Repository navigation
fix(esptool): reinstall a cached source esptool venv whose interpreter no longer resolves (#1655) - #1714
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Venv interpreter validation crates/fbuild-library/src/library/esptool.rs, crates/fbuild-library/src/library/esptool_tests.rs |
Verification checks whether the Python interpreter beside a venv launcher resolves before consulting the verification stamp or launching the executable. Tests cover a dangling symlink and a binary outside a venv. |
Source installation retry crates/fbuild-library/src/library/esptool.rs |
Source installation retries verification once after removing the tool and bin directories. A second failure returns a package error containing the archive URL and verification error. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- FastLED/fbuild#1505: This PR changes source esptool verification and adds recovery after verification fails.
- FastLED/fbuild#1503: This PR changes the source esptool tool and bin directory helpers used to remove the cached environment before reinstalling.
Merge Risk: 
Minimal · up to 8b4c3
-
The recovery path is ready to merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Issue
#1655requires validation of cached esptool venv interpreters and reinstall after failed validation.verify_esptool_oncechecks the venv interpreter before it trusts the verification stamp.ensure_source_installedremoves the cached uv tool and bin directories and retries installation and verification once. The added tests cover a stamped venv with a dangling interpreter and binaries outside a venv. These changes satisfy the coding requirements.
Full details: Out of Scope Changes check
-
Explanation
The changes are limited to source esptool verification, one reinstall retry, and focused tests for the cached-venv failure. The changes directly address issue
#1655. No unrelated implementation or test changes are shown.
-
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
…r no longer resolves (#1655) Co-Authored-By: Claude <noreply@anthropic.com>
4e6f3d2 to
8b4c365
Compare
Fixes #1655.
verify_esptool_onceno longer trusts its stamp when the launcher sits in a venv (../pyvenv.cfg) whosebin/pythonis missing or a dangling symlink, which is what a cache restored onto a runner with a different interpreter path produces.ensure_source_installedremoves the uv tool/bin dirs and reinstalls once on a failed verify, instead of failing the build at elf2image.Tests: new
verify_once_rejects_a_stamped_venv_with_a_dangling_interpreterandmissing_venv_interpreter_ignores_binaries_outside_a_venv;cargo test -p fbuild-library esptool31 passed, clippy clean. The reinstall loop itself isn't covered by a unit test because it shells out to realuv.Summary by CodeRabbit