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

[ENHANCEMENT] Emit an metric and alert for misspelled chromium enum #1069

Open
jcscottiii opened this issue Jan 16, 2025 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@jcscottiii
Copy link
Collaborator

jcscottiii commented Jan 16, 2025

Here's an idea I suggested while talking to @past

Background

When we ingest the chromium enums from the Chromium Code Base, we keep a list of the features (while skipping DRAFT and OBSOLETE features). Then we proceed to store them. But before we store them, we use the conversion logic to convert the enum key to a web feature id. If it does match, we store a mapping of the enum ID PK to the Web feature PK for efficient joins. If it does not match, we log a warning:

featureKey := enumLabelToFeatureKey(enum.Label)
featureID, err := c.client.GetIDFromFeatureKey(
ctx, gcpspanner.NewFeatureKeyFilter(featureKey))
if err != nil {
slog.WarnContext(ctx,
"unable to find feature ID. skipping mapping",
"error", err,
"featureKey", featureKey,
"label", enum.Label)
continue
}

Instead, we should have some better alerting around this. We should emit a metric or signal that something is wrong. This should let someone know that they need to fix something in the Chromium code base.

@jcscottiii jcscottiii added the enhancement New feature or request label Jan 16, 2025
@jcscottiii
Copy link
Collaborator Author

jcscottiii commented Jan 16, 2025

cc: @DanielRyanSmith: This may be an easier alternative to the Presubmit directly in Chromium. Of course, it would be great to have the Presubmit but if a web feature ID ever changes, it could break the Chromium CI build.

edit: It seems like this type of change may be coming sooner than expected: https://github.com/web-platform-dx/web-features/labels/major%20version%20required

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant