-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(preprod): Remove reads from deprecated fields and use PreprodArtifactMobileAppInfo table #105847
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
feat(preprod): Remove reads from deprecated fields and use PreprodArtifactMobileAppInfo table #105847
Conversation
| build_configuration=( | ||
| artifact.build_configuration.name if artifact.build_configuration else None | ||
| ), | ||
| app_icon_id=artifact.app_icon_id, | ||
| app_icon_id=( | ||
| artifact.mobile_app_info.app_icon_id if hasattr(artifact, "mobile_app_info") else None | ||
| ), | ||
| apple_app_info=apple_app_info, | ||
| android_app_info=android_app_info, | ||
| ) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
f0842f3 to
5810afa
Compare
63b7c29 to
8958da1
Compare
5810afa to
d4c4a00
Compare
…of mobile app specific info from PreprodArtifact (#105731) In prep for using PreprodArtifact for things beyond mobile apps (snapshots), this creates a separate table, `PreprodArtifactMobileAppInfo`, which will contain info specific to mobile apps. The process to land this and deprecate/remove the fields it's meant to replace is a bit complicated, so will summarize here: - [THIS PR] Add the table - #105846 add the write path to create new `PreprodArtifactMobileAppInfo` rows alongside `PreprodArtifact` rows - #105883 add a backfill to fill `PreprodArtifactMobileAppInfo` for all existing `PreprodArtifact`s - #105847 Remove reads from deprecated `PreprodArtifact` fields and use `PreprodArtifactMobileAppInfo` instead - #105848 remove deprecated fields and add a migration to delete the columns
8958da1 to
bb33e35
Compare
d4c4a00 to
0e97769
Compare
| build_version = ( | ||
| head_artifact.mobile_app_info.build_version | ||
| if hasattr(head_artifact, "mobile_app_info") | ||
| else None | ||
| ) | ||
| build_number = ( | ||
| head_artifact.mobile_app_info.build_number | ||
| if hasattr(head_artifact, "mobile_app_info") | ||
| else None | ||
| ) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
0e97769 to
658b42d
Compare
bb33e35 to
2bac7c1
Compare
2bac7c1 to
11992b0
Compare
658b42d to
c01fd24
Compare
src/sentry/preprod/api/endpoints/project_preprod_check_for_updates.py
Outdated
Show resolved
Hide resolved
| mobile_app_info_fields["app_name"] = app_name | ||
|
|
||
| if mobile_app_info_fields: | ||
| PreprodArtifactMobileAppInfo.objects.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this call create_preprod_artifact_mobile_app_info() now? I'm surprised no tests failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see you updated the tests to now call self.create_preprod_artifact_mobile_app_info() as well. We could create it as part of this method as a convenience if the fields are provided IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was torn here, I actually wanted to test cases where they explicitly weren't provided. I'll add back the convenience of it but leave mostly as-is.
a6b9e1b to
7f5005d
Compare
| build_version=mobile_app_info.build_version, | ||
| build_number=mobile_app_info.build_number, | ||
| release_notes=( | ||
| preprod_artifact.extras.get("release_notes") | ||
| if preprod_artifact.extras | ||
| else None | ||
| ), | ||
| app_name=preprod_artifact.app_name, | ||
| app_name=mobile_app_info.app_name, | ||
| download_url=get_download_url_for_artifact(preprod_artifact), | ||
| created_date=preprod_artifact.date_added.isoformat(), | ||
| ) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
bb67d90 to
9998b19
Compare

Updates all reads from now-deprecated
PreprodArtifactfields (build_number,build_version,app_icon_idandapp_name) to usePreprodArtifactMobileAppInfofields