Skip to content

Conversation

@piyush117
Copy link
Contributor

@piyush117 piyush117 commented Jul 25, 2025

Description

#152
This PR is for adding validation to the metrics_filter.

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

This PR is for adding validation to the metrics_filter.

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@piyush117 piyush117 requested review from Aashiq-J and jor2 as code owners July 25, 2025 06:02
@piyush117
Copy link
Contributor Author

piyush117 commented Jul 25, 2025

For this wrong input,
metrics_filter = [{ exclude = "metricA.", include = "metricB." }]
I got the error as shown in the screenshot.
Screenshot 2025-07-25 at 11 37 56 AM

And for the correct input,
metrics_filter = [{ exclude = "metricA."}, {include = "metricB." }]
It is passing

@piyush117
Copy link
Contributor Author

/run pipeline

@piyush117
Copy link
Contributor Author

/run pipeline

3 similar comments
@piyush117
Copy link
Contributor Author

/run pipeline

@piyush117
Copy link
Contributor Author

/run pipeline

@piyush117
Copy link
Contributor Author

/run pipeline

@piyush117
Copy link
Contributor Author

/run pipeline

@piyush117
Copy link
Contributor Author

/run pipeline

@piyush117
Copy link
Contributor Author

/run pipeline

vkuma17
vkuma17 previously approved these changes Jul 30, 2025
Copy link
Contributor

@vkuma17 vkuma17 left a comment

Choose a reason for hiding this comment

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

Looks good.

variables.tf Outdated
)
)
])
error_message = "Each item in 'metrics_filter' must have either 'include' or 'exclude' set (not both, not neither), and the value must not be null or empty."
Copy link
Member

Choose a reason for hiding this comment

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

[] empty list is a valid value, update the error message.

@piyush117
Copy link
Contributor Author

/run pipeline

@Aashiq-J Aashiq-J merged commit 28b8107 into main Jul 30, 2025
2 checks passed
@Aashiq-J Aashiq-J deleted the 15161_add-validation branch July 30, 2025 12:37
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.5.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants