Skip to content

make setup tries a download three times - #107

Merged
theAndreas merged 2 commits into
mainfrom
setup-retry
Nov 16, 2026
Merged

theAndreas merged 2 commits into
mainfrom
setup-retry

Conversation

@theAndreas

Copy link
Copy Markdown
Owner

A rebuild of MaxMatrix's dev container failed today in its postCreateCommand: make setup ran arduino-cli core update-index, the server reset the connection once, and arduino-cli gave up at once. VS Code then skipped everything after it: the compilation databases clangd reads, and on that attach the copy of the host's .gitconfig and gh auth setup-git, so that git had no name to commit with until a reload of the window. Running make setup again a minute later passed.

make setup now tries each download up to three times, 10 and 20 seconds apart, through a small function in tools/common.sh. arduino-cli's setup and PlatformIO's go through it; a third failure still fails, with the tool's own status. uv retries on its own and is left alone.

For a project: nothing to do.

How it was checked: a project made from this branch, with a stand-in for arduino-cli on the PATH that fails core update-index as often as it is told, as the real one failed:

  • fails once: a note, a second try after 10 s, and make setup passes;
  • fails every time: three tries in 30 s, and make setup fails with arduino-cli's status 1;
  • does not fail: one call, no pause.

tests/check.sh lint passes, shellcheck among it.

arduino-cli gives up at once where a server resets the connection, and its
update-index failed the dev container's postCreateCommand on a rebuild of
MaxMatrix: VS Code then skipped the rest, the compilation databases and,
on that attach, the copy of .gitconfig and gh auth setup-git. download()
in common.sh runs a command that downloads again after 10 and 20 seconds,
and returns the third failure; arduino-cli's setup and PlatformIO's go
through it.
@theAndreas
theAndreas merged commit 0e493b2 into main Nov 16, 2026
1 check passed
@theAndreas
theAndreas deleted the setup-retry branch November 16, 2026 16:07
@theAndreas theAndreas mentioned this pull request Nov 16, 2026
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