-
Notifications
You must be signed in to change notification settings - Fork 261
Mini runtime release env #3250
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
base: feature/mini-runtime-release
Are you sure you want to change the base?
Mini runtime release env #3250
Conversation
There was a problem hiding this comment.
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 adds deployment configuration management for the mini-runtime environment, enabling dynamic environment variable configuration through a centralized deployment system.
- Introduces deployment configuration DTOs and client methods for fetching/sending deployment configs
- Adds EnvConfig utility class for managing environment variables with deployment config priority over system env
- Integrates deployment config initialization in the mini-runtime main entry point
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
DataActor.java | Adds abstract methods for deployment config operations |
ClientActor.java | Implements HTTP client methods for deployment config API calls |
EnvVariable.java | New DTO for individual environment variables with editability flag |
DeploymentConfig.java | New DTO for deployment configuration with environment variables |
Main.java | Adds initialization of deployment config on mini-runtime startup |
EnvConfig.java | New utility class for managing environment variables with deployment config priority |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@Override | ||
public DeploymentConfig fetchDeploymentConfig(String deploymentId) { | ||
Map<String, List<String>> headers = buildHeaders(); | ||
String endpoint = url + "/fetchDeploymentConfig?deploymentId=" + deploymentId; |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL parameter concatenation without encoding could lead to injection issues. Use URL encoding for the deploymentId parameter.
Copilot uses AI. Check for mistakes.
static private final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); | ||
|
||
// REFERENCE: https://www.oreilly.com/library/view/kafka-the-definitive/9781491936153/ch04.html (But how do we Exit?) | ||
public static void main(String[] args) { |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initEnvConfig() is called before dataActor initialization. The dataActor variable is used inside initEnvConfig() but may not be initialized at this point in the main method.
public static void main(String[] args) { | |
public static void main(String[] args) { | |
// Initialize dataActor before calling initEnvConfig | |
dataActor = DataActorFactory.createDataActor(); |
Copilot uses AI. Check for mistakes.
public static Map<String, String> snapshot() { | ||
return Collections.unmodifiableMap(envMap); | ||
} |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The envMap is not thread-safe and could cause race conditions when accessed concurrently with hydrate() method. Consider using ConcurrentHashMap or adding synchronization.
Copilot uses AI. Check for mistakes.
No description provided.