sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

ref(tests): Unhardcode integration list

Open rominf opened this issue 1 year ago • 1 comments

Benefits of unhardcoding integration list and disabling auto integrations:

  1. It becomes possible to successfully run tests in environments where certain extra auto integrations get enabled.
  2. There is no need to update hardcoded list when new default integrations are introduced.

The origin of this change is a patch that I had to apply while packaging for Fedora: https://src.fedoraproject.org/rpms/python-sentry-sdk/blob/30f00540cd30328d578dfb84625226dcc7f28969/f/python-sentry-sdk.spec#_52 (https://src.fedoraproject.org/rpms/python-sentry-sdk/blob/30f00540cd30328d578dfb84625226dcc7f28969/f/0002-tests.test_new_scopes_compat_event-compatibility.patch). The patch was necessary because all possible optional dependencies for optional integrations are pre-installed as system packages, so that as many tests as possible could be run. Unfortunately, the patch no longer applies to a new version of the Sentry SDK, so instead of redoing the patch in Fedora, I am submitting this PR.


General Notes

Thank you for contributing to sentry-python!

Please add tests to validate your changes, and lint your code using tox -e linters.

Running the test suite on your PR might require maintainer approval. Some tests (AWS Lambda) additionally require a maintainer to add a special label to run and will fail if the label is not present.

For maintainers

Sensitive test suites require maintainer review to ensure that tests do not compromise our secrets. This review must be repeated after any code revisions.

Before running sensitive test suites, please carefully check the PR. Then, apply the Trigger: tests using secrets label. The label will be removed after any code changes to enforce our policy requiring maintainers to review all code revisions before running sensitive tests.

rominf avatar Jul 03 '24 14:07 rominf

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.34%. Comparing base (06d5da1) to head (da48ec1). Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3240      +/-   ##
==========================================
- Coverage   79.44%   79.34%   -0.10%     
==========================================
  Files         132      132              
  Lines       14278    14278              
  Branches     2999     2999              
==========================================
- Hits        11343    11329      -14     
- Misses       2088     2108      +20     
+ Partials      847      841       -6     

see 5 files with indirect coverage changes

codecov[bot] avatar Jul 03 '24 20:07 codecov[bot]

GitHub told to update the branch.

image

I rebased it on master.

rominf avatar Jul 15 '24 15:07 rominf

@szokeasaurusrex It happened again: image

What should I do?

rominf avatar Jul 16 '24 10:07 rominf

@rominf I can handle getting the PR merged from here

szokeasaurusrex avatar Jul 16 '24 11:07 szokeasaurusrex