From 74154a546987eebc9c578b54e3727c4550b11d3f Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 23 Jul 2024 23:26:33 -0700 Subject: [PATCH] cleuan up --- .github/workflows/checks.yml | 2 +- Makefile | 1 + policies/attribute_name_collisions.rego | 6 +++--- policies/registry.rego | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3609ee261f..ceaf8ef7f6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -113,5 +113,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: policies checks + - name: verify semantic conventions yaml definitions run: make check-policies diff --git a/Makefile b/Makefile index 6dd2193679..80772401b4 100644 --- a/Makefile +++ b/Makefile @@ -234,4 +234,5 @@ check-policies: docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec -v $(PWD)/policies:/policies \ otel/weaver:${WEAVER_VERSION} registry check \ --registry=/source \ + --policy=/policies/registry.rego \ --policy=/policies/attribute_name_collisions.rego diff --git a/policies/attribute_name_collisions.rego b/policies/attribute_name_collisions.rego index cc6fad5b03..62f67cea45 100644 --- a/policies/attribute_name_collisions.rego +++ b/policies/attribute_name_collisions.rego @@ -24,7 +24,7 @@ attr_registry_collision(description, attr_name) = violation { violation := { "id": description, "type": "semconv_attribute", - "category": "", + "category": "naming_collision", "attr": attr_name, "group": "", } @@ -42,5 +42,5 @@ attr_names_except(excluded) = names { names := {n | n := input.groups[_].attributes[_].name} - excluded } -excluded_const_collisions := {"m1essaging.client_id"} -excluded_namespace_collisions := {"m1essaging.operation", "db.operation"} \ No newline at end of file +excluded_const_collisions := {"messaging.client_id"} +excluded_namespace_collisions := {"messaging.operation", "db.operation", "deployment.environment"} \ No newline at end of file diff --git a/policies/registry.rego b/policies/registry.rego index 1c73ef450a..e0d666b707 100644 --- a/policies/registry.rego +++ b/policies/registry.rego @@ -8,7 +8,7 @@ package before_resolution attr_registry_violation(violation_id, group_id, attr_id) = violation { violation := { "id": violation_id, - "type": "semantic_convention_policies", + "type": "semconv_attribute", "category": "attribute_registry_checks", "group": group_id, "attr": attr_id,