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

MuxLogger discrepancy introduced by new event #10493

Open
maridematte opened this issue Aug 6, 2024 · 1 comment
Open

MuxLogger discrepancy introduced by new event #10493

maridematte opened this issue Aug 6, 2024 · 1 comment
Assignees
Labels
Area: BuildCheck Area: Logging Priority:2 Work that is important, but not critical for the release triaged

Comments

@maridematte
Copy link
Contributor

maridematte commented Aug 6, 2024

MuxLogger and normal logger have output difference of a blank line with the introduction of new event. The test (here) was made more lenient so we could get work done without this being a blocker. This issue is being created to keep track of this difference and address it in the future.

Context

When adding the new event BuildSubmissionStartedEventArgs (#10424) an unintentional side effect was changing how the logging output looks like. This is happening because there is a difference in event order between loggers.

Using the case of the MockLogger. The MockLogger will receive a BuildStartedEvent, log it, and then receive BuildSubmissionStartedEvent, log it, and then receive ProjectStartedEvent and log it.

flowchart LR
BS[BuildStartedEvent] --> BSS[BuildSubmissionStartedEvent] --> BS2[ProjectStartedEvent]
Loading

The MuxLogger will receive a BuildStartedEvent, ignore it, receive a BuildSubmissionStartedEvent, log it, and then receive ProjectStartedEvent when it will create an artificial BuildStartedEvent that will then log before logging ProjectStartedEvent.

flowchart LR
BS[BuildSubmissionStartedEvent] --> BSS[BuildStartedEvent] --> BS2[ProjectStartedEvent]
Loading

This causes the general event order to be different and for the outputs to be different.

@AR-May AR-May added Area: BuildCheck Priority:2 Work that is important, but not critical for the release labels Aug 7, 2024
@AR-May
Copy link
Member

AR-May commented Aug 7, 2024

This different order might result in VS loggers either getting data in different order or not getting events before BuildStartedEvent, which is currently only BuildSubmissionStartedEvent needed for analyzers. This is acceptable until we bring analyzers to VS scenarios (checked with exp VS insertion). At this point, another aspect will surface - how to set up the analyzers along or using the MuxLogger. We will need to figure out ordering issues at that time.

@maridematte maridematte self-assigned this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BuildCheck Area: Logging Priority:2 Work that is important, but not critical for the release triaged
Projects
None yet
Development

No branches or pull requests

2 participants