Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

Removes unused string conversion from AppendJobOperationBatchAsync that was left over from development debugging.

Changes:

  • Removed line 289 in AzureStorageJobShard.cs: var str = System.Text.Encoding.UTF8.GetString(stream.ToArray())
    • Variable was never referenced
    • Stream operations remain intact
// Before:
NetstringJsonSerializer<JobOperation>.Encode(operation.JobOperation!.Value, stream, JobOperationJsonContext.Default.JobOperation);
var str = System.Text.Encoding.UTF8.GetString(stream.ToArray());  // ← Removed
stream.Position = 0;

// After:
NetstringJsonSerializer<JobOperation>.Encode(operation.JobOperation!.Value, stream, JobOperationJsonContext.Default.JobOperation);
stream.Position = 0;
Original prompt

This section details on the original issue you should resolve

<issue_title>Debug leftovers in durable job?</issue_title>
<issue_description>

var str = System.Text.Encoding.UTF8.GetString(stream.ToArray());

@benjaminpetit ? 🖌️ </issue_description>

<agent_instructions>Fix the code left over from development-time debugging of the Orleans.DurableJobs projects, such as the code indicated in the issue description</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Microsoft Reviewers: Open in CodeFlow

Copilot AI changed the title [WIP] Fix leftovers from debugging in durable jobs Remove debug leftover in AzureStorageJobShard Jan 5, 2026
Copilot AI requested a review from ReubenBond January 5, 2026 17:27
@ReubenBond ReubenBond marked this pull request as ready for review January 6, 2026 00:34
Copilot AI review requested due to automatic review settings January 6, 2026 00:34
@ReubenBond ReubenBond enabled auto-merge January 6, 2026 00:34
Co-authored-by: ReubenBond <203839+ReubenBond@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 removes an unused debug statement from the AppendJobOperationBatchAsync method in AzureStorageJobShard.cs. The removed line was converting a stream to a string for debugging purposes but was never used, leaving an unnecessary allocation and conversion operation.

Key changes:

  • Removed unused string conversion (var str = System.Text.Encoding.UTF8.GetString(stream.ToArray())) from line 289
  • Stream operations remain intact and functional
  • No behavioral changes to the code

@ReubenBond ReubenBond added this pull request to the merge queue Jan 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
@ReubenBond ReubenBond enabled auto-merge January 6, 2026 15:35
@ReubenBond ReubenBond added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit a072c34 Jan 6, 2026
59 checks passed
@ReubenBond ReubenBond deleted the copilot/fix-durable-jobs-leftovers branch January 6, 2026 16:34
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.

Debug leftovers in durable job?

2 participants