Skip to content

refactor: extract bootstrapAnnotationKey helper function#233

Open
Shreya2005-2005 wants to merge 1 commit intokubernetes-sigs:mainfrom
Shreya2005-2005:refactor/bootstrap-annotation-key-helper
Open

refactor: extract bootstrapAnnotationKey helper function#233
Shreya2005-2005 wants to merge 1 commit intokubernetes-sigs:mainfrom
Shreya2005-2005:refactor/bootstrap-annotation-key-helper

Conversation

@Shreya2005-2005
Copy link
Copy Markdown
Contributor

Description

The annotation key format string for bootstrap completion tracking was
duplicated in isBootstrapCompleted and markBootstrapCompleted in
internal/controller/node_controller.go. Extract into a single
bootstrapAnnotationKey(ruleName string) helper function to prevent
silent divergence if one is updated independently.

Related Issue

Fixes #232

Type of Change

/kind cleanup

Testing

  • go build ./... passes cleanly
  • make lint passes with 0 issues

Checklist

  • make test passes
  • make lint passes

Does this PR introduce a user-facing change?

NONE

Duplicate fmt.Sprintf format string existed in isBootstrapCompleted
and markBootstrapCompleted. Extract into bootstrapAnnotationKey(ruleName)
to prevent silent divergence if one is updated independently.

Fixes kubernetes-sigs#232

Signed-off-by: Shreya2005-2005 <bhakatmistu2005@gmail.com>
@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Invalid commit message issues detected

Invalid commit messages

Keywords which can automatically close issues and hashtag(#) mentions are not allowed.

  • 253baed refactor: extract bootstrapAnnotationKey helper function

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. I understand the commands that are listed here.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 10, 2026

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit 253baed
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/6a00139b7fe3c3000804eec0

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @Shreya2005-2005. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 10, 2026
@Shreya2005-2005
Copy link
Copy Markdown
Contributor Author

@ajaysundark review it whenever you get a chance

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. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: extract bootstrap annotation key format string into a helper function

2 participants