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(verification): add promotion verification mechanisms based on rollouts analysis templates #1259

Merged
merged 12 commits into from
Dec 20, 2023

Conversation

krancour
Copy link
Member

@krancour krancour commented Dec 9, 2023

Fixes #1159

  • Mimics a subset of Rollouts resource types, similar to what was done in use a minimal subset of argo cd resource types #989
  • Adds Phase field to StageStatus to establish a more concrete Stage lifecycle.
  • Adds Verification field to Stage to define AnalysisTemplate-based promotion verification processes.
  • Makes Stage reconciliation loop kick off AnalysisRuns
  • Factors AnalysisRun results into Stage verification
  • Listens for completed AnalysisRuns to enqueue corresponding Stage for reconciliation

About 50% of this is codegen, but the PR is large regardless.

@jessesuen could I suggest that we tackle reviewing this in layers? Changes to the Kargo resource types are isolated to commit 4e35b64. If you zeroed in on just that one commit for now, I think we'd be able to work through any inadvertent misalignment between what you had in mind and what I've implemented.

Copy link

netlify bot commented Dec 9, 2023

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

Name Link
🔨 Latest commit bbd89bf
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/6581e91089f406000961fc8f
😎 Deploy Preview https://deploy-preview-1259.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.

@krancour krancour marked this pull request as draft December 9, 2023 01:14
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

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

Comparison is base (7021905) 49.41% compared to head (bbd89bf) 46.99%.
Report is 14 commits behind head on main.

Files Patch % Lines
...ler/rollouts/api/v1alpha1/zz_generated.deepcopy.go 4.92% 644 Missing and 13 partials ⚠️
api/v1alpha1/zz_generated.deepcopy.go 0.00% 91 Missing and 1 partial ⚠️
internal/controller/analysis/analysis_runs.go 6.81% 78 Missing and 4 partials ⚠️
internal/controller/stages/verification.go 77.77% 72 Missing and 2 partials ⚠️
...ntroller/rollouts/api/v1alpha1/analysis_helpers.go 53.84% 12 Missing ⚠️
internal/controller/stages/stages.go 84.48% 9 Missing ⚠️
internal/kubeclient/indexer.go 72.72% 8 Missing and 1 partial ⚠️
...controller/rollouts/api/v1alpha1/analysis_types.go 0.00% 7 Missing ⚠️
internal/controller/promotions/promotions.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1259      +/-   ##
==========================================
- Coverage   49.41%   46.99%   -2.43%     
==========================================
  Files         128      134       +6     
  Lines        9892    11225    +1333     
==========================================
+ Hits         4888     5275     +387     
- Misses       4844     5767     +923     
- Partials      160      183      +23     

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

@krancour krancour force-pushed the krancour/analysis branch 16 times, most recently from b760fc9 to bf0dc23 Compare December 16, 2023 00:06
@krancour krancour marked this pull request as ready for review December 16, 2023 00:17
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

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

Awesome work!

api/v1alpha1/stage_types.go Show resolved Hide resolved
cmd/controlplane/controller.go Show resolved Hide resolved
internal/controller/analysis/analysis_runs.go Show resolved Hide resolved
internal/controller/promotions/promotions.go Show resolved Hide resolved
internal/controller/stages/verification.go Show resolved Hide resolved
@krancour krancour added this pull request to the merge queue Dec 20, 2023
Merged via the queue into akuity:main with commit b5cca09 Dec 20, 2023
14 of 16 checks passed
@krancour krancour deleted the krancour/analysis branch December 20, 2023 18:14
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.

epic: support user-defined analyses to gate promotion success
2 participants