-
Notifications
You must be signed in to change notification settings - Fork 907
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
Validate config / system state across everything #1746
Comments
gep13
added a commit
to gep13/choco
that referenced
this issue
Mar 9, 2019
This is implemented as a validation engine. Any new validations will need to implement the IValidation interface, and be added to the container in the ContainerBinding class. When running with limited output, error messages will still be shown to the user, but warning messages will be suppressed. Initial validation is provided which errors if attempting to halt when a reboot is detected, but when usage of package exit codes is turned off. This is an error, since without package exit codes turned on, Chocolatey is not able to detect what actually happened when a package is installed/upgraded/uninstalled.
gep13
added a commit
to gep13/choco
that referenced
this issue
Mar 11, 2019
This is implemented as a validation engine. Any new validations will need to implement the IValidation interface, and be added to the container in the ContainerBinding class. When running with limited output, error messages will still be shown to the user, but warning messages will be suppressed. Initial validation is provided which errors if attempting to halt when a reboot is detected, but when usage of package exit codes is turned off. This is an error, since without package exit codes turned on, Chocolatey is not able to detect what actually happened when a package is installed/upgraded/uninstalled.
ferventcoder
changed the title
Add ability to globally validate Chocolatey execution, and halt on error
Global validation of config / system state
Mar 11, 2019
ferventcoder
changed the title
Global validation of config / system state
Validate config / system state across everything
Mar 11, 2019
ferventcoder
pushed a commit
that referenced
this issue
Mar 11, 2019
This is implemented as a validation engine. Any new validations will need to implement the IValidation interface, and be added to the container in the ContainerBinding class. When running with limited output, error messages will still be shown to the user, but warning messages will be suppressed. Initial validation is provided which errors if attempting to halt when a reboot is detected, but when usage of package exit codes is turned off. This is an error, since without package exit codes turned on, Chocolatey is not able to detect what actually happened when a package is installed/upgraded/uninstalled.
ferventcoder
added a commit
that referenced
this issue
Mar 11, 2019
Change the logging so each part can be determined what tripped up something in an easier reading format.
ferventcoder
added a commit
that referenced
this issue
Mar 11, 2019
Move some of the comments in the method up to remarks - add XML comments for methods in PendingRebootService.
ferventcoder
added a commit
that referenced
this issue
Mar 11, 2019
* stable: (GH-1655) make virtual methods for outdated / package service (GH-1747) Fix: passing timeout switch of 0 is ignored (GH-1746) Update XML comments / formatting (GH-1746) update logging for validation (GH-1038) Stop operation on package reboot request (GH-1038) Stop execution if pending reboot (GH-1746) Add concept of global validation (maint) Corrected white space
This is completed and will be in 0.10.12. |
ferventcoder
added a commit
that referenced
this issue
Mar 15, 2019
If warnings tend to start to annoy someone, they may want to shut them off, provide the ability to do so.
ferventcoder
added a commit
that referenced
this issue
Mar 15, 2019
* stable: (doc) add exit codes to gen doc headings (doc) update generated docs (version) 0.10.12 (doc) fix grammar (GH-1038) remove note on off recommendation (GH-1746) allow shutting off validation warnings (doc) update release notes for licensed extension (maint) whitespace (doc) update release notes (maint) formatting (GH-1758)(doc) provide exit code docs (doc) info - add usage / examples (doc) outdated - note ignore unfound (doc) scripting - point to scripting reference (doc) scripting - how to get exit code w/powershell (GH-1724) search - exit 2 on no results (GH-1758) control enhanced exit codes w/feature (doc) update release notes for 0.10.12 release (doc) update older release notes
ferventcoder
changed the title
Validate config / system state across everything
config: Validate config / system state across everything
Mar 31, 2020
ferventcoder
changed the title
config: Validate config / system state across everything
Validate config / system state across everything
Mar 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In addition to the ability for individual commands to validate that everything is correct before proceeding, for example here:
https://github.com/chocolatey/choco/blob/master/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs#L169-L201
with the install command, it should also be possible to validate at a higher level, and not tidied specifically to an individual command.
This would allow the opportunity to valid on things like:
This should be implemented in an extensible way, so that new validations can be easily added.
The text was updated successfully, but these errors were encountered: