Closed Bug 1792327 Opened 2 years ago Closed 2 years ago

Improve process-tc-artifacts.sh' save-analysis normalization to not get tricked by the escaped substring `\"src\"` inside a JSON string

Categories

(Webtools :: Searchfox, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

References

Details

Attachments

(1 file)

Bug 1789507 brought a change to the standard library at https://github.com/rust-lang/rust/blob/0ebd3ab63aa08337bb4e4600358679262ce8d242/library/std/src/fs.rs#L660 which included the line:

    ///     let src = fs::metadata("src")?;

which, as a comment, ends up in the save-analysis as \"src\" which tricked our hacky, naive sed path-normalization logic which was looking for a regexp match against "src[/\\] in order to replace it with "__GENERATED__/__RUST_STDLIB__/ which broke the closing escaped \" by turning it into /". I don't think I'd fully appreciated that arbitrary strings could end up in the save-analysis JSON when implementing the massive hack that the normalization is, although I was also down a very long yak-shaving rabbit hole. In any event, save-analysis is going away for our purposes in bug 1761287 so I'm just going to minimally fix this hack.

A manually re-triggering of the config1 lambda job successfully completed with this fix in place and this is confirmed by manual verification of the updated revision and the relevant check.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: