Skip to content

Cannot reference non-HEAD or untagged commits #1452

Closed
@mgoodness

Description

@mgoodness

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions