Skip to content

Skip BuildCheck on restore#10500

Merged
JanKrivanek merged 9 commits intodotnet:mainfrom
maridematte:skipRestore
Aug 9, 2024
Merged

Skip BuildCheck on restore#10500
JanKrivanek merged 9 commits intodotnet:mainfrom
maridematte:skipRestore

Conversation

@maridematte
Copy link
Copy Markdown
Member

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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