Skip to content

feat!: dict-primitive messaging payloads and unified Azure credential… - #17

Merged
abhi-bhat-lyzr merged 1 commit into
mainfrom
release/v0.2.7
Jul 27, 2026
Merged

feat!: dict-primitive messaging payloads and unified Azure credential…#17
abhi-bhat-lyzr merged 1 commit into
mainfrom
release/v0.2.7

Conversation

@abhi-bhat-lyzr

Copy link
Copy Markdown
Contributor

… chain; release v0.2.7

BREAKING CHANGE: MessagingBackend.send/send_batch take a dict, not bytes. send_json() and Message.json() are removed.

  • messaging: send/send_batch are now concrete on the ABC and serialize through to_json(); backends implement _send_json/_send_json_batch and can never see an unserialized payload, while callers can never send a non-dict. Replaces the send_json() free function and Message.json() with Message.data. Message.body stays raw bytes so a malformed payload is still inspectable for DLQ triage.
  • messaging/sqs: MessageBody takes the JSON string directly, dropping an encode/decode round-trip and its UnicodeDecodeError failure mode.
  • messaging/azure_bus: cache one send link for the lifetime of the backend instead of opening and tearing down an AMQP link on every message; rebuild and retry once on a dead link. Fix error translation — ServiceBusError subclasses AzureError, not HttpResponseError, so AMQP-path failures were leaking raw Azure exceptions to callers.
  • azure auth: new cloudrift/core/azure_credentials.py defines the credential chain once (workload identity -> managed identity -> az CLI); all eight Azure backends now use it instead of ManagedIdentityCredential. Excludes ambient AZURE_CLIENT_ID/AZURE_CLIENT_SECRET, the Azure counterpart of the SQS exclude_env_credentials option. Each from_managed_identity gains a credential_options dict, forwarded to DefaultAzureCredential.
  • Bump version to 0.2.7, re-lock.

… chain; release v0.2.7

BREAKING CHANGE: MessagingBackend.send/send_batch take a dict, not bytes.
send_json() and Message.json() are removed.

- messaging: send/send_batch are now concrete on the ABC and serialize through
  to_json(); backends implement _send_json/_send_json_batch and can never see an
  unserialized payload, while callers can never send a non-dict. Replaces the
  send_json() free function and Message.json() with Message.data. Message.body
  stays raw bytes so a malformed payload is still inspectable for DLQ triage.
- messaging/sqs: MessageBody takes the JSON string directly, dropping an
  encode/decode round-trip and its UnicodeDecodeError failure mode.
- messaging/azure_bus: cache one send link for the lifetime of the backend
  instead of opening and tearing down an AMQP link on every message; rebuild
  and retry once on a dead link. Fix error translation — ServiceBusError
  subclasses AzureError, not HttpResponseError, so AMQP-path failures were
  leaking raw Azure exceptions to callers.
- azure auth: new cloudrift/core/azure_credentials.py defines the credential
  chain once (workload identity -> managed identity -> az CLI); all eight Azure
  backends now use it instead of ManagedIdentityCredential. Excludes ambient
  AZURE_CLIENT_ID/AZURE_CLIENT_SECRET, the Azure counterpart of the SQS
  exclude_env_credentials option. Each from_managed_identity gains a
  credential_options dict, forwarded to DefaultAzureCredential.
- Bump version to 0.2.7, re-lock.
@sonarqubecloud

Copy link
Copy Markdown

@abhi-bhat-lyzr
abhi-bhat-lyzr merged commit 3d914e5 into main Jul 27, 2026
2 checks passed
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