You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/02/24 22:24:28 UTC

[GitHub] JonZeolla opened a new pull request #28: METRON-1990: Bro plugin docker should exit nonzero if it encounters issues

JonZeolla opened a new pull request #28: METRON-1990: Bro plugin docker should exit nonzero if it encounters issues
URL: https://github.com/apache/metron-bro-plugin-kafka/pull/28
 
 
   ## Contributor Comments
   For the most part, `docker/` scripts were already failing `./run_end_to_end.sh` (and the various component scripts) because they contain `set -e` and `set -o pipefile`.
   
   However, it had one major gap which caused it to not exit nonzero when `bro-pkg` or `bro -r` failed. Because we use `bro-pkg` with the `--force` flag, it will not exit nonzero even if it encounters issues.  `bro -r` exits nonzero if it encounters an issue, but because it was being run as a find `-exec`, that exit status was being suppressed.  By piping the output of find to xargs the overall exit status is no longer suppressed.
   
   ### Testing
   Inject a failure - such as by having an invalid config, by breaking the plugin itself, etc. - and run `./run_end_to_end.sh`.  It should exit nonzero.
   
   _Note_:  If you choose to break the `src/` it must be committed in order for the `bro-pkg install code` to use it (in this case, `code` is a local directory, and in this scenario `bro-pkg` only uses already-commit code).
   
   ## Pull Request Checklist
   
   Thank you for submitting a contribution to Apache Metron's Bro kafka writer plugin.
   
   In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
   
   ### For all changes:
   - [X] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
   - [X] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   - [X] Has your PR been rebased against the latest commit within the target branch (typically master)?
   
   ### For code changes:
   - [X] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
   - [X] Have you included steps or a guide to how the change may be verified and tested manually?
   - [X] Have you ensured that the full suite of tests and checks have been executed via:
     ```
     bro-pkg test $GITHUB_USERNAME/metron-bro-plugin-kafka --version $BRANCH
     ```
   - [ ] Have you written or updated unit tests and or integration tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] Have you verified the basic functionality of the build by building and running locally with Apache Metron's [Vagrant full-dev environment](https://github.com/apache/metron/tree/master/metron-deployment/development/centos6) or the equivalent?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services