Skip to content

Commit

Permalink
ref: remove tools.hack_pip (#79555)
Browse files Browse the repository at this point in the history
- this has been "broken" since end of july (when pip 24.2 released)
- it's unclear when the underlying problem was fixed (if it was?)
- I suspect github might have improved their networking? or gcp?
- we haven't seen ReadTimeout errors though so presumably something in
pip changed to resolve this
- we can always bring this back later with the correct `retry` decorator
-- but it's simpler to just remove this!

```
working around pypa/pip#12383 (comment)
writing: /home/runner/work/sentry/sentry/.venv/lib/python3.12/site-packages/sentry-pip-hack.pth
Error processing line 1 of /home/runner/work/sentry/sentry/.venv/lib/python3.12/site-packages/sentry-pip-hack.pth:

  Traceback (most recent call last):
    File "<frozen site>", line 206, in addpackage
    File "<string>", line 1, in <module>
    File "<string>", line 2, in <module>
  ModuleNotFoundError: No module named 'pip._vendor.tenacity'

Remainder of file ignored
```

getsentry first: getsentry/getsentry#15456

<!-- Describe your PR here. -->
  • Loading branch information
asottile-sentry authored Oct 28, 2024
1 parent cfebf45 commit 6ddaa27
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-sentry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ runs:
with:
python-version: ${{ inputs.python-version }}
cache-dependency-path: ${{ inputs.workdir }}/requirements-dev-frozen.txt
install-cmd: cd ${{ inputs.workdir }} && python3 -m tools.hack_pip && pip install -r requirements-dev-frozen.txt
install-cmd: cd ${{ inputs.workdir }} && pip install -r requirements-dev-frozen.txt

- name: Set up outputs
id: config
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test-setup-sentry-devservices/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ runs:
with:
python-version: ${{ inputs.python-version }}
cache-dependency-path: ${{ inputs.workdir }}/requirements-dev-frozen.txt
install-cmd: cd ${{ inputs.workdir }} && python3 -m tools.hack_pip && pip install -r requirements-dev-frozen.txt
install-cmd: cd ${{ inputs.workdir }} && pip install -r requirements-dev-frozen.txt

- name: Set up outputs
id: config
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
with:
python-version: 3.12.6
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -q --constraint requirements-dev-frozen.txt pip-tools
install-cmd: pip install -q --constraint requirements-dev-frozen.txt pip-tools
- name: check requirements
run: |
python -S -m tools.freeze_requirements
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
with:
python-version: 3.12.6
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev-frozen.txt
install-cmd: pip install -r requirements-dev-frozen.txt

- name: setup sentry (lite)
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/development-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
install-cmd: pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
- name: test-tools
run: make test-tools
- name: Handle artifacts
Expand All @@ -56,7 +56,7 @@ jobs:
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
install-cmd: pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
- name: devenv sync
run: |
devenv --nocoderoot sync
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
install-cmd: pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ~/.cache/pre-commit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
python-version: 3.12.6
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip
install-cmd: echo

- name: Step configurations
id: config
Expand Down
31 changes: 0 additions & 31 deletions tools/hack_pip.py

This file was deleted.

0 comments on commit 6ddaa27

Please sign in to comment.