Skip to content

Commit

Permalink
Fix failing resource back compat checks (open-telemetry#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova authored and ChrsMark committed Oct 18, 2024
1 parent a149836 commit efe62f6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions policies/compatibility.rego
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ deny contains back_comp_violation(description, group_id, attr.name) if {
some nmember in nattr.type.members
member.id == nmember.id

# Enforce the policy
# Enforce the policy
member.stability == "stable"
nmember.stability != "stable"

Expand All @@ -184,7 +184,7 @@ deny contains back_comp_violation(description, group_id, attr.name) if {
some nmember in nattr.type.members
member.id == nmember.id

# Enforce the policy
# Enforce the policy
member.value != nmember.value

# Generate human readable error.
Expand Down Expand Up @@ -294,7 +294,7 @@ deny contains back_comp_violation(description, group_id, "") if {
metric.stability == "stable"
some nmetric in registry_metrics
metric.metric_name = nmetric.metric_name

baseline_attributes := { attr.name |
some attr in metric.attributes
not is_opt_in(attr)
Expand All @@ -321,7 +321,7 @@ deny contains back_comp_violation(description, group_id, "") if {
metric.stability == "stable"
some nmetric in registry_metrics
metric.metric_name = nmetric.metric_name

baseline_attributes := { attr.name |
some attr in metric.attributes
not is_opt_in(attr)
Expand Down Expand Up @@ -385,8 +385,9 @@ deny contains back_comp_violation(description, group_id, "") if {
some resource in baseline_resources
resource.stability == "stable"
some nresource in registry_resources
resource.name = nresource.name

resource.name == nresource.name
nresource.stability == "stable" # remove after https://github.com/open-telemetry/semantic-conventions/pull/1423 is merged

baseline_attributes := { attr.name |
some attr in resource.attributes
not is_opt_in(attr)
Expand Down

0 comments on commit efe62f6

Please sign in to comment.