Skip to content

Commit 10c7af7

Browse files
runningcodeclaude
andcommitted
fix(artifacts): Remove iOS distribution skip reporting (EME-422)
Revert the iOS-specific changes that reported skip reasons for invalid code signatures and simulator builds. Keep the unsupported artifact type error reporting via the distribution endpoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4ef03e1 commit 10c7af7

2 files changed

Lines changed: 7 additions & 73 deletions

File tree

src/launchpad/artifact_processor.py

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -308,20 +308,13 @@ def _do_distribution(
308308
logger.info(f"BUILD_DISTRIBUTION for {artifact_id} (project: {project_id}, org: {organization_id})")
309309
if isinstance(artifact, ZippedXCArchive):
310310
apple_info = cast(AppleAppInfo, info)
311-
if not apple_info.is_code_signature_valid:
312-
logger.warning(f"BUILD_DISTRIBUTION skipped for {artifact_id}: invalid code signature")
313-
self._update_distribution_skip(organization_id, project_id, artifact_id, "invalid_signature")
314-
return
315-
if apple_info.is_simulator:
316-
logger.warning(f"BUILD_DISTRIBUTION skipped for {artifact_id}: simulator build")
317-
self._update_distribution_skip(organization_id, project_id, artifact_id, "simulator")
318-
return
319-
with tempfile.TemporaryDirectory() as temp_dir_str:
320-
temp_dir = Path(temp_dir_str)
321-
ipa_path = temp_dir / "App.ipa"
322-
artifact.generate_ipa(ipa_path)
323-
with open(ipa_path, "rb") as f:
324-
self._sentry_client.upload_installable_app(organization_id, project_id, artifact_id, f)
311+
if apple_info.is_code_signature_valid and not apple_info.is_simulator:
312+
with tempfile.TemporaryDirectory() as temp_dir_str:
313+
temp_dir = Path(temp_dir_str)
314+
ipa_path = temp_dir / "App.ipa"
315+
artifact.generate_ipa(ipa_path)
316+
with open(ipa_path, "rb") as f:
317+
self._sentry_client.upload_installable_app(organization_id, project_id, artifact_id, f)
325318
elif isinstance(artifact, (AAB, ZippedAAB)):
326319
with tempfile.TemporaryDirectory() as temp_dir_str:
327320
temp_dir = Path(temp_dir_str)
@@ -430,24 +423,6 @@ def _update_artifact_error(
430423
else:
431424
logger.info(f"Successfully updated artifact {artifact_id} with error information")
432425

433-
def _update_distribution_skip(
434-
self,
435-
organization_id: str,
436-
project_id: str,
437-
artifact_id: str,
438-
skip_reason: str,
439-
) -> None:
440-
"""Report distribution skip via the dedicated distribution endpoint."""
441-
try:
442-
self._sentry_client.update_distribution_error(
443-
org=organization_id,
444-
artifact_id=artifact_id,
445-
error_code=InstallableAppErrorCode.SKIPPED.value,
446-
error_message=skip_reason,
447-
)
448-
except Exception:
449-
logger.exception(f"Failed to update distribution skip for artifact {artifact_id}")
450-
451426
def _update_size_error_from_exception(
452427
self,
453428
organization_id: str,

tests/unit/artifacts/test_artifact_processor.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
)
77

88
from launchpad.artifact_processor import ArtifactProcessor
9-
from launchpad.artifacts.apple.zipped_xcarchive import ZippedXCArchive
109
from launchpad.artifacts.artifact import Artifact
1110
from launchpad.constants import (
1211
InstallableAppErrorCode,
@@ -159,46 +158,6 @@ def test_do_distribution_unknown_artifact_type_reports_error(self):
159158
error_message="unsupported artifact type",
160159
)
161160

162-
def test_do_distribution_invalid_code_signature_skips(self):
163-
mock_sentry_client = Mock(spec=SentryClient)
164-
mock_sentry_client.update_distribution_error.return_value = None
165-
self.processor._sentry_client = mock_sentry_client
166-
167-
artifact = Mock(spec=ZippedXCArchive)
168-
mock_info = Mock()
169-
mock_info.is_code_signature_valid = False
170-
mock_info.is_simulator = False
171-
172-
self.processor._do_distribution("test-org-id", "test-project-id", "test-artifact-id", artifact, mock_info)
173-
174-
mock_sentry_client.update_distribution_error.assert_called_once_with(
175-
org="test-org-id",
176-
artifact_id="test-artifact-id",
177-
error_code=InstallableAppErrorCode.SKIPPED.value,
178-
error_message="invalid_signature",
179-
)
180-
mock_sentry_client.upload_installable_app.assert_not_called()
181-
182-
def test_do_distribution_simulator_build_skips(self):
183-
mock_sentry_client = Mock(spec=SentryClient)
184-
mock_sentry_client.update_distribution_error.return_value = None
185-
self.processor._sentry_client = mock_sentry_client
186-
187-
artifact = Mock(spec=ZippedXCArchive)
188-
mock_info = Mock()
189-
mock_info.is_code_signature_valid = True
190-
mock_info.is_simulator = True
191-
192-
self.processor._do_distribution("test-org-id", "test-project-id", "test-artifact-id", artifact, mock_info)
193-
194-
mock_sentry_client.update_distribution_error.assert_called_once_with(
195-
org="test-org-id",
196-
artifact_id="test-artifact-id",
197-
error_code=InstallableAppErrorCode.SKIPPED.value,
198-
error_message="simulator",
199-
)
200-
mock_sentry_client.upload_installable_app.assert_not_called()
201-
202161

203162
class TestArtifactProcessorMessageHandling:
204163
"""Test message processing functionality in ArtifactProcessor."""

0 commit comments

Comments
 (0)