Repository navigation
Rename a provisioner, filter jobs, inbox done from the CLI - #71
Merged
Merged
Conversation
The action rename carries the provisioner's entry, its own secrets, the records of what it made or plans, and its jobs to the new name in one change. berth provisioner rename NAME NEW runs it.
jobs.list takes subject, host, running and before, the id of the last job of the page before. berth job list takes the same as flags.
Owner
Author
|
Gaps the audit found that need a decision, most missed first:
|
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.
Adds a
renameaction for provisioners and fills two small gaps found in an audit of the API.renameaction,berth provisioner rename NAME NEW). One store transaction moves the entry (with its type, settings and node), the provisioner's own secretsprovisioner/NAME/*, the legacy settings row, the provisioner name in every resource record (deployments, made machines and planned machines, own and file scopes), and the jobs ofprovisioner:NAME. Secrets left over under the new name are dropped. The rename also takes the new name's lock and the locks of everything the provisioner holds, so no running work writes a record with the old name. A name that is taken, invalid or unchanged gets a 400 before the job starts. A node's provisioner stays the node's, and the next apply still finds it (it is matched by node and type).subject,host(exact, also inside a roll-out's host list),runningandbefore(a job id, for the next page). The response shape stays the same.berth job listgets matching flags.berth inbox done/reopen HOST ID, which the API already had, and--before SEQso the "older messages" hint can be followed.The store gets
rename_subjectin both backends, tested on SQLite and PostgreSQL.Gaps left for a decision are listed in the comment below.