-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ko builder sideload displays both correct and incorrect tag when using default tag policy #6835
Comments
halvards
added a commit
to halvards/skaffold
that referenced
this issue
Nov 11, 2021
Display the expected tag after successfully building a ko image, for both sideloaded and published images. Also handles the `tagPolicy.sha256` scenarios. Fixes: GoogleContainerTools#6835 Tracking: GoogleContainerTools#6041
halvards
added a commit
to halvards/skaffold
that referenced
this issue
Nov 11, 2021
Display the expected tag after successfully building a ko image, for both sideloaded and published images. Also handles the `tagPolicy.sha256` scenarios. Fixes: GoogleContainerTools#6835 Tracking: GoogleContainerTools#6041
The final image ref also seems to be missing the |
That may have been me editing out the project ID... :-) |
halvards
added a commit
to halvards/skaffold
that referenced
this issue
Dec 3, 2021
With this change, the `ko` builder no longer prints the image name to `stdout` by default. Originally, this was added to the `ko` builder to mimic the behavior of the `ko` CLI. Other Skaffold image builders do not print the image name in this way. The reason this is useful for existing `ko` CLI users is that some documented workflows rely on capturing the image name from `stdout`, see https://github.com/google/ko/blob/v0.9.3/README.md#build-an-image After some investigation, the better option seems to be to rely on the existing `--quiet` and `--output` Skaffold flags to format the output of the image name(s). This change also updates the `ko` builder documentation to show existing `ko` CLI users how to capture the image name by providing an appropriate Go template to `--output`. Fixes: GoogleContainerTools#6835 Closes: GoogleContainerTools#6836 Tracking: GoogleContainerTools#6041
halvards
added a commit
to halvards/skaffold
that referenced
this issue
Dec 3, 2021
With this change, the `ko` builder no longer prints the image name to `stdout` by default. Originally, this was added to the `ko` builder to mimic the behavior of the `ko` CLI. Other Skaffold image builders do not print the image name in this way. The reason this is useful for existing `ko` CLI users is that some documented workflows rely on capturing the image name from `stdout`, see https://github.com/google/ko/blob/v0.9.3/README.md#build-an-image After some investigation, the better option seems to be to rely on the existing `--quiet` and `--output` Skaffold flags to format the output of the image name(s). This change also updates the `ko` builder documentation to show existing `ko` CLI users how to capture the image name by providing an appropriate Go template to `--output`. Fixes: GoogleContainerTools#6835 Closes: GoogleContainerTools#6836 Tracking: GoogleContainerTools#6041
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Using the ko builder with the default tag policy results in the output displaying the correct tag name.
Actual behavior
The image builds correctly, and the correct tag is applied.
However, using the default tag policy results in the output displaying both the correct tag name and an image name with the wrong tag.
Using the
sha256
tag policy results in the correct tag being displayed.Information
Build from
main
at commit a9d7152Output:
The image
australia-southeast1-docker.pkg.dev//default/skaffold-ko:v1.34.0-42-ga9d715237-dirty
is correctly built and exists in the local Docker daemon after the build is done.The text was updated successfully, but these errors were encountered: