-
Notifications
You must be signed in to change notification settings - Fork 6
infrahubctl check
to find and filter the same as PC checks
#446
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: stable
Are you sure you want to change the base?
Conversation
…n't change and potential issues arise if the identifier is only valid on the specific object and not the 'CoreGroup'.
Deploying infrahub-sdk-python with
|
Latest commit: |
1159059
|
Status: | ✅ Deploy successful! |
Preview URL: | https://9c426057.infrahub-sdk-python.pages.dev |
Branch Preview URL: | https://may-202506-445-check-attribu.infrahub-sdk-python.pages.dev |
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## stable #446 +/- ##
==========================================
+ Coverage 75.57% 75.59% +0.01%
==========================================
Files 100 100
Lines 8750 8748 -2
Branches 1704 1703 -1
==========================================
Hits 6613 6613
+ Misses 1661 1659 -2
Partials 476 476
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
# TODO: Does this support multiple parameters and we need make identifiers a dict to iterate over on L166-168? | ||
for param_key, param_value in check_module.definition.parameters.items(): | ||
identifier = param_key | ||
identifier_attribute = param_value.split("__")[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.
I think this might be fine as it resolves a previous error. But I'm not sure these params really work today if you have more than one. This is something that we should address. It's also problematic with regards to a query that might look like this instead:
query TagsQuery($tag_name: String!) {
BuiltinTag(name__value: $tag_name) {
edges {
node {
description {
value
}
}
}
}
}
I.e. it's a valid check but the name is missing and as such will be reported as null.
Have you tried to run this same check and code within the pipeline in Infrahub as well? I think we might need to fix something there too.
Fixes #445
parameters
defined in acheck_definition
and set the parameters into the GraphQL query properlyidentifier
to a dictionary with the to be properly passed into the GraphQL to support multiple parameters.