Skip to content

Skip uploading results to perflab when onlySanityCheck is true#5148

Open
LoopedBard3 wants to merge 1 commit intodotnet:mainfrom
LoopedBard3:DontPushResultsWhenSanityCheckOnly
Open

Skip uploading results to perflab when onlySanityCheck is true#5148
LoopedBard3 wants to merge 1 commit intodotnet:mainfrom
LoopedBard3:DontPushResultsWhenSanityCheckOnly

Conversation

@LoopedBard3
Copy link
Member

When onlySanityCheck runs are internal, the --upload-to-perflab-container flag was still being passed to benchmarks_ci.py, causing sanity check results (~34 tests) to be uploaded as real performance data. This gates the upload flag on only_sanity_check being false for both microbenchmark and scenario run paths.

When onlySanityCheck runs are internal, the --upload-to-perflab-container
flag was still being passed to benchmarks_ci.py, causing sanity check results
(~34 tests) to be uploaded as real performance data. This gates the upload
flag on only_sanity_check being false for both microbenchmark and scenario
run paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
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 prevents internal sanity-check-only benchmark runs from uploading their results to the Perflab container, avoiding pollution of official performance data when --only-sanity is used.

Changes:

  • Gate the microbenchmark --upload-to-perflab-container flag on internal && !only_sanity_check.
  • Gate scenario upload arguments similarly when running internally with sanity-check-only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

def get_work_item_command_for_artifact_dir(artifact_dir: str):
assert args.target_csproj is not None
return get_work_item_command(args.os_group, args.target_csproj, args.architecture, perf_lab_framework, args.internal, wasm, artifact_dir, wasm_coreclr)
return get_work_item_command(args.os_group, args.target_csproj, args.architecture, perf_lab_framework, args.internal, wasm, artifact_dir, wasm_coreclr, args.only_sanity_check)
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

This call passes multiple boolean flags positionally (wasm_coreclr, only_sanity_check), which is easy to misread and brittle as parameters evolve. Consider passing these as keyword arguments (or making the optional flags keyword-only) to prevent accidental argument-order bugs in future edits.

Suggested change
return get_work_item_command(args.os_group, args.target_csproj, args.architecture, perf_lab_framework, args.internal, wasm, artifact_dir, wasm_coreclr, args.only_sanity_check)
return get_work_item_command(
args.os_group,
args.target_csproj,
args.architecture,
perf_lab_framework,
args.internal,
wasm,
artifact_dir=artifact_dir,
wasm_coreclr=wasm_coreclr,
only_sanity_check=args.only_sanity_check,
)

Copilot uses AI. Check for mistakes.
Copy link
Member

@DrewScoggins DrewScoggins left a comment

Choose a reason for hiding this comment

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

LGTM

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