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

Put back the namespace to reconcile list if a resource cant be created for… #2118

Closed
wants to merge 2 commits into from

Conversation

jkhelil
Copy link
Contributor

@jkhelil jkhelil commented Apr 18, 2024

… this namespace

Changes

Put back the namespace to the reconcile list if a resource creation is failing for this namespace, so we continue reconciling even if an error happens when creating a resource one namespace.

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

Put back the namespace to the reconcile list if a resource creation is failing for this namespace, so we continue reconciling even if an error happens when creating a resource one namespace.

@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 18, 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 18, 2024
@jkhelil jkhelil changed the title Add the namespace to reconcile list if a resource cant be created for… [WIP] Add the namespace to reconcile list if a resource cant be created for… Apr 19, 2024
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 19, 2024
@jkhelil jkhelil changed the title [WIP] Add the namespace to reconcile list if a resource cant be created for… [WIP] Put back the namespace to reconcile list if a resource cant be created for… Apr 22, 2024
@jkhelil jkhelil changed the title [WIP] Put back the namespace to reconcile list if a resource cant be created for… Put back the namespace to reconcile list if a resource cant be created for… Apr 22, 2024
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2024
@jkhelil jkhelil changed the title Put back the namespace to reconcile list if a resource cant be created for… [WIP]Put back the namespace to reconcile list if a resource cant be created for… Apr 22, 2024
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2024
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 22, 2024
@jkhelil jkhelil changed the title [WIP]Put back the namespace to reconcile list if a resource cant be created for… Put back the namespace to reconcile list if a resource cant be created for… Apr 22, 2024
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2024
@jkhelil
Copy link
Contributor Author

jkhelil commented Apr 24, 2024

@jkandasa @piyush-garg can i have a first rview here please ?
thank you

@jkandasa
Copy link
Member

/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 24, 2024
return fmt.Errorf("failed to ensure ca bundles presence in namespace %s, %w", ns.Name, err)
logger.Errorf("failed to ensure ca bundles presence in namespace %s: %v", ns.Name, err)
if err = r.AddNsToReconcileOnError(ctx, &ns); err != nil {
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.

@jkhelil When we return from the loop on error on a specific namespace issue, we fail to reconcile further namespaces until we fix the error on the specific namespace. So IMHO, we can continue to proceed with further namespaces, even though we see error on a namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @jkandasa thats why we continue juste after the check. here we return from AddNsToReconcileOnError wich is removing the label on the namespace on etcd. so if something is failing there, we dont continue otherwise the namespace will be considered as reconciled without having the prerequisite resources.

Copy link
Member

Choose a reason for hiding this comment

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

we return from AddNsToReconcileOnError wich is removing the label on the namespace on etcd. so if something is failing there, we dont continue

@jkhelil I meant this

Copy link
Contributor

Choose a reason for hiding this comment

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

I did not get this logic, we are not adding the label, untill we are reaching the end of this function, which means everything is created.

I think what we need is more checks whether the namespace needs to be reonciled

@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/openshift/tektonconfig/rbac.go 0.0% 2.9% 2.9

@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/openshift/tektonconfig/rbac.go 0.0% 2.9% 2.9

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2024
@jkhelil jkhelil closed this May 27, 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. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants