Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCS Artifact path handling does not normalise the path. #9958

Closed
3 tasks done
isubasinghe opened this issue Nov 3, 2022 · 0 comments · Fixed by #9959
Closed
3 tasks done

GCS Artifact path handling does not normalise the path. #9958

isubasinghe opened this issue Nov 3, 2022 · 0 comments · Fixed by #9959
Labels
P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority type/bug

Comments

@isubasinghe
Copy link
Member

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

Paths with '..' in them are not currently handled in the GCS driver. We should not error out if a key contains '..' in its path, we should normalise that key first.

Version

4f1451e

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: input-artifact-gcs-
spec:
  entrypoint: input-artifact-gcs-example
  templates:
    - name: input-artifact-gcs-example
      inputs:
        artifacts:
          - name: my-art
            path: /my-artifact
            gcs:
              bucket: relative-paths-gcs
              # key could be either a file or a directory.
              key: b/ba/../text_v2.txt
              # serviceAccountKeySecret is a secret selector.
              # It references the k8s secret named 'my-gcs-credentials'.
              # This secret is expected to have have the key 'serviceAccountKey',
              # containing the base64 encoded Google Cloud Service Account Key (json)
              # to the bucket.
              #
              # If it's running on GKE, and Workload Identity is used,
              # serviceAccountKeySecret is not needed.
              serviceAccountKeySecret:
                name: pipekit-gcs-creds
                key: serviceAccountKey
      container:
        image: debian:latest
        command: [sh, -c]
        args: ["ls -l /my-artifact"]

Logs from the workflow controller

N/A I will supply the fix myself.

Logs from in your workflow's wait container

N/A I will supply the fix myself.

terrytangyuan pushed a commit that referenced this issue Nov 4, 2022
Signed-off-by: Isitha Subasinghe <isitha@pipekit.io>
@caelan-io caelan-io added the P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority label Nov 7, 2022
sarabala1979 pushed a commit that referenced this issue Nov 29, 2022
Signed-off-by: Isitha Subasinghe <isitha@pipekit.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants