-
Notifications
You must be signed in to change notification settings - Fork 207
[Jenkins] Go Agent Pipeline version 0 #292
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
Conversation
# Conflicts: # README.md
Codecov Report
@@ Coverage Diff @@
## master #292 +/- ##
==========================================
- Coverage 84.44% 81.02% -3.42%
==========================================
Files 98 98
Lines 5857 5856 -1
==========================================
- Hits 4946 4745 -201
- Misses 839 840 +1
- Partials 72 271 +199
Continue to review full report at Codecov.
|
axw
left a comment
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, looking good. Is it possible to enable the job in apm-ci so we test on this PR before merging?
scripts/jenkins/test.sh
Outdated
|
|
||
| go get -v -t ./... | ||
|
|
||
| export COV_FILE="build/coverage.cov" |
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 don't think we need coverage for both this and the docker tests. Having it for the docker tests should be enough, since those tests are a superset.
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.
this one thing I have to ask you, there are differences between two coverage reports, the docker one has more files, these are they:
go.elastic.co/apm/apmtest/httpsuite.go
go.elastic.co/apm/apmtest/testlogger.go
go.elastic.co/apm/apmtest/withtransaction.go
go.elastic.co/apm/internal/apmcontext/context.go
go.elastic.co/apm/internal/apmdebug/debug.go
go.elastic.co/apm/internal/apmschema/schema.go
go.elastic.co/apm/internal/radix/radix.go
go.elastic.co/apm/transport/transporttest/err.go
go.elastic.co/apm/transport/transporttest/recorder.go
What is it the good coverage test?
I did not check the unit test executed but probably are different too.
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.
It's because of the "-coverpkg" flag.
go test -cover ./... will run the tests for each package in subdirectories of ./, but for each package it only includes coverage information of its own package. i.e. test coverage for go.elastic.co/apm/module/apmhttp only contains coverage information for go.elastic.co/apm/module/apmhttp.
In the docker case, it runs "make coverage", which runs scripts/test_coverage.sh. In that script you can see we add a flag, -coverpkg=go.elastic.co/apm/.... This instructs the go command to include coverage for all packages under go.elastic.co/apm/...
That script is slightly more complex than needed here, since it also works with older versions of Go. You could just run go test ./... -v -coverprofile="${COV_FILE}" -coverpkg=go.elastic.co/apm/... to get the same effect, for recent versions of Go.
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.
so if we add -coverpkg=go.elastic.co/apm/... to the test.sh (test stage) both will be the same, ok, in that case the docker test can be removed.
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.
so if we add -coverpkg=go.elastic.co/apm/... to the test.sh (test stage) both will be the same, ok, in that case the docker test can be removed.
They might cover the same files, but not the same lines. The docker tests run a super-set of tests: integration tests that only run when certain environment variables are set (e.g. PGHOST). The docker one should be kept, and this one removed.
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.
gotcha, it is the other way around
Co-Authored-By: kuisathaverat <kuisathaverat@users.noreply.github.com>
Co-Authored-By: kuisathaverat <kuisathaverat@users.noreply.github.com>
Co-Authored-By: kuisathaverat <kuisathaverat@users.noreply.github.com>
Co-Authored-By: kuisathaverat <kuisathaverat@users.noreply.github.com>
|
yep, as soon as Infra reprovision the Jenkins instance this pipeline will appear in the apm-agent-go-mbp project as a PR, then we would test it on apm-ci. I will try to it happens in the next two days. |
Co-Authored-By: kuisathaverat <kuisathaverat@users.noreply.github.com>
|
@axw The creation of tags was removed, so the integration tests are disabled for now, the other stuff I think that was resolved, thus I think we are ready to Go ;) |
|
The only decision pending, it is to set which steps only run on the master branch (or other branches) and which steps only run on PRs, at the moment this is may suggestion checkout - all The integration test and axis test are disabled until we implemented the SHA1 support on the integration tests |
axw
left a comment
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.
The only decision pending, it is to set which steps only run on the master branch (or other branches) and which steps only run on PRs, at the moment this is may suggestion
checkout - all
build - all
test - all
benchmarks - master
docker-test - all
integration test (PR vs server stable) - PR
integration test Axis (agent vs the versions matrix) - master
documentation - master
That all sounds good to me.
Still a couple of coverage bits to be removed from the test stage / test.sh script. After that, and commits are squashed, LGTM :) Thanks for bearing with me.
|
Please squash before merging. Maybe hold off until we set the default branch to master? |
|
sure, we have to squash it before merge, there is no rush, so we can merge it next week. |
Uh oh!
There was an error while loading. Please reload this page.