https://flyte.org logo
#ask-the-community
Title
# ask-the-community
g

Gilbert Yang

03/28/2024, 3:26 PM
Hi team, got a error when I pyflyte register a workflow. cmd:
Copy code
PYTHONPATH=/pay/src/zoolander pyflyte register src/python/flyte/ml_exploration/dynamic_resource_allocation_example -p ml-exploration -d adhoc -i "<http://containers.global.qa.stripe.io/stripe-qa/flyte/flyte-workflow-minimal-images-2@sha256:1f5b27f07f2ee6c68cb480562dad950184c9bcac590c4f6b2fa220c9173e4f3b|containers.global.qa.stripe.io/stripe-qa/flyte/flyte-workflow-minimal-images-2@sha256:1f5b27f07f2ee6c68cb480562dad950184c9bcac590c4f6b2fa220c9173e4f3b>" -v gilbert3-123456 --deref-symlinks
This is a valid image, but it got the error:
Copy code
AssertionError: Incorrectly formatted image <http://containers.global.qa.stripe.io/stripe-qa/flyte/flyte-workflow-minimal-images-2@sha256:1f5b27f07f2ee6c68cb480562dad950184c9bcac590c4f6b2fa220c9173e4f3b|containers.global.qa.stripe.io/stripe-qa/flyte/flyte-workflow-minimal-images-2@sha256:1f5b27f07f2ee6c68cb480562dad950184c9bcac590c4f6b2fa220c9173e4f3b>, missing tag value
Can someone know how to resolve this?
y

Yee

03/28/2024, 4:35 PM
kill the sha?
i think flytekit’s not processing the sha correctly… partly because there’s no check on the backend.
g

Gilbert Yang

03/28/2024, 4:37 PM
We cannot tag the image when we build the image due to some internal constraint. We can only get the image by the image_digest (sha256)
@Ketan (kumare3) Could you take a look pls?
y

Yee

03/28/2024, 5:33 PM
so the request is that you’d like the image that you specify to be sha based rather than tag?
g

Gilbert Yang

03/28/2024, 5:33 PM
Yeah, exactly
y

Yee

03/28/2024, 5:34 PM
and you’d like it to be persisted like that across the board - like in the task definition…
g

Gilbert Yang

03/28/2024, 5:34 PM
It's weird that we don't support image digest
y

Yee

03/28/2024, 5:34 PM
and when it’s launched on k8s
so the pod when it’s run, it’d use the sha?
g

Gilbert Yang

03/28/2024, 5:35 PM
and you’d like it to be persisted like that across the board - like in the task definition…
Any risk by doing so? fwiw container is just a uri, it doesn't really matter how it looks like right?
y

Yee

03/28/2024, 5:35 PM
no concern from flyte’s perspective… it’s just a string. so it’s just the parsing logic we do here and there.
as long as fetching images by sha is a supported part of the oci api
g

Gilbert Yang

03/28/2024, 5:36 PM
I see! I just don't understand why I cannot pass image sha🥲
Can we support that?
y

Yee

03/28/2024, 5:37 PM
if it’s supported by k8s/oci it’s something we should support.
mind cutting a ticket for this?
we will investigate and get back to you on there.
g

Gilbert Yang

03/28/2024, 5:38 PM
mind cutting a ticket for this?
Sure, how can I cut it?
g

Gilbert Yang

03/28/2024, 5:42 PM
Thanks Yee!
Hi @Yee! May I know any update on this? I have to re-adjust our project plan based on this release date.
y

Yee

04/02/2024, 3:52 PM
sorry i haven’t even thought about this yet.
could you try this?
basically we just need to verify 1) k8s works with images specified like this - just spin up a pod with this as the image and 2) flyte works - i think we just need to adjust the image parsing part in flytekit, the rest of the system treats it like a string.
cc @Eduardo Apolinario (eapolinario) - can you think of any reason why this won’t work?
g

Gilbert Yang

04/02/2024, 3:54 PM
I believe the image parsing part in flytekit block this format of image_uri
could you try this?
hmm, try what?
y

Yee

04/02/2024, 3:57 PM
making the change in flytekit 🙂
?
g

Gilbert Yang

04/02/2024, 3:58 PM
Oh you mean I make a PR for that?
y

Yee

04/02/2024, 4:07 PM
yeah would you be up for it?
g

Gilbert Yang

04/02/2024, 4:10 PM
I am not sure I got the enough knowledge to do this
4 Views