-
Notifications
You must be signed in to change notification settings - Fork 100
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
cChoco reports compliant state however package failed to install correctly #146
Comments
Additionally; packages with a dependsOn on the failed package will deploy while their predecessor is not in an compliant state yet. This can cause a chain effect of failed packages. |
When you install the package with Chocolatey does the package show as installed? Can you provide an example (I note it's an internal package but you may be able to share some code that I can test)? |
When I check with choco list --local-only the failed package does not show in the list of installed local packages. When I run choco info the command returns '0 packages found'. As far as I know this behavior is the same for any failing package. After download and attempted installation it is moved to /lib-bad and remains there. |
Can you provide an example (I note it's an internal package but you may be able to share some code that I can test)? So if you install it with cChoco (whcih you say confirms it was installed) and then run the Can you also give me the exit code that Chocolatey exits with when you try to install the package from the command line (or preferably the logs in a gist)? |
|
Replaying the situation on my local machine does not yield the expected result. I will try to find time soon to recreate the issue on a virtual machine with non-propitiatory packages so I can provide you with better information. |
I ran into the issue again, however this time because i tried to install a version that doesn't exist on the private repository. I captured the output of the Set- and Test-TargetResource for the cchocopackageinstall.psm1:
I have obfuscated any information that refers to the details of the package name and repository. |
I've just looked at the behavior of Chocolatey: if you perform a |
I have also hit this issue and it is very serious for my company as we need to sequence installation of packages for a successful server build. @pauby This issue is marked as still waiting on customer. Below I have provided an example of the community package corretto11jdk, in the ChocoParams I have set the install path to a drive (X:) that doesn't exist on my test server. This caused the installation to fail but the not the DSC. I have also attached the relevant section of the Chocolatey Client log from my test server which includes the exit codes as you requested. Are these examples enough for this issue to move out of "Waiting on customer"?
|
@pauby I also do not know why this is 'Waiting on user'. If there's any additional information I can provide you please let me know! |
I think I've found the issue here. Working on a PR and it should be in the next release. |
(chocolatey#146) Check state after install / upgrade
Giving this a small bump. This is still not working correctly.. While MattJeanes@559341c would fix the problem as listed in the ticket, the error should still be written in the error stream, right? The problem is that using Invoke-expression will swallow the exit code as well. A workaround is documented here |
@timothy-mcroy-cengage The fix in this repository hasn't been released yet. Are you saying the fix that was merged into develop doesn't fix it? It looks the same as MattJeanes commit. I'm a little confused 😄 |
Sorry, I was saying the change(s) linked would fix the issue, but the errors aren't being written to the error stream. I must confess that I wrote my above comment before my morning pot of coffee and could do a better job of communicating. |
Describe the bug
When deploying a failing self-created package from an internal source (package ends up in lib-bad folder) cChoco reports a compliant state rather than a failed state.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A failed installation should lead to an incompliant state warning/error.
Software (please complete the following information):
The text was updated successfully, but these errors were encountered: