Skip to content

[CI] Cap redis below 8.2.0 - #206270

Closed
Isalia20 wants to merge 2 commits into
pytorch:mainfrom
Isalia20:ci-cap-redis-below-8.2.0
Closed

Isalia20 wants to merge 2 commits into
pytorch:mainfrom
Isalia20:ci-cap-redis-below-8.2.0

Conversation

@Isalia20

@Isalia20 Isalia20 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

redis 8.2.0 (released 2026-11-23) raises BytesWarning on import under python -bb, which run_test.py uses, so macOS and Windows trunk tests that import inductor fail. Cap it until a fixed release.

Test Plan: python -bb -c "import redis" passes with 8.1.0, fails with 8.2.0.

Reported issue to redis repo here:
redis/redis-py#4677

redis 8.2.0 (released 2026-11-23) raises BytesWarning on import under
`python -bb`, which run_test.py uses, so macOS and Windows trunk tests that
import inductor fail. Cap it until a fixed release.

Test Plan: `python -bb -c "import redis"` passes with 8.1.0, fails with 8.2.0.
@pytorch-bot

pytorch-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

PR Status: Approved 🚀

Please fix all CI failures and trigger merge by commenting "@pytorchbot merge".

✅ AUTOMATED REVIEW - Ready for human review:

The PR caps redis below 8.2.0 in .ci/docker/requirements-ci.txt, because 8.2.0
raises a BytesWarning on import under python -bb, which breaks inductor imports
in run_test.py jobs. Recommendation: Approve. All three points the review raises
are non-blocking.

Findings (3):

[minor] .ci/docker/requirements-ci.txt:320
Dependabot will probably lift the cap (non-blocking, but worth fixing before
merge). .github/dependabot.yml:31-86 runs a weekly update over /.ci/docker,
which includes this file. It uses versioning-strategy: increase-if-necessary and
a 7-day cooldown, and its ignore: list has no redis entry. Before this PR,
redis>=4.0.0 already accepted 8.2.0, so Dependabot had nothing to change. The
new <8.2.0 bound gives it something to raise. Once the cooldown ends, a
Dependabot PR (probably the grouped ci-image one) will likely widen the cap to
allow 8.2.x, which would bring back the macOS and Windows -bb failures. The file
already handles this for the intel-openmp cap (dependabot.yml:75, with a reason
comment at lines 70-72). Fix: add `- dependency-name: "redis"` with a short
reason comment, optionally scoped with versions: [">=8.2.0"].

[minor] .ci/docker/requirements-ci.txt:320
Still a floating range, not an == pin (non-blocking). macOS, Windows and s390x
install this file at job time, so a new 8.1.x release would still come in
without review. The exposure is narrow, and it is smaller than before the PR.
redis==8.1.0, the version the Test Plan checked, would close it. Only do this
together with the Dependabot ignore, since increase-if-necessary also bumps ==
pins.

