Skip to content

Preview and validate endpoints for Octopus import

Summary

  • Added GET /api/octopus-import/{sessionId}/preview and POST /api/octopus-import/{sessionId}/validate to OctopusImportController.
  • Added preview request and validation command contracts, including GetOctopusImportPreviewRequest, ValidateOctopusImportCommand, and OctopusImportValidatedPlanDto.
  • Added OctopusImportPlanningPipeline to rebuild extraction, inventory, resource graph, dependency plan, conflicts, and preview plan from the temporary upload for preview/validation handlers.
  • Added handlers that enforce session state transitions: Extracted -> Previewed for preview and Previewed -> Validated for successful validation, with blocker responses left untransitioned.

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: 262 tests.

Merge request reports

Loading