Implement catalog idempotent publish skips
This commit is contained in:
@@ -33,6 +33,7 @@ Planning inspects destination state through `internal/state` and maps catalog co
|
||||
- `publish_new`: no valid state exists and the destination bundle path is empty.
|
||||
- `upsert_additive`: additive workflow writes planned outputs and retains unrelated catalog outputs.
|
||||
- `replace_catalog`: replacement workflow writes planned outputs and deletes omitted outputs for the current owner.
|
||||
- `skip_same`: valid catalog metadata already matches every planned output.
|
||||
- `force_replace`: explicit bounded replacement selected by `Force`.
|
||||
- `fail_unmanaged`: unmanaged destination content blocks publication.
|
||||
- `fail_conflict`: invalid or unsupported state blocks publication.
|
||||
@@ -43,9 +44,11 @@ Execution writes destination state after selected outputs are written. Catalog o
|
||||
|
||||
## Workflow Behavior
|
||||
|
||||
Additive workflow computes a write set for the planned outputs and preserves catalog outputs for unplanned paths. Existing catalog records for planned paths are replaced by the current owner and source identity.
|
||||
Additive workflow computes a write set for the planned outputs and preserves catalog outputs for unplanned paths. Existing catalog records for planned paths are replaced by the current owner and source identity. When every planned output already matches catalog metadata, planning returns `skip_same` and ignores unrelated retained catalog outputs for the no-op decision.
|
||||
|
||||
Replacement workflow computes a write set for the planned outputs, preserves other-owner outputs, and deletes omitted outputs owned by the current pipeline and destination. It does not need `Force`.
|
||||
Replacement workflow computes a write set for the planned outputs, preserves other-owner outputs, and deletes omitted outputs owned by the current pipeline and destination. It does not need `Force`. Matching planned outputs return `skip_same` only when replacement would not delete omitted outputs for the current owner.
|
||||
|
||||
Catalog skip comparison is metadata-only. It checks pipeline id, destination id, source id, source digest, source creation timestamp, output path, kind, digest, size, generated output source path, generated output transform, and output URL metadata. It does not read destination file bytes, and `skip_same` execution does not write outputs, rewrite `.distributor.json`, delete files, or notify.
|
||||
|
||||
Forced replacement is explicit per request. It deletes the bounded destination bundle path before writing planned outputs and schema version `4` catalog state. Catalog planning selects `force_replace` only when `Force` is true and normal planning would otherwise fail for a non-empty no-state destination, a planned path collision with unmanaged storage content, invalid destination state, or unsupported future destination state.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user