Skip to content

Commit

Permalink
Removes docker-image-py dependency (flyteorg#1978)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas J. Fan <[email protected]>
  • Loading branch information
thomasjpfan authored and ringohoffman committed Nov 24, 2023
1 parent b2af16e commit 76a6a70
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
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

0 comments on commit 76a6a70

Please sign in to comment.