Skip to content

Commit 94511a0

Browse files
ref(preprod): post task deployment, remove no longer needed fallback (#112528)
Follow-up to #112527. Removes the `artifact.date_added` fallback and makes `triggered_at` a required parameter now that all producers pass it.
1 parent 4633450 commit 94511a0

File tree

1 file changed

+3
-5
lines changed
  • src/sentry/preprod/size_analysis

1 file changed

+3
-5
lines changed

src/sentry/preprod/size_analysis/tasks.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def compare_preprod_artifact_size_analysis(
5454
project_id: int,
5555
org_id: int,
5656
artifact_id: int,
57-
triggered_at: str | None = None,
57+
triggered_at: str,
5858
**kwargs: Any,
5959
) -> None:
6060
logger.info(
@@ -268,11 +268,9 @@ def compare_preprod_artifact_size_analysis(
268268
except (ValueError, AttributeError, TypeError):
269269
artifact_type_name = "unknown"
270270

271-
# TODO: Remove artifact.date_added fallback once all producers pass triggered_at
272-
start_time = (
273-
datetime.fromisoformat(triggered_at) if triggered_at else artifact.date_added
271+
e2e_size_analysis_compare_duration = timezone.now() - datetime.fromisoformat(
272+
triggered_at
274273
)
275-
e2e_size_analysis_compare_duration = timezone.now() - start_time
276274
metrics.distribution(
277275
"preprod.size_analysis.compare.results_e2e",
278276
e2e_size_analysis_compare_duration.total_seconds(),

0 commit comments

Comments
 (0)