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

builder implementation of outputs_image_ref_to for custom build scripts that want to compute their own tag #3766

Merged
merged 1 commit into from Sep 11, 2020

Conversation

nicks
Copy link
Member

@nicks nicks commented Sep 11, 2020

Hello @landism,

Please review the following commits I made in branch nicks/custombuilder:

82d91d8 (2020-09-11 15:28:27 -0400)
builder implementation of outputs_image_ref_to for custom build scripts that want to compute their own tag

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@nicks nicks requested a review from landism September 11, 2020 19:28
@nicks
Copy link
Member Author

nicks commented Sep 11, 2020

this is the build-engine side of #3760

_, err := f.cb.Build(f.ctx, refSetFromString("gcr.io/foo/bar"), cb)
require.NotNil(t, err)
assert.Contains(t, err.Error(),
fmt.Sprintf("Output image ref in file %s was invalid: could not parse ref docker.io/library/999", f.tdf.JoinPath("ref.txt")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe ParseNamedTagged should return the original string in the error. If I got this error I'd think it pretty fishy that it's telling me it can't parse the value in my file but not showing me the actual value in the file. Probably worth %qing, too, to get a better error when the file is empty.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point! done

@nicks nicks merged commit 37ad092 into master Sep 11, 2020
@nicks nicks deleted the nicks/custombuilder branch September 11, 2020 22:08
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 this pull request may close these issues.

None yet

2 participants