Skip to content

Conversation

@rbro112
Copy link
Member

@rbro112 rbro112 commented Jan 7, 2026

Updates all reads from now-deprecated PreprodArtifact fields (build_number, build_version , app_icon_id and app_name) to use PreprodArtifactMobileAppInfo fields

@rbro112 rbro112 requested a review from a team as a code owner January 7, 2026 20:30
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 7, 2026
Comment on lines 205 to 206
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.

@rbro112 rbro112 changed the base branch from ryan/add_preprodartifactmobileappinfo_creation_to_write_path to graphite-base/105847 January 8, 2026 00:57
@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from f0842f3 to 5810afa Compare January 8, 2026 00:57
@rbro112 rbro112 changed the base branch from graphite-base/105847 to ryan/add_backfill_migration_for_preprodartifactmobileappinfo January 8, 2026 00:57
@rbro112 rbro112 changed the title Remove reads from deprecated fields and use PreprodArtifactMobileAppInfo table feat(preprod): Remove reads from deprecated fields and use PreprodArtifactMobileAppInfo table Jan 8, 2026
@rbro112 rbro112 force-pushed the ryan/add_backfill_migration_for_preprodartifactmobileappinfo branch from 63b7c29 to 8958da1 Compare January 8, 2026 17:37
@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from 5810afa to d4c4a00 Compare January 8, 2026 17:37
Comment on lines 18 to 20
build_number = (
artifact.mobile_app_info.build_number if hasattr(artifact, "mobile_app_info") else None
)

This comment was marked as outdated.

rbro112 added a commit that referenced this pull request Jan 8, 2026
…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
@rbro112 rbro112 force-pushed the ryan/add_backfill_migration_for_preprodartifactmobileappinfo branch from 8958da1 to bb33e35 Compare January 8, 2026 18:46
@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from d4c4a00 to 0e97769 Compare January 8, 2026 18:46
Comment on lines 367 to 376
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.

@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from 0e97769 to 658b42d Compare January 8, 2026 23:10
@rbro112 rbro112 force-pushed the ryan/add_backfill_migration_for_preprodartifactmobileappinfo branch from bb33e35 to 2bac7c1 Compare January 8, 2026 23:10
@rbro112 rbro112 force-pushed the ryan/add_backfill_migration_for_preprodartifactmobileappinfo branch from 2bac7c1 to 11992b0 Compare January 9, 2026 00:11
@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from 658b42d to c01fd24 Compare January 9, 2026 00:11
Comment on lines 67 to 70
app_icon_id = (
artifact.mobile_app_info.app_icon_id if hasattr(artifact, "mobile_app_info") else None
)
if app_icon_id:

This comment was marked as outdated.

mobile_app_info_fields["app_name"] = app_name

if mobile_app_info_fields:
PreprodArtifactMobileAppInfo.objects.create(
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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.

@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from a6b9e1b to 7f5005d Compare January 13, 2026 23:44
Comment on lines +153 to 168
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.

@rbro112 rbro112 force-pushed the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch from bb67d90 to 9998b19 Compare January 14, 2026 02:11
@rbro112 rbro112 merged commit 45eedfe into master Jan 14, 2026
66 checks passed
@rbro112 rbro112 deleted the ryan/remove_reads_from_deprecated_fields_and_use_preprodartifactmobileappinfo_table branch January 14, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants