flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[Core feature] fast-fail inamgespec

Open dansola opened this issue 8 months ago • 3 comments

Motivation: Why do you think this is important?

Right now, if ImageSpec can't find or create an image (e.g. Docker isn't running), it assumes the image exists with f"Flytekit assumes the image {img_name} already exists.".

For CI/CD processes, it may not be ideal for an automated system to assume an image exists.

Goal: What should the final outcome look like, ideally?

Ideally, the register or run command can take a --imagespec-fast-fail flag which will fail the registration or run command if the image can't be built.

Describe alternatives you've considered

Alternatively, ImageSpec could take an argument that prevents registration from succeeding if the image can't be found or built.

Propose: Link/Inline OR Additional context

Proposition:

  1. Add a --imagespec-fast-fail flag
  2. Add a imagespec_fast_fail argument to ImageConfig which is included in the SerializationSettings during registration.
  3. In ImageBuildEngine.build, include the imagespec_fast_fail arg.
  4. In ImageSpec, in should_build, raise an error if imagespec_fast_fail==True and the image can't be found or built.

Are you sure this issue hasn't been raised already?

  • [x] Yes

Have you read the Code of Conduct?

  • [x] Yes

dansola avatar May 20 '25 20:05 dansola

There is currently no --imagespec-fast-fail flag or imagespec_fast_fail argument in Flyte's CLI or ImageConfig as described in your proposal. The current behavior, as you noted, is that if Flytekit cannot determine if an image exists (e.g., Docker is not running), it assumes the image exists and proceeds, which may not be ideal for CI/CD environments (source).

Your suggested enhancements—adding a fast-fail flag or config option to fail registration/run if the image can't be built—are not present in the current implementation or documentation. This feature would require a code change to Flytekit and is not achievable with existing CLI flags or configuration options.

Would you like more detail on how to propose or implement this feature in Flyte?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @runllm to ask follow-up questions. See runllm.com for more!

runllm[bot] avatar May 20 '25 20:05 runllm[bot]

#take

popojk avatar May 21 '25 06:05 popojk

This should be fixed with this simpler solution: https://github.com/flyteorg/flytekit/pull/3251

dansola avatar May 21 '25 13:05 dansola