Skip to content

Conversation

@eddymoulton
Copy link
Contributor

Background

While adding docs I discovered that we have a bug in our implementation for reporting manifests from bash scripts.

Due to the way we process the manifest string in the bash helper, we end up with a \n that isn't recognised as a newline in Server.

Results

Uses the newline character instead of the string of characters.

Before

Bash script step silently errors and does not report
image

After

Bash script step is reported now
image

Comment on lines +92 to +95
output.AssertOutput("##octopus[k8s-manifest-applied manifest='ImFwaVZlcnNpb24iOiAidjEiCiJraW5kIjogIk5hbWVzcGFjZSIKIm1ldGFkYXRhIjoKICAibmFtZSI6ICJleGFtcGxlIgoibGFiZWxzIjoKICAgICJuYW1lIjogImV4YW1wbGUiCg==']");
output.AssertOutput("##octopus[k8s-manifest-applied manifest='ImFwaVZlcnNpb24iOiAidjEiCiJraW5kIjogIk5hbWVzcGFjZSIKIm1ldGFkYXRhIjoKICAibmFtZSI6ICJkaWZmcyIKImxhYmVscyI6CiAgICAibmFtZSI6ICJkaWZmcyIK']");
output.AssertOutput("##octopus[k8s-manifest-applied manifest='ImFwaVZlcnNpb24iOiAidjEiCiJraW5kIjogIk5hbWVzcGFjZSIKIm1ldGFkYXRhIjoKICAibmFtZSI6ICJleGFtcGxlIgoibGFiZWxzIjoKICAgICJuYW1lIjogImV4YW1wbGUiCg==' ns='bXk=']");
output.AssertOutput("##octopus[k8s-manifest-applied manifest='ImFwaVZlcnNpb24iOiAidjEiCiJraW5kIjogIk5hbWVzcGFjZSIKIm1ldGFkYXRhIjoKICAibmFtZSI6ICJkaWZmcyIKImxhYmVscyI6CiAgICAibmFtZSI6ICJkaWZmcyIK' ns='bXk=']");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These still don't match the powershell tests unfortunately as the powershell tests uses \r\n newlines.

I did confirm that we get the same output if I change the code in Bootstrap.sh to return \r\n.

Copy link
Contributor

@zentron zentron left a comment

Choose a reason for hiding this comment

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

oh nice. so it was just a bug in the method itself

@eddymoulton eddymoulton force-pushed the em/fix-line-ending-when-reporting-manifests-via-bash branch from da25580 to b5b9358 Compare December 22, 2025 23:11
@eddymoulton eddymoulton changed the base branch from main to release/2025.4 December 22, 2025 23:12
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