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

Skip BuildCheck on restore #10500

Merged
merged 9 commits into from
Aug 9, 2024
Merged

Skip BuildCheck on restore #10500

merged 9 commits into from
Aug 9, 2024

Conversation

maridematte
Copy link
Contributor

@maridematte maridematte commented Aug 8, 2024

Fixes #9747

Context

We don't want BuildCheck to run on restore, so we are skipping that.

Changes Made

Checked if we are restoring on the RequestBuilder, as it is the place where we call BuildCheckManager directly to run the checks. And added extra handling to the BuildChecks logs for the BuildSubmissionStartedEventArgs, to account for out-of-proc processing of analyzers. When we get the event, it checks if it is running during the restore. If it is, all events handling is disabled until another BuildSubmissionStartedEventArgs to signal that the restore phase has ended.

Testing

Added a test to run restore target without the build and check if there are BuildCheck outputs on it.

Copy link
Member

@AR-May AR-May left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Looks good - let's please add few more improvements based on comments

@maridematte maridematte enabled auto-merge (squash) August 8, 2024 15:10
@maridematte maridematte disabled auto-merge August 8, 2024 15:10
@maridematte maridematte enabled auto-merge (squash) August 8, 2024 15:11
@JanKrivanek JanKrivanek disabled auto-merge August 8, 2024 15:16
@JanKrivanek
Copy link
Member

(Disabling automerge - let's merge after renaming merged)

@JanKrivanek JanKrivanek enabled auto-merge (squash) August 8, 2024 16:29
@JanKrivanek JanKrivanek merged commit aac5276 into dotnet:main Aug 9, 2024
10 checks passed
@maridematte maridematte deleted the skipRestore branch October 22, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analyzers prototyping - Detect and skip restore (evaluation and execution)
4 participants