diff --git a/.github/workflows/container-smoke-test.yml b/.github/workflows/container-smoke-test.yml index 89d6d4a2d..a92bd387f 100644 --- a/.github/workflows/container-smoke-test.yml +++ b/.github/workflows/container-smoke-test.yml @@ -20,14 +20,8 @@ jobs: with: fetch-depth: 0 - - name: Install requirements - run: make install-dev - - name: Resolve Karapace version - run: | - source ./venv/bin/activate - KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)") - echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV + run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV - run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV - run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1de08c44f..e830d6f2c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,19 +37,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # Need fetch-depth 0 to fetch tags, see https://github.com/actions/checkout/issues/701 + with: + fetch-depth: 0 + - uses: actions/setup-python@v5 with: cache: pip python-version: '3.12' - - name: Install requirements - run: make install-dev - - name: Resolve Karapace version - run: | - source ./venv/bin/activate - KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)") - echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV + run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV - run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV - run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df5b5683b..016dff288 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,6 +28,9 @@ jobs: --showlocals steps: - uses: actions/checkout@v4 + # Need fetch-depth 0 to fetch tags, see https://github.com/actions/checkout/issues/701 + with: + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -40,14 +43,8 @@ jobs: with: go-version: '1.21.0' - - name: Install requirements - run: make install-dev - - name: Resolve Karapace version - run: | - source ./venv/bin/activate - KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)") - echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV + run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV - run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV - run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV diff --git a/src/schema_registry/telemetry/tracer.py b/src/schema_registry/telemetry/tracer.py index d23fa0ec4..e905e0edc 100644 --- a/src/schema_registry/telemetry/tracer.py +++ b/src/schema_registry/telemetry/tracer.py @@ -18,7 +18,6 @@ url_attributes as U, ) from opentelemetry.trace.span import Span -from typing import Any import inspect @@ -42,7 +41,7 @@ def get_name_from_caller() -> str: return inspect.stack()[1].function @staticmethod - def get_name_from_caller_with_class(function_class: object, function: Callable[[Any], Any]) -> str: + def get_name_from_caller_with_class(function_class: object, function: Callable) -> str: return f"{type(function_class).__name__}.{function.__name__}()" @staticmethod