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

regression from 95c6276d dockerutils.py TypeError: 'Version' object is not subscriptable #15637

Closed
dapplegatecp opened this issue Oct 9, 2024 · 1 comment · Fixed by #15638
Labels
bug Something isn't working

Comments

@dapplegatecp
Copy link

Bug summary

    my_flow.deploy(
        name="my-flow",
        work_pool_name="my_docker_pool",
        parameters=None,
        image="myname/myflow:latest",
        push=False
    )

This builds a docker image locally, but the client throws

  File "/home/dapplegate/git/root-sandboxes/.venv/lib/python3.12/site-packages/prefect/deployments/runner.py", line 917, in deploy
    image.build()
  File "/home/dapplegate/git/root-sandboxes/.venv/lib/python3.12/site-packages/prefect/docker/docker_image.py", line 69, in build
    with generate_default_dockerfile():
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/dapplegate/git/root-sandboxes/.venv/lib/python3.12/site-packages/prefect/utilities/dockerutils.py", line 584, in generate_default_dockerfile
    base_image = get_prefect_image_name()
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dapplegate/git/root-sandboxes/.venv/lib/python3.12/site-packages/prefect/utilities/dockerutils.py", line 62, in get_prefect_image_name
    parsed_version[0]
    ~~~~~~~~~~~~~~^^^
TypeError: 'Version' object is not subscriptable

Version info (prefect version output)

Version:             3.0.6
API version:         0.8.4
Python version:      3.12.3
Git commit:          aa5171d6
Built:               Wed, Oct 9, 2024 2:11 PM
OS/Arch:             linux/x86_64
Profile:             default
Server type:         server
Pydantic version:    2.9.2
Integrations:
  prefect-gitlab:    0.3.0
  prefect-docker:    0.6.1

Additional context

#15624

@dapplegatecp dapplegatecp added the bug Something isn't working label Oct 9, 2024
@zzstoatzz
Copy link
Collaborator

thank you for the report @dapplegatecp - the PR linked above should fix this. we will get a release out as soon as we can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants