-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-baggage
- Loading branch information
Showing
302 changed files
with
18,048 additions
and
8,399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
@@ -39,7 +39,7 @@ jobs: | |
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
@@ -54,7 +54,7 @@ jobs: | |
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
@@ -67,7 +67,6 @@ jobs: | |
- name: Build Packages | ||
run: | | ||
echo "Creating directory containing Python SDK Lambda Layer" | ||
pip install virtualenv | ||
# This will also trigger "make dist" that creates the Python packages | ||
make aws-lambda-layer | ||
- name: Upload Python Packages | ||
|
@@ -83,13 +82,12 @@ jobs: | |
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- run: | | ||
pip install virtualenv | ||
make apidocs | ||
cd docs/_build && zip -r gh-pages ./ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].7 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
name: "Release a new version" | ||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
with: | ||
token: ${{ secrets.GH_RELEASE_PAT }} | ||
fetch-depth: 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
name: Test AI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/** | ||
- sentry-sdk-2.0 | ||
pull_request: | ||
# Cancel in progress workflows on pull_requests. | ||
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
env: | ||
BUILD_CACHE_KEY: ${{ github.sha }} | ||
CACHED_BUILD_PATHS: | | ||
${{ github.workspace }}/dist-serverless | ||
jobs: | ||
test-ai-latest: | ||
name: AI (latest) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7","3.9","3.11","3.12"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup Test Env | ||
run: | | ||
pip install coverage tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test anthropic latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest" | ||
- name: Test cohere latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest" | ||
- name: Test langchain latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest" | ||
- name: Test openai latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest" | ||
- name: Test huggingface_hub latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest" | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() }} | ||
run: | | ||
coverage combine .coverage* | ||
coverage xml -i | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
test-ai-pinned: | ||
name: AI (pinned) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7","3.9","3.11","3.12"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup Test Env | ||
run: | | ||
pip install coverage tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test anthropic pinned | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-anthropic" | ||
- name: Test cohere pinned | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cohere" | ||
- name: Test langchain pinned | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain" | ||
- name: Test openai pinned | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai" | ||
- name: Test huggingface_hub pinned | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub" | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() }} | ||
run: | | ||
coverage combine .coverage* | ||
coverage xml -i | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
check_required_tests: | ||
name: All AI tests passed | ||
needs: test-ai-pinned | ||
# Always run this, even if a dependent job failed | ||
if: always() | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check for failures | ||
if: contains(needs.test-ai-pinned.result, 'failure') || contains(needs.test-ai-pinned.result, 'skipped') | ||
run: | | ||
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
name: permissions check | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
with: | ||
persist-credentials: false | ||
- name: Check permissions on PR | ||
|
@@ -53,7 +53,6 @@ jobs: | |
test-aws_lambda-pinned: | ||
name: AWS Lambda (pinned) | ||
timeout-minutes: 30 | ||
needs: check-permissions | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -64,31 +63,40 @@ jobs: | |
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
needs: check-permissions | ||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].7 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup Test Env | ||
run: | | ||
pip install coverage "tox>=3,<4" | ||
pip install coverage tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test aws_lambda pinned | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch | ||
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() }} | ||
run: | | ||
coverage combine .coverage* | ||
coverage xml -i | ||
- uses: codecov/codecov-action@v4 | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
check_required_tests: | ||
name: All AWS Lambda tests passed | ||
needs: test-aws_lambda-pinned | ||
|
Oops, something went wrong.