Skip to content
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

chore: fixes vanity import. #960

Merged
merged 3 commits into from
May 28, 2021

Conversation

jcchavezs
Copy link
Contributor

This PR adds a check for vanity imports to be updated on CI.

Ping @axw

Closes #844

@jcchavezs jcchavezs force-pushed the 844_adds_vanity_import_check branch from 7f1cc95 to 4d17406 Compare May 21, 2021 08:27
scripts/before_install.sh Outdated Show resolved Hide resolved
@apmmachine
Copy link
Contributor

apmmachine commented May 21, 2021

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #960 updated

  • Start Time: 2021-05-27T18:22:03.553+0000

  • Duration: 9 min 27 sec

  • Commit: 332d844

Test stats 🧪

Test Results
Failed 1
Passed 1128
Skipped 7
Total 1136

Trends 🧪

Image of Build Times

Image of Tests

Test errors 1

Expand to view the tests failures

Initializing / Tests / Go-1.11.x / TestHarness – apmot
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     suite.go:63: test panicked: reflect: Elem of invalid type
        goroutine 53 [running]:
        runtime/debug.Stack(0xc000040c88, 0x88bde0, 0x9b3690)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/runtime/debug/stack.go:24 +0xa7
        github.com/stretchr/testify/suite.failOnPanic(0xc000144300)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/pkg/mod/github.com/stretchr/testify@v1.6.1/suite/suite.go:63 +0x60
        panic(0x88bde0, 0x9b3690)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/runtime/panic.go:513 +0x1b9
        reflect.(*rtype).Elem(0x933bc0, 0x9b8020, 0xc0000c62d0)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/reflect/type.go:923 +0x143
        github.com/stretchr/testify/suite.Run(0xc000144300, 0x9b8020, 0xc0000c62d0)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/pkg/mod/github.com/stretchr/testify@v1.6.1/suite/suite.go:97 +0x13a
        go.elastic.co/apm/module/apmot.TestHarness.func6(0xc0000c62d0)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/src/go.elastic.co/apm/module/apmot/harness_test.go:71 +0x49
        github.com/opentracing/opentracing-go/harness.RunAPIChecks(0xc000144300, 0x953cc8, 0xc00004cf78, 0x4, 0x4)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/pkg/mod/github.com/opentracing/opentracing-go@v1.1.0/harness/api_checkers.go:70 +0x68
        go.elastic.co/apm/module/apmot.TestHarness(0xc000144300)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/src/go.elastic.co/apm/module/apmot/harness_test.go:66 +0x175
        testing.tRunner(0xc000144300, 0x953cd8)
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/testing/testing.go:827 +0xbf
        created by testing.(*T).Run
    /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/testing/testing.go:878 +0x35c 
    

Steps errors 29

Expand to view the steps failures

Show only the first 10 steps failures

Build
  • Took 0 min 6 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 2 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 2 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 6 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 2 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 2 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 6 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 2 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Build
  • Took 0 min 2 sec . View more details on here
  • Description: ./scripts/jenkins/build.sh
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: hudson.AbortException: script returned exit code 2

Log output

Expand to view the last 100 lines of log output

