GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Harden `sanitizeLog` against incorrect matches on TypeScript versions. by DanielRosenwasser · Pull Request #60794 · microsoft/TypeScript

Conversation

@DanielRosenwasser

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) commented Dec 17, 2024

Copy link
Copy Markdown
Member

Background

Because we don't want to update every server log baseline on every TypeScript version change, we sanitize server logs based on the current TypeScript version. Specifically, we replace occurrences of the full version with FakeVersion, and replace occurrences of the major.minor version with tsFakeMajor.Minor.

Problem

When TypeScript updating to 5.7.3, the baselines were incorrectly updated because we have a server test with a package at the version 15.7.3. This is not the first time we hit this issue, and historically we have gotten around it by just changing the version of the test package.

Proposed Fix

Andrew Branch (@andrewbranch)'s suggestion was to switch to a regex and add boundaries to the beginning/end. This doesn't entirely fix the issue, but it does harden the test runner by avoiding a match of 5.7.3 within 15.7.3.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@DanielRosenwasser
Harden sanitizeLog against incorrect matches on TypeScript versions.
2fc2bdc
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) requested review from Andrew Branch (andrewbranch), Gabriela Araujo Britto (gabritto), Jake Bailey (jakebailey) and Wesley Wigham (weswigham) December 17, 2024 19:15
@typescript-bot TypeScript Bot (typescript-bot) assigned Daniel Rosenwasser (DanielRosenwasser) Dec 17, 2024
@typescript-bot TypeScript Bot (typescript-bot) added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Dec 17, 2024
jakebailey
Jake Bailey (jakebailey) approved these changes Dec 17, 2024
View reviewed changes

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Seems fine to me; would rather this and a cherry-pick to release-5.7 rather than manual changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
andrewbranch
Andrew Branch (andrewbranch) approved these changes Dec 17, 2024
View reviewed changes
andrewbranch
Andrew Branch (andrewbranch) requested changes Dec 17, 2024
View reviewed changes
Comment thread src/harness/tsserverLogger.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/harness/tsserverLogger.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Daniel Rosenwasser (DanielRosenwasser) and others added 2 commits December 17, 2024 11:57
@DanielRosenwasser @andrewbranch
Escape versions.
30b13f8
Co-authored-by: Andrew Branch <[email protected]>
@DanielRosenwasser
Qualify.
b7dceba
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) merged commit 7be4b2c into main Dec 17, 2024
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) deleted the tsVersionsInSanitizeLog branch December 17, 2024 20:56
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Dec 17, 2024

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) cherry-pick to release-5.7

typescript-bot reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 17, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick to release-5.7 ✅ Started ✅ Results
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TypeScript Bot (typescript-bot) pushed a commit that referenced this pull request Dec 17, 2024
@DanielRosenwasser @andrewbranch @typescript-bot
Harden sanitizeLog against incorrect matches on TypeScript versions. (
44001eb
#60794)

Co-authored-by: Andrew Branch <[email protected]>
@typescript-bot TypeScript Bot (typescript-bot) mentioned this pull request Dec 17, 2024
🤖 Pick PR #60794 (Harden sanitizeLog against incorr...) into release-5.7 #60798
Merged
@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 17, 2024

Copy link
Copy Markdown
Contributor

Hey, Daniel Rosenwasser (@DanielRosenwasser)! I've created #60798 for you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Daniel Rosenwasser (DanielRosenwasser) added a commit that referenced this pull request Dec 17, 2024
@typescript-bot @DanielRosenwasser @andrewbranch
🤖 Pick PR #60794 (Harden sanitizeLog against incorr...) into releas…
e167412
…e-5.7 (#60798)

Co-authored-by: Daniel Rosenwasser <[email protected]>
Co-authored-by: Andrew Branch <[email protected]>
@sandersn Nathan Shively-Sanders (sandersn) removed this from PR Backlog Apr 22, 2025
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@andrewbranch Andrew Branch (andrewbranch) andrewbranch requested changes
@jakebailey Jake Bailey (jakebailey) jakebailey approved these changes
@weswigham Wesley Wigham (weswigham) Awaiting requested review from weswigham
@gabritto Gabriela Araujo Britto (gabritto) Awaiting requested review from gabritto

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser)

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@DanielRosenwasser @typescript-bot @andrewbranch @jakebailey
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.