You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation page currently gives a pretty general description of the ignore_fields argument and then provides an example that suggests that setting ignore_fields = ["caBundle"] is enough for the provider to ignore any caBundle fields in the manifest, however deep they are.
This doesn't seem to be the case: from observation and then looking at the getLiveManifestFilteredForUserProvidedOnlyWithIgnoredFields function, it looks like fields are ignored by full path and prefix rather than name, meaning that given the documentation's example manifest:
the correct value for the ignore_fields argument is ["webhooks.0.clientConfig.caBundle"] and not ["caBundle"].
Side notes
While updating the documentation to reflect the actual behaviour of ignore_fields would probably be enough, that would leave a lot to be desired in terms of functionality and ergonomics (imagine wanting to ignore a field that's 3 arrays deep).
Some other thoughs:
ignoring by name (disregarding the path) seems really dangerous as it could lead users into inadvertently ignoring fields they actually care about;
a jq-like syntax would offer the greatest flexibility (all array elements with webhooks[].clientConfig.caBundle or a specific one webhooks[13].clientConfig.caBundle) but sounds unnecessary and a pain to implement;
having the user provide regex patterns seems more likely than [2] but increases user fatigue and is arguably more dangerous than [1];
implicitly skipping array indices (webhooks.clientConfig.caBundle) or having a placeholder character (webhooks.*.clientConfig.caBundle) looks like the cleanest solution to me.
The text was updated successfully, but these errors were encountered:
The documentation page currently gives a pretty general description of the
ignore_fields
argument and then provides an example that suggests that settingignore_fields = ["caBundle"]
is enough for the provider to ignore anycaBundle
fields in the manifest, however deep they are.This doesn't seem to be the case: from observation and then looking at the
getLiveManifestFilteredForUserProvidedOnlyWithIgnoredFields
function, it looks like fields are ignored by full path and prefix rather than name, meaning that given the documentation's example manifest:the correct value for the
ignore_fields
argument is["webhooks.0.clientConfig.caBundle"]
and not["caBundle"]
.Side notes
While updating the documentation to reflect the actual behaviour of
ignore_fields
would probably be enough, that would leave a lot to be desired in terms of functionality and ergonomics (imagine wanting to ignore a field that's 3 arrays deep).Some other thoughs:
jq
-like syntax would offer the greatest flexibility (all array elements withwebhooks[].clientConfig.caBundle
or a specific onewebhooks[13].clientConfig.caBundle
) but sounds unnecessary and a pain to implement;webhooks.clientConfig.caBundle
) or having a placeholder character (webhooks.*.clientConfig.caBundle
) looks like the cleanest solution to me.The text was updated successfully, but these errors were encountered: