Closed HemanthDogiparthi12 closed 3 months ago
I'm not entirely convinced the issue is completely resolved by removing this code. I mean, it will fix the hanging issue, but the code that Will had added here for DEVTOOLING-319 is checking for and comparing the skills
ids that return in this resource to existing genesyscloud_routing_skill
resource types and removing/filtering any non-matching skills. We'll just get another report of DEVTOOLING-319 without handling this issue properly.
I think the full fix to this is to use a CustomAttributeResolver
hook in the exporter definition to do the comparisons between the skill
references found in the outbound ruleset, and the actual skills found in the genesyscloud_routing_skill
resource type and filter out / log any references that cannot be resolved
I'm not entirely convinced the issue is completely resolved by removing this code. I mean, it will fix the hanging issue, but the code that Will had added here for DEVTOOLING-319 is checking for and comparing the
skills
ids that return in this resource to existinggenesyscloud_routing_skill
resource types and removing/filtering any non-matching skills. We'll just get another report of DEVTOOLING-319 without handling this issue properly.I think the full fix to this is to use a
CustomAttributeResolver
hook in the exporter definition to do the comparisons between theskill
references found in the outbound ruleset, and the actual skills found in thegenesyscloud_routing_skill
resource type and filter out / log any references that cannot be resolved
Hi Brian..
The problem is CustomAttributeResolver does only have references for the attributes and to filter them or modify them.
if we want to change the instances of exporter based on some condition , we need to overridde the GetResourceFunc of Exporter
In other words modify the GetResourceFunc method to give us the values we want after filter
DEVTOOLING-319 Plugin crash will not be repeated because as part of this PR, the skill resolver update will make sure it only refrence exisiting skills and non-existent/deleted skills are simply ignored in a ruleset.
and if we still need to have the custom filter of ruleset , i would prefer to have it this way. in this PR link https://github.com/MyPureCloud/terraform-provider-genesyscloud/pull/1208
the getAllAuthOutboundRuleset function is just the implementation of
"return &resourceExporter.ResourceExporter{
GetResourcesFunc: provider.GetAllWithPooledClient(getAllAuthOutboundRuleset),"
or we need to have an entire new resolver type (like a filterExportResolver) to do a filter again on top of GetResourcesFunc which would be an overkill.
This PR
Will remove the filter of rulesets based on skill set existence. Instead it will filter the skills being referenced i they are not existent. The rulesets will still be present.