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

[Serve] Gate the deprecation warnings behind envvar #27479

Merged
merged 2 commits into from
Aug 5, 2022

Conversation

simon-mo
Copy link
Contributor

@simon-mo simon-mo commented Aug 4, 2022

Why are these changes needed?

This PR makes the deprecation warnings optional when user are using the API. Deprecation will still show up in the docstring regardless; but the warnings will be disabled by default.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(
    • Manually tested

@@ -428,3 +428,17 @@ def in_interactive_shell():
import __main__ as main

return not hasattr(main, "__file__")


def deprecated(*args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

can we call this deprecation_warning instead of deprecated so it's less confusing with the existing ray core-level Deprecated decorator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed it to guarded_deprecation_warning for extra verbosity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PTAL

@edoakes edoakes added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Aug 4, 2022
Signed-off-by: simon-mo <[email protected]>
@simon-mo simon-mo removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Aug 4, 2022
Copy link
Contributor

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

Thanks!

@simon-mo simon-mo merged commit f6d19ac into ray-project:master Aug 5, 2022
simon-mo added a commit to simon-mo/ray that referenced this pull request Aug 5, 2022
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
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.

3 participants