Repository navigation
feat(ci): report run stats to the tcache - #185
Open
OlufemiAdeOlusile wants to merge 1 commit into
Open
OlufemiAdeOlusile wants to merge 1 commit into
OlufemiAdeOlusile wants to merge 1 commit into
Conversation
OlufemiAdeOlusile
force-pushed
the
feat/report-stats-to-tcache
branch
from
November 5, 2026 04:49
7823560 to
7cc5506
Compare
After each sync run, a stats document built from the pytest JUnit file and the results JSON (counts, sync time, versions, machine size) is PUT to the testing-results-cache /stats route, the same way cardano-node-tests does. The report runs from a new runner script, run_sync.sh, which wraps pytest and takes the same arguments, so CI and a laptop report the same way. Both workflows now call the runner in place of pytest. The report is off until ENABLE_TCACHE_STATS and the TCACHE_BASIC_AUTH and TCACHE_URL variables are set, and it never changes pytest's exit code. An empty 200 from a proxy with no /stats route is reported as a failure, not taken as success.
OlufemiAdeOlusile
force-pushed
the
feat/report-stats-to-tcache
branch
from
November 5, 2026 06:12
7cc5506 to
7759dd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing in this repo tells the testing-results-cache that a sync run happened, so the testing dashboard that reads the cache cannot count sync runs or sync hours.
The change follows cardano-node-tests: a runner script,
sync_tests/scripts/run_sync.sh, takes the same arguments as pytest, runs it, then reports the run to the cache's/statsroute and exits with pytest's code. Both workflows call the runner in place of pytest, and a developer runs it the same way on a laptop, so CI and local runs are reported alike, withoriginset from the runner and a local run id when there is none. The report carries the counts from pytest's JUnit file and the sync time, versions and machine size from the results JSON, and names the runsync-node-<network>orsync-dbsync-<network>from the options given. It is off untilENABLE_TCACHE_STATS=true,TCACHE_BASIC_AUTHandTCACHE_URLare set. It never changes the run's exit code, and the job summary shows whether it uploaded, was disabled, or failed. A 200 with an empty body, which a proxy returns for a path it does not route, is treated as a failure.Tested by running the real runner with real pytest and the real conftest against a local cache running the
/statsbranch (testing-results-cache PR #25): a CI-style run and a local db-sync run from the mainnet 11.1.0 results file were stored with the right name, origin, sync time and exit code. Seventeen framework tests compute their expectations by hand, and eleven mutants each turned one test red.make lintis green.To turn it on once the cache is deployed with the
/statsroute: add the two secrets and setENABLE_TCACHE_STATStotrue. A GitHub re-run keeps the same run id, so it replaces that run's row.