Skip to content
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

sanitize decorators and callable parameters on entrypoint load #15932

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

soamicharan
Copy link
Contributor

@soamicharan soamicharan commented Nov 6, 2024

During prefect deploy command execution, if python environment is not setup prefect load entrypoint using code parsing by ast module.
Now this is done by _sanitize_and_load_flow function which tries to sanitize code definition and try to load the flow.
Now in flow decorator, if it used any other decorator or uses callback hooks on_completion, on_running etc. then it will throw ScriptError.
So in this PR, try to sanitize the decorators and keywords used in flow decorator to try to load flow.

Checklist

Copy link

codspeed-hq bot commented Nov 6, 2024

CodSpeed Performance Report

Merging #15932 will not alter performance

Comparing soamicharan:enchance-safe-entrypoint-load (8fc7d81) with main (575a1f6)

Summary

✅ 3 untouched benchmarks

@desertaxle
Copy link
Member

Thanks for the PR @soamicharan! Could you please open an GitHub issue with an MRE describing the bug you're fixing here? That will be very helpful for me to understand the issue and help me make sure that the solution fits in well with the surrounding code.

@soamicharan
Copy link
Contributor Author

Thanks for suggestion
#15942
@desertaxle linked the Issue

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.

2 participants