microsoft / microsoft/trident

Add a migrate/keep-files API

Open
#287 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.