Skip to content

Commit 09c6816

Browse files
committed
ref(preprod): Remove onboarding messages from snapshot PR comments
Remove first-upload and missing-base onboarding messages to match the size analysis pattern, which doesn't have these Emerge-specific flows.
1 parent df563b3 commit 09c6816

File tree

2 files changed

+1
-53
lines changed

2 files changed

+1
-53
lines changed

src/sentry/preprod/vcs/pr_comments/snapshot_templates.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ def format_snapshot_pr_comment(
8484
def format_snapshot_pr_comment_solo(
8585
artifacts: list[PreprodArtifact],
8686
snapshot_metrics_map: dict[int, PreprodSnapshotMetrics],
87-
is_first_upload: bool = False,
88-
is_missing_base: bool = False,
8987
) -> str:
9088
"""Format a PR comment for snapshots without a base comparison."""
9189
if not artifacts:
@@ -107,29 +105,7 @@ def format_snapshot_pr_comment_solo(
107105

108106
table_header = "| Name | Snapshots | Status |\n| :--- | :---: | :---: |\n"
109107

110-
sections = [_HEADER, table_header + "\n".join(table_rows)]
111-
112-
if is_first_upload:
113-
sections.append(
114-
str(
115-
_(
116-
"This looks like your first snapshot upload. "
117-
"Snapshot diffs will appear when we have a base upload to compare against. "
118-
"Make sure to upload snapshots from your main branch."
119-
)
120-
)
121-
)
122-
elif is_missing_base:
123-
sections.append(
124-
str(
125-
_(
126-
"No base snapshots found to compare against. "
127-
"Make sure snapshots are uploaded from your main branch."
128-
)
129-
)
130-
)
131-
132-
return "\n\n".join(sections)
108+
return f"{_HEADER}\n\n{table_header}" + "\n".join(table_rows)
133109

134110

135111
def _name_cell(

tests/sentry/preprod/vcs/pr_comments/test_snapshot_templates.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -356,34 +356,6 @@ def test_solo_upload(self) -> None:
356356
assert "| 15 |" in result
357357
assert "Uploaded" in result
358358

359-
def test_first_upload_shows_onboarding(self) -> None:
360-
artifact, metrics = self._create_artifact_with_metrics()
361-
362-
result = format_snapshot_pr_comment_solo(
363-
[artifact], {artifact.id: metrics}, is_first_upload=True
364-
)
365-
366-
assert "first snapshot upload" in result
367-
assert "main branch" in result
368-
369-
def test_missing_base_shows_warning(self) -> None:
370-
artifact, metrics = self._create_artifact_with_metrics()
371-
372-
result = format_snapshot_pr_comment_solo(
373-
[artifact], {artifact.id: metrics}, is_missing_base=True
374-
)
375-
376-
assert "No base snapshots found" in result
377-
assert "main branch" in result
378-
379-
def test_solo_no_warnings(self) -> None:
380-
artifact, metrics = self._create_artifact_with_metrics()
381-
382-
result = format_snapshot_pr_comment_solo([artifact], {artifact.id: metrics})
383-
384-
assert "first snapshot upload" not in result
385-
assert "No base snapshots found" not in result
386-
387359
def test_solo_no_metrics_shows_processing(self) -> None:
388360
artifact = self.create_preprod_artifact(
389361
project=self.project,

0 commit comments

Comments
 (0)