Skip to content

Azure Storage queue: round-trip GroupId - #100

Open
niemyjski wants to merge 5 commits into
mainfrom
feature/queue-group-id
Open

niemyjski wants to merge 5 commits into
mainfrom
feature/queue-group-id

Conversation

@niemyjski

Copy link
Copy Markdown
Member

What this adds

Support for the new QueueEntryOptions.GroupId from Foundatio core.

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 also kept when the message is retried.

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

Fixes

The entry returned by EnqueueAsync used to always have CorrelationId = null and no properties. It now carries the CorrelationId, Properties, and GroupId that were actually sent, so Enqueued handlers see the real values.

Tests

  • Run against local Azurite in Docker.
  • Opts into the new shared QueueTestBase GroupId tests: round-trip, kept on retry, empty means no group.

Compatibility

Nothing breaks. GroupId is a new optional envelope field, and older messages deserialize with null. This PR needs the Foundatio core release that adds GroupId (FoundatioFx/Foundatio#579).

@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-06T03:25:46.176159Z bd80c80 New commits
ℹ️ 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".

{
CorrelationId = options.CorrelationId,
Properties = options.Properties,
GroupId = options.GroupId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require the Foundatio release that defines GroupId

When this provider is built or packaged outside the coordinated Foundatio source workspace, its project still restores Foundatio 13.0.4 (and the tests restore Foundatio.TestHarness 13.0.4), which predates the GroupId API and shared test methods introduced by Foundatio PR 579. The standalone solution therefore cannot compile against its declared dependencies; if packaging is performed against newer source, the resulting package can instead restore 13.0.4 for consumers and fail when these member references are resolved. Update both package requirements to a release containing the new API before referencing it.

AGENTS.md reference: AGENTS.md:L107-L111

Useful? React with 👍 / 👎.

…ness

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

Copy link
Copy Markdown
Member Author

Downstream CI pin: this PR consumes the 13.0.5-preview.queue-group-id.0.10 nightly of Foundatio and Foundatio.TestHarness from the Feedz feed (built from FoundatioFx/Foundatio#579), because the GroupId APIs aren't in 13.0.4. Before merging: merge and release #579, set both references to that release, and change .github/workflows/build.yml back to @main.

…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.

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