Skip to content

Commit

Permalink
[Backport 8.16] Build dists as part of CI (#2710)
Browse files Browse the repository at this point in the history
Co-authored-by: Quentin Pradet <[email protected]>
  • Loading branch information
github-actions[bot] and pquentin authored Nov 13, 2024
1 parent 0070b83 commit e79dd7d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.x"
- name: Install dependencies
run: |
python3 -m pip install nox
- name: Lint the code
run: nox -s lint

package:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python3 -m pip install build
- name: Build dists
run: python utils/build-dists.py

test-linux:
strategy:
fail-fast: false
Expand All @@ -32,9 +47,9 @@ jobs:
continue-on-error: false
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set Up Python - ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/_otel.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def helpers_span(self, span_name: str) -> Generator[OpenTelemetrySpan, None, Non

@contextlib.contextmanager
def use_span(self, span: OpenTelemetrySpan) -> Generator[None, None, None]:
if not self.enabled or self.tracer is None:
if not self.enabled or self.tracer is None or span.otel_span is None:
yield
return

Expand Down
3 changes: 1 addition & 2 deletions elasticsearch/_sync/client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@
url_to_node_config,
)

from elasticsearch.exceptions import GeneralAvailabilityWarning

from ..._version import __versionstr__
from ...compat import to_bytes, to_str, warn_stacklevel
from ...exceptions import GeneralAvailabilityWarning

if TYPE_CHECKING:
from ._base import NamespacedClient
Expand Down

0 comments on commit e79dd7d

Please sign in to comment.