-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Use worker config resource requirements by default in jobs #10231
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
Use worker config resource requirements by default in jobs #10231
Conversation
@@ -113,6 +114,8 @@ public SchedulerApp(final Path workspaceRoot, | |||
} | |||
|
|||
public void start() throws IOException { | |||
final Configs configs = new EnvConfigs(); | |||
final WorkerConfigs workerConfigs = new WorkerConfigs(configs); |
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.
I believe this should be safe to do here in the SchedulerApp, because I see that the resource requirement env variables exist in each of these environments:
- Docker compose:
Lines 67 to 70 in 84d1456
- JOB_MAIN_CONTAINER_CPU_LIMIT=${JOB_MAIN_CONTAINER_CPU_LIMIT} - JOB_MAIN_CONTAINER_CPU_REQUEST=${JOB_MAIN_CONTAINER_CPU_REQUEST} - JOB_MAIN_CONTAINER_MEMORY_LIMIT=${JOB_MAIN_CONTAINER_MEMORY_LIMIT} - JOB_MAIN_CONTAINER_MEMORY_REQUEST=${JOB_MAIN_CONTAINER_MEMORY_REQUEST} - Kube overlays:
airbyte/kube/overlays/stable/.env
Lines 57 to 60 in 84d1456
JOB_MAIN_CONTAINER_CPU_REQUEST= JOB_MAIN_CONTAINER_CPU_LIMIT= JOB_MAIN_CONTAINER_MEMORY_REQUEST= JOB_MAIN_CONTAINER_MEMORY_LIMIT= - Helm charts:
airbyte/charts/airbyte/templates/scheduler/deployment.yaml
Lines 127 to 146 in 84d1456
- name: JOB_MAIN_CONTAINER_CPU_REQUEST valueFrom: configMapKeyRef: name: airbyte-env key: JOB_MAIN_CONTAINER_CPU_REQUEST - name: JOB_MAIN_CONTAINER_CPU_LIMIT valueFrom: configMapKeyRef: name: airbyte-env key: JOB_MAIN_CONTAINER_CPU_LIMIT - name: JOB_MAIN_CONTAINER_MEMORY_REQUEST valueFrom: configMapKeyRef: name: airbyte-env key: JOB_MAIN_CONTAINER_MEMORY_REQUEST - name: JOB_MAIN_CONTAINER_MEMORY_LIMIT valueFrom: configMapKeyRef: name: airbyte-env key: JOB_MAIN_CONTAINER_MEMORY_LIMIT
|
||
public DefaultJobCreator(final JobPersistence jobPersistence, final ConfigRepository configRepository) { | ||
public DefaultJobCreator(final JobPersistence jobPersistence, |
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.
This is the class with the main changes of using the WorkerConfig resource requirements if they are not set on the StandardSync
This reverts commit 39d21f0.
We noticed that resource requirements were not actually being populated on jobs in cloud, so this PR causes the DefaultJobCreator to use the resource requirements from WorkerConfigs by default if they are not populated in the StandardSync