Skip to content

Update main.yml build arguments to reduce flakiness with BuildChecks#462

Merged
rjmurillo merged 2 commits intomainfrom
bug/flaky-build-update-build-args
Jun 9, 2025
Merged

Update main.yml build arguments to reduce flakiness with BuildChecks#462
rjmurillo merged 2 commits intomainfrom
bug/flaky-build-update-build-args

Conversation

@rjmurillo
Copy link
Copy Markdown
Owner

@rjmurillo rjmurillo commented Jun 9, 2025

@coderabbitai

Summary by CodeRabbit

  • Chores
    • Updated the build process in the workflow to improve consistency and reliability by adjusting build parameters. No user-facing changes.

Copilot AI review requested due to automatic review settings June 9, 2025 04:12
@rjmurillo rjmurillo requested a review from MattKotsenas as a code owner June 9, 2025 04:12
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 9, 2025

📝 Walkthrough

Walkthrough

The GitHub Actions workflow was updated to modify the dotnet build command by adding specific MSBuild parameters. These changes adjust the build process to enforce deterministic builds, disable shared compilation, prevent parallel builds, and turn off node reuse, while leaving other build options unchanged.

Changes

File(s) Change Summary
.github/workflows/main.yml Updated dotnet build step to include additional MSBuild parameters for deterministic builds and altered build behavior.

Suggested reviewers

  • MattKotsenas

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d139d26 and 9560ec9.

📒 Files selected for processing (1)
  • .github/workflows/main.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-24.04-arm)
🔇 Additional comments (1)
.github/workflows/main.yml (1)

51-51: LGTM – deterministic and reliable MSBuild settings

The added /p:Deterministic=true, /p:UseSharedCompilation=false, /p:BuildInParallel=false and /nodeReuse:false flags will enforce single‐threaded, cache-free builds and improve reproducibility, which should reduce BuildChecks flakiness.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rjmurillo rjmurillo added bug github_actions Pull requests that update GitHub Actions code releasable labels Jun 9, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the GitHub Actions build step to add MSBuild flags aimed at reducing flaky builds by enforcing deterministic outputs and disabling shared compilation, parallel builds, and node reuse.

  • Added /p:Deterministic=true, /p:UseSharedCompilation=false, /p:BuildInParallel=false, and disabled node reuse in the build command.
  • Kept the binary log output path unchanged.
Comments suppressed due to low confidence (1)

.github/workflows/main.yml:51

  • Typo in MSBuild flag nodeResuse. It should be nodeReuse to properly disable node reuse.
run: dotnet build --no-restore --configuration Release /check /p:Deterministic=true /p:UseSharedCompilation=false /p:BuildInParallel=false /nodeResuse:false /bl:./artifacts/logs/release/build.release.binlog

Comment thread .github/workflows/main.yml Outdated
cursor[bot]

This comment was marked as outdated.

@MattKotsenas
Copy link
Copy Markdown
Collaborator

If we're running into problems with BuildChecks, can we file bugs upstream?


- name: Build
run: dotnet build --no-restore --configuration Release /check /bl:./artifacts/logs/release/build.release.binlog
run: dotnet build --no-restore --configuration Release /check /p:Deterministic=true /p:UseSharedCompilation=false /p:BuildInParallel=false /nodeReuse:false /bl:./artifacts/logs/release/build.release.binlog
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Expected an indentation at 8 instead of at 6.

@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit 9560ec9 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Style 1

View more on Code Climate.

@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) (target: 95.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d139d26) 873 792 90.72%
Head commit (9560ec9) 873 (+0) 792 (+0) 90.72% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#462) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@rjmurillo
Copy link
Copy Markdown
Owner Author

If we're running into problems with BuildChecks, can we file bugs upstream?

@MattKotsenas sure. They produce a bunch of noise see recent run, especially with Nerdbank Git Version, so I'm considering turning them back off. I fixed a couple of errors they surfaced (see #437, #440, #442), but as of now their utility is minimal. I'm considering a separate workflow that just does the build check so the main PR flow isn't jammed up with flaky stuff (and we can dogfood changes there if need be without changing core CI)

@rjmurillo
Copy link
Copy Markdown
Owner Author

If we're running into problems with BuildChecks, can we file bugs upstream?

@MattKotsenas sure. They produce a bunch of noise see recent run, especially with Nerdbank Git Version, so I'm considering turning them back off. I fixed a couple of errors they surfaced (see #437, #440, #442), but as of now their utility is minimal. I'm considering a separate workflow that just does the build check so the main PR flow isn't jammed up with flaky stuff (and we can dogfood changes there if need be without changing core CI)

@coderabbitai open an issue for this

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 9, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@rjmurillo I'll create an issue to track the BuildChecks problems you described.


🏁 Script executed:

#!/bin/bash
# Create a GitHub issue for BuildChecks problems
gh issue create \
  --title "BuildChecks producing excessive noise and flakiness in CI" \
  --body "## Problem Description

BuildChecks are currently producing excessive noise in CI builds, particularly when used with Nerdbank Git Version. While some legitimate issues have been identified and fixed, the overall utility remains minimal compared to the disruption caused.

## Evidence

- Recent run showing noise: https://github.com/rjmurillo/moq.analyzers/actions/runs/15526019694/job/43707147776?pr=458
- Fixed issues identified by BuildChecks: #437, #440, #442

## Current Impact

- Main PR workflow gets jammed up with flaky BuildChecks failures
- Noise makes it difficult to identify genuine issues
- Minimal utility compared to disruption caused

## Potential Solutions to Consider

1. Turn BuildChecks back off entirely
2. Create a separate workflow dedicated to BuildChecks to isolate from main CI
3. File bugs upstream with BuildChecks maintainers
4. Configure BuildChecks to reduce noise (if possible)

## References

- Original discussion: https://github.com/rjmurillo/moq.analyzers/pull/462
- Comment thread: https://github.com/rjmurillo/moq.analyzers/pull/462#issuecomment-2631885847

Requested by: @rjmurillo" \
  --assignee rjmurillo

Length of output: 1292


Perfect! I've created issue #463 to track the BuildChecks problems you described: #463

The issue captures the excessive noise problem, particularly with Nerdbank Git Version, references the specific run that demonstrates the issue, and outlines potential solutions including creating a separate workflow or filing bugs upstream.

ฅ(^・ω・^)ฅ

@rjmurillo rjmurillo merged commit 6bbea4f into main Jun 9, 2025
14 checks passed
@rjmurillo rjmurillo deleted the bug/flaky-build-update-build-args branch June 9, 2025 04:23
@rjmurillo rjmurillo added this to the vNext milestone Jun 9, 2025
@MattKotsenas
Copy link
Copy Markdown
Collaborator

Yeah, I've seen them be noisy too. Just want to make sure upstream is aware, as I'm not yet sure they're ready for adoption?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug github_actions Pull requests that update GitHub Actions code releasable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants