-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feat!: Remove SDK installation from our base image #443
Conversation
🚀 Code Coverage
|
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.
Found few blocking issues, the all the nitpicks are non-blocking
# We should only have two calls: our invocation and the aggregation step | ||
assert len(calls) == 2 | ||
# We should only have three calls: | ||
# invocation aggregation step and error handling for aggregation step |
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.
What's the 3rd call?
@@ -403,7 +393,13 @@ def _(imp: ir.GitImport): | |||
"" if imp.package_name is None else f"{imp.package_name}{extras_string} @ " | |||
) | |||
|
|||
return [f"{package_name_string}{url_string}"] | |||
# TODO: we should fully support subdirectories as projects |
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.
nitpick TODO without a ticket
@@ -38,7 +37,7 @@ RUN <<EOF | |||
set -ex | |||
. "$VIRTUAL_ENV/bin/activate" | |||
python -m pip install --no-cache-dir -U pip wheel | |||
python -m pip install --no-cache-dir "${SDK_REQUIREMENT}" | |||
python -m pip install --no-cache-dir ray[default]==2.30 |
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.
question: I can imagine the Ray version we're using in the image has to match the Ray version used in other components. Can you remind me what those components are?
It would be great to make a list of them here as a comment, so we know what to pay attention to when bumping the constraint in the future.
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.
Ray version is important in 2 places
- wdr
- image being run
B\umping ray version would be the only scenario where we have to rebuild all custom-images as they are based on given ray version.
It will be part of release process
assert deps_imports[0].type == "PYTHON_IMPORT" | ||
# it depends if you have installed SDK with version from PyPi, or | ||
# its local-dev version, it changes what import is used for SDK | ||
assert deps_imports[0].type == "PYTHON_IMPORT" or "GIT_IMPORT" |
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.
issue: that's not how equality works in Python 😄
>>> foo = "foo"
>>> foo == "abc" or "def"
'def'
assert deps_imports[0].type == "PYTHON_IMPORT" or "GIT_IMPORT" | |
assert deps_imports[0].type in {"PYTHON_IMPORT", "GIT_IMPORT"} |
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.
🤦
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.
issue: the design doc mentions specifying the images in orquestra-workflow-shared
, while this is in orquestra-sdk
. Which approach is the intended one?
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.
Good catch - I fixed the design doc.
Reasoning:
WDR is dependent on runtime-shared.
If I update WDR to new version, I need to update shared library.
If I updated shared library, I would have to update WDR.
This would basically lead to the looped process.
Now when we update WDR we update client and everything works.
@@ -1178,6 +1190,7 @@ def test_metadata_on_dev(monkeypatch: pytest.MonkeyPatch): | |||
# Given | |||
mocked_installed_version = Mock(return_value="22.42.0.dev1+gitAABBCC.20230101") | |||
monkeypatch.setattr(_versions, "get_installed_version", mocked_installed_version) | |||
monkeypatch.setattr(git.Repo, "is_dirty", Mock(return_value=False)) |
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.
nitpick: this mock is already set by the autoused fixture mask_sdk_version
monkeypatch.setattr(git.Repo, "is_dirty", Mock(return_value=False)) |
@@ -384,6 +384,8 @@ class Version(BaseModel): | |||
class WorkflowMetadata(BaseModel): | |||
sdk_version: Version | |||
python_version: Version | |||
# new field added in 0.67. Default to None to allow parsing older IRs |
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.
nice addition and a nice comment 👍
The problem
We had to regenerate SDK images each release
https://zapatacomputing.atlassian.net/browse/ORQSDK-1032
This PR's solution
Remove installation of SDK in our worker base images
Checklist
Check that this PR satisfies the following items:
<feat/fix/chore/imp[rovement]/int[ernal]/docs>[!]: