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

Don't mask error in cquery transitions output formatter #23210

Closed

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Aug 5, 2024

All errors used to be wrapped in an InterruptedException instead of being reported with a message. Also show a warning when an incompatible target is skipped instead of failing the build.

Work towards #21010

All errors used to be wrapped in an `InterruptedException` instead of being reported with a message.
Also show a warning when an incompatible target is skipped instead of failing the build.
@fmeum fmeum requested a review from gregestren August 5, 2024 12:14
@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 Aug 5, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Aug 5, 2024

@keith @illicitonion Do you think this handling of incompatible targets is reasonable?


options.transitions = Transitions.LITE;
AnalysisProtosV2.CqueryResult cqueryResult =
getProtoOutput("deps(//test:my_target)", AnalysisProtosV2.CqueryResult.parser());
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume getProtoOutput before would trigger the InterruptedException that auto-failed this test? Could we, just for clarity, add a line verifying the result isn't null and/or checking the warning message?

Also, what are you distinctly testing here compared to the shell test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was just a leftover from an earlier attempt at a Java test that ultimately failed. I removed it.

@gregestren gregestren removed the awaiting-review PR is awaiting review from an assigned reviewer label Aug 5, 2024
@keith
Copy link
Member

keith commented Aug 5, 2024

tested and it seems to work for our case, thanks!

Copy link
Contributor

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Looks very reasonable - thanks!

@fmeum fmeum requested a review from gregestren August 6, 2024 06:39
@gregestren gregestren added the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Aug 6, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Aug 6, 2024

@bazel-io fork 7.4.0

@copybara-service copybara-service bot closed this in 300c586 Aug 6, 2024
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Aug 6, 2024
@fmeum fmeum deleted the 21010-transition-error-handling branch August 7, 2024 08:53
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request Aug 19, 2024
All errors used to be wrapped in an `InterruptedException` instead of being reported with a message. Also show a warning when an incompatible target is skipped instead of failing the build.

Work towards bazelbuild#21010

Closes bazelbuild#23210.

PiperOrigin-RevId: 660116656
Change-Id: I22651110984e471a6b31dcc59a387f3f85ad49bc
github-merge-queue bot pushed a commit that referenced this pull request Sep 11, 2024
…3351)

All errors used to be wrapped in an `InterruptedException` instead of
being reported with a message. Also show a warning when an incompatible
target is skipped instead of failing the build.

Work towards #21010

Closes #23210.

PiperOrigin-RevId: 660116656
Change-Id: I22651110984e471a6b31dcc59a387f3f85ad49bc


300c586

Co-authored-by: Fabian Meumertzheim <[email protected]>
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 7.4.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.4.0rc1. Thanks!

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.

5 participants