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

stats: add lint error for using Stats::ScopePtr, and mark that nickname as deprecated #20896

Merged
merged 3 commits into from
Apr 20, 2022

Conversation

jmarantz
Copy link
Contributor

@jmarantz jmarantz commented Apr 20, 2022

Commit Message: Prevent further in-repo uses of Stats::ScopePtr with a lint error. Attempt to discourage out-of-repo uses of Stats::ScopePtr with a deprecated flag, though that doesn't seem to cause any warning in our build or clang-tidy when I change a reference in the code. See #19468 for the change to suppress deprecation warnings.
Additional Description:
Risk Level: low
Testing: //test/common/stats/...
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #20896 was opened by jmarantz.

see: more, trace.

Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
@jmarantz jmarantz changed the title WiP stats: add lint error for using Stats::ScopePtr, and mark that nickname as deprecated stats: add lint error for using Stats::ScopePtr, and mark that nickname as deprecated Apr 20, 2022
@jmarantz jmarantz marked this pull request as ready for review April 20, 2022 13:53
@KBaichoo
Copy link
Contributor

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #20896 (comment) was created by @KBaichoo.

see: more, trace.

Copy link
Contributor

@KBaichoo KBaichoo left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -35,7 +35,7 @@ using ScopeSharedPtr = std::shared_ptr<Scope>;
// ScopePtr. We should fully remove this alias in a future PR and change all the
// references, once known consumers that might break from this change have a
// chance to do the global replace in their own repos.
using ScopePtr = ScopeSharedPtr;
using ScopePtr ABSL_DEPRECATED("Use ScopeSharedPtr() instead.") = ScopeSharedPtr;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a timeline / a tracking issue for when we'll finally get rid of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#20911. I'll submit this first to get the lint check online before any other refs show up .. then I'll add a ref to that issue here.

@jmarantz jmarantz merged commit fbcfafb into envoyproxy:main Apr 20, 2022
@jmarantz jmarantz deleted the stats-scope-deprecation branch April 20, 2022 20:51
mum4k pushed a commit to envoyproxy/nighthawk that referenced this pull request Apr 26, 2022
- Update the ENVOY_COMMIT and ENVOY_SHA in [bazel/repositories.bzl](https://github.com/envoyproxy/nighthawk/blob/main/bazel/repositories.bzl) to the latest Envoy's commit.
- Log the value when failed to record value into HdrHistogram.
- Replace `Stats::ScopePtr` with preferred term `Stats::ScopeSharedPtr`. This was introduced into format check by envoyproxy/envoy#20896.

Signed-off-by: jiajunye [[email protected]](mailto:[email protected])
ravenblackx pushed a commit to ravenblackx/envoy that referenced this pull request Jun 8, 2022
…me as deprecated (envoyproxy#20896)

Commit Message: Prevent further in-repo uses of Stats::ScopePtr with a lint error. Attempt to discourage out-of-repo uses of Stats::ScopePtr with a deprecated flag, though that doesn't seem to cause any warning in our build or clang-tidy when I change a reference in the code. See envoyproxy#19468 for the change to suppress deprecation warnings.
Additional Description:
Risk Level: low
Testing: //test/common/stats/...
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Joshua Marantz <[email protected]>
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.

2 participants