Send git commit information as service message from ArgoCD steps#1749
Merged
sathvikkumar-octo merged 9 commits intomainfrom Feb 11, 2026
Merged
Send git commit information as service message from ArgoCD steps#1749sathvikkumar-octo merged 9 commits intomainfrom
sathvikkumar-octo merged 9 commits intomainfrom
Conversation
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
eddymoulton
approved these changes
Feb 4, 2026
Contributor
eddymoulton
left a comment
There was a problem hiding this comment.
Looks good! Just some minor comments to consider.
I'd recommend setting up the Server side part of this too before we merge it in just in case we find something we didn't think of.
...alamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionHelmTests.cs
Outdated
Show resolved
Hide resolved
eddymoulton
reviewed
Feb 6, 2026
- One service message per application (not per source) - Sources serialized as JSON array with commit SHA and source index - Replaced/patched files tracked per-source (architecturally correct) - Deployment ID extracted from server context (not in payload) - Shared ProcessApplicationResult class across conventions - Reporter injected via DI and called after processing
50e3d8d to
530b7a3
Compare
...alamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionHelmTests.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs
Outdated
Show resolved
Hide resolved
- Add CreateConvention() helpers in test classes - Replace 29 duplicate constructor calls with helpers - Allows easy customization via optional parameters
- Construct result object inline with all properties - Remove intermediate local variables - Cleaner, more readable code
There was a problem hiding this comment.
Pull request overview
Adds a new ArgoCD deployment service message to expose per-source Git commit SHAs (and related source metadata) for ArgoCD manifest/image update steps.
Changes:
- Introduces
argocd-deploymentservice message constants and a newArgoCDDeploymentReporterthat emits deployment service messages. - Captures the Git commit SHA after committing ArgoCD manifest/image changes and threads it into a shared
ProcessApplicationResultmodel. - Updates ArgoCD conventions/commands/tests to wire in the reporter and new result model.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| source/Calamari/Kubernetes/SpecialVariables.cs | Adds argocd-deployment service message name/attributes. |
| source/Calamari/ArgoCD/ProcessApplicationResult.cs | New shared result model including per-source commit SHA details. |
| source/Calamari/ArgoCD/Git/RepositoryWrapper.cs | Adds GetCommitSha() helper for retrieving HEAD commit SHA. |
| source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs | Captures commit SHA for manifest updates; reports deployments via reporter. |
| source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs | Captures commit SHA for image updates; reports deployments via reporter. |
| source/Calamari/ArgoCD/Commands/UpdateArgoCDAppManifestsCommand.cs | Wires reporter into manifests convention construction. |
| source/Calamari/ArgoCD/Commands/UpdateArgoCDAppImagesCommand.cs | Wires reporter into images convention construction. |
| source/Calamari/ArgoCD/ArgoCDModule.cs | Registers IArgoCDDeploymentReporter in Autofac. |
| source/Calamari/ArgoCD/ArgoCDDeploymentReporter.cs | New reporter emitting argocd-deployment service messages with serialized source details. |
| source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDApplicationManifestsInstallConventionTests.cs | Updates construction to satisfy new reporter dependency. |
| source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionTest.cs | Updates construction to satisfy new reporter dependency. |
| source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionHelmTests.cs | Updates construction to satisfy new reporter dependency. |
| source/Calamari.Tests/ArgoCD/ArgoCDDeploymentReporterTests.cs | Adds unit tests for reporter service message output/serialization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Show resolved
Hide resolved
eddymoulton
reviewed
Feb 10, 2026
- Changed init properties to constructor parameters - Makes object truly immutable after construction - Updated all call sites to use new constructor signature
flin-8
reviewed
Feb 11, 2026
source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionTest.cs
Show resolved
Hide resolved
flin-8
reviewed
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does not require the corresponding server PR as the service message will be ignored
References MD-1489
Sends a service message per ArgoCD app with all source details
Tested manually with corresponding server PR with image and manifest update ArgoCD steps