selfxp opened a new pull request #4348: Fixes the issue of failing to read 
empty Splunk JSON objects
URL: https://github.com/apache/incubator-openwhisk/pull/4348
 
 
   ## Description
   <!--- Provide a detailed description of your changes. -->
   <!--- Include details of what problem you are solving and how your changes 
are tested. -->
   
   <!--- Provide a concise summary of your changes in the Title -->
   There is currently an issue with `SplunkLogStore` that assumes that all JSON 
objects received from Splunk API should always contain these fields: 
`log_timestamp`, `log_stream` and `log_message`.
   
   
   
   The problem occurs when trying to get the logs using: 
   ```
   wsk activation logs $activation_id
   ```
   as Splunk sometimes sends empty JSON objects. 
   
   This PR handles the `NoSuchElementException`, displays an error message and 
allows the retrieval of all the other log messages for that particular 
activation. 
   
   More details about the the issue here: #4347
   
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [x] I opened an issue to propose and discuss this change (#4347)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the 
boxes that apply: -->
   - [x] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered 
all aspects of the change you're making. -->
   
   - [x] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [x] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   

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


With regards,
Apache Git Services

Reply via email to