[2021-05-27T18:31:25.391Z] --- PASS: TestTraceContext (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestTraceContextTextFormatter
[2021-05-27T18:31:25.391Z] --- PASS: TestTraceContextTextFormatter (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestTraceContextNoSpan
[2021-05-27T18:31:25.391Z] --- PASS: TestTraceContextNoSpan (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestTraceContextEmpty
[2021-05-27T18:31:25.391Z] --- PASS: TestTraceContextEmpty (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestHook
[2021-05-27T18:31:25.391Z] --- PASS: TestHook (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestHookTransactionTraceContext
[2021-05-27T18:31:25.391Z] --- PASS: TestHookTransactionTraceContext (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestHookWithError
[2021-05-27T18:31:25.391Z] --- PASS: TestHookWithError (0.00s)
[2021-05-27T18:31:25.391Z] === RUN   TestHookFatal
[2021-05-27T18:31:25.391Z] --- PASS: TestHookFatal (0.02s)
[2021-05-27T18:31:25.391Z] === RUN   TestHookTracerClosed
[2021-05-27T18:31:25.391Z] --- PASS: TestHookTracerClosed (0.00s)
[2021-05-27T18:31:25.391Z] PASS
[2021-05-27T18:31:25.391Z] ok  	go.elastic.co/apm/module/apmlogrus	0.057s
[2021-05-27T18:31:26.336Z] === RUN   TestHarness
[2021-05-27T18:31:26.336Z] --- FAIL: TestHarness (0.00s)
[2021-05-27T18:31:26.336Z]     suite.go:63: test panicked: reflect: Elem of invalid type
[2021-05-27T18:31:26.336Z]         goroutine 53 [running]:
[2021-05-27T18:31:26.336Z]         runtime/debug.Stack(0xc000040c88, 0x88bde0, 0x9b3690)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/runtime/debug/stack.go:24 +0xa7
[2021-05-27T18:31:26.336Z]         github.com/stretchr/testify/suite.failOnPanic(0xc000144300)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/pkg/mod/github.com/stretchr/testify@v1.6.1/suite/suite.go:63 +0x60
[2021-05-27T18:31:26.336Z]         panic(0x88bde0, 0x9b3690)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/runtime/panic.go:513 +0x1b9
[2021-05-27T18:31:26.336Z]         reflect.(*rtype).Elem(0x933bc0, 0x9b8020, 0xc0000c62d0)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/reflect/type.go:923 +0x143
[2021-05-27T18:31:26.336Z]         github.com/stretchr/testify/suite.Run(0xc000144300, 0x9b8020, 0xc0000c62d0)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/pkg/mod/github.com/stretchr/testify@v1.6.1/suite/suite.go:97 +0x13a
[2021-05-27T18:31:26.336Z]         go.elastic.co/apm/module/apmot.TestHarness.func6(0xc0000c62d0)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/src/go.elastic.co/apm/module/apmot/harness_test.go:71 +0x49
[2021-05-27T18:31:26.336Z]         github.com/opentracing/opentracing-go/harness.RunAPIChecks(0xc000144300, 0x953cc8, 0xc00004cf78, 0x4, 0x4)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/pkg/mod/github.com/opentracing/opentracing-go@v1.1.0/harness/api_checkers.go:70 +0x68
[2021-05-27T18:31:26.336Z]         go.elastic.co/apm/module/apmot.TestHarness(0xc000144300)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/src/go.elastic.co/apm/module/apmot/harness_test.go:66 +0x175
[2021-05-27T18:31:26.336Z]         testing.tRunner(0xc000144300, 0x953cd8)
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/testing/testing.go:827 +0xbf
[2021-05-27T18:31:26.336Z]         created by testing.(*T).Run
[2021-05-27T18:31:26.336Z]         	/var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960/.gimme/versions/go1.11.13.linux.amd64/src/testing/testing.go:878 +0x35c
[2021-05-27T18:31:26.336Z] === RUN   TestTransactionType
[2021-05-27T18:31:26.336Z] --- PASS: TestTransactionType (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestHTTPTransaction
[2021-05-27T18:31:26.336Z] --- PASS: TestHTTPTransaction (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestSpanType
[2021-05-27T18:31:26.336Z] --- PASS: TestSpanType (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestDBSpan
[2021-05-27T18:31:26.336Z] --- PASS: TestDBSpan (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestHTTPSpan
[2021-05-27T18:31:26.336Z] --- PASS: TestHTTPSpan (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestHTTPSpanTraefik
[2021-05-27T18:31:26.336Z] --- PASS: TestHTTPSpanTraefik (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestStartSpanRemoteParent
[2021-05-27T18:31:26.336Z] --- PASS: TestStartSpanRemoteParent (0.01s)
[2021-05-27T18:31:26.336Z] === RUN   TestStartSpanParentFinished
[2021-05-27T18:31:26.336Z] --- PASS: TestStartSpanParentFinished (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestCustomTags
[2021-05-27T18:31:26.336Z] --- PASS: TestCustomTags (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestStartSpanFromContextMixed
[2021-05-27T18:31:26.336Z] --- PASS: TestStartSpanFromContextMixed (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestSpanLogError
[2021-05-27T18:31:26.336Z] --- PASS: TestSpanLogError (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestSpanFinishWithOptionsLogs
[2021-05-27T18:31:26.336Z] --- PASS: TestSpanFinishWithOptionsLogs (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   TestTraceInjectExtract
[2021-05-27T18:31:26.336Z] --- PASS: TestTraceInjectExtract (0.00s)
[2021-05-27T18:31:26.336Z] === RUN   Example
[2021-05-27T18:31:26.336Z] --- PASS: Example (0.05s)
[2021-05-27T18:31:26.336Z] FAIL
[2021-05-27T18:31:26.336Z] FAIL	go.elastic.co/apm/module/apmot	0.113s
[2021-05-27T18:31:26.597Z] Makefile:57: recipe for target 'test' failed
[2021-05-27T18:31:26.597Z] make: *** [test] Error 1
[2021-05-27T18:31:26.597Z] + status=2
[2021-05-27T18:31:26.597Z] + go-junit-report
[2021-05-27T18:31:26.597Z] + exit 2
[2021-05-27T18:31:26.662Z] Recording test results
[2021-05-27T18:31:28.079Z] [Checks API] No suitable checks publisher found.
[2021-05-27T18:31:28.116Z] Failed in branch Go-1.11.x
[2021-05-27T18:31:29.179Z] Stage "Coverage" skipped due to earlier failure(s)
[2021-05-27T18:31:29.215Z] Stage "Benchmark" skipped due to earlier failure(s)
[2021-05-27T18:31:29.290Z] Stage "More OS" skipped due to earlier failure(s)
[2021-05-27T18:31:29.325Z] Stage "Windows" skipped due to earlier failure(s)
[2021-05-27T18:31:29.328Z] Stage "OSX" skipped due to earlier failure(s)
[2021-05-27T18:31:29.362Z] Failed in branch Windows
[2021-05-27T18:31:29.366Z] Failed in branch OSX
[2021-05-27T18:31:29.434Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2021-05-27T18:31:29.470Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-27T18:31:29.486Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-27T18:31:29.522Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-27T18:31:29.812Z] Running on Jenkins in /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-960
[2021-05-27T18:31:29.901Z] [INFO] getVaultSecret: Getting secrets
[2021-05-27T18:31:29.945Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-05-27T18:31:30.651Z] + chmod 755 generate-build-data.sh
[2021-05-27T18:31:30.651Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-960/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-960/runs/5 FAILURE 566825
[2021-05-27T18:31:30.651Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-960/runs/5/steps/?limit=10000 -o steps-info.json
[2021-05-27T18:31:30.901Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-960/runs/5/tests/?status=FAILED -o tests-errors.json
[2021-05-27T18:31:30.901Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-960/runs/5/log/ -o pipeline-log.txt

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! I'd just like to shuffle the Makefile change up to be with the other conditional "check-" targets please

Makefile Outdated
@@ -85,3 +85,7 @@ model/marshal_fastjson.go: model/model.go

scripts/Dockerfile-testing: $(wildcard module/*)
go generate ./scripts

.PHONY: check-vanity-import
check-vanity-import:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please move this up with the other conditional targets at line 15? and define an empty target for Go < 1.12

@jcchavezs jcchavezs force-pushed the 844_adds_vanity_import_check branch from 78cc889 to 077516b Compare May 26, 2021 09:42
@jcchavezs
Copy link
Contributor Author

@axw I addressed your comments.

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can change go get to go install for consistency that'd be great. Otherwise LGTM, thanks!

@axw
Copy link
Member

axw commented May 28, 2021

Tests are failing but pretty certain that's unrelated, so merging. Thanks!

@axw axw merged commit 283087e into elastic:master May 28, 2021
@axw
Copy link
Member

axw commented May 28, 2021

Tests are failing but pretty certain that's unrelated, so merging. Thanks!

Oops, looks like it's related to the testify upgrade actually. I'll sort it out.

stuartnelson3 pushed a commit that referenced this pull request Jul 30, 2021
* chore: fixes vanity import.

* chore: uses v0.1.0 for porto.

* chore: use install instead of get for tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: add check that vanity import comments exist
3 participants