Implement catalog force replacement
This commit is contained in:
@@ -72,7 +72,7 @@ distributor run [--config <path>] [--dry-run] [--force] [--format text|json]
|
||||
|
||||
- `--config <path>` loads the pipeline configuration. If omitted, the application uses `/usr/local/etc/distributor/config.yml`.
|
||||
- `--dry-run` validates inputs and reports destination actions without applying changes.
|
||||
- `--force` permits a run when destination state indicates a conservative safety check would otherwise block it.
|
||||
- `--force` permits exceptional catalog replacement when a dry run reports `force_replace` for unmanaged content, a planned unmanaged path collision, invalid state, or unsupported future state.
|
||||
- `--format text|json` selects human-readable or machine-readable output.
|
||||
|
||||
`run` accepts no positional arguments.
|
||||
@@ -206,7 +206,7 @@ go run ./cmd/distributor run --config examples/local-publish.yml --dry-run
|
||||
go run ./cmd/distributor run --config examples/local-publish.yml
|
||||
```
|
||||
|
||||
Use `--format json` when automation needs structured run results. Use `--force` only when the operator has reviewed the destination state conflict and intentionally wants to continue.
|
||||
Use `--format json` when automation needs structured run results. Use `--force` only after `--dry-run --force` reports the intended bounded `force_replace` action.
|
||||
|
||||
### Repair Destination State Records
|
||||
|
||||
@@ -292,7 +292,7 @@ Text output is optimized for direct operator use. JSON output is optimized for a
|
||||
- Usage errors and fatal setup errors exit non-zero and do not emit a JSON result document.
|
||||
- `run --format json` emits a JSON result for partial destination failures, sets `ok` to `false`, includes result details and errors, and exits non-zero.
|
||||
- Warnings are included in JSON output and are printed in text output when relevant.
|
||||
- `run` summaries include separate `replace_older`, `replace_conflict`, `replace_newer`, `replace_takeover`, and `force_replace` counters. Takeover destination actions include `takeover_mode` in JSON and text output.
|
||||
- `run` summaries include separate `force_replace` counters. In JSON output, forced replacement actions use the stable action value `force_replace` and include the resolved `destination_path`.
|
||||
|
||||
## Diagnostics And Recovery
|
||||
|
||||
|
||||
Reference in New Issue
Block a user