Skip to content

Conversation

@lizardruss
Copy link
Collaborator

@lizardruss lizardruss commented Apr 28, 2023

What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
Partial resolution of #2634

Please provide a short message that should be published in the DevSpace release notes
Fixed an issue where DevSpace would reformat yaml when 0 patches are applied

What else do we need to know?
This is only a partial fix of #2634. If there are patches, the YAML formatting issue still occurs.

go.mod & go.sum changes were only to resolve issues running go mod tidy locally.

Other things tried:

  • detecting and setting the encoder indentation: The same defect occurs if a YAML document with 4 spaces gets passed in, for example:
test:
    example: |2
      Hello World!

would become invalid YAML when re-marshaled:

test:
    example: |4
      Hello World!

Other suggestions:

  • rewrite the yaml using the node tree.. but this will likely corrupt the original strings if they use the chomp indicator |6+
  • probably best to wait for an official release.. or create a fork like kustomize has done. We may be able to use their fork once the PR is merged.

@89luca89 @FabianKramm

devspace-sh#2634

Signed-off-by: Russell Centanni <russell.centanni@gmail.com>
@netlify
Copy link

netlify bot commented Apr 28, 2023

Deploy Preview for devspace-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 2c9db3d
🔍 Latest deploy log https://app.netlify.com/sites/devspace-docs/deploys/644c1edb56143d00083da8d6

…n denied messages

Signed-off-by: Russell Centanni <russell.centanni@gmail.com>
@lizardruss lizardruss marked this pull request as ready for review April 28, 2023 20:29
@FabianKramm FabianKramm merged commit 4fac43d into devspace-sh:main May 2, 2023
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