Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@azun
Copy link
Contributor

@azun azun commented Jan 28, 2024

Description

Allows filtering the output config properties from himl-config-merger. Filter rules are part of the configs and can be defined hierarchically. The rules sit under a key that is passed as an argument to the tool through --filter-rules-key

Related Issue

--

Motivation and Context

Output configs can become very big when values are being reused/interpolated between levels or on the same level. For example a property defined at the root level is only needed by a subset of clusters. To minimize the output, the only partial solution currently is to overwrite that property for all the leaf paths that don't need it. When configuring multiple clusters/services, default properties get populated and are never used.

How Has This Been Tested?

Added a hierarchy with filters in the examples folder with values convering multiple scanarios:

  • rule selectors for multiple keys with explicit value or matching a pattern
  • rules keeping a list of properties
  • rules keeping properties that match a pattern

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@azun azun force-pushed the config-merger-filtering branch from 9a0a80b to f7d47f8 Compare January 29, 2024 07:57
Copy link

@alex-necula alex-necula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻🛳️🇮🇹

@ecojan ecojan requested review from amuraru and danielcoman January 30, 2024 11:31
Copy link
Contributor

@danielcoman danielcoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

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.

4 participants