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

sampling/pubsub/pubsubtest: add some assertions #4445

Closed
wants to merge 1 commit into from

Conversation

axw
Copy link
Member

@axw axw commented Nov 19, 2020

Motivation/summary

Add some assertions about expected data in the
pubsubtest package, panicking on unexpected args.
This is an effort to hunt down the flakiness of
TestProcessLocalTailSampling.

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

make test

Related issues

#4436

Add some assertions about expected data in the
pubsubtest package, panicking on unexpected args.
This is an effort to hunt down the flakiness of
TestProcessLocalTailSampling.
@apmmachine
Copy link
Contributor

apmmachine commented Nov 19, 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: [Branch indexing]

  • Start Time: 2020-11-21T02:50:11.170+0000

  • Duration: 7 min 40 sec

Steps errors 1

Expand to view the steps failures

Run intake

  • Took 4 min 32 sec . View more details on here
  • Description: ./script/jenkins/intake.sh

Log output

Expand to view the last 100 lines of log output

[2020-11-21T02:54:37.938Z] /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/NOTICE.txt
[2020-11-21T02:54:38.201Z] 2020/11/21 02:54:37 exec: go list -m
[2020-11-21T02:54:38.201Z] Running target: Update
[2020-11-21T02:54:38.201Z] Running dependency: Config
[2020-11-21T02:54:38.201Z] Running dependency: Fields
[2020-11-21T02:54:38.201Z] >> Building apm-server.yml for linux/amd64
[2020-11-21T02:54:38.201Z] exec: go list -m -f {{.Dir}} github.com/elastic/beats/v7
[2020-11-21T02:54:38.201Z] >> Building apm-server.docker.yml for linux/amd64
[2020-11-21T02:54:38.463Z] Found Elastic Beats dir at /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected]
[2020-11-21T02:54:38.463Z] exec: go run -mod=readonly /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected]/libbeat/scripts/cmd/global_fields/main.go -es_beats_path /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected] -beat_path /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server -out build/fields/fields.yml model
[2020-11-21T02:54:39.038Z] Generated fields.yml for apm-server to /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/build/fields/fields.yml
[2020-11-21T02:54:39.038Z] exec: go run -mod=readonly /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected]/dev-tools/cmd/asset/asset.go -pkg include -in build/fields/fields.yml -out include/fields.go -license ASL2 apm-server
[2020-11-21T02:54:39.613Z] exec: go run -mod=readonly /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected]/libbeat/scripts/cmd/global_fields/main.go -es_beats_path /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected] -beat_path /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server -out build/fields/fields.all.yml model /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/x-pack/apm-server
[2020-11-21T02:54:40.190Z] Generated fields.yml for apm-server to /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/build/fields/fields.all.yml
[2020-11-21T02:54:40.190Z] >> Generating docs/fields.asciidoc for apm-server
[2020-11-21T02:54:40.190Z] exec: /tmp/tmp.mAuYRG15Bb/python-env/build/ve/linux/bin/python3 /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected]/libbeat/scripts/generate_fields_docs.py build/fields/fields.all.yml apm-server /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/pkg/mod/github.com/elastic/beats/[email protected] --output_path /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server
[2020-11-21T02:54:41.138Z] 2020/11/21 02:54:40 exec: go list -m
[2020-11-21T02:54:41.401Z] Running target: Check
[2020-11-21T02:54:41.401Z] >> check: Checking source code for common problems
[2020-11-21T02:54:41.401Z] Running dependency: github.com/elastic/beats/v7/dev-tools/mage.CheckYAMLNotExecutable
[2020-11-21T02:54:41.401Z] Running dependency: github.com/elastic/beats/v7/dev-tools/mage.GoVet
[2020-11-21T02:54:41.401Z] exec: go vet ./...
[2020-11-21T02:54:41.401Z] Running dependency: github.com/elastic/beats/v7/dev-tools/mage.CheckPythonTestNotExecutable
[2020-11-21T02:54:41.401Z] go: downloading github.com/tidwall/sjson v1.1.1
[2020-11-21T02:54:41.401Z] go: downloading github.com/stretchr/testify v1.6.1
[2020-11-21T02:54:41.401Z] go: downloading github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56
[2020-11-21T02:54:41.401Z] go: downloading github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
[2020-11-21T02:54:41.667Z] go: downloading github.com/tidwall/gjson v1.6.0
[2020-11-21T02:54:41.667Z] go: downloading github.com/santhosh-tekuri/jsonschema v1.2.4
[2020-11-21T02:54:41.667Z] go: downloading github.com/ianlancetaylor/demangle v0.0.0-20200715173712-053cf528c12f
[2020-11-21T02:54:41.667Z] go: downloading github.com/tidwall/pretty v1.0.1
[2020-11-21T02:54:41.667Z] go: downloading github.com/tidwall/match v1.0.1
[2020-11-21T02:54:41.667Z] go: downloading github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
[2020-11-21T02:54:41.667Z] go: downloading github.com/pmezard/go-difflib v1.0.0
[2020-11-21T02:54:41.667Z] go: downloading gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
[2020-11-21T02:54:41.667Z] go: downloading github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb
[2020-11-21T02:56:48.387Z] exec: git update-index -q --refresh
[2020-11-21T02:56:48.387Z] exec: git diff-index HEAD -- .
[2020-11-21T02:56:48.387Z] exec: git --no-pager diff --minimal
[2020-11-21T02:56:48.387Z] diff --git a/NOTICE.txt b/NOTICE.txt
[2020-11-21T02:56:48.387Z] index e803dccaa..f69c95a23 100644
[2020-11-21T02:56:48.387Z] --- a/NOTICE.txt
[2020-11-21T02:56:48.387Z] +++ b/NOTICE.txt
[2020-11-21T02:56:48.387Z] @@ -3499,11 +3499,6 @@ Contents of "LICENSE":
[2020-11-21T02:56:48.387Z]      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
[2020-11-21T02:56:48.387Z]      OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[2020-11-21T02:56:48.387Z]  
[2020-11-21T02:56:48.387Z] ---------------------------------------------------------------------
[2020-11-21T02:56:48.387Z] -Dependency: github.com/ua-parser/uap-go
[2020-11-21T02:56:48.387Z] -Revision: e1c09f13e2fe
[2020-11-21T02:56:48.387Z] -License type (autodetected): Apache-2.0
[2020-11-21T02:56:48.387Z] -
[2020-11-21T02:56:48.387Z]  --------------------------------------------------------------------
[2020-11-21T02:56:48.387Z]  Dependency: github.com/uber/tchannel-go
[2020-11-21T02:56:48.387Z]  Version: v1.16.0
[2020-11-21T02:56:48.387Z] Error: some files are not up-to-date. Run 'make fmt update' then review and commit the changes. Modified: [NOTICE.txt]
[2020-11-21T02:56:48.387Z] main.Check
[2020-11-21T02:56:48.387Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/magefile.go:470
[2020-11-21T02:56:48.387Z] main.main.func16
[2020-11-21T02:56:48.387Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/mage_output_file.go:617
[2020-11-21T02:56:48.387Z] main.main.func12.1
[2020-11-21T02:56:48.387Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/src/github.com/elastic/apm-server/mage_output_file.go:284
[2020-11-21T02:56:48.387Z] runtime.goexit
[2020-11-21T02:56:48.387Z] 	/var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445/.gvm/versions/go1.14.7.linux.amd64/src/runtime/asm_amd64.s:1373
[2020-11-21T02:56:48.387Z] Makefile:76: recipe for target 'check' failed
[2020-11-21T02:56:48.387Z] make: *** [check] Error 1
[2020-11-21T02:56:48.387Z] + cleanup
[2020-11-21T02:56:48.387Z] + rm -rf /tmp/tmp.mAuYRG15Bb
[2020-11-21T02:56:49.564Z] Stage "Build and Test" skipped due to earlier failure(s)
[2020-11-21T02:56:49.651Z] Stage "linux build" skipped due to earlier failure(s)
[2020-11-21T02:56:49.652Z] Stage "windows build-test" skipped due to earlier failure(s)
[2020-11-21T02:56:49.653Z] Stage "OSX build-test" skipped due to earlier failure(s)
[2020-11-21T02:56:49.654Z] Stage "Unit Test" skipped due to earlier failure(s)
[2020-11-21T02:56:49.655Z] Stage "System and Environment Tests" skipped due to earlier failure(s)
[2020-11-21T02:56:49.656Z] Stage "Benchmarking" skipped due to earlier failure(s)
[2020-11-21T02:56:49.656Z] Stage "Check kibana Obj. Updated" skipped due to earlier failure(s)
[2020-11-21T02:56:49.657Z] Stage "Hey-Apm" skipped due to earlier failure(s)
[2020-11-21T02:56:49.658Z] Stage "Package" skipped due to earlier failure(s)
[2020-11-21T02:56:49.658Z] Stage "APM Integration Tests" skipped due to earlier failure(s)
[2020-11-21T02:56:49.693Z] Stage "Package" skipped due to earlier failure(s)
[2020-11-21T02:56:49.830Z] Failed in branch linux build
[2020-11-21T02:56:49.831Z] Failed in branch windows build-test
[2020-11-21T02:56:49.831Z] Failed in branch OSX build-test
[2020-11-21T02:56:49.832Z] Failed in branch Unit Test
[2020-11-21T02:56:49.833Z] Failed in branch System and Environment Tests
[2020-11-21T02:56:49.833Z] Failed in branch Benchmarking
[2020-11-21T02:56:49.834Z] Failed in branch Check kibana Obj. Updated
[2020-11-21T02:56:49.834Z] Failed in branch Hey-Apm
[2020-11-21T02:56:49.835Z] Failed in branch APM Integration Tests
[2020-11-21T02:56:49.886Z] Stage "Package" skipped due to earlier failure(s)
[2020-11-21T02:56:49.946Z] Failed in branch Package
[2020-11-21T02:56:50.558Z] Running on Jenkins in /var/lib/jenkins/workspace/pm-server_apm-server-mbp_PR-4445
[2020-11-21T02:56:50.864Z] [INFO] getVaultSecret: Getting secrets
[2020-11-21T02:56:51.030Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-11-21T02:56:51.770Z] + chmod 755 generate-build-data.sh
[2020-11-21T02:56:51.770Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4445/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4445/runs/4 FAILURE 400340
[2020-11-21T02:56:52.321Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4445/runs/4/steps/?limit=10000 -o steps-info.json
[2020-11-21T02:56:52.872Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-server/apm-server-mbp/PR-4445/runs/4/tests/?status=FAILED -o tests-errors.json
[2020-11-21T02:56:52.872Z] Retry 1/3 exited 22, retrying in 1 seconds...
[2020-11-21T02:56:54.216Z] Retry 2/3 exited 22, retrying in 2 seconds...

@axw
Copy link
Member Author

axw commented Nov 19, 2020

jenkins run the tests please

@codecov-io
Copy link

Codecov Report

Merging #4445 (5f69069) into master (f0dc152) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4445      +/-   ##
==========================================
+ Coverage   76.11%   76.12%   +0.01%     
==========================================
  Files         156      156              
  Lines        9713     9713              
==========================================
+ Hits         7393     7394       +1     
+ Misses       2320     2319       -1     
Impacted Files Coverage Δ
...ack/apm-server/aggregation/txmetrics/aggregator.go 93.80% <0.00%> (+0.44%) ⬆️

@axw axw closed this Nov 23, 2020
@axw axw deleted the pubsubtest-paranoia branch November 23, 2020 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants