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

controller: reuse the context from reconcile #385

Closed
wants to merge 2 commits into from

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Mar 26, 2024

We dont need to create a new context for each time for a reconcile we should use the ctx from the Reconcile for all the dependent operations.

@Madhu-1
Copy link
Member Author

Madhu-1 commented Mar 26, 2024

/assign @iamniting

Copy link
Contributor

openshift-ci bot commented Mar 26, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Madhu-1
Once this PR has been reviewed and has the lgtm label, please ask for approval from iamniting. For more information see the Kubernetes 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

@Madhu-1
Copy link
Member Author

Madhu-1 commented Mar 26, 2024

@iamniting where i can find details about the test failure?

Copy link
Member

@iamniting iamniting left a comment

Choose a reason for hiding this comment

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

Can we save the context to the recociler func and use it from there. I will save us from passing ctx here and there if the func is on top of reconciler struct.

@Madhu-1
Copy link
Member Author

Madhu-1 commented Mar 26, 2024

Can we save the context to the recociler func and use it from there. I will save us from passing ctx here and there if the func is on top of reconciler struct.

sorry didn't get the suggestion, Do you mean saving as a global variable? if yes, i would not do it as its against the practice. main goal is that we should not create context when reconciling instead we should use the context created for the Reconcile

@Madhu-1
Copy link
Member Author

Madhu-1 commented Mar 26, 2024

Can we save the context to the recociler func and use it from there. I will save us from passing ctx here and there if the func is on top of reconciler struct.

got it now, let me take that in to consideration and do it

Madhu-1 added 2 commits March 26, 2024 16:32
We dont need to create a new context for each
time for a reconcile we should use the ctx
from the Reconcile for all the dependent operations.

Signed-off-by: Madhu Rajanna <[email protected]>
If the CSV is in Failed state, log/return
the complete status field which helps in
understanding what went wrong.

Signed-off-by: Madhu Rajanna <[email protected]>
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

Copy link
Contributor

openshift-ci bot commented Apr 24, 2024

@Madhu-1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/odf-operator-e2e-aws f771169 link true /test odf-operator-e2e-aws
ci/prow/ci-bundle-odf-operator-bundle f771169 link true /test ci-bundle-odf-operator-bundle

Full PR test history. Your PR dashboard.

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

@Madhu-1 Madhu-1 closed this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants