You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Abacn (via GitHub)" <gi...@apache.org> on 2026/06/10 19:48:16 UTC
[PR] Revert "[Python] Honor disableCounterMetrics, disableStringSetMetrics, and disableBoundedTrieMetrics experiments" [beam]
Abacn opened a new pull request, #38901:
URL: https://github.com/apache/beam/pull/38901
Reverts apache/beam#38749
See https://github.com/apache/beam/pull/38749#discussion_r3369938771, and there are other breakages breaking internal imports
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Revert "[Python] Honor disableCounterMetrics, disableStringSetMetrics, and disableBoundedTrieMetrics experiments" [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #38901:
URL: https://github.com/apache/beam/pull/38901#issuecomment-4673855560
R: @damccorm
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Revert "[Python] Honor disableCounterMetrics, disableStringSetMetrics, and disableBoundedTrieMetrics experiments" [beam]
Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #38901:
URL: https://github.com/apache/beam/pull/38901#issuecomment-4673855070
## Summary of Changes
Hello, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request reverts a previous change that allowed users to disable specific metric types (Counter, StringSet, and BoundedTrie) via pipeline experiments. The reversion was necessary to resolve issues with internal imports and other breakages caused by the original implementation. The codebase has been cleaned up to remove the `MetricsFlag` class and all associated logic and tests.
### Highlights
* **Reversion of Metrics Flag Functionality**: Reverted the changes that introduced `MetricsFlag` and the ability to disable specific metric types (Counter, StringSet, BoundedTrie) via pipeline experiments, due to internal import issues and breakages.
* **Cleanup of Metrics Logic**: Removed the `MetricsFlag` class and associated logic from `metric.py`, and updated `DelegatingCounter`, `DelegatingStringSet`, and `DelegatingBoundedTrie` to remove the conditional checks for disabled metrics.
* **Removal of Pipeline Integration**: Cleaned up references to `MetricsFlag` in `pipeline.py`, `sdk_worker_main.py`, and `metric_test.py`, ensuring that the initialization of pipeline options no longer attempts to set these flags.
<details>
<summary><b>New Features</b></summary>
🧠You can now enable **Memory** (public preview) to help **Gemini Code Assist** learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. **Click [here](https://codeassist.google/code-review/login) to enable Memory in your admin console.**
</details>
<details>
<summary><b>Using Gemini Code Assist</b></summary>
<br>
The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.
<b>Invoking Gemini</b>
You can request assistance from Gemini at any point by creating a comment using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands on the current page.
Feature | Command | Description
--- | --- | ---
Code Review | `/gemini review` | Performs a code review for the current pull request in its current state.
Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state.
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help | `/gemini help` | Displays a list of available commands.
<b>Customization</b>
To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).
<b>Limitations & Feedback</b>
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up [here](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG).
</details>
[^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Revert "[Python] Honor disableCounterMetrics, disableStringSetMetrics, and disableBoundedTrieMetrics experiments" [beam]
Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #38901:
URL: https://github.com/apache/beam/pull/38901#discussion_r3391088504
##########
sdks/python/apache_beam/metrics/metric.py:
##########
@@ -269,23 +231,13 @@ class DelegatingStringSet(StringSet):
"""Metrics StringSet that Delegates functionality to MetricsEnvironment."""
def __init__(self, metric_name: MetricName) -> None:
super().__init__(metric_name)
- self._updater = MetricUpdater(cells.StringSetCell, metric_name)
-
- def add(self, value: str) -> None:
- if MetricsFlag.string_set_disabled:
- return
- self._updater(value)
+ self.add = MetricUpdater(cells.StringSetCell, metric_name) # type: ignore[method-assign]
class DelegatingBoundedTrie(BoundedTrie):
- """Metrics BoundedTrie that Delegates functionality to MetricsEnvironment."""
+ """Metrics StringSet that Delegates functionality to MetricsEnvironment."""
Review Comment:

The docstring for `DelegatingBoundedTrie` was incorrectly changed to refer to `StringSet` instead of `BoundedTrie`. It should be corrected to accurately describe the class.
```suggestion
"""Metrics BoundedTrie that Delegates functionality to MetricsEnvironment."""
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Revert "[Python] Honor disableCounterMetrics, disableStringSetMetrics, and disableBoundedTrieMetrics experiments" [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38901:
URL: https://github.com/apache/beam/pull/38901#issuecomment-4673877441
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment `assign set of reviewers`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Revert "[Python] Honor disableCounterMetrics, disableStringSetMetrics, and disableBoundedTrieMetrics experiments" [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #38901:
URL: https://github.com/apache/beam/pull/38901
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org