Skip to content

Commit 27e83df

Browse files
authored
fix(preprod): Handle missing date_built in UI and backend (EME-671) (#104444)
Frontend: Update the build details sidebar to display a timestamp even when `date_built` is not available by falling back to `date_added`. The tooltip now shows "App build time" when displaying `date_built`, or "App upload time" when displaying date_added. Backend: Extract `build_date` from `apple_app_info` and set it as `date_built`. Previously, Launchpad was sending `build_date` in `apple_app_info`, but the Sentry endpoint was not extracting it. This fix ensures that the build date from the XCArchive metadata is properly stored in the `date_built` field. Before: <img width="321" height="133" alt="Screenshot 2025-12-05 at 11 29 39" src="https://github.com/user-attachments/assets/e2ee1df3-09ba-4b90-b453-569412f78a11" /> After: <img width="307" height="125" alt="Screenshot 2025-12-05 at 11 29 30" src="https://github.com/user-attachments/assets/4dceb788-d440-43da-92df-ce236df98572" /> This ensures users always see a relevant timestamp for their builds.
1 parent aa58e30 commit 27e83df

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def validate_preprod_artifact_update_schema(
6060
"is_code_signature_valid": {"type": "boolean"},
6161
"code_signature_errors": {"type": "array", "items": {"type": "string"}},
6262
"missing_dsym_binaries": {"type": "array", "items": {"type": "string"}},
63+
"build_date": {"type": "string"},
6364
},
6465
},
6566
"android_app_info": {
@@ -90,6 +91,7 @@ def validate_preprod_artifact_update_schema(
9091
"apple_app_info.is_code_signature_valid": "The is_code_signature_valid field must be a boolean.",
9192
"apple_app_info.code_signature_errors": "The code_signature_errors field must be an array of strings.",
9293
"apple_app_info.missing_dsym_binaries": "The missing_dsym_binaries field must be an array of strings.",
94+
"apple_app_info.build_date": "The build_date field must be a string.",
9395
"android_app_info": "The android_app_info field must be an object.",
9496
"android_app_info.has_proguard_mapping": "The has_proguard_mapping field must be a boolean.",
9597
"dequeued_at": "The dequeued_at field must be a string.",
@@ -293,6 +295,10 @@ def put(
293295
if isinstance(binaries, list):
294296
extras_updates["has_missing_dsym_binaries"] = len(binaries) > 0
295297

298+
if "build_date" in apple_info:
299+
head_artifact.date_built = apple_info["build_date"]
300+
updated_fields.append("date_built")
301+
296302
for field in [
297303
"is_simulator",
298304
"codesigning_type",

static/app/views/preprod/buildDetails/sidebar/buildDetailsSidebarAppInfo.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,17 @@ export function BuildDetailsSidebarAppInfo(props: BuildDetailsSidebarAppInfoProp
6868
</Flex>
6969
</Tooltip>
7070
)}
71-
{props.appInfo.date_added && (
72-
<Tooltip title={t('App upload time')}>
71+
{(props.appInfo.date_built || props.appInfo.date_added) && (
72+
<Tooltip
73+
title={props.appInfo.date_built ? t('App build time') : t('App upload time')}
74+
>
7375
<Flex gap="2xs" align="center">
7476
<InfoIcon>
7577
<IconClock />
7678
</InfoIcon>
7779
<Text>
7880
{getFormattedDate(
79-
getUtcToSystem(props.appInfo.date_added),
81+
getUtcToSystem(props.appInfo.date_built || props.appInfo.date_added),
8082
datetimeFormat,
8183
{local: true}
8284
)}

0 commit comments

Comments
 (0)