-
Notifications
You must be signed in to change notification settings - Fork 665
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
[BUG] Register workflow by image sha256 #5132
Comments
Thank you for opening your first issue here! 🛠 |
Hey @gilbert-stripe, great to see you back! Hope you're doing well.👋 Thank you for bringing this to our attention. Currently, Flyte's The error message you're seeing is due to an assertion in the code that checks for the presence of a tag in the image string. When you provide an image digest instead of a tag, this assertion fails, resulting in the error. To support image digests, changes would need to be made to the Here's an illustrative example of how the class ImageSpec:
def __init__(self, base_image=None, packages=None, python_version=None, apt_packages=None, env=None, registry=None, image_digest=None):
self.base_image = base_image
self.packages = packages or []
self.python_version = python_version
self.apt_packages = apt_packages or []
self.env = env or {}
self.registry = registry
self.image_digest = image_digest # New parameter for image digest
# Existing methods and new methods to handle image specification by digest... In this example, the However, please note that this is a significant change that would need to be thoroughly tested to ensure it doesn't introduce any regressions or break existing functionality. It would also need to be carefully designed to maintain backwards compatibility with existing workflows that specify images by tag. I hope this provides some clarity on the issue. If you have any further questions, please don't hesitate to ask. Sources
|
I'm also very interested in supporting this, though I think my error is actually a bit different.
Comes from https://github.com/flyteorg/flytekit/blob/4c6e704eb600b4fed38434bfe1e68b55ad7fac19/flytekit/configuration/__init__.py#L221 but this actually seems to work for me. Looking at the implementation of parse_repository_tag it looks to me like this part should work. The problem I have is that the |
@eapolinario have you started working this? I am very keen to get it fixed fast so if you are not working on it I can probably do it. |
Go for it. You can tag me on the PR. 😄 |
@gilbert-stripe which version of |
@Tom-Newton Hi! |
flyteorg/flytekit#1978 only only solves a tiny bit of the issue. I have made a PR that should fix the rest flyteorg/flytekit#2335 |
Describe the bug
Flyte supports passing image while registering workflow by pyflyte. However, it requires passing image tag and hasn't supported image sha256.
Example:
cmd:
PYTHONPATH=/pay/src/zoolander pyflyte register src/python/flyte/ml_exploration/dynamic_resource_allocation_example -p ml-exploration -d adhoc -i "containers.global.qa.stripe.io/stripe-qa/flyte/flyte-workflow-minimal-images-2@sha256:1f5b27f07f2ee6c68cb480562dad950184c9bcac590c4f6b2fa220c9173e4f3b" -v gilbert3-123456 --deref-symlinks
Error:
AssertionError: Incorrectly formatted image containers.global.qa.stripe.io/stripe-qa/flyte/flyte-workflow-minimal-images-2@sha256:1f5b27f07f2ee6c68cb480562dad950184c9bcac590c4f6b2fa220c9173e4f3b, missing tag value
Is it possible to support image sha256 in pyflyte?
Expected behavior
Support image sha 256 when registering workflow by pyflyte.
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: