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(controller): use directives engine for Stage health checks #2580

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Sep 26, 2024

No description provided.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Copy link

netlify bot commented Sep 26, 2024

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

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

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 35.84906% with 34 lines in your changes missing coverage. Please review.

Project coverage is 51.03%. Comparing base (60ca5b3) to head (43fa0c5).

Files with missing lines Patch % Lines
internal/controller/stages/stages.go 50.00% 15 Missing and 1 partial ⚠️
internal/controller/promotions/promotions.go 0.00% 11 Missing ⚠️
api/v1alpha1/promotion_types.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2580      +/-   ##
==========================================
- Coverage   51.09%   51.03%   -0.07%     
==========================================
  Files         281      281              
  Lines       20713    20757      +44     
==========================================
+ Hits        10583    10593      +10     
- Misses       9476     9509      +33     
- Partials      654      655       +1     

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

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco force-pushed the stage-engine-health-checks branch from 9dbb4a3 to 43fa0c5 Compare September 26, 2024 12:23
// FinishedAt is the time when the promotion was completed.
FinishedAt *metav1.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"`
}

// HealthCheckStep describes a health check directive which can be executed by
// a Stage to verify the health of a Promotion result.
type HealthCheckStep struct {
Copy link
Member

Choose a reason for hiding this comment

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

I think we could probably make the engine use this type directly instead of directive.HealthCheckStep. The same can probably be said for promotion steps.

I can handle that after this PR is merged since I am still actively working on the directives package and want to avoid creating merge conflicts over there.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco added this to the v0.9.0 milestone Sep 26, 2024
@hiddeco hiddeco marked this pull request as ready for review September 26, 2024 17:01
@hiddeco hiddeco requested a review from a team as a code owner September 26, 2024 17:01
Comment on lines +283 to +284
directivesEngine := directives.NewSimpleEngine(credentialsDB, kargoMgr.GetClient(), argoCDClient)
promoMechanisms := promotion.NewMechanisms(kargoMgr.GetClient(), argoCDClient, credentialsDB)
Copy link
Member

Choose a reason for hiding this comment

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

I actually love seeing the two of these side-by-side here and knowing half of it goes away soon. 😄

@hiddeco hiddeco added this pull request to the merge queue Sep 26, 2024
Merged via the queue into akuity:main with commit eefc812 Sep 26, 2024
21 checks passed
@hiddeco hiddeco deleted the stage-engine-health-checks branch September 26, 2024 18:45
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.

2 participants