Skip to content

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 in OctopusPropertyNames.
  • Added scoped extraction single-flight to OctopusImportPlanningPipeline, keyed by file path, length, and last-write time. Concurrent previews reuse one OctopusInputExtractionResult, changed files re-extract, and failed extractions are not cached.
  • Enforced optimistic concurrency for session mutations: UpdateSessionAsync and confirmation admission now require the expected DataVersion. Stale writes throw OctopusImportSessionConcurrencyException, mapped to the existing API conflict envelope by GlobalExceptionFilter.
  • Added an evidence-backed action compatibility matrix: real export action types Octopus.KubernetesDeployContainers, Octopus.KubernetesDeployIngress, and Octopus.Manual remain 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

  • OctopusImportPlanningPipelineTests covers repeated extraction reuse, concurrent single-flight behavior, file-change invalidation, and failed-task retry.
  • OctopusImportSessionDataProviderTests and OctopusImportSessionServiceTests cover current-version updates, stale-version rejection, missing-version guards, and atomic confirmation admission.
  • OctopusImportDeploymentProcessMapperTests verifies the real-export compatibility matrix and explicit unsupported-action placeholders.
  • OctopusResourceMetadataTests verifies enum completeness, ordering, historical-release behavior, and snapshot exclusions.
  • GlobalExceptionFilterTests verifies 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.UnitTests and Squid.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.

Merge request reports

Loading