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

Removes docker-image-py dependency #1978

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ distlib==0.3.7
# via virtualenv
docker==6.1.3
# via flytekit
docker-image-py==0.1.12
# via flytekit
docstring-parser==0.15
# via flytekit
exceptiongroup==1.1.3
Expand Down Expand Up @@ -429,8 +427,6 @@ pyyaml==6.0.1
# flytekit
# kubernetes
# pre-commit
regex==2023.10.3
# via docker-image-py
requests==2.31.0
# via
# azure-core
Expand Down
4 changes: 0 additions & 4 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ docker==6.1.3
# via
# flytekit
# mlflow
docker-image-py==0.1.12
# via flytekit
docstring-parser==0.15
# via flytekit
docutils==0.17.1
Expand Down Expand Up @@ -1023,8 +1021,6 @@ referencing==0.30.2
# jsonschema
# jsonschema-specifications
# jupyter-events
regex==2023.8.8
# via docker-image-py
requests==2.31.0
# via
# azure-core
Expand Down
8 changes: 4 additions & 4 deletions flytekit/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def look_up_image_info(name: str, tag: str, optional_tag: bool = False) -> Image
:param Text tag: e.g. somedocker.com/myimage:someversion123
:rtype: Text
"""
from docker_image import reference
from docker.utils import parse_repository_tag

if pathlib.Path(tag).is_file():
with open(tag, "r") as f:
Expand All @@ -216,11 +216,11 @@ def look_up_image_info(name: str, tag: str, optional_tag: bool = False) -> Image
ImageBuildEngine.build(image_spec)
tag = image_spec.image_name()

ref = reference.Reference.parse(tag)
if not optional_tag and ref["tag"] is None:
fqn, parsed_tag = parse_repository_tag(tag)
if not optional_tag and parsed_tag is None:
raise AssertionError(f"Incorrectly formatted image {tag}, missing tag value")
else:
return Image(name=name, fqn=ref["name"], tag=ref["tag"])
return Image(name=name, fqn=fqn, tag=parsed_tag)


@dataclass(init=True, repr=True, eq=True, frozen=True)
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"dataclasses-json>=0.5.2,<0.5.12", # TODO: remove upper-bound after fixing change in contract
"deprecated>=1.0,<2.0",
"diskcache>=5.2.1",
"docker-image-py>=0.1.10",
"docker>=4.0.0,<7.0.0",
"docstring-parser>=0.9.0",
"flyteidl>=1.10.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ diskcache==5.6.1
# via flytekit
docker==6.1.3
# via flytekit
docker-image-py==0.1.12
# via flytekit
docstring-parser==0.15
# via flytekit
flyteidl==1.5.13
Expand Down Expand Up @@ -278,8 +276,6 @@ pyyaml==6.0.1
# flytekit
# kubernetes
# responses
regex==2023.6.3
# via docker-image-py
requests==2.31.0
# via
# azure-core
Expand Down