Skip to content

ref(processor): Decouple ArtifactProcessor from Kafka message schema#581

Merged
NicoHinderling merged 1 commit intomainfrom
03-12-ref_processor_decouple_artifactprocessor_from_kafka_message_schema
Mar 13, 2026
Merged

ref(processor): Decouple ArtifactProcessor from Kafka message schema#581
NicoHinderling merged 1 commit intomainfrom
03-12-ref_processor_decouple_artifactprocessor_from_kafka_message_schema

Conversation

@NicoHinderling
Copy link
Contributor

@NicoHinderling NicoHinderling commented Mar 13, 2026

Summary

Decouples ArtifactProcessor.process_message() from the Kafka message schema (PreprodArtifactEvents dict) by changing its signature to accept individual parameters (artifact_id, project_id, organization_id, requested_features).

This is prep work for the upcoming TaskWorker mode, which calls process_message() directly without a Kafka message envelope. By making the interface explicit, ArtifactProcessor becomes reusable by both the Kafka consumer and the TaskWorker.

Changes

  • artifact_processor.py: Replace dict parameter with explicit kwargs. Remove sentry_kafka_schemas import. Add features param to process_artifact(). Minor cleanups (Dictdict, raise eraise, simplify _guess_message).
  • kafka.py: Update _process_in_subprocess to call new signature with keyword args.
  • requirements-dev.txt: Bump sentry-protos from ==0.2.0 to >=0.4.11.
  • Tests: Update all process_message call sites in unit and integration tests.

Test plan

  • make check passes (lint, format, types)
  • make test-unit passes
  • make test-integration passes

Copy link
Contributor Author

NicoHinderling commented Mar 13, 2026

@sentry
Copy link
Contributor

sentry bot commented Mar 13, 2026

Sentry Build Distribution

App Name App ID Version Configuration Install Page
Hacker News com.emergetools.hackernews 1.0.2 (13) Release Install Build

else:
# If all else fails return unknown
return ProcessingErrorMessage.UNKNOWN_ERROR
return ProcessingErrorMessage.UNKNOWN_ERROR
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor cleanup

@NicoHinderling NicoHinderling marked this pull request as ready for review March 13, 2026 04:28
@NicoHinderling NicoHinderling force-pushed the 03-12-ref_processor_decouple_artifactprocessor_from_kafka_message_schema branch from fcce11c to fd1fdde Compare March 13, 2026 04:29
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@NicoHinderling NicoHinderling force-pushed the 03-12-ref_processor_decouple_artifactprocessor_from_kafka_message_schema branch from 8f447fb to 77d269c Compare March 13, 2026 19:07
@NicoHinderling NicoHinderling merged commit 78ce33d into main Mar 13, 2026
23 checks passed
@NicoHinderling NicoHinderling deleted the 03-12-ref_processor_decouple_artifactprocessor_from_kafka_message_schema branch March 13, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants