Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
109642: Grafana dashboard sync r=srosenberg,herkolategan a=smg260

2 commits for the Grafana dashboard jsons
- update the repo with the latest from https://grafana.testeng.crdb.io/dashboards/f/PYSGrKenz/crdb
- update the dashboards to utilise `test_run_id` and `test_name` introduced as part of #107965

1 commit is just adding the latest prom config for testeng grafana

Dashboards available at: https://grafana.testeng.crdb.io/dashboards/f/Kmw561gIk/crdb-by-test-run-and-name
Home page: https://grafana.testeng.crdb.io/d/crdb-home/crdb-home?orgId=1

Release note: none
Epic: none

109790: build,util: disable metamorphic variables in Bazel-generated wrappers r=AlexTalks a=AlexTalks

Since metamorphic variables are declared and logged at module initialization time, and since tests run under Bazel use a generated wrapper that imports the test module before forking a child test process (which performs all the same imports, and thus init-time logging), there has been a longstanding issue with metamorphic variables that can be illustrated as follows (lines starting `--DBG` added for clarity):
```
==================== Test output for //pkg/kv/kvserver:kvserver_test:
-- DBG (pid 28890) metamorphic build: true --
initialized metamorphic constant "span-reuse-rate" with value 74
initialized metamorphic constant "merge-joiner-groups-buffer" with value 8
initialized metamorphic constant "write-metadata-sst" with value true
...
initialized metamorphic constant "changefeed.new_webhook_sink_enabled" with value true
initialized metamorphic constant "changefeed.new_pubsub_sink_enabled" with value true
-- DBG (pid 29024) metamorphic build: false --
I230420 03:31:50.151970 1 (gostd) rand.go:243  [-] 1  random seed: 3912943573250159482
=== RUN   TestDecommission
...
```

This is particularly confusing without the added `--DBG` lines because a developer looking at a test has no idea if the metamorphic variables logged actually apply to the run of the test in question, or if they apply to the wrapper.

This change adds a check prior to enabling metamorphic variables to ensure that the code is **not** being called by the test wrapper, but by the test itself. This ensures that metamorphic variables, and their logging, is only enabled in the actual test run, clearing up the longstanding confusion.

Epic: none

Release note (build change): Metamorphic variable logging in test runs now reliably pertains to the actual test run, and can be trusted to be valid.

Co-authored-by: Miral Gadani <[email protected]>
Co-authored-by: Alex Sarkesian <[email protected]>
  • Loading branch information
3 people committed Sep 7, 2023
3 parents cd2e060 + 24bc2b1 + 2f43cda commit 5dd3ab1
Show file tree
Hide file tree
Showing 46 changed files with 82,075 additions and 3,130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ providers:
allowUiUpdates: false
options:
path: /var/lib/grafana/dashboards
foldersFromFilesStructure: true
Loading

0 comments on commit 5dd3ab1

Please sign in to comment.