[minor] .ci/docker/requirements-ci.txt:322
The comment has no issue link (non-blocking). Other pins in this file cite an
issue: hypothesis at line 61 (# 31136), intel-openmp at line 87 (# 201218) and
scipy at line 280 (# 60347). The upstream issue (redis/redis-py# 4677) and the
"until a fixed release" condition are only in the PR description. Copy both into
the comment so whoever removes the cap later knows when it is safe.

Reviewed commit: fbae045

Review run

🐛 Report a bad review

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/206270

Note: Links to docs will display an error until the docs builds have been completed.

⏳ 31 Pending, 1 Unrelated Failure

As of commit fbae045 with merge base 1340330 (image):
🟡 GreenLight: changes can't be reviewed due to merge_rules.yaml restrictions

FLAKY - The following job failed but was likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@Isalia20 Isalia20 added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 23, 2026
@github-actions github-actions Bot added bot-triaged This is a label only to be used by the auto triage bot triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Nov 23, 2026
@pytorch-bot pytorch-bot Bot added the in progress PR is being worked on by the author, until the automated review accepts it label Nov 23, 2026
github-actions[bot]

This comment was marked as outdated.

@malfet

malfet commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "Yes, let's do it"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR changes files under .ci/docker/, so the docker-builds builds must finish before merging. Still waiting for 1 docker build job(s), the first few are: docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-noble-xpu-n-py3-client)

Details for Dev Infra team

Raised by workflow job

@albanD albanD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@Isalia20

Copy link
Copy Markdown
Collaborator Author

Holding off before deadsnakes PPA launchpad outage is fixed:
https://exit1.dev/status/ppa.launchpadcontent.net

Three images built under the previous hash during the Launchpad PPA outage
installed Ubuntu's python3.11 3.11.0rc1. docker-builds never rebuilds an
existing tag, so a new hash is needed to rebuild them.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review of fbae045: nothing blocking; ready for human review.

The PR caps redis below 8.2.0 in .ci/docker/requirements-ci.txt, because 8.2.0 raises a BytesWarning on import under python -bb, which breaks inductor imports in run_test.py jobs. Recommendation: Approve. All three points the review raises are non-blocking.

⚪ 3 non-blocking findings

redis>=4.0.0,<8.2.0

Dependabot will probably lift the cap (non-blocking, but worth fixing before merge). .github/dependabot.yml:31-86 runs a weekly update over /.ci/docker, which includes this file. It uses versioning-strategy: increase-if-necessary and a 7-day cooldown, and its ignore: list has no redis entry. Before this PR, redis>=4.0.0 already accepted 8.2.0, so Dependabot had nothing to change. The new <8.2.0 bound gives it something to raise. Once the cooldown ends, a Dependabot PR (probably the grouped ci-image one) will likely widen the cap to allow 8.2.x, which would bring back the macOS and Windows -bb failures. The file already handles this for the intel-openmp cap (dependabot.yml:75, with a reason comment at lines 70-72). Fix: add - dependency-name: "redis" with a short reason comment, optionally scoped with versions: [">=8.2.0"].


redis>=4.0.0,<8.2.0

Still a floating range, not an == pin (non-blocking). macOS, Windows and s390x install this file at job time, so a new 8.1.x release would still come in without review. The exposure is narrow, and it is smaller than before the PR. redis==8.1.0, the version the Test Plan checked, would close it. Only do this together with the Dependabot ignore, since increase-if-necessary also bumps == pins.


#Pinned versions: <8.2.0 (8.2.0 raises BytesWarning on import under python -bb).

The comment has no issue link (non-blocking). Other pins in this file cite an issue: hypothesis at line 61 (# 31136), intel-openmp at line 87 (# 201218) and scipy at line 280 (# 60347). The upstream issue (redis/redis-py# 4677) and the "until a fixed release" condition are only in the PR description. Copy both into the comment so whoever removes the cap later knows when it is safe.

This review is AI-generated and advisory. Each new automated review replaces the previous one. Report a bad review

@Isalia20

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

This was referenced Nov 24, 2026
danieldale2026 added a commit to danieldale2026/pytorch that referenced this pull request Nov 28, 2026
Brings in b62254c ("[CI] Cap redis below 8.2.0 (pytorch#206270)"). Without
the cap, macOS and Windows CI install redis-py 8.2.0, whose module-level
mixed str/bytes frozenset raises BytesWarning; the test runner's -bb flag
turns that into an error and every test file that imports
torch._inductor fails at import time. The merge is conflict-free and keeps
the PR diff limited to test/test_testing.py.

Co-Authored-By: Claude Code <[email protected]>
bvolpato added a commit to bvolpato/pytorch that referenced this pull request Nov 28, 2026
Pytest 9.2 crashed when the JUnit reporter used a different key from pytest. Redis 8.2.0 raised a BytesWarning on import under python -bb.

Merge main at 579ecc5 to use pytest's reporter keys (pytorch#202390) and the upstream CI images that cap Redis below 8.2.0 (pytorch#206270). This keeps the load deduplication patch unchanged.

Test Plan

The affected jobs passed on the merged main commit in https://github.com/pytorch/pytorch/actions/runs/46101078121. The staged tree matched a replay of the original patch on that commit. Syntax and PR diff checks passed.

```sh
git diff --cached --check MERGE_HEAD
git diff --cached --exit-code MERGE_HEAD -- .ci/docker test/conftest.py test/test_testing.py
git diff --cached MERGE_HEAD | git patch-id --stable
git diff HEAD^ HEAD | git patch-id --stable
python -m py_compile torch/_inductor/dependencies.py test/conftest.py
```

Local lint and the CPU and CUDA suites did not run. This checkout lacks lintrunner and a PyTorch build.

Authored with an AI assistant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-triaged This is a label only to be used by the auto triage bot ciflow/docker ciflow/trunk Trigger trunk jobs on your pull request in progress PR is being worked on by the author, until the automated review accepts it Merged open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants