Skip to content

fix: install awslocal with pipx to avoid distro botocore - #78

Merged
bartsdev merged 1 commit into
mainfrom
fix/awslocal-botocore-vendored
Nov 30, 2026
Merged

bartsdev merged 1 commit into
mainfrom
fix/awslocal-botocore-vendored

Conversation

@bartsdev

Copy link
Copy Markdown
Member

Summary

Scheduled CI on main has failed every week since at least October 11. On the Ubuntu 26.04 runner, pip install awscli-local[ver1] reuses the distro-packaged botocore, which has botocore.vendored removed. awscli v1 imports it, so every awslocal call crashes.

awslocal is now installed into its own pipx environment, which comes with a complete botocore from PyPI:

 tools/action.yml
-  which awslocal || pip install awscli-local[ver1]
+  if no awslocal
+    if pipx available
+      pipx install awscli-local[ver1]   # isolated venv, PyPI botocore
+    else
+      pip install awscli-local[ver1]

The step is also renamed from "Start LocalStack" to "Install tools", which matches what it does.

Evidence

  • Before: run 46325297167: "Test Local State Save Action" and "Test Cloud Pods Action" fail at Run AWS commands, and the two load jobs are skipped.
    File ".../awscli/s3transfer/__init__.py", line 140, in <module>
      from botocore.vendored.requests.packages.urllib3.exceptions import (
    ModuleNotFoundError: No module named 'botocore.vendored'
    
  • After: local repro in python:3.14-slim with a system-wide botocore==1.40.72 and vendored/ deleted, as on the runner:
    == pip install --user awscli-local[ver1]
    ModuleNotFoundError: No module named 'botocore.vendored'
    == pipx install awscli-local[ver1]
    aws-cli/1.46.3 Python/3.14.10 Linux/... botocore/1.44.15
    
    This PR's CI run is the end-to-end check.

Merge Danger

Door: two-way

Reverting is a one-file change.

Blast Radius: small

Only affects users with install-awslocal: true on runners where awslocal isn't already installed. With pipx, awslocal lands in ~/.local/bin, the same place pip install --user put it. awscli v1 and its dependencies now live in a pipx environment, so later steps that import awscli from the system Python won't find it. Without pipx, the old pip behaviour is kept.

🤖 Generated with Claude Code

On Ubuntu 26.04 runners, `pip install awscli-local[ver1]` reuses the
Debian-packaged botocore, which strips `botocore.vendored`. awscli v1
imports it, so every `awslocal` call crashed and the state/cloud-pod CI
jobs failed. Install into an isolated pipx venv when pipx is available,
falling back to pip otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bartsdev
bartsdev requested a review from a team as a code owner November 30, 2026 13:19
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The ephemeral instance for the application preview has been shut down

@bartsdev
bartsdev merged commit 69ea056 into main Nov 30, 2026
1 check passed
@bartsdev bartsdev mentioned this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant