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

Steps specified by digest (w/o command) are broken #1674

Closed
imjasonh opened this issue Dec 3, 2019 · 1 comment · Fixed by #1675
Closed

Steps specified by digest (w/o command) are broken #1674

imjasonh opened this issue Dec 3, 2019 · 1 comment · Fixed by #1675
Assignees

Comments

@imjasonh
Copy link
Member

imjasonh commented Dec 3, 2019

Expected Behavior

Steps can be specified by digest:

steps:
- image: ubuntu@sha256:6e9f67fa63b0323e9a1e587fd71c561ba48a034504fb804fd26fd8800039835d
  args: ['echo', 'hello']

(To experience the broken behavior, make sure you don't also specify a command)

Actual Behavior

Entrypoint lookup fails, because the entrypoint is resolved, and the resulting digest is appended to the input image name, which already has a digest. The result is a string like ubuntu@sha256:6e9...@sha256:6e9..., which is invalid.

Additional Info

The bug is here, which isn't covered by unit tests 🤦‍♂️

cc @mattmoor
/assign

@imjasonh
Copy link
Member Author

imjasonh commented Dec 3, 2019

The error looks like this when a step is specified by digest, without command:

conditions:
  - lastTransitionTime: "2019-12-03T20:29:20Z"
    message: 'Missing or invalid Task default/dep-update: translating Build to Pod:
      Error constructing resulting digest: a digest must contain exactly one ''@''
      separator (e.g. registry/repository@digest) saw: gcr.io/mattmoor-knative/pr-builder-70f5460f789e054d2fe41e583216fb39@sha256:5d7712b713364de13ddab7170b839a6c595af554621349b895a2a4ccbc1ed201@sha256:5d7712b713364de13ddab7170b839a6c595af554621349b895a2a4ccbc1ed201'
    reason: CouldntGetTask
    status: "False"
    type: Succeeded

(note the duplicate @sha256:... in the image name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant