chore: use runtime_deps for IC gateway dependencies#8396
Merged
Conversation
fe60671 to
6ac530a
Compare
This deduplicates the data of `IC_GATEWAY_DATA` and replaces its definition with `IC_GATEWAY_RUNTIME_DEPS` which can be used with `runtime_deps`. In a few trivial cases and where applicable `runtime_deps` is also expanded with dependencies from `data` so that `data` can be removed altogether.
6ac530a to
4df3e55
Compare
nmattia
commented
Jan 16, 2026
lwshang
approved these changes
Jan 16, 2026
basvandijk
approved these changes
Jan 16, 2026
andrewbattat
approved these changes
Jan 16, 2026
eichhorl
approved these changes
Jan 16, 2026
blind-oracle
approved these changes
Jan 16, 2026
yhabib
approved these changes
Jan 19, 2026
frankdavid
pushed a commit
that referenced
this pull request
Jan 20, 2026
…Qs on GitHub Actions (#8403) What? === This adds the `//ci/githubstats:query` tool for running "Frequently Asked Queries" on the [github stats](https://github.com/dfinity-ops/k8s/tree/main/bases/apps/github-stats) PostgreSQL database which stores information on all GitHub Action workflow runs of the dfinity/ic repository including bazel invocations. This is an efficient CLI alternative to running the same queries on Apache Superset (https://superset.idx.dfinity.network/) and will allow AI agents to run the same or similar queries (either using this tool or directly using: ``` psql -h githubstats.idx.dfinity.network -U githubstats_read -d github ``` Supported Queries === Currently the following two queries are supported (more will follow later): `top` --- Get the top N most non-successful, flaky, failed, timed-out or slowest tests in the last period. ``` $ bazel run //ci/githubstats:query -- top --help ... usage: bazel run //ci/githubstats:query -- top [-h] [--verbose] [--conninfo STR] [--timeout T] [--tablefmt FMT] [--day | --week | --month] [--prs] [--branch B] [--gt F | --ge F | --lt F | --le F | --eq F] [--owner TEAM] [--hide TEST] [N] {total,non_success,non_success%,flaky,flaky%,timeout,timeout%,fail,fail%,duration_p90} positional arguments: N If specified, limits the number of tests to show (default: 10) {total,non_success,non_success%,flaky,flaky%,timeout,timeout%,fail,fail%,duration_p90} COLUMN to order by and have the condition flags like --gt, --ge, etc. apply to options: -h, --help show this help message and exit --verbose Log queries (default: False) --conninfo STR PostgreSQL connection string (default: postgresql://githubstats_read@githubstats.idx.dfinity.network/github) --timeout T PostgreSQL connect and query timeout in seconds (default: 60) --tablefmt FMT Table format. See: https://pypi.org/project/tabulate/ (default: mixed_outline) --day Limit to last day (default: False) --week Limit to last week (default) (default: False) --month Limit to last month (default: False) --prs Only show test runs on Pull Requests (default: False) --branch B Filter by branch SQL LIKE pattern (default: None) --gt F Only show tests where COLUMN > F (default: None) --ge F Only show tests where COLUMN >= F (default: None) --lt F Only show tests where COLUMN < F (default: None) --le F Only show tests where COLUMN <= F (default: None) --eq F Only show tests where COLUMN = F (default: None) --owner TEAM Filter tests by owner (a regex for the GitHub username or team) (default: None) --hide TEST Hide tests matching this SQL LIKE pattern (default: None) ``` For example: ``` $ bazel run //ci/githubstats:query -- top 10 flaky% --week ┍━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┑ │ │ label │ total │ non_success │ non_success% │ flaky │ flaky% │ timeout │ timeout% │ fail │ fail% │ duration_p90 │ owners │ ┝━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━┿━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━┿━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━━┿━━━━━━━━━━━━┿━━━━━━━━┿━━━━━━━━━┿━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━┥ │ 0 │ //rs/tests/message_routing:state_sync_malicious_chunk_test │ 8 │ 2 │ 25 │ 2 │ 25 │ 0 │ 0 │ 0 │ 0 │ 13:11 │ team-dsm │ │ 1 │ //rs/tests/message_routing:rejoin_test_large_state │ 8 │ 1 │ 12.5 │ 1 │ 12.5 │ 0 │ 0 │ 0 │ 0 │ 10:36 │ team-dsm │ │ 2 │ //rs/tests/consensus/upgrade:upgrade_downgrade_nns_subnet_test │ 96 │ 10 │ 10.4 │ 10 │ 10.4 │ 0 │ 0 │ 0 │ 0 │ 19:10 │ consensus │ │ 3 │ //rs/tests/boundary_nodes:api_bn_integration_test │ 304 │ 30 │ 9.9 │ 28 │ 9.2 │ 0 │ 0 │ 2 │ 0.7 │ 3:56 │ node │ │ 4 │ //rs/tests/consensus/upgrade:upgrade_downgrade_app_subnet_test_colocate │ 96 │ 8 │ 8.3 │ 7 │ 7.3 │ 0 │ 0 │ 1 │ 1 │ 20:02 │ consensus │ │ 5 │ //rs/tests/nns:rent_subnet_test │ 97 │ 9 │ 9.3 │ 7 │ 7.2 │ 0 │ 0 │ 2 │ 2.1 │ 14:23 │ governance-team │ │ 6 │ //rs/tests/message_routing:rejoin_test │ 97 │ 6 │ 6.2 │ 6 │ 6.2 │ 0 │ 0 │ 0 │ 0 │ 6:36 │ team-dsm │ │ 7 │ //rs/tests/consensus/upgrade:upgrade_downgrade_nns_subnet_test_head_nns │ 96 │ 6 │ 6.3 │ 5 │ 5.2 │ 0 │ 0 │ 1 │ 1 │ 18:40 │ consensus │ │ 8 │ //rs/tests/consensus/upgrade:upgrade_app_subnet_test │ 96 │ 5 │ 5.2 │ 5 │ 5.2 │ 0 │ 0 │ 0 │ 0 │ 13:05 │ consensus │ │ 9 │ //rs/tests/nested:hostos_upgrade_from_latest_release_to_current_head_nns │ 96 │ 6 │ 6.3 │ 5 │ 5.2 │ 0 │ 0 │ 1 │ 1 │ 16:42 │ node │ ┕━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┙ ``` Note that: * `label` are terminal hyperlinks to the right file and bazel target in SourceGraph. * `owners` are terminal hyperlinks to the GitHub page of the respected team or user. `last` --- Get the last runs of the specified test in the given period optionally filtered by status. ``` $ bazel run //ci/githubstats:query -- last --help ... usage: bazel run //ci/githubstats:query -- last [-h] [--verbose] [--conninfo STR] [--timeout T] [--tablefmt FMT] [--day | --week | --month] [--prs] [--branch B] [--success] [--flaky] [--failed] [--timedout] test_target positional arguments: test_target Bazel label of the test target to get runs of options: -h, --help show this help message and exit --verbose Log queries (default: False) --conninfo STR PostgreSQL connection string (default: postgresql://githubstats_read@githubstats.idx.dfinity.network/github) --timeout T PostgreSQL connect and query timeout in seconds (default: 60) --tablefmt FMT Table format. See: https://pypi.org/project/tabulate/ (default: mixed_outline) --day Limit to last day (default: False) --week Limit to last week (default) (default: False) --month Limit to last month (default: False) --prs Only show test runs on Pull Requests (default: False) --branch B Filter by branch SQL LIKE pattern (default: None) --success Include successful runs (default: False) --flaky Include flaky runs (default: False) --failed Include failed runs (default: False) --timedout Include timed-out runs (default: False) ``` For example: ``` $ bazel run //ci/githubstats:query -- last --week --flaky //rs/tests/nns:rent_subnet_test ┍━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━┑ │ │ last started at (UTC) │ duration │ status │ branch │ PR │ commit │ buildbuddy │ ┝━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━━━━━┥ │ 0 │ Fri 2026-01-16 16:02:12 │ 13:00 │ FLAKY │ nm-ic-gateway │ #8396 │ 4df3e55 │ log │ │ 1 │ Thu 2026-01-15 09:04:01 │ 12:33 │ FLAKY │ master │ │ 1b744b4 │ log │ │ 2 │ Wed 2026-01-14 15:47:28 │ 14:05 │ FLAKY │ master │ │ 33fb61d │ log │ │ 3 │ Wed 2026-01-14 15:28:34 │ 12:25 │ FLAKY │ rjb/remove-old-prefixes-from-fw │ #8252 │ a294689 │ log │ │ 4 │ Wed 2026-01-14 14:07:26 │ 12:09 │ FLAKY │ master │ │ 5cfda15 │ log │ │ 5 │ Tue 2026-01-13 12:11:40 │ 14:45 │ FLAKY │ nm-dep-dict │ #8333 │ e6ee3a4 │ log │ │ 6 │ Tue 2026-01-13 11:09:52 │ 12:57 │ FLAKY │ delete-bazel-files │ #8332 │ ea0ab95 │ log │ ┕━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━┙ ``` Note the: * `branch` are terminal hyperlinks to the GitHub branch page. * `PR` are terminal hyperlinks to the GitHub PR. * `commit` are terminal hyperlinks to the GitHub commit page. * `log` are terminal hyperlinks to the BuildBuddy log. Future Work === `--download-logs` --- It would save a lot of time if the `last` subcommand would automatically download test logs to a temporary directory if `--download-logs` was specified. That way you can use local tools like `grep`, your text editor or an AI agent to quickly analyse these logs without doing this in a browser via BuildBuddy like we have to do now. Additionally this would enable an `error` column that would show the last error message of a failing test. This would make it very easy to quickly spot patterns. --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org> Co-authored-by: IDX GitHub Automation <>
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.
This deduplicates the data of
IC_GATEWAY_DATAand replaces its definition withIC_GATEWAY_RUNTIME_DEPSwhich can be used withruntime_deps.In a few trivial cases and where applicable
runtime_depsis also expanded with dependencies fromdataso thatdatacan be removed altogether.