first draft diagram#455
Draft
rugeli wants to merge 3 commits intofeature/server-passed-recipe-jsonfrom
Draft
Conversation
Contributor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


BEFORE: Original Server Workflow
graph TD A[Client Request] --> B[POST /start-packing] B --> C{Check recipe param} C -->|Missing| D[Return 400 Error] C -->|Present| E[Generate UUID for job_id] E --> F[Create Background Task] F --> G[Return job_id immediately] F --> H[run_packing with recipe path] H --> I[pack with docker enabled] I --> J[Load recipe from file path] J --> K[Execute packing] K --> L{Packing succeeds?} L -->|Success| M[S3: Upload outputs to S3] L -->|Failure| N[Firebase: Update job status to FAILED] style A fill:#e1f5fe style G fill:#c8e6c9 style M fill:#fff3e0 style N fill:#ffcdd2AFTER: Enhanced Server Workflow with JSON Recipe Support
graph TD A[Client Request] --> B[POST /start-packing] B --> C{Check inputs} C -->|No recipe param + No body| D[Return 400 Error] C -->|Has recipe param + config| E[Generate UUID for job_id] C -->|Has JSON body + config| F[Generate hash from JSON] F --> G{Job exists?} G -->|Yes| H[Return existing job_id] G -->|No| I[Use hash as job_id] E --> J[Create Background Task] I --> J J --> K[Return job_id immediately] J --> L[pack with docker enabled and hash] L --> M{Input type?} M -->|Recipe path| N[Load recipe from file path] M -->|JSON body| O[Load recipe from JSON dict] N --> P[Execute packing in pack function] O --> P P --> Q{Packing succeeds?} Q -->|Success| R[S3: Upload outputs to S3] Q -->|Failure| S[Firebase: Update job status to FAILED] style A fill:#e1f5fe style K fill:#c8e6c9 style R fill:#fff3e0 style S fill:#ffcdd2 style G fill:#ffeb3b style H fill:#4caf50