Skip to content

Fix updating globaljsonworkloadsets.json (backport #50372) - #56518

Merged
marcpopMSFT merged 1 commit into
release/11.0.2xxfrom
backport-50372-release-11.0.2xx
Oct 6, 2026
Merged

marcpopMSFT merged 1 commit into
release/11.0.2xxfrom
backport-50372-release-11.0.2xx

Conversation

@baronfel

@baronfel baronfel commented Oct 6, 2026

Copy link
Copy Markdown
Member

Backports the fix from #50372 to release/11.0.2xx.

The file is truncated before serializing updated workload-set data, preventing stale trailing JSON when the new content is shorter.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 14:07
@baronfel
baronfel requested a review from a team as a code owner October 6, 2026 14:07
@azure-pipelines

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

@baronfel
baronfel requested a review from a team October 6, 2026 14:13
@baronfel baronfel added Area-Workloads backport PR that has been backported to a servicing branch and removed Servicing-consider labels Oct 6, 2026

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.

Copilot review overview

🟢 Approval recommended

The focused backport correctly prevents stale trailing JSON in both write paths.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes malformed globaljsonworkloadsets.json files when updated content is shorter.

Changes:

  • Truncates the file before recording workload-set data.
  • Applies the same fix during stale-entry cleanup.
File Description
src/​Cli/​dotnet/​Commands/​Workload/​GlobalJsonWorkloadSetFile.cs Replaces seeking with truncation before serialization.

@marcpopMSFT
marcpopMSFT merged commit 672d89d into release/11.0.2xx Oct 6, 2026
26 of 27 checks passed
@marcpopMSFT
marcpopMSFT deleted the backport-50372-release-11.0.2xx branch October 6, 2026 20:36

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — b9285615 Deployed Oct 6, 2026 by marcpopMSFT via pre_activation #7846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Workloads backport PR that has been backported to a servicing branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants