Skip to content

Rust: Update instructions for rust-analyzer update automation - #22827

Merged
paldepind merged 3 commits into
mainfrom
rust/update-workflow
Oct 15, 2026
Merged

paldepind merged 3 commits into
mainfrom
rust/update-workflow

Conversation

@paldepind

Copy link
Copy Markdown
Contributor
  • First commit adds new steps about running QL tests and fixing issues that they expose. I've also moved the "add upgrade/downgrade scripts" earlier. The agentic workflow ends when it opens a PR, so the step is now prior to creating a PR and observing CI.
  • Second commit removes some parts of the workflow instructions that duplicate.

In particular, add additional steps about re-generating `.expected`
files and fixing problems exposed by doing that.
@github-actions github-actions Bot added documentation Rust Pull requests that update Rust code labels Oct 15, 2026
@paldepind
paldepind marked this pull request as ready for review October 15, 2026 11:00
@paldepind
paldepind requested review from a team as code owners October 15, 2026 11:00
@paldepind
paldepind requested review from andersfugmann and a max review from Copilot October 15, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The validation instructions need corrections to reliably check extractor fixes and all expected test results.

3 open findings
What changed in this PR

Updates rust-analyzer maintenance guidance so automation completes local validation and schema work before opening a PR.

Changes:

  • Adds QL expectation regeneration and failure-repair steps.
  • Moves schema preparation before PR creation.
  • Simplifies workflow instructions and refreshes generated metadata.
File Description
rust/​updating-rust-analyzer.md Adds test-validation steps and reorders PR preparation.
.github/​workflows/​update-rust-analyzer.md Consolidates instructions around the maintenance guide.
.github/​workflows/​update-rust-analyzer.lock.yml Updates the generated workflow body hash.

🧠 Review effort: Max


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust/updating-rust-analyzer.md
Comment on lines +125 to +126
For each separate problem address the issue, regenerate the `.expected`
files with the command from step 7, and create a commit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be said. Of course the extractor must be re-built if its code is changed.

Comment thread rust/updating-rust-analyzer.md Outdated
For each separate problem address the issue, regenerate the `.expected`
files with the command from step 7, and create a commit.

Repeat until no `testFailures` remain and the tests pass.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tweaked the sentence a bit.

@paldepind
paldepind force-pushed the rust/update-workflow branch from 2f94c1d to 89fca11 Compare October 15, 2026 11:47

@andersfugmann andersfugmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One comment to consider if you want to follow up on later.

Comment thread rust/updating-rust-analyzer.md Outdated
7. Check with CI if everything is in order.
7. Update `.expected` files by running:
```
codeql test run --learn --search-path=rust/extractor-pack:. rust/ql/test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Its my experience that copilot might eagerly do this without actually assessing if the changes are acceptable. Consider in a followup PR to strengthen this by instructing copilot that tests and expected files are precious, and changes should only be accepted after careful scrutiny. Do not blindly accept changes to e.g. locations without first understanding if the changes are good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that in step 7 we want to blindly accept all test changes. This gives a PR where we can observe exactly what the fallouts are. Then in step 8 things should be fixed and only desired changes should be accepted. Does that make sense?

@paldepind
paldepind merged commit 2ed987f into main Oct 15, 2026
11 checks passed
@paldepind
paldepind deleted the rust/update-workflow branch October 15, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants