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

Deprecate PrefectAgent and prefect agent command group #12273

Merged
merged 4 commits into from Mar 13, 2024
Merged

Conversation

desertaxle
Copy link
Member

@desertaxle desertaxle commented Mar 13, 2024

Adds deprecation warnings to the PrefectAgent class and prefect agent command group. Users will receive a recommendation to use workers and a link to the workers upgrade guide.

Example

.venv ~/dev/PrefectHQ/prefect git:(deprecate/agent)
prefect agent start -q test
WARNING: The 'agent' command group has been deprecated. It will not be available after Sep 2024. Use `prefect worker start` instead. Refer to the upgrade guide for more information: https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/.
Starting v2.16.3+7.g4fe3951e0 agent with ephemeral API...

  ___ ___ ___ ___ ___ ___ _____     _   ___ ___ _  _ _____
 | _ \ _ \ __| __| __/ __|_   _|   /_\ / __| __| \| |_   _|
 |  _/   / _|| _|| _| (__  | |    / _ \ (_ | _|| .` | | |
 |_| |_|_\___|_| |___\___| |_|   /_/ \_\___|___|_|\_| |_|


Agent started! Looking for work from queue(s): test...

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • This pull request includes tests or only affects documentation.
  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • This pull request includes redirect settings in netlify.toml for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • This pull request includes helpful docstrings.
  • If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in mkdocs.yml navigation.

@desertaxle desertaxle added the deprecation This feature has been marked for removal label Mar 13, 2024
Copy link

netlify bot commented Mar 13, 2024

Deploy Preview for prefect-docs-preview ready!

Name Link
🔨 Latest commit f4dc548
🔍 Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/65f1d437901b300008066853
😎 Deploy Preview https://deploy-preview-12273--prefect-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@desertaxle desertaxle changed the title Deprecates PrefectAgent and prefect agent command group Deprecate PrefectAgent and prefect agent command group Mar 13, 2024
@desertaxle desertaxle marked this pull request as ready for review March 13, 2024 15:40
@desertaxle desertaxle requested a review from a team as a code owner March 13, 2024 15:40
Copy link
Contributor

@serinamarie serinamarie left a comment

Choose a reason for hiding this comment

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

LGTM!

src/prefect/agent.py Show resolved Hide resolved
tests/cli/test_agent.py Show resolved Hide resolved
Comment on lines +2 to +7
DEPRECATION WARNING:

This module, is deprecated as of version March 2024 and not be available after September 2024.
Agents have been replaced by workers, which offer enhanced functionality and better performance.

For upgrade instructions, see https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/.
Copy link
Contributor

Choose a reason for hiding this comment

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

👏

@desertaxle desertaxle merged commit 224fe56 into main Mar 13, 2024
45 checks passed
@desertaxle desertaxle deleted the deprecate/agent branch March 13, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This feature has been marked for removal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants