Skip to content
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

chore(hybrid-cloud): Upgrade Pydantic to version 2.7 #74770

Merged
merged 14 commits into from
Jul 30, 2024

Conversation

GabeVillalobos
Copy link
Member

Based on PR #74766, which should be merged first.

This PR upgrades pydantic and updates the model configs we use for RPC methods to conform with the new version.

This PR does not address deprecation warnings, which will be handled in a series of follow-up commits to both Sentry and GetSentry.

@GabeVillalobos GabeVillalobos requested review from a team as code owners July 23, 2024 19:41
@github-actions github-actions bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Jul 23, 2024
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@@ -10,7 +10,7 @@ on:
# 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
cancel-in-progress: false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only set for obtaining test results. This will be removed prior to merging.

Copy link

codecov bot commented Jul 23, 2024

Bundle Report

Changes will increase total bundle size by 11.02kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 28.2MB 11.02kB ⬆️

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.18%. Comparing base (ca1bcbe) to head (37d54bb).
Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #74770       +/-   ##
===========================================
+ Coverage   57.35%   78.18%   +20.83%     
===========================================
  Files        6539     6743      +204     
  Lines      288766   300997    +12231     
  Branches    49672    51776     +2104     
===========================================
+ Hits       165609   235335    +69726     
+ Misses     118600    59297    -59303     
- Partials     4557     6365     +1808     
Files Coverage Δ
src/sentry/autofix/utils.py 93.75% <100.00%> (+39.06%) ⬆️
src/sentry/hybridcloud/rpc/__init__.py 82.20% <100.00%> (+5.73%) ⬆️
src/sentry/hybridcloud/rpc/sig.py 90.78% <100.00%> (+11.05%) ⬆️
src/sentry/types/region.py 91.41% <100.00%> (+26.59%) ⬆️
src/sentry/users/services/user/serial.py 93.33% <ø> (+33.33%) ⬆️

... and 2440 files with indirect coverage changes

@GabeVillalobos GabeVillalobos requested a review from a team as a code owner July 23, 2024 22:13
@@ -45,7 +45,7 @@ python-rapidjson>=1.4
psutil>=5.9.2
psycopg2-binary>=2.9.9
PyJWT>=2.4.0
pydantic>=1.10.17,<2
pydantic>=2.5.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pydantic>=2.5.0
pydantic>=2.5.0,<3

Could we pin to the 2.x range so that we don't accidentally bump a major?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no risk to uncapping here -- in fact it's encouraged

this file isn't installed from -- it's used to generate the pinned file

Copy link
Member

@asottile-sentry asottile-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw I usually split out the compatible changes and land them first -- so that the core changes can be focused on

@GabeVillalobos GabeVillalobos merged commit 106b00a into master Jul 30, 2024
51 of 52 checks passed
@GabeVillalobos GabeVillalobos deleted the gv/pydantic-v2-7-upgrade branch July 30, 2024 18:40
@GabeVillalobos GabeVillalobos added the Trigger: Revert add to a merged PR to revert it (skips CI) label Jul 30, 2024
@getsentry-bot
Copy link
Contributor

PR reverted: 2525223

getsentry-bot added a commit that referenced this pull request Jul 30, 2024
This reverts commit 106b00a.

Co-authored-by: GabeVillalobos <5643012+GabeVillalobos@users.noreply.github.com>
roaga pushed a commit that referenced this pull request Jul 31, 2024
This reverts commit 106b00a.

Co-authored-by: GabeVillalobos <5643012+GabeVillalobos@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components Trigger: Revert add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants