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

Require ko:// prefix on all references #158

Closed
mattmoor opened this issue Apr 30, 2020 · 4 comments · Fixed by #162
Closed

Require ko:// prefix on all references #158

mattmoor opened this issue Apr 30, 2020 · 4 comments · Fixed by #162

Comments

@mattmoor
Copy link
Collaborator

mattmoor commented Apr 30, 2020

Deprecate and eliminate the use of unqualified references (e.g. no ko://).

The initial heuristic-based approach was a bit too clever, and led to a lot of undesirable failure modes, which are really confusing to new users. With this change we will start to warn whenever we publish an image for an unprefixed import path, and stop building them in a coming release.

Dropping the heuristic approach will also speed up builds because the heuristic has gotten more expensive with the adoption of go modules.

The plan:

  1. Whenever we build an import path without ko:// emit a warning linking to this issue.
  2. Cut a 0.5 release
  3. Drop the warning and stop supporting ko://

To suppress this warning

Prefix the import path with ko://, e.g.

  image: ko:/google/ko/cmd/ko

UPDATED to improve the main issue body. Original below. 👇
@imjasonh added support for ko:// prefixed references a while ago, and I feel like there's been fairly steady adoption of this as projects have matured and folks have been bitten by the old guard heuristics (😬 mea culpa).

I propose we start to emit warnings when we are fed references that ARE supported references, but that don't use ko:// and cut a new release.

cc @jonjohnsonjr @dprotaso

@n3wscott
Copy link
Contributor

n3wscott commented May 1, 2020

I am +1 inside of yaml, but publish should still take a path without ko://.

This will speed up some of the path searching too if you can skip over non-ko:// strings.

@vaikas
Copy link
Contributor

vaikas commented May 1, 2020

Anything that prevents the container image that we're trying to launch being something like github.com/vaikas/dump would be great imho.

@mattmoor
Copy link
Collaborator Author

mattmoor commented May 3, 2020

While we are at it, let's deprecate :root as the default base and switch to :nonroot.

@mattmoor
Copy link
Collaborator Author

mattmoor commented May 3, 2020

I'm going to try to knock these off this morning. I'll open a proper issue for the base outlining things so I can include it in the deprecation notice.

@mattmoor mattmoor changed the title Let's deprecate non-strict references Require ko:// prefix on all references May 3, 2020
mattmoor added a commit to mattmoor/ko that referenced this issue May 3, 2020
mattmoor added a commit to mattmoor/ko that referenced this issue May 3, 2020
mattmoor added a commit that referenced this issue May 4, 2020
* Add a deprecation notice when `defaultBaseImage` is not specified.

Related: #160

* Add a deprecation notice when `ko://` is not specified.

Related: #158

* Add a sample import path.
mattmoor added a commit to mattmoor/ko that referenced this issue May 4, 2020
dibyom added a commit to dibyom/triggers that referenced this issue Jul 28, 2020
ko will start requiring this prefix in an upcoming release per ko-build/ko#158

Signed-off-by: Dibyo Mukherjee <[email protected]>
tekton-robot pushed a commit to tektoncd/triggers that referenced this issue Jul 31, 2020
ko will start requiring this prefix in an upcoming release per ko-build/ko#158

Signed-off-by: Dibyo Mukherjee <[email protected]>
mattmoor added a commit to mattmoor/ko that referenced this issue Sep 24, 2020
mattmoor added a commit that referenced this issue Sep 24, 2020
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.

3 participants