-
Notifications
You must be signed in to change notification settings - Fork 550
Add Strawberry GraphQL integration #2393
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
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
80c33dc
add to tox.ini
sentrivana 016218f
strawberry errors
sentrivana f97c8eb
wip
sentrivana 408481f
tweaks
sentrivana e589eb2
more tests
sentrivana af1e23b
fixes
sentrivana fe036c1
better info message
sentrivana 169ffd3
add graphql ops
sentrivana 5ed4f4a
compat
sentrivana 977965f
Merge branch 'master' into ivana/strawberry-integration
sentrivana f51e992
fixes, more tests
sentrivana 0a97dc7
add breadcrumb
sentrivana cfba133
fix tests
sentrivana bdbf83e
more test fixes
sentrivana 6e08308
some mypy fixes
sentrivana 5894c6c
more mypy fixes
sentrivana 30fd779
more mypy
sentrivana 5d251c2
mypy?
sentrivana e4a868f
mypy?
sentrivana e2b3222
mypy pls
sentrivana e7e9677
more tests
sentrivana 9787172
remove comment
sentrivana 740a94c
Merge branch 'master' into ivana/strawberry-integration
sentrivana 9ed948d
Merge branch 'master' into ivana/strawberry-integration
sentrivana 2dc5fe5
Merge branch 'master' into ivana/strawberry-integration
sentrivana a1a7a37
use new strawberry hook
sentrivana ea69abe
temp: test with strawberry prerelease
sentrivana aa29575
Merge branch 'master' into ivana/strawberry-integration
sentrivana 6ca7183
mypy fixes
sentrivana d9863ec
update strawberry version
sentrivana 65a2bce
dont override the hook completely
sentrivana 5c03e8f
Update sentry_sdk/integrations/strawberry.py
sentrivana ebed817
Update sentry_sdk/integrations/strawberry.py
sentrivana f862b3c
Update sentry_sdk/integrations/strawberry.py
sentrivana 6d9f35d
review feedback, round 1
sentrivana 8a75c2a
review feedback 2
sentrivana 168fe8c
use fixtures in tests
sentrivana 11013d6
Merge branch 'master' into ivana/strawberry-integration
sentrivana 6334cd9
Merge branch 'master' into ivana/strawberry-integration
sentrivana 7831520
handle event['request'] being none
sentrivana aed4cc9
introduce package_version helper
sentrivana 3df7256
Revert "introduce package_version helper"
sentrivana 2ccd1eb
change to try..except
sentrivana ed52750
alias for parametrize
sentrivana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,83 @@ | ||
name: Test strawberry | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/** | ||
|
||
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: | ||
name: strawberry, python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8","3.9","3.10","3.11"] | ||
# 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/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup Test Env | ||
run: | | ||
pip install coverage "tox>=3,<4" | ||
|
||
- name: Test strawberry | ||
uses: nick-fields/retry@v2 | ||
with: | ||
timeout_minutes: 15 | ||
max_attempts: 2 | ||
retry_wait_seconds: 5 | ||
shell: bash | ||
command: | | ||
set -x # print commands that are executed | ||
coverage erase | ||
|
||
# Run tests | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && | ||
coverage combine .coverage* && | ||
coverage xml -i | ||
|
||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
|
||
|
||
check_required_tests: | ||
name: All strawberry tests passed or skipped | ||
needs: test | ||
# 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.result, 'failure') | ||
run: | | ||
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.