Skip to content

Conversation

@RincewindsHat
Copy link
Member

No description provided.

@cla-bot cla-bot bot added the cla/signed label Jun 21, 2022
@LordHepipud LordHepipud self-assigned this Jun 22, 2022
@LordHepipud LordHepipud added the Question Further information is requested label Jun 22, 2022
@LordHepipud
Copy link
Collaborator

Thank you for the PR. Which problem does it exactly solve?
The current implementation creates comma separated entries for PowerShell arrays. Why wrap it specifically inside @()?

@RincewindsHat
Copy link
Member Author

When using the powershell-connector to circumvent the performance problems, comma separated values are not interpreted as an array and some calls to check functions will therefore not work as expected. Using the @() syntax so declare an array negates this problem in that case, since arrays are then detected as expected and properly handed to the API as an array.
If there is another (better) way to do this, I am open to suggestions.

@LordHepipud
Copy link
Collaborator

Thank you for the clarification. Can you please rename the variable foo too psarr and update the changelog for v.1.10.0 with the following Enhancement:

* [#534](https://github.com/Icinga/icinga-powershell-framework/pull/534) Improves Icinga and Director configuration generator, by wrapping PowerShell arrays inside `@()` instead of simply writing them comma separated

Please also update the description of this PR accordingly and squash both commits to one commit only.

Thank you in advance!

@LordHepipud LordHepipud added this to the v1.10.0 milestone Jun 22, 2022
@LordHepipud
Copy link
Collaborator

Before I forget it: Please also add a ; behind return "@(" + psarr + ")

@LordHepipud LordHepipud force-pushed the Fix_powershell_array_creation_in_icinga_config branch from 7df344b to d41cd9c Compare August 17, 2022 13:53
@LordHepipud LordHepipud force-pushed the Fix_powershell_array_creation_in_icinga_config branch from d41cd9c to 4e182ca Compare August 17, 2022 14:05
@LordHepipud LordHepipud added Enhancement New feature or request and removed Question Further information is requested labels Aug 17, 2022
@LordHepipud LordHepipud merged commit a83d35e into master Aug 17, 2022
@LordHepipud LordHepipud deleted the Fix_powershell_array_creation_in_icinga_config branch August 17, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants