-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
pwsh experimental/fixes #175
Conversation
Codecov ReportBase: 93.78% // Head: 93.78% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
=======================================
Coverage 93.78% 93.78%
=======================================
Files 64 64
Lines 2188 2188
=======================================
Hits 2052 2052
Misses 136 136 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
After getting through the initial failures (related to the compilation problems) by updating the experimental plugins, we have two new issues. On 2.12 only:
This doesn't make sense... it implies that the Ansible.Basic module being used is the one included with ansible (which doesn't have the changes from 2.13 that make it work), but the changes I made to the experimental plugins should ensure that 2.12 uses the vendored modified module utils in the role. I confirmed locally that this works, the conditional for the ansible version is working and using the local copies. I don't have an answer yet for why this is (seemingly) failing in CI. 2.13 and 2.14 work as expected; it's worth noting that the compilation issue only comes up in PowerShell 7.3, and the test container for those doesn't include it, so this mainly shows that the modifications to the experimental plugins are working correctly on these versions (using the module utils included in those core versions). devel now has a different problem that also stems from PowerShell 7.3.
Every invocation of a This might to be related to this change (maybe): I can't actually confirm that though, it might be unrelated. I thought I'd check to see if doing an explicit In CI we can see that this failed spectacularly: https://github.com/lowlydba/lowlydba.sqlserver/actions/runs/4225543845/jobs/7337956510#step:9:197 Basically it just acted as though the module doesn't exist, but it should have been installed in the previous step. When I tried this import thing locally, it failed in a different but also incredibly confusing way: Full traceback
So that's the current state... :( |
Ok so I've solved some of the above mysteries:
Error with explicit import in the ansible module:
MCVE:
the above seems to happen no matter which version of ansible, so I wonder if it's solely related to the version of pwsh |
thanks @jborean93 for help troubleshooting It seems that there are assemblies in repros for showing the dbatools error: Ansible
PowerShell
NOTE:
|
Thanks so much for all this work and investigation 🙇🏻 !
I think I had tried a few methods to make the install less verbose since it was writing way too many lines out in noninteractive mode, but had trouble and just used no_log as a workaround.
That behavior looks to be captured by dataplat/dbatools#8657. As wsmelton mentions there, apparently pwsh 7.3 included the move to .NET 7 so that probably explains the abrupt change in behavior. I'm going to look into it from that angle a bit, but have low expectations. |
The preview of 2.0 works! Quick repro: Install-Module dbatools -AllowPrerelease -Force
ansible localhost -m command -a 'pwsh -c "ipmo dbatools -verbose"' I don't get the impression that < 2.0 will get any of the needed fixes backported, it probably makes sense to do an enhancement that checks for 2.0+ when the pwsh version is >= 7.3 in the CI. It might also be worth it to set the new min version to 2.0 once it is finally released to avoid any confusing compatibility issues as well. |
imo, let's merge this, and use #177 and a new PR to deal with 2.0 if <2 is never fixed, wdyt? |
You read my mind. |
Description
unused-import
pylint rule to be enabled ansible-collections/news-for-maintainers#34)devel
test container to 7.4.0 in order to have PowerShell 7.2.x instead of 7.3.xdbatools
and 7.3 when called from ansible, see other commentsHow Has This Been Tested?
CI
Types of changes
Checklist:
version_added
property.