Skip to content

Conversation

@Rishab87
Copy link
Contributor

@Rishab87 Rishab87 commented Oct 3, 2025

What this PR does / why we need it:
This PR adds a post release workflow, which helps in creating a PR for merging back to main & promoting images with kpromo. This needs to be run manually after pre release is created and images have been built on prow. (For making this workflow run automatically, one approach we can take is create a PR in test-infra repo which curls a github API when image build is completed after which this workflow is triggered triggered, open to suggestions and other possible approaches).

Test PR: Rishab87#16

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
does not changes

Which issue(s) this PR fixes: (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged)
Related to #2756

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Rishab87
Once this PR has been reviewed and has the lgtm label, please assign mrueg for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 3, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Instrumentation Oct 3, 2025
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 3, 2025
Comment on lines 37 to 50
- name: Create image promotion PR
run: |
kpromo pr --fork=${{ github.actor }} -i \
--project=kube-state-metrics \
--tag=${{ steps.extract_tag.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I only see the second part of this workflow in the test run. Were you able to test this out on your local?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I tested this exact command when I was releasing 2.17.0 locally. I think running it again would create a PR in k8s.io. Should I still test it again? Just wanted to confirm here if it's not a problem if I create a PR in k8s.io for testing this out again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it create a PR earlier as well (when you were testing it)? The PR can be closed, so it's fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it did create a PR earlier, I was running it for promoting images for v2.17.0.

This command can't be run for v2.18.0 since its image is not built yet obviously.

FATA growing manifest with image filter [] and tag [v2.18.0]: no images survived filtering; double-check your --filter_* flag(s) for typos 

I tried running it for prev version (v2.17.0) here:
https://github.com/Rishab87/kube-state-metrics/actions/runs/19295972264/job/55177889064
and got:

level=info msg="No changes detected in the promoter images list, exiting without changes"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the scope of the GITHUB_TOKEN work outside of its own repository for PRs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I just checked it's repo scoped, I think then to create a PR in k8s.io we need PAT of that repo. Should I remove this step or should we include the PAT of k8s.io

@Rishab87 Rishab87 force-pushed the post-release-workflow branch from 7bff6e1 to c31ca88 Compare November 12, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

4 participants