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)!: assign a default alias to promotion steps that have none #2881

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

krancour
Copy link
Member

Part of #2845

This PR make the step execution engine assign a default alias to any promotion step that doesn't explicitly have an alias specified.

This makes it such that all steps leave behind outputs in the shared state map where that was only possible before for steps that had explicitly been assigned an alias.

This creates the possibility of modifying some step implementations, in a follow-up, to consult any output they themselves may have produced in a previous execution.

This is braking only insofar as it reserves step aliases of the form ^step-\d+$ for system use.

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Copy link

netlify bot commented Oct 30, 2024

Deploy Preview for docs-kargo-io canceled.

Name Link
🔨 Latest commit 9ba5acc
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/672912f5fa1d0c00082c8912

@@ -13,6 +15,8 @@ import (
"github.com/akuity/kargo/internal/credentials"
)

var forbiddenStepAliasRegex = regexp.MustCompile(`^step-\d+$`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better to make this publicly accessible and have the webhook depend on it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't want to make the webhook dependent on this package or vice versa, but since you've called me out on this, I probably should move this to api/v1alpha1. Pretty much everything already depends on that and that is arguably a better location for this anyway.

Fix incoming.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 185a14f

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 70.58824% with 10 lines in your changes missing coverage. Please review.

Project coverage is 50.01%. Comparing base (f30f66b) to head (185a14f).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/directives/simple_engine.go 28.57% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2881      +/-   ##
==========================================
+ Coverage   49.95%   50.01%   +0.05%     
==========================================
  Files         275      275              
  Lines       24493    24556      +63     
==========================================
+ Hits        12236    12282      +46     
- Misses      11587    11603      +16     
- Partials      670      671       +1     

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

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
@krancour krancour enabled auto-merge October 30, 2024 19:08
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
@krancour krancour force-pushed the krancour/default-alias branch from 1f39dc3 to 9ba5acc Compare November 4, 2024 18:31
@krancour krancour added this pull request to the merge queue Nov 4, 2024
Merged via the queue into akuity:main with commit 8967a6a Nov 4, 2024
15 checks passed
@krancour krancour deleted the krancour/default-alias branch November 4, 2024 18:53
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