Let delete-activities target an exact list of process ids - #213
Merged
Conversation
The only selection mode was a filter that resolves to its whole matching set — an empty filter matches everything. Deleting a known list of processes therefore required a deliberately unsatisfiable filter (e.g. product="ZZZ_no_match_ZZZ") plus the extra list, a hack even pyvolca's client documents. The request now carries an optional ids list naming the selection verbatim; keep and extra compose with it unchanged. ids combined with filter fields is refused — an ambiguous request must never be guessed at. The field is additive on the wire (old clients omit it) and reaches the CLI as a repeatable --id. Delete's arguments moved into a DeleteRequest record on the way: the nine-positional-argument signature was already a smell, and a tenth would have made every call site unreadable.
The client builds the delete body by hand and never carried the new ids field, so 'volca database delete-activities --id PID' against a server fell back to filter mode — whose empty filter selects the whole database. Wire-contract specs now pin both directions: --id values reach the server as the ids selection, and filter mode still omits ids so old servers keep working. Also pins the documented ids/keep/extra composition at the Edit level.
exact only modifies name/classification matching, so alongside ids it silently does nothing. Treat it like the other filter fields: refuse the ambiguous request instead of guessing.
Owner
Author
|
Suite de revue — trois correctifs poussés :
Reste hors de cette PR : le paramètre |
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The only selection mode was a filter that resolves to its whole matching set — an empty filter matches everything. Deleting a known list of processes therefore required a deliberately unsatisfiable filter (e.g.
product="ZZZ_no_match_ZZZ") plus theextralist, a hack even pyvolca's client documents.The request now carries an optional
idslist naming the selection verbatim;keepandextracompose with it unchanged.idscombined with filter fields is refused — an ambiguous request must never be guessed at. The field is additive on the wire (a spec pins that a request without the key still decodes), and reaches the CLI as a repeatable--id.Delete's arguments moved into a
DeleteRequestrecord on the way: the nine-positional-argument signature was already a smell, and a tenth would have made every call site unreadable.