chocolatey / chocolatey-licensed-issues

Issues for Licensed Editions of Chocolatey
19 stars 13 forks source link

Nodes with invalid licenses are being reported when using --limit-output #256

Open nascentt opened 3 years ago

nascentt commented 3 years ago

What You Are Seeing?

limitoutput flag is not limiting enough for example if I do choco list banana --limitoutput --exact I get "A license was found for a licensed version of Chocolatey, but is invalid: Expiration Date : 01/10/2020 00:00:00"

Fine, this host needs to have the license upgraded, but then where's the actual results of the command? If I do the same command on a host with an up to date license I get "" (ie nothing)

So I can do the same command on multiple hosts and get different results, some hosts with a valid license I see that the package isn't installed, on hosts with an out of date license I get the license error message"

Sure I need to upgrade the license on those hosts, and will, but because the results are polluted my check if the package is on that host gets results where it shouldn't. So now I need to start putting checks into every command to see if the results are actually an error message instead. The lack of a valid license shouldn't break basic free functionality.

What is Expected?

No results for limitoutput rather than an error

I can't even -match the return of the word "error" to pre-empt. I don't know how many types of error response will show up here.

PS > C:\ProgramData\chocolatey\bin\choco.exe list 7zip --exact --limitoutput 7zip|19.00 PS > C:\ProgramData\chocolatey\bin\choco.exe list banana --exact --limitoutput

┆Issue is synchronized with this Gitlab issue by Unito

Another example of output polluting limitoutput is upgradeallexceptions:

choco outdated --limitoutput
These packages will not be upgraded because they were specified in the 'except' list: softwarename
firefox|90.0|90.0.2|false

which means there's no safe way of pulling choco outdated --limitoutput from all hosts without having to guess if there's little messages to strip out before parsing.

pauby commented 3 years ago

If you have an invalid license then Chocolatey should warn you about it so this is expected behaviour. If your Chocolatey node is not licensed then Chocolatey will still run that command and provide the output.

There are two solutions:

  1. Ensure the node has a valid license;
  2. Remove the invalid license from the node;
nascentt commented 3 years ago

again, the errors are polluting the output. "limitoutput" should NOT pollute output a host with an invalid license gives hundreds of warnings a day about it being out of date, and pro functionality is broken until the license is up to date. So there's no need to pollute limitedoutput core functionality.

polluting the output of limitedoutput core functionality is broken

pauby commented 3 years ago

Chocolatey is adding that to the output because the nodes have an invalid license. The solution is to give the nodes a valid license or unlicense those nodes.

nascentt commented 3 years ago

Licenses are completely unrelated to basic functionality. Basic functionality is free. Polluting the output of commands (especially limitoutput) with stuff like license errors is nuts. Yes I am fully aware of how to uninstall licenses on hosts, and how to upgrade the newer license on hosts. That has zero relevance to core chocolatey functionality. Having inconsistent output on core choco commands is one of the reasons that using chocolatey in enterprise is just a nightmare.

pauby commented 3 years ago

I've edited your comment.

I think it would be good to start by pointing to the [etiquette(https://github.com/chocolatey/choco#etiquette-regarding-communication) for communication that everybody is expected to adhere to.

The problem comes from your nodes not being licensed properly. We both know this. That's the solution. I appreciate it's not the solution you want, but you're expected to have your nodes properly licensed. The command itself is running. Chocolatey doesn't stop that. So core functionality is not being affected. It's alerting you to something you need to fix. Chocolatey is trying to be helpful. Perhaps it could be less helpful or helpful in other ways. That we can discuss.

If I came to you and told you that 'talking to you is like talking to a brick wall', what you were saying is 'nuts' and dealing with you is a 'nightmare' what would your reaction be? These things don't actually help anybody and are trigger words that cause people to avoid your post. They put people on edge. You come across as angry and unhelpful. Which isn't helping to get anything you say across and isn't helpful. Being respectful and understanding is going to help you.

I'll speak to the team in the morning and update the issue when I have more info.

pauby commented 3 years ago

@nascentt For business customers the best avenue for raising issues is to run choco support and see the options for raising a support ticket. Your ticket will then be handled by our support team and subject to response SLA's and they will triage the problem, follow the process for capturing the information and raising any issues.

Ordinarily, that is the procedure to follow. As the issue was already created, I've moved this over here as it's specifically related to Chocolatey Licensed.