Skip to content

feat: status updates during issuance process - #1264

Open
joostdebruijn wants to merge 1 commit into
polymind-inc:masterfrom
joostdebruijn:feat/status-update-for-issuance
Open

joostdebruijn wants to merge 1 commit into
polymind-inc:masterfrom
joostdebruijn:feat/status-update-for-issuance

Conversation

@joostdebruijn

Copy link
Copy Markdown
Contributor

Summary

  • While issuing or renewing a certificate, the status endpoint (GET /api/operations/{instanceId}) previously returned a bare 202 Accepted with no body, so the UI showed a static "Issuing certificate..." spinner for the whole duration with no indication of which step (order creation, DNS record setup, propagation wait, challenge verification, finalization, Key Vault merge, etc.) was running.
  • CertificateIssuanceOrchestrator now reports its current step via context.SetCustomStatus(...) at each stage — the same mechanism CertificateRenewalSchedulerOrchestrator already uses for the background renewal scheduler — and GetOperation surfaces that status in the 202 response body while running, and folds the last known step into the error detail if the orchestration ends in Failed (e.g. "...error... (failed during: Saving certificate to Key Vault...)").
  • The frontend's polling loop (pollOperation) now takes an optional progress callback, wired up in App.vue to update the operation overlay's message live instead of showing a fixed string for the whole operation.

Changes

  • Models/CertificateIssuanceStatus.cs (new): DTO carrying certificateName, step, message, updatedAt.
  • CertificateIssuanceOrchestrator.cs: sets a custom status before each of the ~9 pipeline steps.
  • GetOperation.cs: reads the custom status back and includes it in the 202 body; extracted BuildFailureDetail/ReadIssuanceStatus as internal static helpers so the new logic is unit-testable.
  • api/types.ts, api/acmebotApi.ts, App.vue, api/mockData.ts: thread an optional onProgress callback through issueCertificate/renewCertificate → pollOperation → the OperationOverlay message, plus a matching simulation in the dev mocks.

Test plan

  • dotnet build -c Release ./Acmebot.slnx
  • dotnet format --verify-no-changes --no-restore ./Acmebot.slnx
  • dotnet test ./Acmebot.slnx — 133/133 passing (4 new: GetOperationTests)
  • bicep build ./deploy/azuredeploy.bicep (no infra changes in this PR, ran as part of validation)
  • vue-tsc --noEmit and eslint . on the ClientApp

Copilot AI balanced review requested due to automatic review settings September 5, 2026 15:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Cleanup and webhook statuses are misleading, and successful status deserialization needs test coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds live certificate issuance and renewal progress updates across the orchestration API and UI.

Changes:

  • Reports issuance stages through Durable Task custom status.
  • Returns progress and failure-stage details from the operation endpoint.
  • Updates frontend polling, overlays, mocks, and tests.
File summaries
File Description
tests/Acmebot.App.Tests/GetOperationTests.cs Tests operation helpers, but lacks successful custom-status deserialization coverage.
src/Acmebot.App/Models/CertificateIssuanceStatus.cs Defines the progress-status DTO.
src/Acmebot.App/Functions/Orchestration/CertificateIssuanceOrchestrator.cs Publishes issuance progress; cleanup and webhook stages need accurate statuses.
src/Acmebot.App/Functions/Http/GetOperation.cs Returns progress and enhanced failure details.
src/Acmebot.App/ClientApp/src/App.vue Displays live progress in the operation overlay.
src/Acmebot.App/ClientApp/src/api/types.ts Defines the client progress type.
src/Acmebot.App/ClientApp/src/api/mockData.ts Simulates issuance progress.
src/Acmebot.App/ClientApp/src/api/acmebotApi.ts Propagates polling updates through callbacks.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 3
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Acmebot.App/Functions/Orchestration/CertificateIssuanceOrchestrator.cs Outdated
Comment thread tests/Acmebot.App.Tests/GetOperationTests.cs
@joostdebruijn
joostdebruijn force-pushed the feat/status-update-for-issuance branch from 90de99b to 2a605e7 Compare September 5, 2026 16:25
Copilot AI review requested due to automatic review settings September 5, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The reviewed changes have no unresolved approval-blocking issues.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

This branch has not been deployed

No deployments
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.

2 participants