Skip to content

Commit

Permalink
Merge pull request #182 from rapid7/update_docker_validator
Browse files Browse the repository at this point in the history
[SOAR-16531] DockerValidator - Output error
  • Loading branch information
cmcnally-r7 authored Mar 13, 2024
2 parents 881fec2 + 3d9ae16 commit 5adae05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ be on your way to contributing!

## Changelog

* 2.47.16 - `HelpInputOutputValidator` - Update error message from `icon-plugin` to `insight-plugin`
* 2.47.15 - `TitleValidator` - Change validator to print all issues rather than break on the first
* 2.47.16 - `HelpInputOutputValidator` - Update error message from `icon-plugin` to `insight-plugin` | `DockerValidator` - Print full error message and change instances of `icon-plugin` to `insight-plugin`
* 2.47.15 - `TitleValidator` - Change validator to print all issues rather than break on the first
* 2.47.14 - `OutputValidator` - Fix issue where `schema.py` files from the venv folder were being validated
* 2.47.13 - `HelpInputOutputValidator` - Fix validator to change single quotes to double quotes when an input field uses list values so that it does not break
* 2.47.12 - `VersionBumpValidator` - update validation for connection versions| Updated `GitPython` to version 3.1.41.
Expand Down
11 changes: 6 additions & 5 deletions icon_validator/rules/plugin_validators/docker_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ def validate(self, spec):
else:
try:
subprocess.check_call(build_image, stdout=fd, stderr=fd)
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError as error:
raise ValidationException("The plugin is either broken or the image might not be built."
"Please try 'icon-plugin build image' to rebuild the image."
"'icon-plugin run -c bash' will open a bash shell on the build container.") from e
"Please try 'make image' to rebuild the image."
"'insight-plugin shell' will open a bash shell on the build container."
f"Error:\n{error}")

try:
subprocess.check_call(run_image, stdout=fd, stderr=fd)
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError as error:
raise ValidationException("Docker failed at running info command. "
"Check your plugin code for run-time errors.") from e
f"Error:\n{error}")

0 comments on commit 5adae05

Please sign in to comment.