fluxninja / aperture

Rate limiting, caching, and request prioritization for modern workloads
https://docs.fluxninja.com
Apache License 2.0
641 stars 25 forks source link

Improve field names in label matcher #3014

Closed tanveergill closed 11 months ago

tanveergill commented 11 months ago

Description of change

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 11 months ago

Walkthrough

The recent updates involve a significant renaming and deprecation effort across various configuration and code files. Fields related to label matching have been renamed for consistency and clarity, with match_expressions becoming match_list and related message types being updated to reflect new naming conventions. Deprecated fields and types have been replaced with new ones, and additional functions have been introduced to ensure backward compatibility with older configurations.

Changes

File Path Change Summary
api/.../v1/label_matcher.proto Renamed match_expressions to match_list and K8sLabelMatcherRequirement to MatchRequirement; deprecated old fields in favor of new ones.
docs/content/concepts/selector.md Updated YAML configuration examples and explanations to reflect renaming from match_expressions to match_list.
docs/content/reference/configuration/spec.md Renamed EqualsMatchExpression to EqualsExpression and MatchExpression to MatchRequirement; deprecated some types and updated documentation.
pkg/.../selectors/selector.go Updated functions to loop over new match_list and handle new Expression structure; added backCompatConvLabelMatcher for backward compatibility.

🐇 In the land of code, where matchers align, A rabbit hopped through, renaming in kind. With a whisk of its tail, old fields deprecated, New matchers emerged, perfectly updated. 🌟 🐇


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`