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

docs/spec: fix JSON Schema for arrays of objects #4516

Merged
merged 2 commits into from
Dec 14, 2020

Conversation

axw
Copy link
Member

@axw axw commented Dec 10, 2020

Motivation/summary

The properties for array items should be tested under "items", not added directly to the array object.

Checklist

I have considered changes for:
- [ ] documentation
- [ ] logging (add log lines, choose appropriate log selector, etc.)
- [ ] metrics and monitoring (create issue for Kibana team to add metrics to visualizations, e.g. Kibana#44001)

How to test these changes

???
Talk to @russcam

Related issues

Closes #4515

The properties for array items should be tested under "items",
not added directly to the array object.
Copy link
Contributor

@simitt simitt left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, completely overlooked that!

@apmmachine
Copy link
Contributor

apmmachine commented Dec 10, 2020

💔 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 #4516 updated

  • Start Time: 2020-12-14T03:00:22.112+0000

  • Duration: 44 min 2 sec

Test stats 🧪

Test Results
Failed 0
Passed 4621
Skipped 139
Total 4760

Steps errors 4

Expand to view the steps failures

Compress
  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=coverage-files.tgz -czf coverage-files.tgz coverage
Run Linux tests
  • Took 29 min 57 sec . View more details on here
  • Description: ./.ci/scripts/linux-test.sh
Compress
  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests
Test Sync
  • Took 3 min 51 sec . View more details on here
  • Description: ./.ci/scripts/sync.sh

Log output

Expand to view the last 100 lines of log output

[2020-12-14T03:38:58.833Z] net.(*netFD).Read(0xc0001c2680, 0xc0002d8000, 0x1000, 0x1000, 0x43974c, 0xc0002aab58, 0x465ca0)
[2020-12-14T03:38:58.833Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/fd_unix.go:202 +0x4f
[2020-12-14T03:38:58.833Z] net.(*conn).Read(0xc0000100a8, 0xc0002d8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
[2020-12-14T03:38:58.833Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/net.go:184 +0x8e
[2020-12-14T03:38:58.833Z] net/http.(*persistConn).Read(0xc0005ea120, 0xc0002d8000, 0x1000, 0x1000, 0xc000047080, 0xc0002aac58, 0x406ed5)
[2020-12-14T03:38:58.833Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/http/transport.go:1884 +0x75
[2020-12-14T03:38:58.833Z] bufio.(*Reader).fill(0xc00007afc0)
[2020-12-14T03:38:58.833Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/bufio/bufio.go:100 +0x103
[2020-12-14T03:38:58.833Z] bufio.(*Reader).Peek(0xc00007afc0, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc0005e8d80)
[2020-12-14T03:38:58.833Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/bufio/bufio.go:138 +0x4f
[2020-12-14T03:38:58.833Z] net/http.(*persistConn).readLoop(0xc0005ea120)
[2020-12-14T03:38:58.833Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/http/transport.go:2037 +0x1a8
[2020-12-14T03:38:58.833Z] created by net/http.(*Transport).dialConn
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/http/transport.go:1706 +0xc56
[2020-12-14T03:38:58.834Z] 
[2020-12-14T03:38:58.834Z] goroutine 99 [sleep]:
[2020-12-14T03:38:58.834Z] time.Sleep(0x5f5e100)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/runtime/time.go:188 +0xba
[2020-12-14T03:38:58.834Z] github.com/elastic/apm-server/systemtest.CleanupElasticsearch(0x12d3f60, 0xc000b72000)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server/systemtest/elasticsearch.go:139 +0x5e0
[2020-12-14T03:38:58.834Z] github.com/elastic/apm-server/systemtest_test.TestTransactionAggregationShutdown(0xc000b72000)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server/systemtest/aggregation_test.go:77 +0x4f
[2020-12-14T03:38:58.834Z] testing.tRunner(0xc000b72000, 0x116f620)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/testing/testing.go:1050 +0xdc
[2020-12-14T03:38:58.834Z] created by testing.(*T).Run
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/testing/testing.go:1095 +0x28b
[2020-12-14T03:38:58.834Z] 
[2020-12-14T03:38:58.834Z] goroutine 24 [select, 9 minutes]:
[2020-12-14T03:38:58.834Z] io.(*pipe).Write(0xc0000ac7e0, 0xc000b50000, 0x1, 0x8000, 0x0, 0x0, 0x0)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/pipe.go:94 +0x1db
[2020-12-14T03:38:58.834Z] io.(*PipeWriter).Write(0xc0004a6358, 0xc000b50000, 0x1, 0x8000, 0x1, 0x0, 0x0)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/pipe.go:163 +0x4c
[2020-12-14T03:38:58.834Z] io.copyBuffer(0x12aa4a0, 0xc0004a6358, 0x12aa4c0, 0xc000296e80, 0xc000b50000, 0x8000, 0x8000, 0x2, 0x10, 0x1ce)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/io.go:407 +0x1fb
[2020-12-14T03:38:58.834Z] io.Copy(...)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/io.go:364
[2020-12-14T03:38:58.834Z] github.com/elastic/apm-server/systemtest/apmservertest.(*Server).consumeStderr(0xc00038a2c0, 0x12aa500, 0xc0002014a0)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server/systemtest/apmservertest/server.go:334 +0x6d1
[2020-12-14T03:38:58.834Z] github.com/elastic/apm-server/systemtest/apmservertest.(*Server).Start.func4(0xc0004a6348, 0xc00038a2c0, 0x12b5e40, 0xc0004a6320)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server/systemtest/apmservertest/server.go:183 +0xec
[2020-12-14T03:38:58.834Z] created by github.com/elastic/apm-server/systemtest/apmservertest.(*Server).Start
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server/systemtest/apmservertest/server.go:181 +0x87c
[2020-12-14T03:38:58.834Z] 
[2020-12-14T03:38:58.834Z] goroutine 71 [select]:
[2020-12-14T03:38:58.834Z] net/http.(*persistConn).writeLoop(0xc0005ea120)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/http/transport.go:2336 +0x11c
[2020-12-14T03:38:58.834Z] created by net/http.(*Transport).dialConn
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/net/http/transport.go:1707 +0xc7b
[2020-12-14T03:38:58.834Z] 
[2020-12-14T03:38:58.834Z] goroutine 188 [chan receive]:
[2020-12-14T03:38:58.834Z] go.elastic.co/apm/internal/iochan.(*Reader).Read(0xc00036b040, 0xc0006fc000, 0x2000, 0x2000, 0x2ef, 0x0, 0x0)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/pkg/mod/go.elastic.co/[email protected]/internal/iochan/reader.go:87 +0x135
[2020-12-14T03:38:58.834Z] io/ioutil.devNull.ReadFrom(0x0, 0x12a9e60, 0xc00036b040, 0xfff340, 0x1, 0x7f96e1d69cd0)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/ioutil/ioutil.go:144 +0x92
[2020-12-14T03:38:58.834Z] io.copyBuffer(0x12ab680, 0x1d2d070, 0x12a9e60, 0xc00036b040, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/io.go:391 +0x2fc
[2020-12-14T03:38:58.834Z] io.Copy(...)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/.gvm/versions/go1.14.12.linux.amd64/src/io/io.go:364
[2020-12-14T03:38:58.834Z] go.elastic.co/apm/transport/transporttest.ErrorTransport.SendStream.func1(0x12a9e60, 0xc00036b040, 0xc00070e780)
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/pkg/mod/go.elastic.co/[email protected]/transport/transporttest/err.go:42 +0x67
[2020-12-14T03:38:58.834Z] created by go.elastic.co/apm/transport/transporttest.ErrorTransport.SendStream
[2020-12-14T03:38:58.834Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/pkg/mod/go.elastic.co/[email protected]/transport/transporttest/err.go:41 +0x89
[2020-12-14T03:38:58.834Z] FAIL	github.com/elastic/apm-server/systemtest	601.221s
[2020-12-14T03:38:58.834Z] === RUN   TestAPMServer
[2020-12-14T03:38:58.834Z] 2020/12/14 03:28:49 Building apm-server...
[2020-12-14T03:38:58.834Z] 2020/12/14 03:28:51 Built /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server/apm-server
[2020-12-14T03:38:58.834Z] --- PASS: TestAPMServer (5.57s)
[2020-12-14T03:38:58.834Z] === RUN   TestUnstartedAPMServer
[2020-12-14T03:38:58.834Z] --- PASS: TestUnstartedAPMServer (0.00s)
[2020-12-14T03:38:58.834Z] === RUN   TestExpvar
[2020-12-14T03:38:58.834Z] --- PASS: TestExpvar (1.76s)
[2020-12-14T03:38:58.834Z] PASS
[2020-12-14T03:38:58.834Z] ok  	github.com/elastic/apm-server/systemtest/apmservertest	7.348s
[2020-12-14T03:38:58.834Z] ?   	github.com/elastic/apm-server/systemtest/estest	[no test files]
[2020-12-14T03:38:58.834Z] FAIL
[2020-12-14T03:38:58.834Z] + cleanup
[2020-12-14T03:38:58.834Z] + rm -rf /tmp/tmp.F8WMqi7lRm
[2020-12-14T03:38:58.834Z] + .ci/scripts/docker-get-logs.sh
[2020-12-14T03:39:00.038Z] Post stage
[2020-12-14T03:39:00.050Z] Running in /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516/src/github.com/elastic/apm-server
[2020-12-14T03:39:00.076Z] Archiving artifacts
[2020-12-14T03:39:00.293Z] Recording test results
[2020-12-14T03:39:01.414Z] [WARN] tar: pathPrefix parameter is deprecated.
[2020-12-14T03:39:01.832Z] + tar --version
[2020-12-14T03:39:02.167Z] + tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests
[2020-12-14T03:39:02.167Z] tar: system-tests: Cannot stat: No such file or directory
[2020-12-14T03:39:02.167Z] tar: Exiting with failure status due to previous errors
[2020-12-14T03:39:02.182Z] [INFO] system-tests-linux-files.tgz was not compressed or archived : script returned exit code 2
[2020-12-14T03:39:02.323Z] Failed in branch System and Environment Tests
[2020-12-14T03:44:20.940Z] [INFO] For detailed information see: https://apm-ci.elastic.co/job/apm-integration-tests-selector-mbp/job/master/12449/display/redirect
[2020-12-14T03:44:21.185Z] Copied 17 artifacts from "APM Integration Test MBP Selector » master" build number 12449
[2020-12-14T03:44:22.095Z] Post stage
[2020-12-14T03:44:22.106Z] Recording test results
[2020-12-14T03:44:23.249Z] Running on Jenkins in /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4516
[2020-12-14T03:44:23.320Z] [INFO] getVaultSecret: Getting secrets
[2020-12-14T03:44:23.545Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-12-14T03:44:24.259Z] + chmod 755 generate-build-data.sh
[2020-12-14T03:44:24.259Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4516/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4516/runs/3 FAILURE 2641886
[2020-12-14T03:44:24.810Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4516/runs/3/steps/?limit=10000 -o steps-info.json
[2020-12-14T03:44:25.060Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4516/runs/3/tests/?status=FAILED -o tests-errors.json

@axw axw marked this pull request as ready for review December 10, 2020 08:12
@russcam
Copy link
Contributor

russcam commented Dec 14, 2020

@axw
Copy link
Member Author

axw commented Dec 14, 2020

@russcam that is expected. interface{} is like an "any" type; there are no restrictions on the type.

@russcam
Copy link
Contributor

russcam commented Dec 14, 2020

@russcam that is expected. interface{} is like an "any" type; there are no restrictions on the type.

Gotcha!

Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @axw 👍

@codecov-io
Copy link

Codecov Report

Merging #4516 (f390096) into master (c18c658) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4516   +/-   ##
=======================================
  Coverage   75.94%   75.95%           
=======================================
  Files         161      161           
  Lines        9783     9784    +1     
=======================================
+ Hits         7430     7431    +1     
  Misses       2353     2353           
Impacted Files Coverage Δ
model/modeldecoder/generator/jsonschema.go 73.88% <100.00%> (+0.19%) ⬆️
...ack/apm-server/aggregation/txmetrics/aggregator.go 93.36% <0.00%> (ø)

@axw
Copy link
Member Author

axw commented Dec 14, 2020

Unrelated test failure -- #4366

@axw axw merged commit 726b152 into elastic:master Dec 14, 2020
@axw axw deleted the jsonschema-array-items branch December 14, 2020 04:11
simitt pushed a commit to simitt/apm-server that referenced this pull request Dec 15, 2020
The properties for array items should be tested under "items",
not added directly to the array object.
simitt pushed a commit to simitt/apm-server that referenced this pull request Dec 15, 2020
The properties for array items should be tested under "items",
not added directly to the array object.
simitt added a commit that referenced this pull request Dec 15, 2020
The properties for array items should be tested under "items",
not added directly to the array object.

Co-authored-by: Andrew Wilkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stacktrace property in v2 error spec should list properties under items property
5 participants