Skip to content

Commit 1905724

Browse files
runningcodeclaude
andcommitted
fix(artifacts): Use PROCESSING_ERROR for unsupported artifact types (EME-422)
Unsupported artifact types are genuine errors, not intentional skips. Report them with PROCESSING_ERROR instead of SKIPPED so they surface correctly to users. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ba10319 commit 1905724

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/launchpad/artifact_processor.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,15 @@ def _do_distribution(
340340
self._sentry_client.upload_installable_app(organization_id, project_id, artifact_id, f)
341341
else:
342342
logger.error(f"BUILD_DISTRIBUTION failed for {artifact_id}: unsupported artifact type")
343-
self._update_distribution_skip(organization_id, project_id, artifact_id, "unsupported")
343+
try:
344+
self._sentry_client.update_distribution_error(
345+
org=organization_id,
346+
artifact_id=artifact_id,
347+
error_code=InstallableAppErrorCode.PROCESSING_ERROR.value,
348+
error_message="unsupported artifact type",
349+
)
350+
except SentryClientError:
351+
logger.exception(f"Failed to update distribution error for artifact {artifact_id}")
344352

345353
def _do_size(
346354
self,

tests/unit/artifacts/test_artifact_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_processing_error_message_enum_values(self):
140140
assert ProcessingErrorMessage.SIZE_ANALYSIS_FAILED.value == "Failed to perform size analysis"
141141
assert ProcessingErrorMessage.UNKNOWN_ERROR.value == "An unknown error occurred"
142142

143-
def test_do_distribution_unknown_artifact_type_skips(self):
143+
def test_do_distribution_unknown_artifact_type_reports_error(self):
144144
mock_sentry_client = Mock(spec=SentryClient)
145145
mock_sentry_client.update_distribution_error.return_value = None
146146
self.processor._sentry_client = mock_sentry_client
@@ -155,8 +155,8 @@ def test_do_distribution_unknown_artifact_type_skips(self):
155155
mock_sentry_client.update_distribution_error.assert_called_once_with(
156156
org="test-org-id",
157157
artifact_id="test-artifact-id",
158-
error_code=InstallableAppErrorCode.SKIPPED.value,
159-
error_message="unsupported",
158+
error_code=InstallableAppErrorCode.PROCESSING_ERROR.value,
159+
error_message="unsupported artifact type",
160160
)
161161

162162
def test_do_distribution_invalid_code_signature_skips(self):

0 commit comments

Comments
 (0)