Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize version string for syntactically invalid buildinfo baselines #59932

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

weswigham
Copy link
Member

Nightlies haven't been publishing for a few days because some new baselines inadvertently captured the current ts version in them. The fancy automatic .buildinfo version stripping logic done by the builder baselines only applies to syntactically valid .buildinfo files, so these tests with slightly invalid ones were inadvertently capturing the current version in the test baseline. Do note, with how the version removal machinery works, this extra ad-hoc sanitization is edit-order-dependent - if you try and make this edit before making the file syntactically invalid, the version-stripping-aware-sys will just add the current version right back to the file when it's re-read for the 2nd edit. 😅

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 10, 2024
@jakebailey
Copy link
Member

This applies the fix in the couple of tests; there's no way to do it more generally for syntactically invalid cases?

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

In any case, worth unblocking nightly

@weswigham weswigham merged commit 0d7763e into microsoft:main Sep 10, 2024
32 checks passed
@weswigham
Copy link
Member Author

This applies the fix in the couple of tests; there's no way to do it more generally for syntactically invalid cases?

Probably not - regex searching for "probable version strings" or the like in test baseline data is probably best avoided, since it could result in some unintuitive failures; I think we can probably handle sanitizing it manually in the tests where we know the automatic system is going to fail. Probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants