Skip to content

Fix regression in Violation.RuleValue for native rules#325

Merged
pkwarren merged 3 commits into
mainfrom
pkw/issue-323
Jun 15, 2026
Merged

Fix regression in Violation.RuleValue for native rules#325
pkwarren merged 3 commits into
mainfrom
pkw/issue-323

Conversation

@pkwarren

@pkwarren pkwarren commented Jun 15, 2026

Copy link
Copy Markdown
Member

The value passed to construct a Violation.RuleValue regressed as part of PR #316.

Update the native rules to fix inconsistencies between the CEL rules and the native rules. Add regression tests to verify the shape of the violation.

Fixes #323.

The value passed to construct a Violation.RuleValue regressed as part of
PR #316. Instead of containing the value of the in/not_in rule, it
contained the value of the invalid value.

Update the native rules to construct the rule value for in/not_in rules
and use it when creating the violation. Add regression tests to verify
the shape of the violation.

Fixes #323.
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / validate-protos (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedJun 15, 2026, 10:30 PM

Comment thread base.go
Comment thread native_bytes.go Outdated
Comment thread native_bytes.go Outdated
pkwarren added 2 commits June 15, 2026 17:06
Add an e2e test that verifies the CEL violation matches the native rule
violation. Fix a few more cases where the rule value didn't match.
@pkwarren pkwarren requested a review from jonbodner-buf June 15, 2026 22:32
@pkwarren pkwarren changed the title Fix regression in Violation.RuleValue for in/not_in rules Fix regression in Violation.RuleValue for native rules Jun 15, 2026
@pkwarren pkwarren merged commit 574c1e5 into main Jun 15, 2026
9 checks passed
@pkwarren pkwarren deleted the pkw/issue-323 branch June 15, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Violation.RuleValue unreleased breaking change

2 participants