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

bugfix: the same handler #983

Merged
merged 7 commits into from
Jul 6, 2021
Merged

Conversation

woniu317
Copy link
Contributor

@woniu317 woniu317 commented Jul 6, 2021

No description provided.

@elastic-apm-tech elastic-apm-tech added this to In Progress in APM-Agents (OLD) Jul 6, 2021
@woniu317 woniu317 mentioned this pull request Jul 6, 2021
@apmmachine
Copy link
Collaborator

apmmachine commented Jul 6, 2021

💔 Build 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 #983 updated

  • Start Time: 2021-07-06T02:38:28.369+0000

  • Duration: 13 min 33 sec

  • Commit: 715daac

Test stats 🧪

Test Results
Failed 0
Passed 7274
Skipped 213
Total 7487

Trends 🧪

Image of Build Times

Image of Tests

Steps errors 7

Expand to view the steps failures

Build
  • Took 2 min 44 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 3 min 5 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-07-06T02:50:57.882Z] --- PASS: TestHandlerHTTPSuite (0.01s)
[2021-07-06T02:50:57.882Z]     --- PASS: TestHandlerHTTPSuite/TestExplicitErrorCapture (0.00s)
[2021-07-06T02:50:57.882Z]     --- PASS: TestHandlerHTTPSuite/TestImplicitWrite (0.00s)
[2021-07-06T02:50:57.882Z]     --- PASS: TestHandlerHTTPSuite/TestPanicAfterWrite (0.00s)
[2021-07-06T02:50:57.882Z]     --- PASS: TestHandlerHTTPSuite/TestPanicBeforeWrite (0.00s)
[2021-07-06T02:50:57.882Z] === RUN   TestHandler
[2021-07-06T02:50:57.882Z] --- PASS: TestHandler (0.00s)
[2021-07-06T02:50:57.882Z] === RUN   TestHandlerOutcome
[2021-07-06T02:50:57.882Z] --- PASS: TestHandlerOutcome (0.00s)
[2021-07-06T02:50:57.882Z] === RUN   TestHandlerCaptureBodyRaw
[2021-07-06T02:50:57.882Z] --- PASS: TestHandlerCaptureBodyRaw (0.01s)
[2021-07-06T02:50:57.882Z] === RUN   TestHandlerCaptureBodyConcurrency
[2021-07-06T02:50:58.141Z] --- PASS: TestHandlerCaptureBodyConcurrency (0.14s)
[2021-07-06T02:50:58.141Z] === RUN   TestHandlerCaptureBodyRawTruncated
[2021-07-06T02:50:58.141Z] --- PASS: TestHandlerCaptureBodyRawTruncated (0.00s)
[2021-07-06T02:50:58.141Z] === RUN   TestHandlerCaptureBodyForm
[2021-07-06T02:50:58.141Z] --- PASS: TestHandlerCaptureBodyForm (0.01s)
[2021-07-06T02:50:58.141Z] === RUN   TestHandlerCaptureBodyError
[2021-07-06T02:50:58.141Z] --- PASS: TestHandlerCaptureBodyError (0.00s)
[2021-07-06T02:50:58.141Z] === RUN   TestHandlerCaptureBodyErrorIgnored
[2021-07-06T02:50:58.141Z] --- PASS: TestHandlerCaptureBodyErrorIgnored (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerRecovery
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerRecovery (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerRecoveryNoHeaders
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerRecoveryNoHeaders (0.01s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerWithPanicPropagation
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerWithPanicPropagation (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerWithPanicPropagationResponseCodeForwarding
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerWithPanicPropagationResponseCodeForwarding (0.01s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerRequestIgnorer
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerRequestIgnorer (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerTraceparentHeader
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerTraceparentHeader (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerTracestateHeader
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerTracestateHeader (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestHandlerReaderFrom
[2021-07-06T02:50:58.142Z] --- PASS: TestHandlerReaderFrom (0.00s)
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/_/foo
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/_/foo?bar=baz
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/_http://testing.invalid/foo?bar=baz
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/,_/foo
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/*/foo*_/foo
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/*/foo*_/foo?bar=baz
[2021-07-06T02:50:58.142Z] === RUN   TestServerRequestIgnorer/*/foo*_http://testing.invalid/foo?bar=baz
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/*/FOO*_http://testing.invalid/foo?bar=baz
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/*/foo?bar=baz_/foo
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/*/foo?bar=baz_/foo?bar=baz
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/*/foo?bar=baz_http://testing.invalid/foo?bar=baz
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/http://*_/foo
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/http://*_/foo?bar=baz
[2021-07-06T02:50:58.400Z] === RUN   TestServerRequestIgnorer/http://*_http://testing.invalid/foo?bar=baz
[2021-07-06T02:50:58.400Z] --- PASS: TestServerRequestIgnorer (0.22s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/_/foo (0.02s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/_/foo?bar=baz (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/_http://testing.invalid/foo?bar=baz (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/,_/foo (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/foo*_/foo (0.02s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/foo*_/foo?bar=baz (0.02s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/foo*_http://testing.invalid/foo?bar=baz (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/FOO*_http://testing.invalid/foo?bar=baz (0.02s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/foo?bar=baz_/foo (0.02s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/foo?bar=baz_/foo?bar=baz (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/*/foo?bar=baz_http://testing.invalid/foo?bar=baz (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/http://*_/foo (0.01s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/http://*_/foo?bar=baz (0.02s)
[2021-07-06T02:50:58.400Z]     --- PASS: TestServerRequestIgnorer/http://*_http://testing.invalid/foo?bar=baz (0.02s)
[2021-07-06T02:50:58.400Z] === RUN   TestFallbackDeprecatedRequestIgnorer
[2021-07-06T02:50:58.400Z] --- PASS: TestFallbackDeprecatedRequestIgnorer (0.01s)
[2021-07-06T02:50:58.400Z] === RUN   TestParseTraceparentHeader
[2021-07-06T02:50:58.400Z] --- PASS: TestParseTraceparentHeader (0.00s)
[2021-07-06T02:50:58.400Z] === RUN   TestParseTracestateHeader
[2021-07-06T02:50:58.400Z] --- PASS: TestParseTracestateHeader (0.00s)
[2021-07-06T02:50:58.400Z] === RUN   ExampleWrapClient
[2021-07-06T02:50:58.660Z] --- PASS: ExampleWrapClient (0.25s)
[2021-07-06T02:50:58.660Z] PASS
[2021-07-06T02:50:58.660Z] ok  	go.elastic.co/apm/module/apmhttp	1.278s
[2021-07-06T02:50:58.660Z] + status=0
[2021-07-06T02:50:58.660Z] + go-junit-report
[2021-07-06T02:50:58.660Z] + exit 0
[2021-07-06T02:50:58.710Z] Recording test results
[2021-07-06T02:50:59.264Z] [Checks API] No suitable checks publisher found.
[2021-07-06T02:51:00.315Z] Stage "Coverage" skipped due to earlier failure(s)
[2021-07-06T02:51:00.345Z] Stage "Benchmark" skipped due to earlier failure(s)
[2021-07-06T02:51:00.406Z] Stage "More OS" skipped due to earlier failure(s)
[2021-07-06T02:51:00.436Z] Stage "Windows" skipped due to earlier failure(s)
[2021-07-06T02:51:00.438Z] Stage "OSX" skipped due to earlier failure(s)
[2021-07-06T02:51:00.463Z] Failed in branch Windows
[2021-07-06T02:51:00.464Z] Failed in branch OSX
[2021-07-06T02:51:00.510Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2021-07-06T02:51:00.538Z] Stage "Release" skipped due to earlier failure(s)
[2021-07-06T02:51:00.552Z] Stage "Release" skipped due to earlier failure(s)
[2021-07-06T02:51:00.581Z] Stage "Release" skipped due to earlier failure(s)
[2021-07-06T02:51:01.143Z] Running on Jenkins in /var/lib/jenkins/workspace/agent-go_apm-agent-go-mbp_PR-983
[2021-07-06T02:51:01.223Z] [INFO] getVaultSecret: Getting secrets
[2021-07-06T02:51:01.260Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-07-06T02:51:01.963Z] + chmod 755 generate-build-data.sh
[2021-07-06T02:51:01.964Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-983/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-983/runs/7 FAILURE 753335
[2021-07-06T02:51:01.964Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-983/runs/7/steps/?limit=10000 -o steps-info.json
[2021-07-06T02:51:01.964Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-go/apm-agent-go-mbp/PR-983/runs/7/tests/?status=FAILED -o tests-errors.json

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.

Thank you! Looks good. I think we can get rid of the route map now, and just use FullPath directly.

module/apmgin/middleware.go Outdated Show resolved Hide resolved
module/apmgin/middleware.go Outdated Show resolved Hide resolved
module/apmgin/middleware.go Outdated Show resolved Hide resolved
module/apmgin/middleware.go Outdated Show resolved Hide resolved
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.

This is wonderful, thank you for your contribution :)
Just one minor issue left - please run make fmt

module/apmgin/middleware.go Show resolved Hide resolved
@axw
Copy link
Member

axw commented Jul 6, 2021

For CI to pass, we'll also need to change this:

pin github.com/gin-gonic/gin v1.3.0

from "v1.3.0" to "v1.5.0"

@axw
Copy link
Member

axw commented Jul 6, 2021

Thanks @woniu317. There are some failures in Go 1.8 and 1.9 due to the bump to 1.5. I'll merge and fix those up later.

@axw axw merged commit 909e444 into elastic:master Jul 6, 2021
APM-Agents (OLD) automation moved this from In Progress to Done Jul 6, 2021
stuartnelson3 pushed a commit that referenced this pull request Jul 30, 2021
* bugfix: the same handler

* init map size

* use fullpath

* import order

* import order

* gin version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants