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

feat: Adding ClusterAnalysisTemplate support for Stage verifications #2673

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

BenHesketh21
Copy link
Contributor

@BenHesketh21 BenHesketh21 commented Oct 6, 2024

closes #2481

ClusterAnalysisTemplate Support

This PR adds the ability to refer to cluster level analysis templates using the clusterScope option (inspired by Argo Rollouts).
The verification process finds all the templates and combines them in one run, in the same way as before but now will also find referenced ClusterAnalysisTemplates if clusterScope is set to true.
The UI has also been updated to show both scopes of analysis templates.

Image from Gyazo

@BenHesketh21 BenHesketh21 requested review from a team as code owners October 6, 2024 22:33
Copy link

netlify bot commented Oct 6, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit c1fd414
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/670313a8391e19000817b21d
😎 Deploy Preview https://deploy-preview-2673.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 6, 2024

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 72e799a
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/67a08b19cf498e00086d9bdd
😎 Deploy Preview https://deploy-preview-2673.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@BenHesketh21 BenHesketh21 changed the title Adding ClusterAnalysisTemplate support for Stage verifications feat: Adding ClusterAnalysisTemplate support for Stage verifications Oct 6, 2024
Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 81.71429% with 32 lines in your changes missing coverage. Please review.

Project coverage is 52.59%. Comparing base (676c644) to head (72e799a).

Files with missing lines Patch % Lines
internal/rollouts/analysis_run_builder.go 66.66% 13 Missing and 2 partials ⚠️
...ternal/api/get_clusteranalysistemplate_v1alpha1.go 82.00% 6 Missing and 3 partials ⚠️
...ntroller/rollouts/api/v1alpha1/analysis_helpers.go 72.22% 5 Missing ⚠️
...rnal/api/list_clusteranalysistemplates_v1alpha1.go 85.71% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2673      +/-   ##
==========================================
+ Coverage   52.47%   52.59%   +0.11%     
==========================================
  Files         292      295       +3     
  Lines       26733    26868     +135     
==========================================
+ Hits        14029    14132     +103     
- Misses      11939    11965      +26     
- Partials      765      771       +6     

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

@krancour krancour modified the milestones: v1.0.0, Post-GA Oct 7, 2024
@krancour
Copy link
Member

krancour commented Nov 7, 2024

@BenHesketh21 thank you for your patience with this. I've finally started reviewing this in earnest. What I've looked at so far looks solid, but this is big and there's a lot more to still look at.

Due to the size and complexity, I'm going to ask @hiddeco and @Marvin9 for help with this. Group effort.

@hiddeco since this touches the Stages reconciler, which you are actively refactoring, controller changes here probably need to be on your radar.

@Marvin9 if you don't mind looking at the UI portions of this, it would be a huge help.

I am happy to review the remainder -- e.g. API server changes, docs, and such.

We will try to get this into v1.1.0, but it cannot be guaranteed.

@BenHesketh21
Copy link
Contributor Author

I've done the main parts of this, just waiting to see what the tabs should look like if they need to be vertical. I've put it in a horizontal one for now as it was the default. But the settings page with different tabs should be working.
585db1c6f8c5777213543506aad39010

@Marvin9
Copy link
Contributor

Marvin9 commented Nov 18, 2024

Sure thing @BenHesketh21 here is how I imagine it would look like considering more settings incoming

image

Let me know if its feasible to you otherwise I would refactor the layout later this PR and for now we can keep the tab as in your screenshot. I will put my comments after we finalise what are we scoping for this PR. Thanks!

@BenHesketh21
Copy link
Contributor Author

@Marvin9 Apologies for the delay, I had to re-do a lot of the controller work due to the refactor, I have moved the tab to be vertical. Let me know what you think.
aadc7f6e7473d077738aad6616f64a72

@Marvin9 Marvin9 self-requested a review December 4, 2024 18:43
@krancour
Copy link
Member

We're trying to wrap up v1.2 work by 12/20 with plans to release after the holidays.

It might be too ambitious for us to get this merged before then. I'm tentatively moving this to the v1.3 milestone, but if it somehow becomes possible to sneak this into v1.2, I won't hesitate.

@krancour krancour modified the milestones: v1.2.0, v1.3.0 Dec 13, 2024
@Marvin9
Copy link
Contributor

Marvin9 commented Jan 2, 2025

Sorry @BenHesketh21 do you mind if I change the design a bit? just adjusting color, spacing and layout.. Other than that I don't think there is anything that should block UI

@BenHesketh21
Copy link
Contributor Author

@Marvin9 Please be my guest. UI isn't my strongest area.

Signed-off-by: Mayursinh Sarvaiya <[email protected]>
Signed-off-by: Mayursinh Sarvaiya <[email protected]>
Signed-off-by: Mayursinh Sarvaiya <[email protected]>
@Marvin9
Copy link
Contributor

Marvin9 commented Jan 3, 2025

Done with the UI and it LGTM! Thanks @BenHesketh21

@krancour it is now ready to review the rest of the things..

Copy link
Contributor

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Implementation-wise, this all looks pretty straight-forward and is a job well done.

I just have a minor suggestion in how a ClusterAnalysisTemplate is referenced, please see my comment.

api/v1alpha1/stage_types.go Outdated Show resolved Hide resolved
@hiddeco hiddeco force-pushed the cluster-analysis-templates branch from b469674 to 72e799a Compare February 3, 2025 09:23
@hiddeco
Copy link
Contributor

hiddeco commented Feb 3, 2025

Tested this end-to-end, and everything is working as expected. Great work @BenHesketh21, and you should be done here.

There appears to be a small issue with the UI however, @Marvin9:

image

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.

Stages should support referencing of ClusterAnalysisTemplates
4 participants