Skip to content

Add ArgoCD Step annotation support - #2153

Open
liam-mackie wants to merge 4 commits into
mainfrom
lm/add-argo-step-annotation
Open

liam-mackie wants to merge 4 commits into
mainfrom
lm/add-argo-step-annotation

Conversation

@liam-mackie

Copy link
Copy Markdown
Contributor

This PR adds support for an optional step annotation for ArgoCD applications. By default, with no step annotations, any step may act on the application/source.

namespace Calamari.ArgoCD;

public record DeploymentScope(ProjectSlug Project, EnvironmentSlug Environment, TenantSlug? Tenant)
public record DeploymentScope(ProjectSlug Project, EnvironmentSlug Environment, TenantSlug? Tenant, StepSlug? Step = null)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can the step ever be null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Originally, the step scope was behind a toggle, so it could be, but I spoke to Rob and we decided against a feature toggle (it would have been super confusing to roll forward/back, and isn't really a reversible decision). I don't think there's any cases where it's nullable now, so I'll look at pulling that back out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Taking a look, there's a possibility of the step slug being null only if the process was persisted before slugs, and never edited and saved again. Since Argo steps got released after slugs, this is indeed a nonexistent problem :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants