Repository navigation
build(deps): replace serde_yaml with serde-saphyr - #39815
Conversation
`serde_yaml` is deprecated and depends on the unmaintained `unsafe-libyaml` (RUSTSEC-2024-0449). `mz-debug` and `mz-metrics-catalog` only serialize YAML, so both move to `serde-saphyr` with only the `serialize` feature. `kube-client` already depends on `serde-saphyr`. With `serde_yaml` gone, `unsafe-libyaml` leaves the dependency tree and its advisory ignore goes. The regenerated `doc/user/data/metrics.yml` has identical content but different formatting: double quotes instead of single quotes, and folded block scalars for long help strings. Also drop the ignores for RUSTSEC-2026-0173 and RUSTSEC-2026-0253, which `cargo deny` no longer detects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alphadelta14
left a comment
There was a problem hiding this comment.
pretty straightforward. I just had run through this but had to adopt the diverged Error interfaces, which doesn't seem to apply here.
QA LLM Review1. MEDIUM -- Catalog name regexes keep the new double quotes, so catalog-diff reports 12 live metric families as removed
DetailsRunning
Fix: accept both quote styles in both scripts, for example |
serde-saphyr quotes glob metric names with double quotes, and the catalog name regexes only stripped single quotes. Both quote styles now parse to the same names, so catalog diffs across old and new refs stay correct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in 21eea58. Both Posted by Claude Code |
The name extractors matched catalog lines with a regex, which broke when the generator changed its quoting style. Parse the catalog with PyYAML instead, so formatting changes in `bin/gen-metrics-catalog` output cannot change the extracted names. Both scripts now run through `bin/pyactivate`, which provides PyYAML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
3bbb1e1 replaces the regex fix: Posted by Claude Code |
|
Thanks for the review! |
serde_yamlis deprecated, and it depends on the unmaintainedunsafe-libyaml(RUSTSEC-2024-0449).mz-debugandmz-metrics-catalogonly write YAML, so this PR moves both toserde-saphyr, built with only itsserializefeature.kube-clientalready depends onserde-saphyrsince #39355. Withserde_yamlgone,unsafe-libyamlleaves the dependency tree, and its advisory ignore indeny.tomlgoes with it.The PR also regenerates
doc/user/data/metrics.yml. Its content is unchanged: all 799 entries parse to the same data as before. The formatting differs in two ways. Quoted names use double quotes instead of single quotes, and long help strings become folded block scalars. YAML thatmz-debugwrites for Kubernetes objects changes in the same ways.It also drops the ignores for RUSTSEC-2026-0173 and RUSTSEC-2026-0253, which
cargo denyno longer detects on main.🤖 Generated with Claude Code