You may also be interested in sentry vs. getsentry.

Testing Sentry commits in Getsentry

If you need to deploy to a staging environment: use ./bin/bump-sentry <sha> to update the committed version. Note that this will likely create a merge conflict so you'll want to merge just before updating:

git pull origin HEAD --rebase
./bin/bump-sentry deadbeef
git push origin HEAD -f

If you only need to validate CI: When you create a PR add requires <PR link> to the body of it. The getsentry/action-get-dependent-pr github action will pick up this value and update the sentry revision during CI. This is meant as a temporary measure to quickly validate a change -- one should commit backward and forward compatible changes in sentry since commits cannot be merged in lockstep.

NOTE: If you notice after opening it, edit the PR body and then push a new commit.

Fast reverting a change

If a merged PR in sentry or getsentry needs to be reverted immediately (such as during an incident or to un-break CI) the [Trigger: Revert] label can be applied to the PR. A GitHub action will process the label and apply the revert directly to the primary branch.

Python typechecking

We're slowing working to add typing to our Python codebase, using mypy to check types. While we do that, there are a few useful things to know:

  • As you create or work on Python files, please add typing where you can. If possible, try to follow the Python typing best practices, which may mean you also have to add from __future__ import annotations as the first line of your file. For more information about using types in Python, see the typing docs.

  • In some repos not all files currently pass a typecheck, so in those repos we're enabling checking on a file-by-file basis. (Look for a files entry in the [mypy] section of the repo's mypy.ini file to see if that's the case for a given repo.) This means that in those repos, adding new files and/or moving or renaming existing files may necessitate a change in the mypy.ini file, to add or update the files' paths. Also, if you update a file to include typing, please add it to the list!

  • To test types locally, many repos have a make command you can run. (The exact command varies by repo. In both sentry and getsentry it is make backend-typing.) In repos which don't have a make command, you can run mypy --strict --warn-unreachable --config-file mypy.ini at the root level of the repo.

You can edit this page on GitHub.