Skip to content

Azure Storage queue: round-trip GroupId - #100

Merged
niemyjski merged 11 commits into
mainfrom
feature/queue-group-id
Oct 14, 2026
Merged

niemyjski merged 11 commits into
mainfrom
feature/queue-group-id

Conversation

@niemyjski

@niemyjski niemyjski commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

What this adds

Support for the new QueueEntryOptions.GroupId from Foundatio core (FoundatioFx/Foundatio#579).

Azure Storage queues have no grouping feature, so GroupId is stored as metadata in the message envelope and returned on IQueueEntry.GroupId when the message is dequeued.

  • It is kept when the message is retried.
  • It is kept in the envelope written to the -poison queue when retries are exceeded.
  • The entry passed to Enqueued handlers carries GroupId in the default mode.

The legacy (non-envelope) mode has nowhere to store it, so GroupId isn't kept there, just like CorrelationId and Properties. The shared GroupId tests for legacy mode are skipped and explain why.

The enqueue and dead-letter code is otherwise unchanged from main; each change is one added line.

Not in this PR (draft follow-up, held for the next release)

  • Forwarding the original message bytes to the poison queue instead of rebuilding the envelope.
  • Filling CorrelationId and Properties on the entry passed to Enqueued handlers, to match the other providers.

Tests

  • Author-reported earlier validation against local Azurite in Docker, not independently rerun locally for this dependency correction. Full suite: 108 passed, 0 failed (run twice). The GroupId, metadata and dead-letter tests were also run 10 times in a loop with no failures.
  • Opts into the new shared QueueTestBase GroupId tests: round-trip, kept on retry, empty means no group, reused options.
  • New tests: metadata is persisted only in the default compatibility mode, and the Enqueued entry's GroupId matches the dequeued entry; GroupId is kept in the poison-queue envelope.

Independent dependency validation: core and TestHarness now use matching published 13.0.5-preview.0.10 from core #579 07568d0e. The original published-package build failed six CS0115 overrides (three missing methods in both default and legacy queue test classes); after this two-pin correction, the full Release solution builds with zero warnings/errors and source linking disabled. No local emulator or runtime tests were run for this dependency-only change. Both normal hosted runs pass at de98dcf8: Azurite CI, 108 passed, 0 failed, 15 skips. CI and stable package publication steps are skipped.

Compatibility

GroupId is a new optional envelope field, and older messages deserialize with null. This PR consumes the matching core/TestHarness preview adding GroupId; stable release ordering and broader Properties-wrapper compatibility remain coordinated with core (FoundatioFx/Foundatio#579).

Update

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T14:18:54.396303Z 32d3715 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@niemyjski

niemyjski commented Oct 5, 2026 •

Copy link
Copy Markdown
Member Author

Updated 2026-10-06: reviewed repairs are now pushed at bd80c80dcc4c4726fbf1bc8882545fb99aa6100f. The push build and PR build still fail compilation before tests because the released Foundatio 13.0.4 package lacks the new GroupId APIs. A core/TestHarness release containing #579, followed by provider dependency updates, remains required. Sibling-source tests do not clear this standalone gate.

The build caller is pinned to guarded core commit a28d0f736d9124431de09764c56aff77fbdc1d5d; both runs resolve that exact workflow and skip the test/package/publishing steps after the compile failure. Feature-branch package publication is also excluded by the approved guard. Dependency versions are unchanged; no packages were published by these runs.

Repair and local validation evidence

Verified legacy-mode mismatch: the wire body drops GroupId/CorrelationId/Properties while Enqueued previously reported them. The repair makes the event reflect the metadata actually stored, preserves the legacy wire format, documents the contract, and registers the shared empty-group test.

Legacy/envelope event-versus-dequeue regression: legacy failed before repair; both pass afterward. Focused local Azurite 3.35.0 run: 5 passed, 2 intentional legacy GroupId skips. Both library target frameworks build with zero warnings/errors against sibling core source. This is disposable-emulator evidence, not live Azure evidence.

These local checks ran on 2026-10-05. Application/test source is unchanged from those validated repair commits; this follow-through added only the approved workflow guard/pin. YAML parsing and diff checks passed. No new local application test run is claimed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd80c80dcc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Foundatio.AzureStorage/Queues/AzureStorageQueue.cs
…ness

The GroupId APIs are not in 13.0.4. Use the nightly until a release is available.
@niemyjski

niemyjski commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

Downstream CI pin: this PR consumes Foundatio and Foundatio.TestHarness 13.0.5-preview.0.10 from the Feedz feed, published from main after FoundatioFx/Foundatio#579 merged. No branch nightly is needed anymore.

…rker errors

Dead-lettering rebuilt the message from the deserialized value, which a handler may have changed. It now forwards the original body, keeping the payload, GroupId, CorrelationId and properties exactly. The worker loop logs SDK timeouts, waits at least one second after a dequeue error, and does not abandon during shutdown. The metadata test no longer asserts on missing config and deletes the queue it creates. Legacy mode now runs the reused-options test.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

…sserts GroupId is not persisted), use core preview .0.21
@niemyjski niemyjski self-assigned this Oct 13, 2026
@niemyjski

Copy link
Copy Markdown
Member Author

In Default mode the Enqueued entry now carries the persisted CorrelationId and Properties as well as GroupId (32d3715), so it matches the dequeued entry. A test covers this.

@niemyjski

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 32d3715277

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@niemyjski
niemyjski merged commit e622c3a into main Oct 14, 2026
3 checks passed
@niemyjski
niemyjski deleted the feature/queue-group-id branch October 14, 2026 17:26
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.

1 participant