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

Do not delay TargetCompleteEvents with coverage #22238

Closed
wants to merge 3 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented May 5, 2024

Baseline coverage artifacts are now requested in CompletionFunction to ensure that they are built before the TargetCompleteEvent is generated. This makes it unnecessary to delay sending these events until after a Skymeld build has had the chance to request all coverage artifacts directly, which could only be done after the analysis & execution phase, thus delaying events until the end of the build.

Fixes #21475

@fmeum fmeum force-pushed the 21475-faster-test-results branch from e15fc3d to b0a02fc Compare May 6, 2024 06:47
@fmeum fmeum changed the title WIP: Do not delay TargetCompleteEvents with coverage Do not delay TargetCompleteEvents with coverage May 6, 2024
@fmeum fmeum changed the title Do not delay TargetCompleteEvents with coverage Do not delay TargetCompleteEvents with coverage May 6, 2024
@fmeum fmeum force-pushed the 21475-faster-test-results branch from b0a02fc to 963e7a5 Compare May 6, 2024 07:00
@fmeum fmeum requested a review from joeleba May 6, 2024 13:41
@fmeum fmeum marked this pull request as ready for review May 6, 2024 13:41
@fmeum fmeum requested a review from a team as a code owner May 6, 2024 13:41
@fmeum fmeum requested review from gregestren and removed request for a team and gregestren May 6, 2024 13:41
@github-actions github-actions bot added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels May 6, 2024
@joeleba
Copy link
Member

joeleba commented May 6, 2024

Thanks for sending this. I'll do a review either today or tomorrow.

Copy link
Member

@joeleba joeleba left a comment

Choose a reason for hiding this comment

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

Here are some nits. We do have some internal tests failing, I'll look into them tomorrow.

InstrumentedFilesInfo instrumentedFilesInfo =
value.getConfiguredObject().get(InstrumentedFilesInfo.STARLARK_CONSTRUCTOR);
Iterable<SkyKey> keysToRequest;
if (value.getConfiguredObject() instanceof ConfiguredTargetValue && instrumentedFilesInfo != null) {
Copy link
Member

Choose a reason for hiding this comment

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

So this was the bug. Should s/ConfiguredTargetValue/ConfiguredTarget. After that all the tests passed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I pushed a fix, thanks!

@fmeum fmeum requested a review from joeleba May 7, 2024 13:10
@fmeum
Copy link
Collaborator Author

fmeum commented May 7, 2024

@bazel-io fork 7.2.0

Copy link
Member

@joeleba joeleba left a comment

Choose a reason for hiding this comment

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

LGTM.

@copybara-service copybara-service bot closed this in fd2cc92 May 7, 2024
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label May 7, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request May 7, 2024
Baseline coverage artifacts are now requested in `CompletionFunction` to ensure that they are built before the `TargetCompleteEvent` is generated. This makes it unnecessary to delay sending these events until after a Skymeld build has had the chance to request all coverage artifacts directly, which could only be done after the analysis & execution phase, thus delaying events until the end of the build.

Fixes bazelbuild#21475

Closes bazelbuild#22238.

PiperOrigin-RevId: 631414420
Change-Id: Idc77b6f5c8b5b775e6c69e35c5563f63b3bf974f
@fmeum fmeum deleted the 21475-faster-test-results branch May 7, 2024 15:00
joeleba pushed a commit to joeleba/bazel that referenced this pull request May 10, 2024
Baseline coverage artifacts are now requested in `CompletionFunction` to ensure that they are built before the `TargetCompleteEvent` is generated. This makes it unnecessary to delay sending these events until after a Skymeld build has had the chance to request all coverage artifacts directly, which could only be done after the analysis & execution phase, thus delaying events until the end of the build.

Fixes bazelbuild#21475

Closes bazelbuild#22238.

PiperOrigin-RevId: 631414420
Change-Id: Idc77b6f5c8b5b775e6c69e35c5563f63b3bf974f
joeleba pushed a commit to joeleba/bazel that referenced this pull request May 10, 2024
Baseline coverage artifacts are now requested in `CompletionFunction` to ensure that they are built before the `TargetCompleteEvent` is generated. This makes it unnecessary to delay sending these events until after a Skymeld build has had the chance to request all coverage artifacts directly, which could only be done after the analysis & execution phase, thus delaying events until the end of the build.

Fixes bazelbuild#21475

Closes bazelbuild#22238.

PiperOrigin-RevId: 631414420
Change-Id: Idc77b6f5c8b5b775e6c69e35c5563f63b3bf974f
Kila2 pushed a commit to Kila2/bazel that referenced this pull request May 13, 2024
Baseline coverage artifacts are now requested in `CompletionFunction` to ensure that they are built before the `TargetCompleteEvent` is generated. This makes it unnecessary to delay sending these events until after a Skymeld build has had the chance to request all coverage artifacts directly, which could only be done after the analysis & execution phase, thus delaying events until the end of the build.

Fixes bazelbuild#21475

Closes bazelbuild#22238.

PiperOrigin-RevId: 631414420
Change-Id: Idc77b6f5c8b5b775e6c69e35c5563f63b3bf974f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test results BEP events are delayed when using coverage and Skymeld is enabled
2 participants