Skip to content

Conversation

@pingsutw
Copy link
Member

@pingsutw pingsutw commented Jan 27, 2026

Summary

  • Improve the error message when build_code_bundle finds no files to bundle
  • Include the directory path being searched in the error message
  • List possible causes (virtual environment, .gitignore, no Python files)
  • Provide actionable debugging guidance
Screenshot 2026-01-27 at 11 31 25 AM

Add a more descriptive error message that includes:
- The directory being searched
- Possible causes (venv, .gitignore, no Python files)
- Debugging guidance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
logger.debug(f"Finding files to bundle, ignoring as configured by: {ignore}")
files, digest = list_files_to_bundle(from_dir, True, *ignore, copy_style=copy_style)
if len(files) == 0:
raise ValueError(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this a flyte.errors.CodeBundleError

pingsutw and others added 2 commits January 27, 2026 11:36
Replace ValueError with a custom CodeBundleError exception for better
error handling when no files are found to bundle.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
except Exception as e:
console.print(common.get_panel("Exception", f"[red]✕ Execution failed:[/red] {e}", config.output_format))
raise
exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intended?

@kumare3 kumare3 merged commit b48a31a into main Jan 28, 2026
29 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants