Skip to content

box ci-plan: add verbose option#8

Open
Davis-A wants to merge 1 commit intofastmail:mainfrom
Davis-A:ci-plan-verbose
Open

box ci-plan: add verbose option#8
Davis-A wants to merge 1 commit intofastmail:mainfrom
Davis-A:ci-plan-verbose

Conversation

@Davis-A
Copy link
Copy Markdown
Member

@Davis-A Davis-A commented Mar 30, 2026

Hit an issue where CI wasn't successfully spinning up a box, problem was simple but took a while to figure out. Would have been a LOT faster if the ci plan was printed to see in gitlab output.

I don't love that i've made a _write_plan_file() sub print to stdout, but the alternative was doing it in the ci-plan directly which would mean converting it to yaml in two places. I'm rather ambivalent though how this is done, so if you prefer another way just let me know

The verbose option prints the yaml plan to stdout
@Davis-A Davis-A requested a review from rjbs March 30, 2026 02:31
@rjbs
Copy link
Copy Markdown
Member

rjbs commented Mar 30, 2026

I hope I am not being obnoxious, but I'd like to push back on the premise of this change. Given the relevant report said (plainly, but inside a toggled-closed section) "no combination of preferred sizes and regions was found", I don't think the problem was going to be fixed by adding even more text to read, especially when it would look sort of like a wall of YAML. That sentence hadn't been noticed, so adding text to explain it feels premature.

I think we can make a two-pronged approach that is more likely to have positive results.

First: when a collapsed section fails, add a failure marker outside the collapsed section. The displayed text was:

> Creating droplet
v Uploading artifacts for failed job

Given that the job has failed on the second of those lines, the failure "must" be in the first, but it requires attention. We can instead emit:

> Creating droplet
❌ Creating droplet failed, expand above section for details
v Uploading artifacts for failed job

Hopefully, then, the cross mark will catch the eye.

Second, rather than spit out the YAML, we can print planning decisions in plain English, and I wouldn't require --verbose for that, as most of the ci tools are fairly verbose by default. We could emit:

CI job requests custom image size via label: size-slug-1234

I don't feel confident this would've helped, but I do feel pretty confident that this would've been more useful than the YAML dump.

@rjbs
Copy link
Copy Markdown
Member

rjbs commented Mar 30, 2026

If you like, I will carry out the above two steps, but I don't want to step on your toes. If you're interested in doing it, you'll want to look at cicreate.pm — it's not trivial, because right now the step simply fails when either of the ->get steps throws. You'd want to wrap those in something like:

my $success = try {
  ...
} catch ($error) {
  say "Error while setting up box: $error";
}

print "section-end-stuff";

say "\N{CROSS MARK} Droplet creation failed";

$success || die...

Note that these commands are meant to run in both terminal and CI, so "look at section above" is not really sensible all the time.

The other change would go in ciplan.pm and seems entirely straightforward.

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