Upload and extract endpoints for Octopus import
Summary
- Added
POST /api/octopus-import/uploadandPOST /api/octopus-import/{sessionId}/extractviaOctopusImportController, 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
UploadedtoExtracted. - Extended
OctopusImportSessionService.RegisterTemporaryUploadAsyncto 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:minimalpassed: 259 tests.