-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
upgrade Go to 1.20.6 #36000
upgrade Go to 1.20.6 #36000
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
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.
Why is this deleted?
I suspect we'll want the changes in elastic/elastic-agent@db1c47f here as well since the code is the same. I also suspect the unit tests in the dev-tool directory aren't being run by CI, because those tests are failing with Go 1.20.5 locally on main. |
It looks like this problem might have existed before this PR but now the error is actually being caught: #35927. This plausibly could have been a bug fix in Not sure how to fix it yet, possibly we need to avoid generating code coverage for the package containing these generated files. |
the //line directives used to point to the original "ragel" files were creating problems for the coverage tool. They were being reported without the 'parser/' directory. Causing the go tool cover to look for the wrong files and therefore failing. Moving it all to the root directory fixes the problem.
Go 1.20.6 was just released, you can bump the Go versions here to 1.20.6 to save from having to follow up with another PR doing that. |
/test |
This reverts commit 2b6a159.
This pull request is now in conflicts. Could you fix it? 🙏
|
/test |
@@ -156,7 +156,7 @@ func TestParseRFC3164(t *testing.T) { | |||
hostname: "test-host", | |||
msg: "this is the message", | |||
}, | |||
wantErr: `validation error at position 5: parsing time "24-08-2003T05:14:15-07:00" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "8-2003T05:14:15-07:00" as "2006"`, | |||
wantErr: `validation error at position 5: parsing time "24-08-2003T05:14:15-07:00" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "24-08-2003T05:14:15-07:00" as "2006"`, |
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.
Why did this change? Are you sure this is a not a functional change in the parser that caused this? Was there a change in Go 1.20 that needed this?
I want to make sure this is not a hint that something has changed in how we parse values that we need to account for before we release this.
This pull request is now in conflicts. Could you fix it? 🙏
|
* upgrade Go to 1.20.5 * ignore known issue with go tool cover * capture cover output and check it for errors * debug * wip * move ragel files to root directory the //line directives used to point to the original "ragel" files were creating problems for the coverage tool. They were being reported without the 'parser/' directory. Causing the go tool cover to look for the wrong files and therefore failing. Moving it all to the root directory fixes the problem. * upgrade to go1.20.6 * . * Revert "move ragel files to root directory" This reverts commit 2b6a159. * remove debug * disable //line directives * goimport (cherry picked from commit a278734) # Conflicts: # .go-version # .golangci.yml # Vagrantfile # auditbeat/Dockerfile # dev-tools/kubernetes/filebeat/Dockerfile.debug # dev-tools/kubernetes/heartbeat/Dockerfile.debug # dev-tools/kubernetes/metricbeat/Dockerfile.debug # dev-tools/mage/gotest.go # filebeat/input/syslog/rfc5424_parser.go # heartbeat/Dockerfile # libbeat/docs/version.asciidoc # libbeat/reader/syslog/rfc3164_test.go # libbeat/reader/syslog/rfc5424_test.go # metricbeat/Dockerfile # metricbeat/module/http/_meta/Dockerfile # metricbeat/module/nats/_meta/Dockerfile # packetbeat/Dockerfile # x-pack/functionbeat/Dockerfile # x-pack/metricbeat/module/stan/_meta/Dockerfile
* upgrade Go to 1.20.6 (#36000) * upgrade Go to 1.20.5 * ignore known issue with go tool cover * capture cover output and check it for errors * debug * wip * move ragel files to root directory the //line directives used to point to the original "ragel" files were creating problems for the coverage tool. They were being reported without the 'parser/' directory. Causing the go tool cover to look for the wrong files and therefore failing. Moving it all to the root directory fixes the problem. * upgrade to go1.20.6 * . * Revert "move ragel files to root directory" This reverts commit 2b6a159. * remove debug * disable //line directives * goimport (cherry picked from commit a278734) # Conflicts: # .go-version # .golangci.yml # Vagrantfile # auditbeat/Dockerfile # dev-tools/kubernetes/filebeat/Dockerfile.debug # dev-tools/kubernetes/heartbeat/Dockerfile.debug # dev-tools/kubernetes/metricbeat/Dockerfile.debug # dev-tools/mage/gotest.go # filebeat/input/syslog/rfc5424_parser.go # heartbeat/Dockerfile # libbeat/docs/version.asciidoc # libbeat/reader/syslog/rfc3164_test.go # libbeat/reader/syslog/rfc5424_test.go # metricbeat/Dockerfile # metricbeat/module/http/_meta/Dockerfile # metricbeat/module/nats/_meta/Dockerfile # packetbeat/Dockerfile # x-pack/functionbeat/Dockerfile # x-pack/metricbeat/module/stan/_meta/Dockerfile * Resolve conflicts. * Remove extra entries in CHANGELOG.next.asciidoc * Remove extra files. * Fix test coverage report in cef parser * Run mage fmt --------- Co-authored-by: Anderson Queiroz <[email protected]> Co-authored-by: Craig MacKenzie <[email protected]>
* upgrade Go to 1.20.5 * ignore known issue with go tool cover * capture cover output and check it for errors * debug * wip * move ragel files to root directory the //line directives used to point to the original "ragel" files were creating problems for the coverage tool. They were being reported without the 'parser/' directory. Causing the go tool cover to look for the wrong files and therefore failing. Moving it all to the root directory fixes the problem. * upgrade to go1.20.6 * . * Revert "move ragel files to root directory" This reverts commit 2b6a159. * remove debug * disable //line directives * goimport
What does this PR do?
.rl
files on ...Why is it important?
//line
directives on generated code which makesgo tool cover
to look for files in the wrong path, failing to generate the coverage report.Checklist
[ ] My code follows the style guidelines of this project[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues