Skip to content

Use Redis for the communication between Server and Engine#1172

Merged
MarceloRGonc merged 47 commits into
mainfrom
mg/OPS-2396-2
Aug 27, 2025
Merged

Use Redis for the communication between Server and Engine#1172
MarceloRGonc merged 47 commits into
mainfrom
mg/OPS-2396-2

Conversation

@MarceloRGonc

Copy link
Copy Markdown
Contributor

Part of OPS-2396.

Additional Notes

  • Save the requests to the engine in cache
  • Save the responses from the engine in cache
  • Save the run progress requests in cache

@linear

linear Bot commented Aug 19, 2025

Copy link
Copy Markdown

@MarceloRGonc
MarceloRGonc requested a review from Copilot August 19, 2025 17:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces Redis-based communication between the Server and Engine components, replacing direct HTTP request/response data exchange with a cache-based approach using body access keys.

  • Replaces direct request/response body transmission with Redis cache storage and retrieval
  • Implements BodyAccessKeyRequest pattern for referencing cached data via access keys
  • Adds body converter module registration to both server API and engine components

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/server/worker/src/lib/engine/call-engine.ts Implements request body caching before engine calls and response retrieval using access keys
packages/server/api/src/app/app.ts Registers the body converter module for Redis-based request/response handling
packages/engine/src/main.ts Updates EngineRequest schema to include requestId and use Type.Unknown for engineInput
packages/engine/src/lib/services/progress.service.ts Modifies progress update requests to use cached request bodies via access keys
packages/engine/src/lambda-handler.ts Updates lambda handler to retrieve request body from cache and return response keys
packages/engine/src/engine-executor.ts Changes engine executor to cache response data and return access keys instead of direct responses
packages/engine/src/api-handler.ts Updates API handler to work with cached request bodies and return access keys

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@maor-rozenfeld maor-rozenfeld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test the two types of deployments

Base automatically changed from mg/OPS-2396 to main August 27, 2025 09:21
@sonarqubecloud

Copy link
Copy Markdown

@MarceloRGonc
MarceloRGonc merged commit 0b6ae12 into main Aug 27, 2025
18 of 19 checks passed
@MarceloRGonc
MarceloRGonc deleted the mg/OPS-2396-2 branch August 27, 2025 09:46
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.

3 participants