-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Binlogs Redacting support + Binlogs forward-compatibility reading support #9307
Binlogs Redacting support + Binlogs forward-compatibility reading support #9307
Conversation
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.
Request change is only for missing that "backward-compatible-with" field.
Otherwise it looks OK. But I have to admit that I have not time to carefully review full extent of this PR.
Is there a design doc or some overview of what the redactor does - it sounds interesting? |
Hi @danmoseley, Design proposal of redactor is located here: https://github.com/JanKrivanek/MSBuildBinlogRedactor/blob/main/docs/DesignProposal.md (ultimate long term wishful plan is here https://github.com/dotnet/msbuild/blob/main/documentation/specs/proposed/security-metadata.md) |
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.
I've left comments inline, mostly nits.
src/Build/Logging/BinaryLogger/Postprocessing/TransparentReadStream.cs
Outdated
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/IBuildEventArgsReaderNotifications.cs
Outdated
Show resolved
Hide resolved
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.
Minor comments
src/Build/Logging/BinaryLogger/Postprocessing/IBinlogReaderErrors.cs
Outdated
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/IBinlogReaderErrors.cs
Outdated
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/IBinlogReaderErrors.cs
Outdated
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/IBuildEventStringsReader.cs
Outdated
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/IBuildFileReader.cs
Outdated
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/ArchiveFileEventArgsExtensions.cs
Show resolved
Hide resolved
src/Build/Logging/BinaryLogger/Postprocessing/EmbeddedContentKind.cs
Outdated
Show resolved
Hide resolved
292072d
to
a71f8b3
Compare
Sorry I'm late to this review, overall I think things look good. It's high praise from me for a change of this magnitude ;) A few minor and subjective impressions. Most importantly, both the previous designs and this current one seem heavy with fine-grained interfaces which I don't think are necessary. Your primary hint that an interface is not necessary is that it only has a single implementation. Another one is that no one is actually using the interface. I haven't dug deep, but at first glance I personally don't see a ton of value in localizing these types of exceptions, but since the work is already done, might as well leave it. |
One other thought I had that's not necessarily for this PR, but somewhat related. Right now all binlog files start with Wondering if we could prepare for that future today by gracefully showing a message if the binlog file doesn't start with Currently we handle it relatively well: |
@KirillOsenkov - thank you for review! (here and in StructuredLogger as well - both requiring significant time from your side)
|
I published the viewer update here: The NuGet package here: The binlogtool here: Let's proactively test these and maybe send some PRs to Arcade, Roslyn, Maui and a few other repos to get some testing. Then when we do bump the format to 18 and 18 binlogs start to come out we won't break too many people. Both nuget.org and github now can show projects/packages that depend on MSBuild.StructuredLogger NuGet. |
Is this the behavior we want/expect when we don't opt in MSBuild to be forward compatible by default? |
I suppose the junk byte was added without increasing the version - correct? Then it's expected - we still crash, but more gracefully. |
No, I increased the version |
Thanks @KirillOsenkov - good catch! Not expected indeed! - all the forward compatible flags (allow reading higher version, allow skipping unknown events, allow skiping unknown data in known events) should have same default setting - there was one (allow reading higher version) which was permitted by default - fixed now |
Let's not merge until the linked PRs are merged (to minimize breaking internal teams) |
Fixes #9147, #9261 and contributes to #8400
Viewer complement PR: KirillOsenkov/MSBuildStructuredLog#732
Important
This contains all changes from
Context and changes are described in those individual PRs
Feel free to review everything together (this PR), or separately (above 2 PRs) - but not all 3 as you'd be viewing same changes twice
TBD:
localize all stringsDoneI'm contemplating adding support for recognizing over-reading and mismatched reading during events deserializationDone