Skip to content

Comments

Use fixed hash width for ty_server diagnostics#19766

Merged
ntBre merged 1 commit intomainfrom
brent/hash-fix
Aug 5, 2025
Merged

Use fixed hash width for ty_server diagnostics#19766
ntBre merged 1 commit intomainfrom
brent/hash-fix

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Aug 5, 2025

Summary

Fixes a snapshot test failure I saw in #19653 locally and in Windows CI by
padding the hex ID to 16 digits to match the regex in filter_result_id.

fn filter_result_id() -> insta::internals::SettingsBindDropGuard {
let mut settings = insta::Settings::clone_current();
settings.add_filter(r#""[a-f0-9]{16}""#, r#""[RESULT_ID]""#);
settings.bind_to_scope()
}

Test Plan

I applied this to the branch from #19653 locally and saw that the tests now
pass. I couldn't reproduce this failure directly on main or this branch,
though.

Summary
--

Fixes a snapshot test failure I saw in #19653 locally and in Windows CI by
padding the hex ID to 16 digits to match the regex in `filter_result_id`.

https://github.com/astral-sh/ruff/blob/78e5fe0a51fcbb1456d54c65b4632f60c268e389/crates/ty_server/tests/e2e/pull_diagnostics.rs#L380-L384

Test Plan
--

I applied this to the branch from #19653 locally and saw that the tests now
pass. I couldn't reproduce this failure directly on `main` or this branch,
though.
@ntBre ntBre removed request for carljm, dcreager and sharkdp August 5, 2025 14:43
@ntBre ntBre added the testing Related to testing Ruff itself label Aug 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2025

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@ntBre ntBre merged commit 2db4e5d into main Aug 5, 2025
39 checks passed
@ntBre ntBre deleted the brent/hash-fix branch August 5, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to testing Ruff itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant