Skip to content

docs(ns8-module): no migrations in restore-module - #45

Open
DavidePrincipi wants to merge 2 commits into
mainfrom
docs-ns8-module-restore-no-migrate
Open

DavidePrincipi wants to merge 2 commits into
mainfrom
docs-ns8-module-restore-no-migrate

Conversation

@DavidePrincipi

@DavidePrincipi DavidePrincipi commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

AI agents working on NS8 modules sometimes add migration steps to the restore-module action, to convert settings or data from "an older backup". This is not needed: a restore installs the module version that made the backup, and migrations run later through the update-module.d hooks when the restored module is updated.

The full rule, with its exceptions (Traefik, and images pulled from tags that can move), now lives in the ns8-core developer manual. This skill keeps only a short pointer to it, so agents stop proposing such steps. No behavior change.

  • references/backup-restore.md: short paragraph with a link to the manual section
  • SKILL.md: one-line pointer in the "Always applies" list

See also


Generated by Claude Code:claude-opus-5-5 with nethserver-pr

A restore always runs the same module version that produced the
backup, so restore-module steps never need to convert old settings or
data. Migrations belong in update-module.d hooks, which run when the
restored module is later updated. Agents kept adding such steps to
cover "older backups".

Assisted-by: Claude Code:claude-opus-5-5
The full rule, with its exceptions, now lives in the ns8-core developer
manual. Keep only a short pointer in the skill, and use the same wording
in SKILL.md and the reference.

Assisted-by: Claude Code:claude-opus-5-5
@DavidePrincipi
DavidePrincipi marked this pull request as ready for review November 25, 2026 15:10
- Non-zero exit from any action step or event handler step halts the remaining sequence. (`references/backend.md`)
- Starting only the pod's `<module>.service` does NOT start its children — list every service explicitly in `systemctl --user try-restart`. (`references/backend.md`)
- In `restore-module`, `50call-configure-module` must pass ALL vars restored by `06copyenv`, not just a subset — check `configure-module/validate-input.json`. (`references/backup-restore.md`)
- No data or settings migrations in `restore-module` (except Traefik): put them in `imageroot/update-module.d/`. (`references/backup-restore.md`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we say why here? Without it an agent may still add migrations just in case.

Suggested change
- No data or settings migrations in `restore-module` (except Traefik): put them in `imageroot/update-module.d/`. (`references/backup-restore.md`)
- A restore reinstalls the module version that made the backup, so `restore-module` needs no data or settings migrations (except Traefik): put them in `imageroot/update-module.d/`. (`references/backup-restore.md`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants