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

Python entrypoints defined with Click don't work #116964

Closed
astrojuanlu opened this issue Nov 10, 2023 · 5 comments
Closed

Python entrypoints defined with Click don't work #116964

astrojuanlu opened this issue Nov 10, 2023 · 5 comments

Comments

@astrojuanlu
Copy link

Because of pallets/click#1054, pallets/click#2249, Python entrypoints defined with Click don't work.

Simple reproducer: https://github.com/astrojuanlu/simple-click-entrypoint

Job definition:

image

Result:

image

image


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@SaibabaBalapur-MSFT
Copy link
Contributor

@astrojuanlu
Thanks for your feedback! We will investigate and update as appropriate.

@kateglee-db
Copy link

Thanks for providing feedback that helps improve our documentation. We've created an internal work item (DOC-11889) to address your feedback. The timeline for resolution varies based on resourcing.

#please-close

@astrojuanlu
Copy link
Author

Thanks - do we get a notification here when it's resolved (if ever)?

@kateglee-db
Copy link

@astrojuanlu I sent your feedback to the writer who recommends that if you're blocked from using a library you need, reach out to support at https://help.databricks.com/. If the intent is to add this to the docs, this is an edge case, which we don't document in the tech docs. Support might document it in the KB.

@astrojuanlu
Copy link
Author

If I can emit a recommendation, it would be nice to document in the same page how the entry point execution is performed in better detail. If I squint, I see two hints, one in the page itself:

Both positional and keyword arguments are passed to the Python wheel task as command-line arguments.

And in the traceback:

     16 if entry:
     17   # Load and execute the entrypoint, assumes no parameters
---> 18   entry[0].load()()
     19 else:

This tells me that, internally, Databricks has some script that loads the entry point and executes it, and expects said entry point to read the parameters from the sys.argv (because the function is called without arguments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants