cuddly-jelly-27016
04/15/2025, 9:14 AMentrypoint.py runs into an infinite loop while preparing to run the job
flytekit is taking everything in the current working directory and zip it, the archive file (flyte_wf.zip) is placed in the same directory that is being archived.
shutil.make_archive creates a zip file and archives the whole directory, including the zip file itself. In the case of Databricks clusters, it triggers a recursion and runs into an endless zipping loop.
## What changes were proposed in this pull request?
The easiest way to fix this issue to create the archive outside of the directory to be archived.
## How was this patch tested?
Built a docker image with the fixed flytekit version and tested it E2E.
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
### Summary by Bito
This PR fixes a critical bug in Spark fast registration workflow that caused an infinite loop due to recursive archiving. The solution moves archive creation to a temporary directory, preventing the archive file from including itself. The changes also streamline function parameters and improve mock assertions for better test reliability.
Unit tests added: True
Estimated effort to review (1-5, lower is better): 1
flyteorg/flytekitcuddly-jelly-27016
04/17/2025, 4:34 AM