You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ABLESTACK-N2K Cloud Cutover Start Policy and Release Checkout Design
2
+
3
+
## Background
4
+
5
+
Cloud-managed N2K migrations use the same engine as the CLI wizard, but the Cloud agent wrapper previously forced Cloud target cutover to pass `--start`. The CLI already distinguishes the two target policies:
6
+
7
+
-`--apply`: deploy/import the target VM and leave it stopped.
8
+
-`--apply --start`: deploy/import the target VM and start it after cutover.
9
+
10
+
This means a user can already request a stopped target VM from direct CLI or wizard mode, but the Cloud UI/API path could not express that preference.
11
+
12
+
The release workflow also had inconsistent checkout behavior during tag-triggered release builds. The release job checked out `workflow_run.head_sha`, while build jobs used the default checkout ref. If the default branch differs from the tag commit, generated artifacts can be built from a different commit than the release metadata.
13
+
14
+
## Design
15
+
16
+
### Cloud cutover policy
17
+
18
+
The Cloud API owns the user-facing choice and passes it to the host command as a boolean start policy. The KVM wrapper maps it to the engine flags:
19
+
20
+
-`starttargetvm=true`: pass `--start` and keep the current default behavior.
21
+
-`starttargetvm=false`: pass `--apply` only, so Cloud creates the target VM but leaves it stopped.
22
+
23
+
CLI and wizard behavior remains unchanged. Existing wizard users can keep using `--apply` or `--start` directly.
24
+
25
+
### Release workflow checkout policy
26
+
27
+
All build jobs and the release job must check out the same source ref:
28
+
29
+
-`workflow_run`: use `github.event.workflow_run.head_sha`.
30
+
-`workflow_dispatch`: use `github.ref`.
31
+
32
+
The final GitHub Release must also publish with `target_commitish` equal to the resolved checked-out commit.
33
+
34
+
## Compatibility
35
+
36
+
- Default behavior remains start-after-cutover for existing Cloud API/UI users.
37
+
- Direct CLI and wizard mode keep their current semantics.
0 commit comments