Skip to content
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

Reimplement RunInfo plugin's deep_clone function for PowerShell 7.4+ compatibility #39

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

brogers5
Copy link

@brogers5 brogers5 commented Nov 30, 2023

Fixes #38.

While I've only observed a maximum depth of 16 members locally for my packages, I went with a maximum depth of 32 to provide room for possible future expansion before we need to worry about AU-imposed truncation.

Testing

For validation purposes, this change was manually patched into an existing AU v2022.10.24 installation (as this issue came up prior to chocolatey-au's first release).

The following files were patched:

  • Windows PowerShell: %PROGRAMFILES%\WindowsPowerShell\Modules\AU\Plugins\RunInfo.ps1
  • PowerShell 7: %USERPROFILE%\PowerShell\Modules\AU\2022.10.24\Plugins\RunInfo.ps1

Executed update_all.ps1 from my local repository based on au-packages-template to invoke the Plugin from Windows PowerShell 5.0 (within a clean VM built around Windows 10 Pro v1507, 64-bit), Windows PowerShell 5.1 and PowerShell 7.4 (both from my dev environment: Windows 11 Pro 22H2).

Compared the resulting update_info.xml files and looked for notable serialization differences from a pre-patched run. Nothing jumped out at me as being potentially problematic.

@tunisiano187
Copy link

won't it break powershell 5.x users ?
as the current appveyor vm is still working with that version, it would break the community repo too...

@brogers5
Copy link
Author

brogers5 commented Mar 9, 2024

@tunisiano187 It shouldn't, this class's documentation explicitly cites compatibility with Windows PowerShell 5.1, which I just confirmed with a quick AU run locally. As mentioned previously, this was also tested successfully against Windows PowerShell 5.0.

@corbob
Copy link
Contributor

corbob commented Mar 21, 2024

@brogers5 Thank you for this PR. Last week we released the first release of the module under the Chocolatey Community group under the name Chocolatey AU. As part of the release, we have moved the repository over to a GitFlow layout. Could you rebase your branch on chocolatey-community/develop and then point this PR at the develop branch?

Could you also update the description to include a Testing section to outline what testing was done? Bonus points if you're able to add a Pester test that will test this issue.

@corbob corbob added the 0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user label Mar 21, 2024
@brogers5 brogers5 changed the base branch from master to develop March 21, 2024 21:30
@brogers5
Copy link
Author

@corbob Rebased and edited accordingly. I'm admittedly unfamiliar with Pester, but will see if I can get ramped up on that this weekend and hopefully get some test cases in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RunInfo Plugin incompatible with PowerShell 7.4
3 participants