-
Notifications
You must be signed in to change notification settings - Fork 2
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
186 ecr cwl dag #192
186 ecr cwl dag #192
Conversation
Updated to centralize CWL DAG operations to a single container ( Confirmed usage with ECR. DAG logs: [2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] Login Succeeded
...
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] Logged into: xxx.dkr.ecr.us-west-2.amazonaws.com
...
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] INFO ['docker', 'pull', 'xxx.dkr.ecr.us-west-2.amazonaws.com/unity-nikki-1-dev-sps-busybox']
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] Using default tag: latest
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] latest: Pulling from unity-nikki-1-dev-sps-busybox
...
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] Status: Downloaded newer image for xxx.dkr.ecr.us-west-2.amazonaws.com/unity-nikki-1-dev-sps-busybox:latest
...
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] xxx.dkr.ecr.us-west-2.amazonaws.com/unity-nikki-1-dev-sps-busybox \
[2024-09-05, 20:31:44 UTC] {pod_manager.py:468} INFO - [base] echo \
[2024-09-05, 20:31:45 UTC] {pod_manager.py:468} INFO - [base] 'Hello Unity' > /scratch/cl_41qdk/echo_message.txt
[2024-09-05, 20:31:45 UTC] {pod_manager.py:468} INFO - [base] INFO [job echo_message.cwl] completed success
...
[2024-09-05, 20:31:45 UTC] {pod_manager.py:468} INFO - [base] INFO Final process status is success Confirmed usage without ECR. DAG logs: [2024-09-05, 20:30:54 UTC] {pod_manager.py:468} INFO - [base] INFO ['docker', 'pull', 'busybox']
[2024-09-05, 20:30:55 UTC] {pod_manager.py:468} INFO - [base] Using default tag: latest
...
[2024-09-05, 20:30:55 UTC] {pod_manager.py:468} INFO - [base] Status: Downloaded newer image for busybox:latest
[2024-09-05, 20:30:55 UTC] {pod_manager.py:468} INFO - [base] docker.io/library/busybox:latest
...
[2024-09-05, 20:30:55 UTC] {pod_manager.py:468} INFO - [base] busybox \
[2024-09-05, 20:30:55 UTC] {pod_manager.py:468} INFO - [base] echo \
[2024-09-05, 20:30:56 UTC] {pod_manager.py:468} INFO - [base] 'Hello Unity' > /scratch/1llk9m62/echo_message.txt
[2024-09-05, 20:30:56 UTC] {pod_manager.py:468} INFO - [base] INFO [job echo_message.cwl] completed success
...
[2024-09-05, 20:30:56 UTC] {pod_manager.py:468} INFO - [base] INFO Final process status is success Modifications included:
|
Pending questions include:
|
Hi @nikki-t : I think this PR is almost ready. To answer your questions:
But can we make this further change: can we assume that (at least for now) the URL of the Docker image to run is embedded in the CWL (yes, exposing the AWS account number, but that seems to be ok). And let's assume we only store the ECR base URI as a Docker variable. Consequently can you please: o Comment out the part in the cwl_dag.py where we override the dockerPull section (let's keep it commented out for future reference) Thanks! |
Updated code to use an Airflow variable to set ECR login URL. If Deployed and tested, A) Setting [2024-09-10, 13:56:57 UTC] {cwl_dag.py:151} INFO - Use ECR: True
[2024-09-10, 13:56:57 UTC] {cwl_dag.py:160} INFO - ECR login: xxx.dkr.ecr.us-west-2.amazonaws.com
[2024-09-10, 13:56:57 UTC] {cwl_dag.py:162} INFO - CWL DAG arguments: {'message': 'Hello Unity'}
...
[2024-09-10, 13:59:54 UTC] {pod_manager.py:468} INFO - [base] + docker login --username AWS --password-stdin xxx.dkr.ecr.us-west-2.amazonaws.com
[2024-09-10, 13:59:54 UTC] {pod_manager.py:468} INFO - [base] + aws ecr get-login-password --region us-west-2
...
[2024-09-10, 13:59:54 UTC] {pod_manager.py:468} INFO - [base] Login Succeeded
[2024-09-10, 13:59:54 UTC] {pod_manager.py:468} INFO - [base] Logged into: xxx.dkr.ecr.us-west-2.amazonaws.com
[2024-09-10, 13:59:54 UTC] {pod_manager.py:468} INFO - [base] + echo 'Logged into: xxx.dkr.ecr.us-west-2.amazonaws.com'
...
[2024-09-10, 13:59:55 UTC] {pod_manager.py:468} INFO - [base] Error: No such object: busybox
[2024-09-10, 13:59:55 UTC] {pod_manager.py:468} INFO - [base] INFO ['docker', 'pull', 'busybox']
[2024-09-10, 13:59:56 UTC] {pod_manager.py:468} INFO - [base] Using default tag: latest
[2024-09-10, 13:59:56 UTC] {pod_manager.py:468} INFO - [base] latest: Pulling from library/busybox
[2024-09-10, 13:59:56 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Pulling fs layer
[2024-09-10, 13:59:56 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Verifying Checksum
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Download complete
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Pull complete
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] Digest: sha256:34b191d63fbc93e25e275bfccf1b5365664e5ac28f06d974e8d50090fbb49f41
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] Status: Downloaded newer image for busybox:latest
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] docker.io/library/busybox:latest
...
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] busybox \
[2024-09-10, 13:59:57 UTC] {pod_manager.py:468} INFO - [base] echo \
[2024-09-10, 13:59:58 UTC] {pod_manager.py:468} INFO - [base] 'Hello Unity' > /scratch/ji_rekxi/echo_message.txt
[2024-09-10, 13:59:58 UTC] {pod_manager.py:468} INFO - [base] INFO [job echo_message.cwl] completed success
...
[2024-09-10, 13:59:58 UTC] {pod_manager.py:468} INFO - [base] INFO Final process status is success B) Setting [2024-09-10, 13:56:52 UTC] {cwl_dag.py:151} INFO - Use ECR: False
[2024-09-10, 13:56:52 UTC] {cwl_dag.py:162} INFO - CWL DAG arguments: {'message': 'Hello Unity'}
...
[2024-09-10, 13:59:45 UTC] {pod_manager.py:468} INFO - [base] INFO /usr/share/cwl/venv/bin/cwl-runner 3.1.20240708091337
[2024-09-10, 13:59:45 UTC] {pod_manager.py:468} INFO - [base] Error: No such object: busybox
[2024-09-10, 13:59:45 UTC] {pod_manager.py:468} INFO - [base] INFO ['docker', 'pull', 'busybox']
[2024-09-10, 13:59:46 UTC] {pod_manager.py:468} INFO - [base] Using default tag: latest
[2024-09-10, 13:59:46 UTC] {pod_manager.py:468} INFO - [base] latest: Pulling from library/busybox
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Pulling fs layer
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Download complete
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] 3d1a87f2317d: Pull complete
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] Digest: sha256:34b191d63fbc93e25e275bfccf1b5365664e5ac28f06d974e8d50090fbb49f41
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] Status: Downloaded newer image for busybox:latest
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] docker.io/library/busybox:latest
...
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] busybox \
[2024-09-10, 13:59:47 UTC] {pod_manager.py:468} INFO - [base] echo \
[2024-09-10, 13:59:48 UTC] {pod_manager.py:468} INFO - [base] 'Hello Unity' > /scratch/ak8glaqi/echo_message.txt
[2024-09-10, 13:59:48 UTC] {pod_manager.py:468} INFO - [base] INFO [job echo_message.cwl] completed success
...
[2024-09-10, 13:59:48 UTC] {pod_manager.py:468} INFO - [base] INFO Final process status is success |
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.
Tested the change on a new deployment and logging into ECR worked.
Purpose
Proposed Changes
Issues
Testing
cwl_dag_ecr
to confirm the DAG will pull the AWS ECR URI and complete successfully.Logs (truncated to only include success details)