-
Notifications
You must be signed in to change notification settings - Fork 162
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
Conversation
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
✅ Deploy Preview for docs-kargo-io canceled.
|
internal/directives/simple_engine.go
Outdated
@@ -13,6 +15,8 @@ import ( | |||
"github.com/akuity/kargo/internal/credentials" | |||
) | |||
|
|||
var forbiddenStepAliasRegex = regexp.MustCompile(`^step-\d+$`) |
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.
Maybe better to make this publicly accessible and have the webhook depend on it?
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 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.
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.
Fixed in 185a14f
Codecov ReportAttention: Patch coverage is
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. |
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
1f39dc3
to
9ba5acc
Compare
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.