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

Tags immutability should be enforced by PR tests #5221

Open
danielvegamyhre opened this issue May 5, 2023 · 7 comments
Open

Tags immutability should be enforced by PR tests #5221

danielvegamyhre opened this issue May 5, 2023 · 7 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. sig/release Categorizes an issue or PR as relevant to SIG Release.

Comments

@danielvegamyhre
Copy link
Member

I recently submitted a PR updating the image digest for a tag: #5220

However, I noticed the image digest for registry.k8s.io/jobset/jobset:v0.1.1 never updated, and after discussion with @BenTheElder I learned tags are immutable.

I think this should be enforced on PRs via tests, rather than silently failing in the image promotion process, in order to avoid confusion.

/kind bug

@danielvegamyhre danielvegamyhre added the sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. label May 5, 2023
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 5, 2023
@BenTheElder
Copy link
Member

cc @kubernetes/release-engineering

/sig release

@k8s-ci-robot k8s-ci-robot added the sig/release Categorizes an issue or PR as relevant to SIG Release. label May 5, 2023
@BenTheElder
Copy link
Member

This also means that we have manifests that don't match reality and will never be fixed (!)

We should probably revert any tag mutations once we prevent introducing new ones.

I think the only robust way to do this is to parse the full config before and after the PR commits and diff the config in memory, git diff can be misleading so just grepping the diff will cause false positives when config is modified in otherwise acceptable ways (e.g. inserting a new image into a file).

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2024
@xmudrii
Copy link
Member

xmudrii commented Jan 19, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2024
@BenTheElder
Copy link
Member

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Apr 18, 2024
@BenTheElder
Copy link
Member

/help
Ideally we'd have a parser for these configs implemented (see also https://github.com/kubernetes-sigs/promo-tools) and validate that the before/after state of a PR does not involve mutating a tag.

You can use git variables from https://docs.prow.k8s.io/docs/jobs/#job-environment-variables

@k8s-ci-robot
Copy link
Contributor

@BenTheElder:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help
Ideally we'd have a parser for these configs implemented (see also https://github.com/kubernetes-sigs/promo-tools) and validate that the before/after state of a PR does not involve mutating a tag.

You can use git variables from https://docs.prow.k8s.io/docs/jobs/#job-environment-variables

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. sig/release Categorizes an issue or PR as relevant to SIG Release.
Projects
None yet
Development

No branches or pull requests

5 participants