Skip to content

Azure support#2384

Open
rjygraham wants to merge 14 commits into
encoredev:mainfrom
rjygraham:azure-support
Open

Azure support#2384
rjygraham wants to merge 14 commits into
encoredev:mainfrom
rjygraham:azure-support

Conversation

@rjygraham
Copy link
Copy Markdown

Add Azure Cloud Support

Adds first-class Azure support to the Encore runtime, bringing it to parity with existing AWS and GCP providers.

Changes

  • Object Storage — Azure Blob Storage provider with upload, download, list, copy, and delete operations (runtimes/go/storage/objects/internal/providers/azblob/)
  • PubSub — Azure Service Bus topic/subscription support in both the Go and Rust runtimes (runtimes/go/pubsub/internal/azure/, runtimes/core/src/pubsub/azure/)
  • Secrets — Azure Key Vault secrets provider (runtimes/go/appruntime/infrasdk/secrets/azure_keyvault.go)
  • Metrics — Azure Monitor exporter via Application Insights (runtimes/go/appruntime/infrasdk/metrics/azure/)
  • Cloud Trace — Azure Application Insights distributed tracing with traceparent header propagation in structured log fields (runtimes/go/appruntime/shared/cloudtrace/azure.go)
  • Metadata — Azure instance metadata collector (runtimes/go/appruntime/infrasdk/metadata/azure_collector.go)
  • Config — Azure infrastructure config parsing and test fixtures (runtimes/go/appruntime/exported/config/infra/)

Dependencies

Azure SDK packages upgraded to latest stable — no AWS or GCP package versions were changed:

  • azblob v0.6.1 → v1.6.4
  • azcore → v1.21.0
  • azidentity → v1.13.1
  • azservicebus → v1.10.0

Tests

86 new tests added across all Azure domains. All existing AWS and GCP tests continue to pass.

46 files changed, ~7,100 insertions

Ryan Graham and others added 14 commits April 6, 2026 15:23
Remove changes not necessary for Azure parity with AWS support.

Reverted: .gitignore trailing newline, CLI link.go short description,
clientgen typescript.go Set-Cookie browser guard, all clientgen testdata
for removed singleSetCookie/multiSetCookie endpoints, core API endpoint.rs
HandlerCall/CancellationGuard, server.rs Arc cleanup, static_assets.rs,
websocket.rs oneshot channel, trace/protocol.rs traced guard, pubsub/manager.rs
PubSubCancellationGuard + cron traced check (kept Azure cluster), pubsub/mod.rs
SubscriptionHandler lifetime (kept mod azure), reqtrack.go isCronScheduled,
go/pubsub/topic.go cron traced check, sqldb startEventID assignments,
all runtimes/js/* OnceSender/HandlerCall/call_function adaptations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- azure_keyvault_test.go: 8 tests for Key Vault secrets provider (httptest TLS mock)
- azure_config_test.go: 9 tests for Azure config Validate/Delete/Get methods
- infra.config.azure.json: add AzureMonitor and KeyVault test data
All 17 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add azure.go: resolves Application Insights instrumentation key from
  APPLICATIONINSIGHTS_CONNECTION_STRING or APPINSIGHTS_INSTRUMENTATIONKEY
  env vars, following sync.Once + panic-recovery pattern as gcp.go
- Update logfields.go: emit operation_Id and operation_ParentId log fields
  for Application Insights log correlation when traceparent header is present
- Add azure_test.go: 23 tests covering env var resolution, connection string
  parsing (edge cases incl. mixed case, whitespace, key position), and log
  field enrichment scenarios

Azure now matches GCP cloud trace parity: structured logs are automatically
correlated with distributed traces in Azure Monitor when running on Azure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Trinity: Azure Application Insights trace correlation in cloudtrace/azure.go
- Log fields: operation_Id, operation_ParentId
- Env var discovery: connection string, instrumentation key
- W3C traceparent header support
- Updated logfields.go for integration
- Build and vet verified

Morpheus: 23 comprehensive tests in azure_test.go
- White-box testing pattern for sync.Once isolation
- Environment variable resolution tests
- Connection string parsing (10 edge cases)
- Log field enrichment tests
- W3C traceparent integration
- 100% coverage, all passing

Decisions merged:
- Azure Cloud Trace Integration (Trinity implementation pattern)
- Azure Cloud Trace Tests (white-box testing pattern for sync.Once)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add topic_test.go with 7 test functions (23 test cases) covering:
- Protocol constants (RetryCountAttribute, TargetSubAttribute)
- Manager.ProviderName() returns 'azure'
- Manager.Matches() routing logic (5 table-driven cases)
- NewManager() initialization
- RetryCount attribute parsing (7 edge cases incl. nil, string, invalid)
- ApplicationProperties -> attrs conversion (8 type variants)
- DeliveryAttempt calculation from retry count

Azure now has tests in every Go package that has Azure implementation.
Overall Azure test scorecard: 65 tests (vs AWS 6, GCP 2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Orchestration log (2026-04-06T235526Z):
- Morpheus completed Azure Pub/Sub test coverage (7 functions, 23 test cases, 100% pass)
- File: runtimes/go/pubsub/internal/azure/topic_test.go
- Commit: b0dc235

Session log (2026-04-06T235526Z):
- Azure coverage parity achieved; now matches AWS approach (1 test file)
- Credential-free unit tests for retry parsing, attribute conversion, provider matching

Decisions:
- Merged morpheus-azure-pubsub-tests.md into .squad/decisions.md
- Classified as project-specific (Azure SDK concrete types, local logic)
- Deleted inbox file post-merge

No breaking changes. All tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…/GCP validation

- Trinity: Cloud/Infra dependency audit complete — all green, azblob pre-GA flag noted
- Morpheus: AWS/GCP test suites validated — all pass, no regressions
- Orchestration log entries created for both agents
- Session log entry documenting audit closure
- Decision inbox: empty (no merges required)

Orchestration tracked in:
- .squad/orchestration-log/2026-04-06T211727Z-trinity-dependency-audit.md
- .squad/orchestration-log/2026-04-06T211727Z-morpheus-aws-gcp-tests.md
- .squad/log/2026-04-06T211727Z-azure-dependency-audit.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- azblob: v0.6.1 → v1.6.4 (was pre-GA; source already used v1.x API)
- azcore: v1.18.0 → v1.21.0
- azidentity: v1.10.1 → v1.13.1
- azservicebus: v1.1.0 → v1.10.0
- azsecrets: v1.4.0 (already at latest, no change)
- AWS and GCP package versions unchanged

All Azure, AWS, and GCP tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Added orchestration-log entry for trinity-azure-sdk-upgrade
- Added session log entry for Azure SDK upgrade work
- Merged trinity-azure-sdk-versions decision to decisions.md
- Removed merged decision from inbox

Commit: 458dc91

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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