-
Notifications
You must be signed in to change notification settings - Fork 10
Add path filter tf support #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…roperties - Introduced PathFilter in AggregationProperty and related models. - Updated Terraform schema to include path_filter attribute. - Implemented conversion logic for PathFilter in readStateToPortBody and refreshAggregationPropertiesState functions. - Enhanced main.tf example to demonstrate PathFilter usage.
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16295563378/artifacts/3536864100Code Coverage Total Percentage:
|
|
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16295953983/artifacts/3537027798Code Coverage Total Percentage:
|
🚨 The new code coverage percentage is lower than the current one. Current coverage: |
…on properties - Clarified the description of the `path` attribute in the documentation to specify its purpose. - Refactored conversion logic in `readStateToPortBody` and `refreshAggregationPropertiesState` to improve clarity and maintainability.
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16343899386/artifacts/3554204258Code Coverage Total Percentage:
|
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16343909458/artifacts/3554214045Code Coverage Total Percentage:
|
…in aggregation properties - Implemented tests for creating aggregation properties with and without path filters. - Added support for multiple path filters in aggregation properties. - Enhanced existing tests to validate the behavior of path filters in various scenarios.
…` and `from_blueprint` attributes
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16345023731/artifacts/3554607886Code Coverage Total Percentage:
|
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16345098681/artifacts/3554671561Code Coverage Total Percentage:
|
🚨 The new code coverage percentage is lower than the current one. Current coverage: |
@@ -61,6 +62,26 @@ func aggregationPropertiesToBody(state *AggregationPropertiesModel) (*map[string | |||
newAggregationProperty.Query = *query | |||
} | |||
|
|||
if len(aggregationProperty.PathFilter) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to check that it is not null as well?
@@ -28,6 +30,27 @@ func (r *AggregationPropertiesResource) refreshAggregationPropertiesState(state | |||
} | |||
state.Properties[aggregationPropertyIdentifier].Query = query | |||
|
|||
if len(aggregationProperty.PathFilter) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to check that it is not null as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets test also the fromBlueprint is one of this cases
…fety in readStateToPortBody and refreshAggregationPropertiesState functions
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16449838421/artifacts/3589493203Code Coverage Total Percentage:
|
…ecks in readStateToPortBody and refreshAggregationPropertiesState functions
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16452112872/artifacts/3590364593Code Coverage Total Percentage:
|
🚨 The new code coverage percentage is lower than the current one. Current coverage: |
Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/16452419008/artifacts/3590521579Code Coverage Total Percentage:
|
Description
What -Add pathFilter support to aggregation property
Why - Improve performance and accuracy
How - Add an option to filter on specific path
Type of change
Please leave one option from the following and delete the rest: