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

bug: snippet bot flagging "kmsinventory" as an invalid product prefix #4994

Closed
bshaffer opened this issue Mar 9, 2023 · 4 comments · Fixed by #5014
Closed

bug: snippet bot flagging "kmsinventory" as an invalid product prefix #4994

bshaffer opened this issue Mar 9, 2023 · 4 comments · Fixed by #5014
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bshaffer
Copy link
Contributor

bshaffer commented Mar 9, 2023

I imagine this is because it thinks that kmsinventory is a subset of kms? Are other languages combining this into one package?

http://cloud.google.com/kms/docs/reference/inventory/rest
googleapis/google-cloud-php#5942

Screenshot 2023-03-09 at 3 35 37 PM

@bshaffer bshaffer added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 9, 2023
@bshaffer
Copy link
Contributor Author

Is it possible that the expected product resource name is kms_inventory? How can I look at the list of valid product prefixes?

@chingor13
Copy link
Contributor

The api prefix list is parsed from gs://devrel-prod-settings/products.json which is exported from or DKP products database.

@bshaffer
Copy link
Contributor Author

The only entry for KMS is kms, which means either something expects KMS Inventory to be kms_inventory, or the entry is simply missing.

@chingor13
Copy link
Contributor

Correct, it is missing, because this data comes from DKP's product database which does not have an entry. This is currently a manual process.

Long term, the plan was for DKP's db to ingest service configs to add to this DB, but that work was deprioritized.

Short term, we can possible scan googleapis/googleapis for service configs ourselves to augment the exported list from DKP.

chingor13 added a commit that referenced this issue Mar 29, 2023
…oogleapis (#5014)

Short term solution to merge new products from service_configs in
googleapis/googleapis into the exported product list from DKP.

To improve performance, we use a daily cron job to scan
googleapis/googleapis for service configs and merge the result with the
exported list from DKP.

Fixes #4994

feat: add daily cron to reload products cache
refactor: pass ApiLabels list into violations logic to avoid implicit
API call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
2 participants