Skip to content

Upload and extract endpoints for Octopus import

Summary

  • Added POST /api/octopus-import/upload and POST /api/octopus-import/{sessionId}/extract via OctopusImportController, mediator commands, response DTOs, permission attributes, cancellation tokens, and upload request size limits.
  • Implemented upload/extract handlers that create import sessions, persist temporary uploads with SHA-256 metadata, extract ZIP or standalone JSON input, build inventory/graph summaries, and transition sessions from Uploaded to Extracted.
  • Extended OctopusImportSessionService.RegisterTemporaryUploadAsync to update the redacted source summary after upload persistence while preserving the existing overload.
  • Added focused unit tests for successful upload, upload bad request, successful extraction transition, and blocker diagnostics without state transition.

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

Merge request reports

Loading