-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using 3.2.1
for editing an eyaml created with 3.2.0
will mess up formatting
#318
Comments
@kenyon can you please take a look? |
@bastelfreak @kenyon Could we rate this bug a bit higher? |
Rating upgraded. |
@kBite can you give some more details about what you're doing? I'm not able to reproduce this: kenyon@lithium ~/git/hiera-eyaml ((v3.2.0) %) % bundle exec bin/eyaml edit --verbose /tmp/test.yaml
[hiera-eyaml-core] Wrote temporary file: /tmp/eyaml_edit20210426-1379-5vmwmf.yaml
kenyon@lithium ~/git/hiera-eyaml ((v3.2.0) %) % cat /tmp/test.yaml
block: >
ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQEw
DQYJKoZIhvcNAQEBBQAEggEAK5A1frBk1ypBJip0LBKqRAt0GnoSp/Mw9pf6
1xsUmh7gOxOACtDOc0IC6muqt4ySwe3FZWqJU1aYQE7FShGiIRD1dGrFYXDH
/QbkUN1YpXRIXBFdO49pSfzIZcxbESmpei/c60uSb9F8gl8SNrsh82UqnNOL
mWaDyKgo2ODr00zZiqvkyaBhguSgSfGxm5kD2vrzvOvka22nzw18NDKSwQYW
AH7/0PSeX0iEvjP7QVHjWEyrcC5frrrEdXWbWb/8/kjw5MVF1xwXYSbcquzN
ApRKw+/hDTSiNrx44EjJV4LC2eraiI1Kbc9ugimE+NnCU15N+3P9nkosYvUz
FlCAwDA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBCWLUlU+vqVnzYaq28c
SqvRgBDE89NHnMcvfSw/UEr5gD5w]
kenyon@lithium ~/git/hiera-eyaml ((v3.2.0) %) % git checkout master
Previous HEAD position was 6034783 Merge pull request #297 from bastelfreak/rel320
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
kenyon@lithium ~/git/hiera-eyaml (master u=) % bundle update
Fetching https://github.com/voxpupuli/github-changelog-generator
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Using rake 13.0.3
Using bundler 2.1.4
Using highline 2.0.3 (was 1.6.21)
Using optimist 3.0.1
Using hiera-eyaml 3.2.1 (was 3.2.0) from source at `.`
Bundle updated!
Gems in the groups system_tests and development were not updated.
kenyon@lithium ~/git/hiera-eyaml (master u=) % bundle exec bin/eyaml edit --verbose /tmp/test.yaml
[hiera-eyaml-core] Wrote temporary file: /tmp/eyaml_edit20210426-1629-ek79qy.yaml
kenyon@lithium ~/git/hiera-eyaml (master u=) % cat /tmp/test.yaml
block: >
ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBAD
AFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAA6h0xJ8QybMF/YUIVRzI7MgfGG
U9j36+ZDi6fDkvEp+vm7hdZm+4Cnq12RVKJKikD3PW5mceZXc33cbBWn0iMb
F/rylGJrHtTR/eDF+VRwnz/mDrXkgMqODF4crT3HT+IejjgKhG3sxXCaPPjB
bzF2AWHjhYvgGqdUmj/sF/KnFGmL7+Rrz6YVFsMPEFG57U2Genlf34BunBSR
uJuQPp07lvMALkd8ryCXd92LbhJp071uhrWN4LcxT1ioTgNCtIWppjwbTdq1
9fnd8njGShXHOXsMXDjbbse1BQDzcY0JWQOiYiDPvQ/Ryj11fznpIa4hXK8h
IUPIFW/xgLq1etwzA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBBF1lbqRX
RmagPvh92l6QjNgBCclVg3Q0BncSvzny1SBvb0]
kenyon@lithium ~/git/hiera-eyaml (master u=) % bundle exec bin/eyaml decrypt --verbose --eyaml /tmp/test.yaml
block: >
DEC::PKCS7[test!
]! |
The cause is changing anything but the secret like changing the key from The cypher text is the same in my example below, but formatting is broken. Steps to reproduce: Using
|
This also happens when changing the key of recrypted files.
|
Even adding a single newline will break formatting.
|
And this even happens when I create a file with v3.2.1
|
OK, I can reproduce it now. At least the YAML is still valid and decrypts properly. I'll see if I can fix this. |
When editing with `eyaml edit`, the indentation would get inserted an extra time on each line. Now blocks are formatted evenly. Fixes voxpupuli#318.
When editing with `eyaml edit`, the indentation would get inserted an extra time on each line. Now blocks are formatted evenly. Fixes voxpupuli#318.
When editing with `eyaml edit`, the indentation would get inserted an extra time on each line. Now blocks are formatted evenly. Fixes voxpupuli#318.
@kenyon I tested the last case, adding a newline
#319 seems working |
Using
3.2.1
for editing an eyaml created with3.2.0
will mess up formattingFormatting with
3.2.0
Formatting after editing with
3.2.1
Caused by #307
The text was updated successfully, but these errors were encountered: