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

Cannot reference non-HEAD or untagged commits #1452

Closed
mgoodness opened this issue Aug 16, 2019 · 1 comment · Fixed by #1859
Closed

Cannot reference non-HEAD or untagged commits #1452

mgoodness opened this issue Aug 16, 2019 · 1 comment · Fixed by #1859
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mgoodness
Copy link
Contributor

I believe #857 introduced a regression that prevents the use of specific GitHub commits as references unless they are either the HEAD of a branch or tagged. For example, building from the following kustomization.yaml succeeds because commit df7ed659a7b6280bb28838e0f87d54de435afe83 is tagged v0.1 in the repo.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - https://github.com/mgoodness/sample-app-deploy/base?ref=df7ed659a7b6280bb28838e0f87d54de435afe83

However, commit 769f3aae20c1527e2ebc0fbbf89cc3a6e71e8d23 is neither a HEAD nor tagged, so the following build fails.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - https://github.com/mgoodness/sample-app-deploy/base?ref=769f3aae20c1527e2ebc0fbbf89cc3a6e71e8d23

The root cause is that GitHub doesn't allow fetching commits by hash.

Using specific commits is considered by some a best practice, so we should find away to re-enable it.

@mgoodness mgoodness changed the title Cannot reference non-HEAD commit Cannot reference non-HEAD or untagged commits Aug 16, 2019
@Liujingfang1 Liujingfang1 added the kind/bug Categorizes issue or PR as related to a bug. label Aug 26, 2019
@kinghajj
Copy link

This bug prevents us from updating past v2.0.3. Are there any plans to support this workflow again? We could work around this by pushing tags on the specific commits we reference, but that's not as secure, since Github won't let you prevent tags from being modified. Perhaps there could be two Cloner implementations, the post-#857 one and the pre-#857 one, and a command line flag used to enable the previous behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants