Browse Source

chore: import getsentry override reqs (#60034)

context:

* https://github.com/getsentry/sentry/pull/60009

```
Anton Pirker
  [2 days ago](https://sentry.slack.com/archives/CUHS29QJ0/p1699876762219409)
Can someone help me bump the Sentry Python SDK version in sentry and getsentry?
I have a [PR for bumping the SDK in ](https://github.com/getsentry/sentry/pull/59837)sentry but it fails because there is an error in the getsentry tests:
ERROR: Cannot install sentry-sdk 1.31.0 (from https://github.com/getsentry/sentry-python/archive/1b445c61d1e263ccd04d823307b3a03a6945dc8a.zip) and sentry-sdk==1.35.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested sentry-sdk 1.31.0 (from https://github.com/getsentry/sentry-python/archive/1b445c61d1e263ccd04d823307b3a03a6945dc8a.zip)
    The user requested sentry-sdk==1.35.0
So I created a [PR in ](https://github.com/getsentry/getsentry/pull/12056)getsentry to get rid of 1b445c61d1e263ccd04d823307b3a03a6945dc8a.zip (because the code is now in the new python sdk that is released publicly). I called bin/bump-sentry --no-skip fb0547a8588bd4f095d3151b43d952019fd9b4a0 in getsentry (with the SHA being the one from my branch in sentry. But the PR has a conflict in the file sentry-version (where my SHA from bin/bump-sentry is).
In what order do I need to do things so all the checks pass?

Anthony Sottile
  [3 hours ago](https://sentry.slack.com/archives/CUHS29QJ0/p1700065627109659?thread_ts=1699876762.219409&cid=CUHS29QJ0)
yeah I think that this isn't going to work without refactoring the dependency setup -- I think there was an unwritten assumption that forked packages in getsentry will always remain compatible and that just isn't true here due to metrics being a big feature added in the fork.  (and undoing that isn't safe either because there's code depending on the metrics functionality in the fork being there implicitly) :S
```
Buck Evan 1 year ago
parent
commit
7a9cb56c40
2 changed files with 16 additions and 0 deletions
  1. 2 0
      .pre-commit-config.yaml
  2. 14 0
      requirements-getsentry-overrides.txt

+ 2 - 0
.pre-commit-config.yaml

@@ -52,6 +52,8 @@ repos:
       entry: python -m tools.lint_requirements
       language: python
       files: requirements-.*\.txt$
+      # exclude the overrides file from this linter -- it doesn't apply at all
+      exclude: ^requirements-getsentry-overrides\.txt$
       additional_dependencies: [packaging==21.3]
     - id: check-mypy-bypass
       name: do not bypass the type checker

+ 14 - 0
requirements-getsentry-overrides.txt

@@ -0,0 +1,14 @@
+# getsentry requirements overrides
+#
+# getsentry-specific dependencies now live in `sentry` in `requirements-getsentry.txt`
+#
+# this file is for listing in-development git archive overrides for sentry libraries
+#
+# the format is:
+# # comment explaining what you're doing
+# library-name @ https://github.com/getsentry/<repo>/archive/<40 char sha>.zip
+
+
+# This overrides our sentry-python version to use a version with
+# configurable gzip compression
+sentry-sdk @ https://github.com/getsentry/sentry-python/archive/1b445c61d1e263ccd04d823307b3a03a6945dc8a.zip