-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
async container launch kubernetes "process" #9242
async container launch kubernetes "process" #9242
Conversation
.env
Outdated
@@ -98,3 +98,5 @@ STATE_STORAGE_GCS_BUCKET_NAME= | |||
|
|||
# Sentry | |||
SENTRY_DSN="https://[email protected]/6102835" | |||
|
|||
CONTAINER_ORCHESTRATOR_ENABLED=true |
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.
remove this before merging
…ch-via-cloud-storage
…ch-via-cloud-storage
@davinchia @benmoriceau would like some first looks over the Still have some cleanup to do, just want general feedback on the approach. |
} else if (secondDocStoreStatus.equals(AsyncKubePodStatus.SUCCEEDED)) { | ||
return 0; | ||
} else { | ||
// otherwise, the actual pod is terminal when the doc store says it shouldn't be. |
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.
Should we update the doc store as failed here?
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 think it's important for the contract to be that only the container orchestrator itself writes to the store and that we handle that state + the kube cluster state instead of trusting other pieces to write to the store as well.
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.
agree. can we document this expectation in the container orchestrator and the state manager doc strings so it's obvious to devs?
} | ||
|
||
@Override | ||
public void destroy() { |
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.
Should we delete the doc store here
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 think there's no downside to maintaining a history on cloud storage? Maybe we'll need to add this to job sweeping eventually.
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.
Agree we can create an issue to remind ourselves and punt this till later.
airbyte-workers/src/main/java/io/airbyte/workers/process/AsyncOrchestratorPodProcess.java
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/temporal/sync/ReplicationLauncherWorker.java
Outdated
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/process/AsyncKubePodStatus.java
Show resolved
Hide resolved
I think I generally follow. The pattern to poll on the api and update the state bucket seems reasonable! I think my main concern is that there seems to be too many places where state can change e.g. the OrchestratorApp writing state. This can get complicated quickly. I think we should try to either keep all state writes/reads in a class or a clear set of abstractions or set a standard around state management e.g. state management cannot happen more than 1 abstraction layer away from the async process. This would also make things easier to test. I'm worried because process state has been biting us a lot. Introducing a remote cache is great and can also make this more complex. I'm not commenting on specific stuff since you said this is still WIP. Appreciate the early review request! (Sorry I know it's quite hand wavy of me to say this. I haven't put much thought into an alternative approach yet. I'm happy to spend some time next week if needed) |
…ch-via-cloud-storage
…ch-via-cloud-storage
...ontainer-orchestrator/src/main/java/io/airbyte/container_orchestrator/AsyncStateManager.java
Show resolved
Hide resolved
...r-orchestrator/src/main/java/io/airbyte/container_orchestrator/ContainerOrchestratorApp.java
Outdated
Show resolved
Hide resolved
...ntainer-orchestrator/src/main/java/io/airbyte/container_orchestrator/DbtJobOrchestrator.java
Show resolved
Hide resolved
...orchestrator/src/main/java/io/airbyte/container_orchestrator/ReplicationJobOrchestrator.java
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java
Outdated
Show resolved
Hide resolved
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.
Looks great! Much much cleaner, especially the state management, which is mostly contained in 1/2 classes now.
Some questions for clarity. Can I confirm, the orchestrator stuff won't be available for docker yeah?
Feel free to merge once you have dealt with the comments.
airbyte-config/models/src/main/java/io/airbyte/config/storage/DefaultS3ClientFactory.java
Show resolved
Hide resolved
...ontainer-orchestrator/src/main/java/io/airbyte/container_orchestrator/AsyncStateManager.java
Show resolved
Hide resolved
...r-orchestrator/src/main/java/io/airbyte/container_orchestrator/DefaultAsyncStateManager.java
Show resolved
Hide resolved
...r-orchestrator/src/main/java/io/airbyte/container_orchestrator/DefaultAsyncStateManager.java
Outdated
Show resolved
Hide resolved
...r-orchestrator/src/main/java/io/airbyte/container_orchestrator/ContainerOrchestratorApp.java
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/process/AsyncOrchestratorPodProcess.java
Outdated
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/process/KubePodProcess.java
Outdated
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/temporal/sync/LauncherWorker.java
Show resolved
Hide resolved
@@ -184,6 +184,32 @@ spec: | |||
configMapKeyRef: | |||
name: airbyte-env | |||
key: JOB_KUBE_MAIN_CONTAINER_IMAGE_PULL_POLICY | |||
# todo: add other state storage keys | |||
- name: STATE_STORAGE_MINIO_BUCKET_NAME |
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.
we can add in a follow up PR - should also update the https://docs.airbyte.com/operator-guides/configuring-airbyte#kubernetes-only with the state env vars.
…ch-via-cloud-storage
LauncherWorker
AsyncOrchestratorPodProcess
to "monitor" a pod that's running, so if it's re-run with the same attempt it continues with the same existing pod without killing it.This change is