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

[2100] Reconcile a namespace again with missing rolebinding #2101

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

jkhelil
Copy link
Member

@jkhelil jkhelil commented Apr 8, 2024

Changes

fixess #2100

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

None

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Apr 8, 2024
@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 8, 2024
@tekton-robot
Copy link
Contributor

Hi @jkhelil. Thanks for your PR.

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

@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 8, 2024
@jkhelil jkhelil changed the title issue-2100 Reconcile a namespace again with missing rolebinding [2100] Reconcile a namespace again with missing rolebinding Apr 8, 2024
@jkandasa
Copy link
Member

jkandasa commented Apr 8, 2024

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 8, 2024
logger.Infof("RoleBinding %s is missing in namespace: %s, will reconcile again the namespace %s", pipelinesSCCRoleBinding, ns.Name, ns.Name)
namespaces = append(namespaces, ns)
continue
}
return nil, err
Copy link
Contributor

Choose a reason for hiding this comment

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

can we custumize this error a bit also with error fetching rolebinding name from namespace: err

Copy link
Member Author

Choose a reason for hiding this comment

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

yes done thanks @piyush-garg

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I was not clear, error message in the logger was fine, i am saying about this for the error we are returning to the end

Copy link
Member

@jkandasa jkandasa Apr 10, 2024

Choose a reason for hiding this comment

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

If I understand correctly, you are asking to print the error message with the logger on line number 271, then return nil, err.
Am I correct @piyush-garg ?

Copy link
Member Author

@jkhelil jkhelil Apr 10, 2024

Choose a reason for hiding this comment

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

I think @piyush-garg is asking to wrap the error, done now

Copy link
Contributor

Choose a reason for hiding this comment

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

yes to wrap the error and return, not logger

// https://github.com/tektoncd/operator/issues/2100
// Reconcile a namespace again with missing RoleBinding
if errors.IsNotFound(err) {
logger.Infof("RoleBinding %s is missing in namespace: %s, will reconcile again the namespace %s", pipelinesSCCRoleBinding, ns.Name, ns.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

SHould we put this into debug

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@concaf concaf left a comment

Choose a reason for hiding this comment

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

this will make a lot of our headaches go away 🎉 thanks 🙂

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2024
@concaf
Copy link
Contributor

concaf commented Apr 9, 2024

we should also cherry pick this to older releases

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: concaf, jkandasa

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

@jkhelil jkhelil force-pushed the SRVKP-4268 branch 2 times, most recently from 8b3d10f to 09915b6 Compare April 10, 2024 06:43
@piyush-garg
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2024
@tekton-robot tekton-robot merged commit dd35a68 into tektoncd:main Apr 11, 2024
8 checks passed
@khrm
Copy link
Contributor

khrm commented Apr 15, 2024

/cherry-pick release-v0.70.x

@tekton-robot
Copy link
Contributor

@khrm: new pull request created: #2113

In response to this:

/cherry-pick release-v0.70.x

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.

@jkandasa
Copy link
Member

/cherry-pick release-v0.69.x

@tekton-robot
Copy link
Contributor

@jkandasa: new pull request created: #2117

In response to this:

/cherry-pick release-v0.69.x

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.

@piyush-garg piyush-garg linked an issue Apr 25, 2024 that may be closed by this pull request
@jkandasa jkandasa added the kind/bug Categorizes issue or PR as related to a bug. label May 15, 2024
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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Reconcile a namespace again with missing rolebinding
6 participants