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

return err from batchOnboardNewTokenForRepos #21589

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

MadhavJivrajani
Copy link
Contributor

@MadhavJivrajani MadhavJivrajani commented Mar 31, 2021

  • To exit HMAC reconciler with non-zero error code on non-recoverable error
    • Non-zero exit takes place through handleConfigUpdate() in main() using .Fatal()

Fix #21171

- done to exit HMAC reconciler with non-zero error code on non-recoverable error

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 31, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @MadhavJivrajani. Thanks for your PR.

I'm waiting for a kubernetes 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.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 31, 2021
@k8s-ci-robot k8s-ci-robot added area/prow Issues or PRs related to prow area/prow/hook Issues or PRs related to prow's hook component sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Mar 31, 2021
Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

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

thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, MadhavJivrajani

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2021
@k8s-ci-robot k8s-ci-robot merged commit a7d612a into kubernetes:master Mar 31, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Mar 31, 2021
@@ -425,6 +425,7 @@ func (c *client) batchOnboardNewTokenForRepos() error {
} else {
delete(c.currentHMACMap, repo)
}
return err
Copy link
Member

Choose a reason for hiding this comment

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

Erroring out early here rather than completing the onboarding for other tokens is problematic. If the onboarding isn't completed for some reason we need to revert the hmac changes.

Rather than erroring out early I'd expect the error to be recorded, but for execution to continue. We should only report this error after cleanup has completed. The same applies to any possible validation errors from line 416.

Copy link
Member

Choose a reason for hiding this comment

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

I had that thought as well but then saw the prior art where we exit early if the validation fails so assumed it was fine

Copy link
Member

Choose a reason for hiding this comment

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

No worries. I'll make a fix PR in a bit.

Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/prow/hook Issues or PRs related to prow's hook component area/prow Issues or PRs related to prow cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMAC reconciler does not exit non-zero on failure => Postsubmit succeeds on failure.
4 participants