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

skopeo-copy task fails with error "Exactly two arguments expected". #1117

Open
dcommisso opened this issue Dec 15, 2022 · 9 comments
Open

skopeo-copy task fails with error "Exactly two arguments expected". #1117

dcommisso opened this issue Dec 15, 2022 · 9 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@dcommisso
Copy link
Contributor

dcommisso commented Dec 15, 2022

Expected Behavior

skopeo-copy task here properly works without errors

Actual Behavior

skopeo-copy task fails with error Exactly two arguments expected when using multiple source and destination image registries.

Steps to Reproduce the Problem

  1. Create a file named url.txt containing all the source and destination image registries URL seperated by a space. Each set of images should be written in the new line.
  2. Create a configmap using this file:
    kubectl create ConfigMap image-configmap --from-file=url.txt
    
  3. Create a TaskRun referring the configmap:
    apiVersion: tekton.dev/v1beta1
    kind: TaskRun
    metadata:
      name: skopeo-run
    spec:
      serviceAccountName: secret-service-account
      taskRef:
        name: skopeo-copy
      workspaces:
      - name: images-url
        configmap:
          name: image-configmap
    

Additional Info

The problem is the double quotes in "$cmd" here

The reason is that double quotes prevents word splitting and an argument enclosed in double quotes presents itself as a single word, even if it contains whitespace separators. Therefore skopeo gets just one argument and complains with the error message Exactly two arguments expected.

The solution is to remove the double quotes from $cmd parameter. I will open a PR to fix this.

dcommisso added a commit to dcommisso/catalog that referenced this issue Dec 15, 2022
dcommisso added a commit to dcommisso/catalog that referenced this issue Dec 15, 2022
@dcommisso dcommisso mentioned this issue Dec 15, 2022
12 tasks
@tekton-robot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 15, 2023
@tekton-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 14, 2023
@tekton-robot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@piyush-garg
Copy link
Contributor

/reopen

@tekton-robot
Copy link

@piyush-garg: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot reopened this Jul 28, 2023
@piyush-garg
Copy link
Contributor

/remove-lifecycle rotten

@tekton-robot tekton-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jul 28, 2023
@piyush-garg
Copy link
Contributor

/kind bug
/assign @dcommisso

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 28, 2023
dcommisso added a commit to dcommisso/catalog that referenced this issue Aug 23, 2023
dcommisso added a commit to dcommisso/catalog that referenced this issue Aug 25, 2023
@tekton-robot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
Status: In Progress
Development

No branches or pull requests

3 participants