-
-
Notifications
You must be signed in to change notification settings - Fork 3
Wire up end to end call path (kafka -> monolith endpoints) #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
NicoHinderling
merged 6 commits into
main
from
07-08-wire_up_end_to_end_call_path_kafka_-_monolith_endpoints_
Jul 11, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dd3bea7
Wire up end to end call path (kafka -> monolith endpoints)
NicoHinderling 8ccc467
update integration tests
NicoHinderling fbf1baf
add error handling
NicoHinderling b05d194
some minor changes, more to come
NicoHinderling 7246703
feedback
NicoHinderling f06ca0c
cleanup
NicoHinderling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,71 @@ | ||
| """Constants used throughout the Launchpad application.""" | ||
|
|
||
| from enum import Enum | ||
|
|
||
| # Kafka topic names | ||
| PREPROD_ARTIFACT_EVENTS_TOPIC = "preprod-artifact-events" | ||
|
|
||
|
|
||
| # Error code constants (matching the Django model) | ||
| class ProcessingErrorCode(Enum): | ||
| """Error codes for artifact processing (matching the Django model).""" | ||
|
|
||
| UNKNOWN = 0 | ||
| UPLOAD_TIMEOUT = 1 | ||
| ARTIFACT_PROCESSING_TIMEOUT = 2 | ||
| ARTIFACT_PROCESSING_ERROR = 3 | ||
|
|
||
|
|
||
| # Artifact type constants | ||
| class ArtifactType(Enum): | ||
| """Artifact types for different platforms and formats.""" | ||
|
|
||
| XCARCHIVE = 0 | ||
| AAB = 1 | ||
| APK = 2 | ||
|
|
||
|
|
||
| # Retry configuration | ||
| MAX_RETRY_ATTEMPTS = 3 | ||
|
|
||
| # Health check threshold - consider unhealthy if file not touched in 60 seconds | ||
| HEALTHCHECK_MAX_AGE_SECONDS = 60.0 | ||
|
|
||
|
|
||
| class OperationName(Enum): | ||
| """Enum for operation names used in retry logic.""" | ||
|
|
||
| PREPROCESSING = "preprocessing" | ||
| SIZE_ANALYSIS = "size analysis" | ||
|
|
||
|
|
||
| class ProcessingErrorMessage(Enum): | ||
| """Fixed set of error messages for artifact processing.""" | ||
|
|
||
| # Network-related errors | ||
| DOWNLOAD_FAILED = "Failed to download artifact from Sentry" | ||
| UPLOAD_FAILED = "Failed to upload analysis results to Sentry" | ||
| UPDATE_FAILED = "Failed to update artifact info in Sentry" | ||
|
|
||
| # Processing-related errors | ||
| PREPROCESSING_FAILED = "Failed to extract basic app information" | ||
| SIZE_ANALYSIS_FAILED = "Failed to perform size analysis" | ||
| ARTIFACT_PARSING_FAILED = "Failed to parse artifact file" | ||
| UNSUPPORTED_ARTIFACT_TYPE = "Unsupported artifact type" | ||
|
|
||
| # System-related errors | ||
| TEMP_FILE_CREATION_FAILED = "Failed to create temporary file" | ||
| CLEANUP_FAILED = "Failed to clean up temporary files" | ||
|
|
||
| # Timeout errors | ||
| PROCESSING_TIMEOUT = "Processing timed out" | ||
|
|
||
| # Unknown errors | ||
| UNKNOWN_ERROR = "An unknown error occurred" | ||
|
|
||
|
|
||
| # Operation to error message mapping | ||
| OPERATION_ERRORS = { | ||
| OperationName.PREPROCESSING: ProcessingErrorMessage.PREPROCESSING_FAILED, | ||
| OperationName.SIZE_ANALYSIS: ProcessingErrorMessage.SIZE_ANALYSIS_FAILED, | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.