Add a migrate/keep-files API
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 32
- Forks
- 18
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 31
Description
Right now, users must use script hooks to migrate any state when performing an update. A `keepFiles` or `migration` API could simplify this operation by removing the extra complexity of a script and transforming this into a declarative operation that can be better understood by Trident.
Such API would also assist users in case of a rollback where maybe some migrated files need to be migrated back (e.g. credentials/certificates).
The API could look something like:
```yaml
migration:
# Could be a file or dir
- path: /path/to/important/files
# Optional, assumed to be the same as `path`
migrationPath: /path/to/place/the/files/at
mode: <> # Optional, can be used to override
owner: <> # Optional, can be used to override
group: <> # Optional, can be set to override
mode: <> # how to handle this migration
```
`mode:` would be the more interesting field, some examples of possible values:
- `simple` (default): the file is only copied to the new system
- `bidirectional`: the file will be copied back (and overridden if different) in case of a rollback
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reading the existing update, rollback, and script-hook handling, then compare it with the proposed YAML migration fields; done requires an agreed API and defined copy and rollback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, yaml
- Domain
- devops, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100