Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ Things worth knowing before changing them:
- Both tapes source `demo/common.tape`, so the two recordings cannot drift apart in size or colour. The dimensions there are twice what the README displays, because GitHub renders the image at about half that width and the spare pixels are what keep the text sharp.
- A tape waits for the shell prompt to come back rather than for a phrase in the output, since the phrase can scroll off screen before the command exits. When a tape ends, VHS kills whatever is still running, which for this tool means a half-installed release left behind on the cluster.
- The transfer needs to be worth watching. Uniform file sizes keep the progress bar moving at a steady rate, and the destination is emptied first, since rsync copies only what differs and a second run against a full destination is over before the bar moves.
- The typed command is spread over continuation lines, one group of flags per line, and the recording is as tall as the success run needs to keep that command and the whole run on one screen.
The failure run is longer and scrolls, by design: its last screen is the explanation, which is what that recording is for.
- Both tapes pin a strategy. Left alone the ladder picks the mount strategy, which copies locally in a second or two and is too fast to see. The failure tape pins mount for the opposite reason, to keep that recording short, and doing so assumes one pod can mount both claims. On a cluster that provisions them in different zones the strategy declines instead, and the recording shows the wrong failure.
- The workflow runs the same steps as the local task, from the same tapes. Only the recorder differs. CI runs VHS from its own image, whose fonts include the colour emoji this tool prints and which a bare runner may not have.
- The recorder honours a setting only where nothing precedes it, and otherwise warns and carries on with its own defaults, so a tape can record at the wrong size and colours while reporting success. The settings therefore come first in every tape, anything that is not a setting comes after them, and `task demo:record` fails on that warning rather than leaving it to be noticed.
Expand Down
2 changes: 1 addition & 1 deletion demo/common.tape
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Set Shell "bash"
Set FontFamily "JetBrains Mono SemiBold"
Set FontSize 36
Set Width 2800
Set Height 1240
Set Height 1650
Set Padding 48
Set Margin 32
Set MarginFill "#0d1117"
Expand Down
12 changes: 9 additions & 3 deletions demo/failure.tape
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ Output img/demo-failure.gif

# A prompt of one plain character. An escape sequence in it would be counted as
# visible width by the shell's line editor, which then wraps the typed command
# in the wrong column. The binary comes from the PATH that task demo:record sets.
# in the wrong column. The continuation prompt is two spaces, so the command
# reads as it would in the docs, one group of flags per line. The binary comes
# from the PATH that task demo:record sets.
Hide
Type `PS1='❯ '`
Type `PS1='❯ ' PS2=' '`
Enter
Type "clear"
Enter
Show

Sleep 1s
Type "pv-migrate -n demo --source app-data -N demo --dest app-data-new -s mount --rsync-extra-args=--nope"
Type "pv-migrate --source-namespace demo --source app-data \"
Enter
Type "--dest-namespace demo --dest app-data-new \"
Enter
Type "--strategies mount --rsync-extra-args=--nope"
Sleep 500ms
Enter

Expand Down
12 changes: 9 additions & 3 deletions demo/success.tape
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ Output img/demo.gif

# A prompt of one plain character. An escape sequence in it would be counted as
# visible width by the shell's line editor, which then wraps the typed command
# in the wrong column. The binary comes from the PATH that task demo:record sets.
# in the wrong column. The continuation prompt is two spaces, so the command
# reads as it would in the docs, one group of flags per line. The binary comes
# from the PATH that task demo:record sets.
Hide
Type `PS1='❯ '`
Type `PS1='❯ ' PS2=' '`
Enter
Type "clear"
Enter
Show

Sleep 1s
Type "pv-migrate -n demo --source app-data -N demo --dest app-data-new -s clusterip"
Type "pv-migrate --source-namespace demo --source app-data \"
Enter
Type "--dest-namespace demo --dest app-data-new \"
Enter
Type "--strategies clusterip"
Sleep 500ms
Enter

Expand Down
Binary file modified img/demo-failure.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.