-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CI #2367
Fix CI #2367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to send my comments apparently.
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install nox | ||
- name: Build the docs | ||
run: nox -s docs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub defaults to 3.x to 3.12, which breaks this check, and since the Read the Docs check has been working well, I'm just removing this one.
test-linux: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
experimental: [false] | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python 3.11 is stable now. I don't believe having a failing check is helpful in any way, so I'm also removing the experimental
variable.
@@ -3,7 +3,7 @@ version: 2 | |||
build: | |||
os: ubuntu-22.04 | |||
tools: | |||
python: "3" | |||
python: "3.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python 3.12 breaks Read the Docs. I'll fix this in a follow-up PR.
# No wheels for Python 3.10 yet! | ||
numpy; python_version<"3.10" | ||
pandas; python_version<"3.10" | ||
numpy | ||
pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those projects have recent wheels, including Python 3.12 wheels.
@@ -3,7 +3,7 @@ ignore = E203, E266, E501, W503 | |||
|
|||
[tool:pytest] | |||
junit_family=legacy | |||
addopts = -vvv -p no:logging --cov-report=term-missing --cov=elasticsearch --cov-config=.coveragerc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-p no:logging
was breaking the caplog fixture now used in test_helpers.py
by disabling logs capture.
@@ -619,8 +620,10 @@ async def test_no_scroll_id_fast_route(self, async_client, scan_teardown): | |||
scroll_mock.assert_not_called() | |||
clear_mock.assert_not_called() | |||
|
|||
@patch("elasticsearch._async.helpers.logger") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @patch
approach was failing on Python 3.7. I still don't know why but using caplog fixed the issue.
with patch.object( | ||
async_client, "options", return_value=async_client | ||
), patch.object(async_client, "scroll", MockScroll()): | ||
try: | ||
with pytest.raises(ScanError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a drive-by change: in addition to not failing when ScanError
is raised, it fails if the exception is not raised.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.10 8.10
# Navigate to the new working tree
cd .worktrees/backport-8.10
# Create a new branch
git switch --create backport-2367-to-8.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5183a07bed27ef1911320043bc0995eecacfa836
# Push it to GitHub
git push --set-upstream origin backport-2367-to-8.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.10 Then, create a pull request where the |
* Fix CI (#2367) Co-authored-by: Quentin Pradet <[email protected]>
Backports: |
This makes CI green, without adding support for Python 3.12 or figuring out why the server tests are not running anymore.