Skip to content

Avoid treating Java warnings as build errors during CI packing - #10781

Merged
akoeplinger merged 1 commit into
mainfrom
akoeplinger-fix-java-pack-exec-stderr
Nov 9, 2026
Merged

akoeplinger merged 1 commit into
mainfrom
akoeplinger-fix-java-pack-exec-stderr

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

CodeQL runs emit JVM warnings that the SignalR Java Pack Exec parses as MSBuild diagnostics, failing the build even though Gradle succeeds:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.semmle.util.files.SubstResolver in an unnamed module (file:/C:/codeql_temp/codeql3000/distribution/codeql/java/tools/semmle-extractor-java.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

Match _Build: use Arcade's ExecWithRetries in CI with MaxAttempts="2" and IgnoreStandardErrorWarningFormat="true". Keep the existing plain Exec for local builds. Nonzero Gradle exit codes still fail after retries.

Observed in attempt 1 of build 3128328.

Upstream CodeQL bug report: github/codeql#23044

Copilot AI balanced review requested due to automatic review settings November 6, 2026 20:42
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team November 6, 2026 20:42
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Use Arcade ExecWithRetries for Java packing in CI, ignoring JVM warning diagnostic parsing while preserving local Exec behavior.

Co-authored-by: Copilot App <[email protected]>
@akoeplinger
akoeplinger force-pushed the akoeplinger-fix-java-pack-exec-stderr branch from c2e4d71 to b5e9564 Compare November 6, 2026 20:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the CI-only Gradle warning-parsing change.

No open issues 🎉

What changed in this PR

Updates SignalR Java packaging so JVM warnings emitted during CodeQL CI runs are not parsed as MSBuild diagnostics.

Changes:

  • Sets IgnoreStandardErrorWarningFormat="$(ContinuousIntegrationBuild)" on the Pack target’s Gradle invocation, matching the Java Build target’s CI-only behavior.
  • Preserves build failures for nonzero Gradle exit codes and leaves non-CI behavior unchanged.
File Description
src/​aspnetcore/​eng/​targets/​Java.Common.targets Disables standard diagnostic parsing for the Pack command during CI.

Review effort: Balanced

@akoeplinger
akoeplinger enabled auto-merge (squash) November 7, 2026 23:32
@akoeplinger
akoeplinger merged commit 8c64499 into main Nov 9, 2026
11 checks passed
@akoeplinger
akoeplinger deleted the akoeplinger-fix-java-pack-exec-stderr branch November 9, 2026 08:18
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.

3 participants