Skip to content

ArgoCD Steps: Replace directory-separator for Patches/Replaced files directly prior to reporting#1837

Merged
rain-on merged 61 commits intomainfrom
tmm/refactor_paths
Mar 19, 2026
Merged

ArgoCD Steps: Replace directory-separator for Patches/Replaced files directly prior to reporting#1837
rain-on merged 61 commits intomainfrom
tmm/refactor_paths

Conversation

@rain-on
Copy link
Contributor

@rain-on rain-on commented Mar 19, 2026

Currently for all steps, the FilePathContent has its file-path updated to be posix compliant at the point that the file is updated.

However - it really isn't a function of the step - the change to posix-compliance is a requirement of the reporter - i.e. Server needs these paths to be posix - not the actual internal functionality of Calamari.

Thus - we move the path-adjustment out from the business logic, and into the "translate to server format" area.

This does not require a server update.

@rain-on rain-on requested a review from eddymoulton March 19, 2026 02:35
Copy link
Contributor

@eddymoulton eddymoulton left a comment

Choose a reason for hiding this comment

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

This is a great change, much cleaner.

As I wrote my suggestion for clarifying the comment it occurred to me that perhaps this logic doesn't belong to Calamari at all and Server should be fixed up the paths before it tries to use them.

I wouldn't block on that, this is still a step forward, but up to you if you want to take it that next step further.


public void ReportFilesUpdated(IReadOnlyList<ProcessApplicationResult> applicationResults)
{
//file paths _must_ use forward slashes for directory separators
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//file paths _must_ use forward slashes for directory separators
// file paths _must_ use forward slashes for directory separators for parsing by LibGit2Sharp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically this is posix as it heading back to server via a service message - and that contract requires a posix path (yes because server puts it into libgit2sharp, but that's a step removed from here).

@rain-on rain-on merged commit 33635f9 into main Mar 19, 2026
33 checks passed
@rain-on rain-on deleted the tmm/refactor_paths branch March 19, 2026 22:08
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.

2 participants