Workaround for pgv regex rewrite issue#6714
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA post-processing step is added to the Gradle Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6714 +/- ##
============================================
- Coverage 74.46% 0 -74.47%
============================================
Files 1963 0 -1963
Lines 82437 0 -82437
Branches 10764 0 -10764
============================================
- Hits 61385 0 -61385
+ Misses 15918 0 -15918
+ Partials 5134 0 -5134 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation:
Recently, two regex patterns have been added upstream:
https://github.com/envoyproxy/envoy/blob/0baaeb4a832cd5683b221cea98b05ed139b3e332/api/envoy/extensions/filters/http/oauth2/v3/oauth.proto#L148-L149
https://github.com/envoyproxy/envoy/blob/0baaeb4a832cd5683b221cea98b05ed139b3e332/api/envoy/extensions/filters/http/oauth2/v3/oauth.proto#L49
Unfortunately, this results in an error due to invalid java conversion:
Where the conversion logic can be found here:
https://github.com/bufbuild/protoc-gen-validate/blob/92b9a7df69ca9f71bfc492f7a90adf4d36eab569/templates/java/register.go#L442
The core issue is regex patterns are rewritten to
\\\xHH,\\"both of which are invalid.As a workaround, I propose that invalid regex patterns are manually rewritten after pgv generation
Modifications:
:xds-apiResult: