-
Notifications
You must be signed in to change notification settings - Fork 68
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
Updated goccy/go-yaml to v.14.1 #1829
Conversation
2098039
to
11063ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. Looks like there is a breaking change in the pretty printing that this PR caught. I'm going to open an issue upstream about this. Our update can be on hold until then.
Opened goccy/go-yaml#534 |
@XuechunHou The upstream issue has been resolved. Can you update the package to |
11063ed
to
eb8f72e
Compare
eb8f72e
to
49e53b1
Compare
3cfaa1a
to
a01e19a
Compare
a01e19a
to
2646891
Compare
The tab character is illegal outside of quoted strings in YAML. The go yaml library used to allow us to do this illegal thing, but not anymore.
@@ -155,7 +155,7 @@ func UnmarshalAndValidate(fullPath string, data []byte, i interface{}) error { | |||
v := NewIntegrationMetadataValidator() | |||
// Note: Unmarshaler does not protect when only the key being declared. | |||
// https://github.com/goccy/go-yaml/issues/313 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update this comment if this issue (# 313) has been fixed with the current update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't be fixed until 1.14.3, which is available if we want to update to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo the integration test pass and addressing comments.
@@ -569,7 +569,7 @@ func sanitizeWriteLogEntriesRequest(t *testing.T, r *logpb.WriteLogEntriesReques | |||
func sanitizeStacktrace(t *testing.T, input string) string { | |||
// We need to remove non-deterministic information from stacktraces so the goldens don't keep changing. | |||
// Remove $GOPATH | |||
result := regexp.MustCompile(`(?m)^\t(.*?)pkg/mod/`).ReplaceAllString(input, "\t") | |||
result := regexp.MustCompile(`(?m)^\t(.*?)pkg/mod/`).ReplaceAllString(input, " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, why did it has to change from tabs (\t
) to two spaces ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using \t
(tab) where we did is illegal according to the YAML spec. Tabs can't be used as indentation, and putting the \t
character where we did ended up mixing space and tab indentation. The old version of the YAML library parsed this incorrectly, allowing it to be possible when it should be illegal. This is fixed in this newer version of the library. I decided on two spaces to maintain the original intent of the replacement while still making it legal YAML.
Ops Agent and Third party integration tests are failing, though they are already failing at Master head. Also, these failed tests on github are passing on Louhi. These tests mostly failed because "context deadline exceeded" |
Description
Updated
goccy/go-yaml
tov.14.1
by executing the commandgo get -u github.com/goccy/[email protected]
Related issue
b/376658816
How has this been tested?
Checklist: