-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat(RHTAPREL-253): queue Releases #366
base: main
Are you sure you want to change the base?
Conversation
999a37d
to
90da749
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach. I reviewed most but not all of the code
Signed-off-by: David Moreno García <[email protected]>
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
==========================================
- Coverage 84.60% 83.55% -1.06%
==========================================
Files 26 26
Lines 1384 1423 +39
==========================================
+ Hits 1171 1189 +18
- Misses 153 172 +19
- Partials 60 62 +2 ☔ View full report in Codecov by Sentry. |
@@ -44,6 +45,35 @@ func NewLoader() ObjectLoader { | |||
return &loader{} | |||
} | |||
|
|||
// GetActiveManagedReleasePipelineRuns returns all active managed Release PipelineRuns for the Application being Released. | |||
// PipelineRuns for the Release passed as an argument are ignored. | |||
func (l *loader) GetActiveManagedReleasePipelineRuns(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*tektonv1.PipelineRunList, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use unfinished or something instead of active? We already have active for the RP/RPA stuff
} | ||
return controller.RequeueAfter(time.Minute, nil) | ||
} | ||
|
||
pipelineRun, err := a.loader.GetManagedReleasePipelineRun(a.ctx, a.client, a.release) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't pipelineRuns.length be 1 if there is already a pipelineRun running for this release? So we don't have to fetch it again?
No description provided.