diff --git a/.github/workflows/update-rust-analyzer.lock.yml b/.github/workflows/update-rust-analyzer.lock.yml index 430687e6c7fd..6a403c04f04c 100644 --- a/.github/workflows/update-rust-analyzer.lock.yml +++ b/.github/workflows/update-rust-analyzer.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"89825e14c90fc1af478d2ac55eb66b5a0df973d37da033c508e957ec5cea2543","body_hash":"990718b1868afabca459556cc701c1d0ef315857b226b054dfe36037ea0c6371","compiler_version":"v0.88.7","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.80"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"89825e14c90fc1af478d2ac55eb66b5a0df973d37da033c508e957ec5cea2543","body_hash":"ba6be270b77cdf21fed3489d4d8178200f5de7cfbab7ab7c273de57ad45f2383","compiler_version":"v0.88.7","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.80"}} # gh-aw-manifest: {"version":1,"secrets":["GH_AW_CI_TRIGGER_TOKEN","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"5e508589e03a7757a7e05b26e834292f5445bfb6","version":"v0.88.7"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.14","digest":"sha256:f7df036c86575527b61f3f7df91c4412349a12b2a74988d929eafa2999230c98","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.14@sha256:f7df036c86575527b61f3f7df91c4412349a12b2a74988d929eafa2999230c98"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.14","digest":"sha256:6f95e2234dd9bd6333a8ff28ccea7ecf0204acd4a09108723844dbd2bf6268c5","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.14@sha256:6f95e2234dd9bd6333a8ff28ccea7ecf0204acd4a09108723844dbd2bf6268c5"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.28.14","digest":"sha256:3a379c5e96e29499c815e9dd2a71334d01c326a9b73991c76544fda9cae35c34","pinned_image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.28.14@sha256:3a379c5e96e29499c815e9dd2a71334d01c326a9b73991c76544fda9cae35c34"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.14","digest":"sha256:2ce8df3abf3e9b76e9c0cf5863da41f1ab3f89b20ad14b988806ab89e7bf2cd5","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.14@sha256:2ce8df3abf3e9b76e9c0cf5863da41f1ab3f89b20ad14b988806ab89e7bf2cd5"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.18","digest":"sha256:85b940556a8faa4e1fdbef124bfd75f2c4ebd855a10b88a1c3b6f3e97f6f1a53","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.18@sha256:85b940556a8faa4e1fdbef124bfd75f2c4ebd855a10b88a1c3b6f3e97f6f1a53"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0daa8971fa4732b647150cb6524a6b0804b68d5d24f6f58b5dd1af23bd63fb23","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0daa8971fa4732b647150cb6524a6b0804b68d5d24f6f58b5dd1af23bd63fb23"},{"image":"ghcr.io/github/github-mcp-server:v1.11.0","digest":"sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699","pinned_image":"ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699"}],"mcp_servers":[{"name":"safeoutputs","tools":["create_pull_request","missing_data","missing_tool","noop"]}]} # This file was automatically generated by gh-aw (v0.88.7). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/update-rust-analyzer.md b/.github/workflows/update-rust-analyzer.md index 1b00961dd10c..23c6aebb4e44 100644 --- a/.github/workflows/update-rust-analyzer.md +++ b/.github/workflows/update-rust-analyzer.md @@ -109,23 +109,16 @@ CI, modify files, or create a pull request. Otherwise, continue the update from the existing working tree and commits: -1. Read `rust/updating-rust-analyzer.md` and all applicable repository - instructions. -2. Review the updater log, exit status, commits, and working tree. Do not rerun - the updater script. -3. Complete as much of the documented update as possible. Fix extractor or - code-generation breakage, keep all `ra_ap_` dependency versions aligned, - regenerate required files, and add schema upgrade/downgrade scripts, tests, - and a change note when the schema changed. -4. Run the relevant formatting, linting, code generation, build, and tests, - including `bazel run //rust:install`. Use `gh` to inspect relevant existing - CI configuration and prior failures while diagnosing problems. -5. Review the complete diff and commits. Do not include secrets. Do not refer +1. Review the updater log, exit status, commits, and working tree. Do not rerun + the updater script or undo changes that it successfully made. +2. Read `rust/updating-rust-analyzer.md` and all applicable repository + instructions, then complete the remaining update steps. +3. Review the complete diff and commits. Do not include secrets. Do not refer to private repositories, internal issues, or internal pull requests in the public pull request. -6. Use `create_pull_request` exactly once to create a focused draft pull - request. Summarize the updater output, changes, and validation. If the - update cannot be finished, still create a partial draft pull request when +4. Use `create_pull_request` exactly once. Summarize the updater output, + changes, and validation. If the update cannot be finished, still create a + partial draft pull request when there are useful changes, and clearly list failures, missing work, and the next commands for a maintainer. @@ -134,9 +127,3 @@ CI cannot be awaited in this run. Compensate with the strongest practical local validation and state this limitation accurately in the pull request. If the updater did not report `no-update` but no useful patch can be produced, call `report_incomplete` with the updater failure and exact blocker. - -## Safe Outputs - -- Use `create_pull_request` for the update or partial update. -- Use `noop` only for the exact no-update result. -- Use `report_incomplete` only when no useful pull request can be created. diff --git a/rust/updating-rust-analyzer.md b/rust/updating-rust-analyzer.md index c68abb0b8fe3..5a1bd8c661a2 100644 --- a/rust/updating-rust-analyzer.md +++ b/rust/updating-rust-analyzer.md @@ -107,12 +107,35 @@ pkg-config`. toolchain, running `rust/lint.py` might reformat or apply new lints to the code. -7. Check with CI if everything is in order. +7. Update `.expected` files by running: + ``` + codeql test run --learn --search-path=rust/extractor-pack:. \ + --consistency-queries=rust/ql/consistency-queries rust/ql/test + ``` + The search path selects the newly built extractor from step 6. + + If there are changes, commit the updated expectations: + ``` + git add 'rust/ql/test/**/*.expected' + git commit -m 'Rust: Update test expectations' + ``` -8. Run DCA with database caching disabled. Iterate on the code if needed. +8. Check the `.expected` files for `testFailures` and fix the underlying + problems. + + For each separate problem address the issue, regenerate the `.expected` + files with the command from step 7, and create a commit. + + Repeat until no rows under `testFailures` remain and the tests pass. 9. If in step 5 the schema was updated, add upgrade/downgrade scripts and a change note. This is best done last to reduce the chance of merge conflicts (none of the other testing depends on having upgrade and downgrade scripts in place). See [Upgrading a language database schema](docs/prepare-db-upgrade.md). + +10. Create a PR with the changes thus far. + +11. Check with CI if everything is in order. + +12. Run DCA with database caching disabled. Iterate on the code if needed.