Skip to content

Confirm and status endpoints for Octopus import

Summary

  • Added POST /api/octopus-import/{sessionId}/confirm and GET /api/octopus-import/{sessionId}/status to OctopusImportController.
  • Added ConfirmOctopusImportCommand and GetOctopusImportStatusRequest contracts plus handlers that keep confirmation idempotent, rebuild the current plan from the retained upload, and return the current session snapshot.
  • Wired confirmation to the existing OctopusImportConfirmationOrchestrator using the validated preview plan persisted in ValidatedPlanJson, with structured bad-request responses for missing uploads, invalid state, or corrupt validated-plan JSON.
  • Added focused unit tests for confirm success, confirm idempotency on terminal sessions, and status retrieval.

Test plan

  • dotnet build src/Squid.Api/Squid.Api.csproj --no-restore -p:BuildInParallel=false -p:UseSharedCompilation=false -v:minimal -clp:ErrorsOnly
  • dotnet build tests/Squid.UnitTests/Squid.UnitTests.csproj --no-restore -p:BuildInParallel=false -p:UseSharedCompilation=false -v:minimal -clp:ErrorsOnly
  • dotnet test tests/Squid.UnitTests/Squid.UnitTests.csproj --no-restore --no-build --filter "FullyQualifiedName~Squid.UnitTests.Handlers.OctopusImport|FullyQualifiedName~Squid.UnitTests.Services.OctopusImport" -v:minimal passed: 265 tests.

Merge request reports

Loading