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

OT endpoints use new ot_use_counter_bucket_number field #4624

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

DanielRyanSmith
Copy link
Collaborator

@DanielRyanSmith DanielRyanSmith commented Dec 8, 2024

This field is needed for the purpose of WebFeature and WebDXFeature use counter monitoring for origin trials. Its value will be inferred based on the number value that use counters are listed as in web_feature.mojom and webdx_feature.mojom.

@DanielRyanSmith DanielRyanSmith marked this pull request as ready for review December 11, 2024 21:54
@DanielRyanSmith DanielRyanSmith requested review from jrobbins and removed request for jrobbins December 11, 2024 21:54
@DanielRyanSmith DanielRyanSmith marked this pull request as draft December 11, 2024 22:00
@DanielRyanSmith DanielRyanSmith marked this pull request as ready for review January 6, 2025 04:37
@KyleJu
Copy link
Collaborator

KyleJu commented Jan 8, 2025

Accidentally close and open the PR!

How often are the OT endpoints used? Should we fetch these files every time vs store them through a separate cron job daily?

@KyleJu KyleJu closed this Jan 8, 2025
@KyleJu KyleJu reopened this Jan 8, 2025
@DanielRyanSmith
Copy link
Collaborator Author

How often are the OT endpoints used? Should we fetch these files every time vs store them through a separate cron job daily?

These are only fetched when an origin trial creation form is submitted, which is usually less than once a day, so I think it's fine to keep fetching them as needed. Additionally, the files will block submission if the contents are not up-to-date, so it's useful to get the most recent version if a feature owner just landed the requirements for submitting the origin trial

def get_chromium_files_for_validation() -> dict:
"""Get all chromium file contents stored in a dictionary"""
chromium_files = {} # Chromium source file contents.
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need 5 workers? CHROMIUM_SRC_FILES only has 4 files so far

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems fine to drop it to 4 to match 🙂

Copy link
Collaborator

@KyleJu KyleJu left a comment

Choose a reason for hiding this comment

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

LGTM with a comment to consider

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