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

[snippet-bot] What does "Some region tags do not have appropriate prefix" mean? #4093

Closed
suztomo opened this issue Jul 28, 2022 · 6 comments
Closed
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@suztomo
Copy link
Member

suztomo commented Jul 28, 2022

Thanks for stopping by to ask us a question! Please make sure to include:

  • What you're trying to do

I'm trying to figure out the meaning of this error message.

Some region tags do not have appropriate prefix
There are 15 possible violations for not having product prefix.
java-network-security/samples/snippets/generated/com/google/cloud/networksecurity/v1beta1/networksecurityclient/create/SyncCreateSetCredentialsProvider1.java:19, tag networksecurity_v1beta1_generated_networksecurityclient_create_setcredentialsprovider1_sync

This is the pull request that failed the error googleapis/java-network-security#183

  • What code you've already tried

  • Any error messages you're getting

The error above.

I created this issue to track my investigation of the error message. If somebody know the background, then I appreciate the input.

@suztomo suztomo added priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue. labels Jul 28, 2022
@suztomo
Copy link
Member Author

suztomo commented Jul 28, 2022

@blunderbuss-gcf Assign this to me.

@suztomo
Copy link
Member Author

suztomo commented Jul 28, 2022

It seems the violations come from the code around here

return change.regionTag.startsWith(label.api_shortname + '_');

By any change, is it failing because of "network-security" v.s. "networksecurity"?

.repo-metadata.json sets networksecurity as api_shortname https://github.com/googleapis/java-network-security/blob/main/.repo-metadata.json#L2

What are the "labels"? It's coming from products.json in the devrel-prod-settings bucket.

https://github.com/googleapis/repo-automation-bots/blob/74474818167da58d2f8ba809b9139e74444974a8/packages/snippet-bot/src/api-labels.ts

I checked the json and no "networksecurity" there.

image

@chingor13
Copy link
Contributor

The available product prefixes come from DRIFT's product database. It a convention/design used so we can associate the samples with a product. Without the prefixes, we get snippets floating around that are never included on our documentation pages.

@chingor13
Copy link
Contributor

networksecurity does appear to be in DRIFT's database (product 501)

@tmatsuo
Copy link
Contributor

tmatsuo commented Jul 28, 2022

That product is marked as "not" public. That's why the drift database doesn't have the region tag prefix networksecurity.

Please make the product public. After a while the bot will be happy. Use the "Update this comment" checkbox in the bot's comment for re-running the bot.

@chingor13
Copy link
Contributor

The product is now updated to be public and will take a bit of time to roll out.

@chingor13 chingor13 assigned suztomo and unassigned chingor13 Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants