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

Continuing to struggle with ko v0.5.0 using ko:// and --preserve-import-paths #164

Closed
bobcatfish opened this issue May 6, 2020 · 10 comments

Comments

@bobcatfish
Copy link

I thought that #163 had fixed our issue tektoncd/plumbing#370 but it looks like I didn't actually try it properly :(

When I try to run ko for tektoncd/pipelines, I get this error:

2020/05/06 08:48:37 error processing import paths in "config/webhook.yaml": error resolving image references: repository can only contain the runes `abcdefghijklmnopqrstuvwxyz0123456789_-./`: christiewilson-catfactory/ko:/tektoncd/pipeline/cmd/webhook

I have tekton pipelines checked out at:
tektoncd/pipeline@4280425

From the root folder (pipeline) I run:

ko resolve --preserve-import-paths -t v20200504-7bbc7ebf3b -f config/

When I replace --preserve-import-paths with -B it works.

I've tried both of these ways to install the version of ko that should have the fix:

# installing v0.5.0
go get github.com/google/ko/cmd/[email protected]

# trying to be sure i get exactly the commit with the fix
go get github.com/google/ko/cmd/ko@ea2beac5751c62af0c019f60145c4bc26e094081
@bobcatfish
Copy link
Author

But apparently if i do go get github.com/google/ko/cmd/ko, then the command works. I am so confused.

@mattmoor
Copy link
Collaborator

mattmoor commented May 6, 2020

@imjasonh Do you think it's worth cutting 0.5.1 just to rule out our futzing with 0.5.0?

@imjasonh
Copy link
Member

imjasonh commented May 6, 2020

Yeah that sounds fine. Maybe the old 0.5 got cached somewhere?

@mattmoor
Copy link
Collaborator

mattmoor commented May 6, 2020

alright, I'll try that now

@mattmoor
Copy link
Collaborator

mattmoor commented May 6, 2020

@bobcatfish
Copy link
Author

Some relevant docs on "go get" behavior that may be at the root of why this isnt always behaving the same way: https://golang.org/cmd/go/#hdr-Legacy_GOPATH_go_get

@imjasonh
Copy link
Member

@mattmoor the goreleaser task failed with

   ⨯ release failed after 186.36s error=github/gitlab/gitea releases: failed to publish artifacts: failed to upload ko_0.5.0_Linux_x86_64.tar.gz after 1 tries: POST https://uploads.github.com/repos/google/ko/releases/26149970/assets?name=ko_0.5.0_Linux_x86_64.tar.gz: 422 Validation Failed [{Resource:ReleaseAsset Field:name Code:already_exists Message:}]

(it thinks it's trying to release v0.5.0 again?)

But the tag and GH release for 0.5.1 exists. Is there anything else to do here, besides just close this bug?

It's blocking Tekton's next attempt to ko://-prefix everything: tektoncd/pipeline#2675

@mattmoor
Copy link
Collaborator

That's odd, the release is empty. I never tagged 0.5.2, which IIRC has a single additional change that been working for me. We can give that a shot?

@mattmoor
Copy link
Collaborator

mattmoor commented May 31, 2020

@imjasonh @bobcatfish @afrittoli here is what we're using in our Prow config:
https:/knative/test-infra/blob/master/images/prow-tests/Dockerfile#L67

(thanks to @chizhg for the pointer)

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

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

No branches or pull requests

3 participants