This pull request includes two main changes to the internal/powerplatform package in the Go codebase. These changes are primarily aimed at handling empty string values and empty solution components more effectively.
Changes to string value handling:
internal/powerplatform/modifiers/sync_attribute_plan_modifier.go: In the PlanModifyString method, an else clause was added to assign the resp.PlanValue to types.StringValue(value) if the value is not an empty string. This ensures that the resp.PlanValue is not left as types.StringUnknown() when there is a valid string value.
Changes to solution components:
internal/powerplatform/services/solution/api_solution.go: In the createSolutionComponentParameters method, a check was added to only append ImportSolutionEnvironmentVariablesDto to solutionComponents if envVariableComponent.Value is not an empty string. Additionally, if solutionComponents is empty after this process, the function now returns nil, nil instead of an empty slice. This prevents unnecessary processing of empty solution components.
This pull request includes two main changes to the
internal/powerplatform
package in the Go codebase. These changes are primarily aimed at handling empty string values and empty solution components more effectively.Changes to string value handling:
internal/powerplatform/modifiers/sync_attribute_plan_modifier.go
: In thePlanModifyString
method, an else clause was added to assign theresp.PlanValue
totypes.StringValue(value)
if thevalue
is not an empty string. This ensures that theresp.PlanValue
is not left astypes.StringUnknown()
when there is a valid string value.Changes to solution components:
internal/powerplatform/services/solution/api_solution.go
: In thecreateSolutionComponentParameters
method, a check was added to only appendImportSolutionEnvironmentVariablesDto
tosolutionComponents
ifenvVariableComponent.Value
is not an empty string. Additionally, ifsolutionComponents
is empty after this process, the function now returnsnil, nil
instead of an empty slice. This prevents unnecessary processing of empty solution components.