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

[prefect-shell] Replace prefect with prefect-client in the dependencies and avoid prerelease version installs #16015

Open
tyong920 opened this issue Nov 14, 2024 · 4 comments
Labels
enhancement An improvement of an existing feature

Comments

@tyong920
Copy link

tyong920 commented Nov 14, 2024

Describe the current behavior

  1. Unnecessary dependency on prefect:
  • prefect-shell currently depends on prefect>=3.0.0rc1, which brings in the full prefect package.
  • For projects that only need to interact with the Prefect API and do not require task flow definitions or runtime, the prefect-client library would be a sufficient and lighter dependency.
  1. Automatic installation of prerelease versions:
  • The dependency specification prefect>=3.0.0rc1 allows the installation of prerelease versions, such as recent .dev versions.
  • This behavior leads to frequent automatic updates to potentially unstable versions, which may introduce unexpected changes or issues.

Describe the proposed behavior

  1. Use prefect-client instead of prefect:
  • Replace the prefect dependency in prefect-shell with prefect-client to reduce dependency weight and avoid unnecessary imports.
  • This would allow prefect-shell to remain focused on API interactions and avoid coupling to the task execution and orchestration features provided by prefect.
  1. Avoid prerelease version installations:
  • Adjust the dependency specification to prevent prerelease versions from being installed unless explicitly intended, such as by setting prefect>=3.0.0.
  • This ensures stability by preventing .dev or rc versions from being automatically pulled in during dependency resolution.

Example Use

No response

Additional context

This change will make prefect-shell easier to integrate in projects where a lighter, API-only client is preferred and prevent potentially unstable releases from being automatically installed.

@tyong920 tyong920 added the enhancement An improvement of an existing feature label Nov 14, 2024
@cicdw
Copy link
Member

cicdw commented Nov 14, 2024

Good call @tyong920 thank you for the issue! I've opened a PR to remove the suffixes; I like your idea of only requiring prefect-client but it will take some time to implement it. Currently the main prefect package does not have prefect-client as a dependency, so without more work this would cause re-installations of prefect-client in cases where it is not necessary. We have a target to refactor the client and we can include this in that work when we pick it up.

@tyong920
Copy link
Author

tyong920 commented Nov 14, 2024

@cicdw Thank you for the quick response and for opening the PR to remove the suffixes!

I appreciate your consideration of the prefect-client dependency idea. It makes sense that refactoring will require some additional work, especially given the current separation between prefect and prefect-client. I’m glad to hear it’s on the roadmap, and I’ll look forward to seeing how it evolves when you’re able to take it up.

Thanks again for your prompt action and thoughtful approach!

@tyong920
Copy link
Author

@cicdw BTW, would it be possible to prioritize publishing the components under src/integrations to PyPI, including prefect-shell? Having these packages readily available would be extremely helpful for projects depending on them.

@cicdw
Copy link
Member

cicdw commented Nov 15, 2024

@tyong920 yup! I just pushed out the tags so the new versions should land on PyPI soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants