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

Stop using deprecated on_event() decorator #4033

Merged
merged 3 commits into from
Oct 5, 2024

Conversation

andylizf
Copy link
Collaborator

@andylizf andylizf commented Oct 4, 2024

Fixes #3997

Replace deprecated @app.on_event('startup') decorator with lifespan event handler in sky/serve/controller.py.

  • Remove the @app.on_event('startup') decorator.
  • Add a lifespan event handler to configure the logger.
  • Update the SkyServeController class to use the lifespan event handler.

Fixes skypilot-org#3997

Replace deprecated `@app.on_event('startup')` decorator with lifespan event handler in `sky/serve/controller.py`.

* Remove the `@app.on_event('startup')` decorator.
* Add a lifespan event handler to configure the logger.
* Update the `SkyServeController` class to use the lifespan event handler.
Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the refactoring! LGTM.

@cblmemo cblmemo added this pull request to the merge queue Oct 5, 2024
Merged via the queue into skypilot-org:master with commit 1efd48a Oct 5, 2024
20 checks passed
@cblmemo cblmemo deleted the fix-deprecated-decorator branch October 5, 2024 21:23
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.

[Serve] Stop using deprecated on_event() decorator.
2 participants