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

Fix use counter reference variable #4708

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions framework/origin_trials_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def _send_create_trial_request(
'bucket_number': ot_stage.ot_use_counter_bucket_number,
'histogram_id': BlinkHistogramID.web_feature.value
}
if (ot_stage.ot_chromium_trial_name
and ot_stage.ot_chromium_trial_name.startswith('WebDXFeature::')):
if (ot_stage.ot_webfeature_use_counter
and ot_stage.ot_webfeature_use_counter.startswith('WebDXFeature::')):
config['histogram_id'] = BlinkHistogramID.webdx_feature.value
json['trial']['blink_use_counter_config'] = config

Expand Down
2 changes: 1 addition & 1 deletion framework/origin_trials_client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_create_origin_trial__webdx_feature(
self, mock_requests_post, mock_get_trial_end_time,
mock_get_ot_access_token, mock_api_key_get, mock_get_admin_group):
"""WebDXFeature use counters should have different config in request."""
self.ot_stage.ot_chromium_trial_name = 'WebDXFeature::Example'
self.ot_stage.ot_webfeature_use_counter = 'WebDXFeature::Example'
self.ot_stage.put()
mock_requests_post.return_value = mock.MagicMock(
status_code=200, json=lambda : (
Expand Down
Loading