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

fix(RHTAPREL-810): reorder operations in ReleasePlan controller #343

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

johnbieren
Copy link
Collaborator

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last. If the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set. With this commit, the matching information is set before, as this does not rely on the application CR existing.

@johnbieren johnbieren requested review from a team, theflockers, ralphbean, davidmogar, mmalina, scoheb, gbenhaim and jinqi7 and removed request for a team January 23, 2024 18:43
@johnbieren
Copy link
Collaborator Author

CI blocked by konflux-ci/e2e-tests#996

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (f114daa) 83.78% compared to head (fa04cae) 83.78%.
Report is 1 commits behind head on main.

Files Patch % Lines
controllers/releaseplan/controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #343   +/-   ##
=======================================
  Coverage   83.78%   83.78%           
=======================================
  Files          30       30           
  Lines        1955     1955           
=======================================
  Hits         1638     1638           
  Misses        245      245           
  Partials       72       72           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mmalina
Copy link
Collaborator

mmalina commented Jan 24, 2024

Is there a bug in Jira for this? Or how was this discovered?

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last. If the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set. With this commit, the matching information is set before, as this does not rely on the application CR existing.

I was confused when reading this at first as I thought "If the application is not found, the reconcile loop errors." is the result of this fix. So I'd suggest to clarify it a bit, e.g. add "currently" or "until now" before the second sentence:

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last.

Currently, if the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set.

With this commit, the matching information is set before, as this does not rely on the application CR existing.

@theflockers
Copy link
Collaborator

Is there a bug in Jira for this? Or how was this discovered?

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last. If the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set. With this commit, the matching information is set before, as this does not rely on the application CR existing.

I was confused when reading this at first as I thought "If the application is not found, the reconcile loop errors." is the result of this fix. So I'd suggest to clarify it a bit, e.g. add "currently" or "until now" before the second sentence:

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last.

Currently, if the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set.

With this commit, the matching information is set before, as this does not rely on the application CR existing.

+1 about the Jira. I think it is important for (eventually) future tracking.

@johnbieren
Copy link
Collaborator Author

johnbieren commented Jan 24, 2024

Is there a bug in Jira for this? Or how was this discovered?

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last. If the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set. With this commit, the matching information is set before, as this does not rely on the application CR existing.

I was confused when reading this at first as I thought "If the application is not found, the reconcile loop errors." is the result of this fix. So I'd suggest to clarify it a bit, e.g. add "currently" or "until now" before the second sentence:

This commit reorders the operations in the ReleasePlan controller so that the application owner reference is set last.

Currently, if the application is not found, the reconcile loop errors. This means that if the application is not yet created, the other operations will not run, and (at this time) no matching information will be set.

With this commit, the matching information is set before, as this does not rely on the application CR existing.

+1 about the Jira. I think it is important for (eventually) future tracking.

I can create a JIRA for it. It was found when I was working on RHTAPBUGS-1113

@mmalina
Copy link
Collaborator

mmalina commented Jan 24, 2024

I can create a JIRA for it. It was found when I was working on RHTAPBUGS-1113

Yeah, so maybe it's enough to reference that bug here and add a note there that you also found this issue and address it in this PR? A separate bug would work as well of course.

@johnbieren johnbieren changed the title fix: reorder operations in ReleasePlan controller fix(RHTAPREL-810): reorder operations in ReleasePlan controller Jan 24, 2024
@johnbieren
Copy link
Collaborator Author

I can create a JIRA for it. It was found when I was working on RHTAPBUGS-1113

Yeah, so maybe it's enough to reference that bug here and add a note there that you also found this issue and address it in this PR? A separate bug would work as well of course.

Updated with https://issues.redhat.com/browse/RHTAPREL-810 reference

@johnbieren
Copy link
Collaborator Author

/test release-service-e2e

This commit reorders the operations in the ReleasePlan controller so
that the application owner reference is set last. If the application is
not found, the reconcile loop errors. This means that if the application
is not yet created, the other operations will not run, and (at this
time) no matching information will be set. With this commit, the
matching information is set before, as this does not rely on the
application CR existing.

Signed-off-by: Johnny Bieren <[email protected]>
Copy link

openshift-ci bot commented Jan 26, 2024

New changes are detected. LGTM label has been removed.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@johnbieren
Copy link
Collaborator Author

/test release-service-e2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants