Skip to content
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

[Provisioner] Fix bug when using docker login config and launching without yaml #2572

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Sep 18, 2023

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
sky launch \            
      --env SKYPILOT_DOCKER_PASSWORD=$(aws ecr get-login-password --region us-east-1) \
      --env SKYPILOT_DOCKER_USERNAME=AWS \
      --env SKYPILOT_DOCKER_SERVER=679991763071.dkr.ecr.us-east-1.amazonaws.com \
      --image-id docker:txia-test-ecr:latest --cloud gcp
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

sky/task.py Outdated
Comment on lines 475 to 476
# NOTE(dev): This should be called before task.set_resources() because
# of the docker login config.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we instead, at the end of set_env call the _with_docker_login_config if we find the docker login config in the new envs, so we don't have to requiring the set_envs to be called before set_resources?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Done. Thanks!

sky/cli.py Outdated
@@ -1425,6 +1425,7 @@ def launch(
'`sky spot launch`. `sky launch` supports a '
'single task only.')
task = task_or_dag
print(task)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unintended?

Copy link
Collaborator Author

@cblmemo cblmemo Sep 18, 2023

Choose a reason for hiding this comment

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

Yeah... Some remnant of debug 😔 Thanks for pointing that out!

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! LGTM with 2 comments.

sky/task.py Show resolved Hide resolved
Comment on lines +508 to +510
if _check_docker_login_config(self._envs):
self.resources = _with_docker_login_config(self.resources,
self._envs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment for why we are doing this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks!

sky/task.py Outdated Show resolved Hide resolved
Co-authored-by: Zhanghao Wu <[email protected]>
Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

LGTM

@cblmemo cblmemo merged commit 17ede26 into master Sep 18, 2023
@cblmemo cblmemo deleted the fix-docker-bug branch September 18, 2023 07:45
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