fix: normalize telemetry taxonomy values to conform with Ansible NRT v1.0 - #771
Merged
SirGitsalot merged 1 commit intoJul 27, 2026
Conversation
…v1.0 The taxonomy.jq audit filter emits raw GCP API kind strings as device_type values (e.g., "compute#instance"), uses title-case infra_bucket values (e.g., "Compute", "Network"), and applies ascii_upcase which produces all-caps output. This blocks automated cross-vendor reporting against the Ansible Normalized Resource Taxonomy. Changes: - Normalize infra_bucket values to lowercase snake_case (e.g., "Database", "Network" -> "database", "networking") - Add device_type normalization map for GCP kind strings (e.g., "compute#instance" -> "virtual_machine", "storage#bucket" -> "object_storage", "compute#firewall" -> "firewall") - Normalize infra_type from "PublicCloud" to "public_cloud" - Remove ascii_upcase from infra_bucket output - Unknown device_type values fall through to raw kind string Signed-off-by: Steve Fulmer <sfulmer@redhat.com>
|
SirGitsalot
approved these changes
Jul 27, 2026
p3ck
reviewed
Jul 28, 2026
| infra_bucket: ($actions[$data.action] // "Unknown" | ascii_upcase), | ||
| device_type: $kind, | ||
| infra_type: "public_cloud", | ||
| infra_bucket: $actions[$data.action], |
Collaborator
There was a problem hiding this comment.
Won't this fail then if it can't match? I would think they would want the data to be able to search on unknown to know what is being missed? Maybe do the same as you do for kind below?
Contributor
Author
SirGitsalot
pushed a commit
that referenced
this pull request
Jul 29, 2026
Modules not present in the action lookup table produced null infra_bucket values instead of a searchable fallback. Apply the same // fallback pattern used by device_type so NRT consumers can filter on 'unknown' to identify missing mappings. Addresses review feedback from #771.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
The
taxonomy.jqaudit filter emits raw GCP APIkindstrings asdevice_typevalues and uses inconsistent casing forinfra_bucket/infra_type. This blocks automated cross-vendor reporting against the Ansible Normalized Resource Taxonomy v1.0.Before:
device_type: "compute#instance"(raw GCP kind string)infra_bucket: "COMPUTE"(ascii_upcase applied)infra_type: "PublicCloud"After:
device_type: "virtual_machine"(normalized taxonomy value)infra_bucket: "compute"(lowercase snake_case)infra_type: "public_cloud"Changes
device_typenormalization map — 23 GCP kind strings mapped to taxonomy valuesinfra_bucketvalues to lowercase snake_case directly in the mappingascii_upcasefrom infra_bucket output (values are now pre-normalized)Normalization Table
device_typeinfra_bucketcompute#instancevirtual_machinecomputecompute#diskblock_storagestoragecompute#firewallfirewallsecurity_identitycompute#networkvpcnetworkingcompute#addressvpcnetworkingstorage#bucketobject_storagestoragesql#instancedatabase_relationaldatabasecontainer#clusterkubernetes_clustercomputeiam#roleiamsecurity_identityiam#serviceAccountiamsecurity_identitydns#managedZonednsnetworkingpubsub#topicmessagingapp_integration_messagingbigquery#datasetdatabase_analyticsdatabasefile#instancefile_storagestoragecloudkms#keyRingkey_vaultsecurity_identityTest Plan
Signed-off-by: Steve Fulmer sfulmer@redhat.com (Red Hat)