Resource metadata consolidation, extraction single-flight, and optimistic concurrency
Summary
- Centralized Octopus resource ordering and compatibility behavior in
OctopusResourceMetadata, removing duplicated planner rank/scope logic, and consolidated repeated property keys inOctopusPropertyNames. - Added scoped extraction single-flight to
OctopusImportPlanningPipeline, keyed by file path, length, and last-write time. Concurrent previews reuse oneOctopusInputExtractionResult, changed files re-extract, and failed extractions are not cached. - Enforced optimistic concurrency for session mutations:
UpdateSessionAsyncand confirmation admission now require the expectedDataVersion. Stale writes throwOctopusImportSessionConcurrencyException, mapped to the existing API conflict envelope byGlobalExceptionFilter. - Added an evidence-backed action compatibility matrix: real export action types
Octopus.KubernetesDeployContainers,Octopus.KubernetesDeployIngress, andOctopus.Manualremain functional, while unproven action types remain explicit disabled placeholders rather than speculative mappings.
The changes are additive and require no database migration or public API contract change.
Test plan
-
OctopusImportPlanningPipelineTestscovers repeated extraction reuse, concurrent single-flight behavior, file-change invalidation, and failed-task retry. -
OctopusImportSessionDataProviderTestsandOctopusImportSessionServiceTestscover current-version updates, stale-version rejection, missing-version guards, and atomic confirmation admission. -
OctopusImportDeploymentProcessMapperTestsverifies the real-export compatibility matrix and explicit unsupported-action placeholders. -
OctopusResourceMetadataTestsverifies enum completeness, ordering, historical-release behavior, and snapshot exclusions. -
GlobalExceptionFilterTestsverifies concurrent session updates map to the conflict envelope. -
Focused P3 tests: 60 passed, 0 failed. -
Full unit suite: 6,775 passed, 0 failed, 0 skipped. -
Release builds for Squid.UnitTestsandSquid.IntegrationTests: 0 errors. -
git diff --check: passed. -
PostgreSQL integration tests were not executed locally; the integration project compiles successfully and execution remains a CI step.