Skip to content
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

Fix and centralize lookup adapter/cache error handling #3905

Merged
merged 5 commits into from Jun 14, 2017
Merged

Conversation

@bernd
Copy link
Member

@bernd bernd commented Jun 12, 2017

  • During adapter refresh, only clear the error once the refresh is done
  • Force refresh when an error is set, even when the file info didn't change
  • Make sure that #startUp() and #shutDown() never throw an error
  • Run validation when opening adapter/cache form to show problems immediately
bernd added 3 commits Jun 12, 2017
The user does not see problems until she changed something, otherwise.
Do not clear error at the beginning and make sure to check the file if
an error exists.
We handle start/stop/refresh errors internally.
@kroepke
Copy link
Member

@kroepke kroepke commented Jun 13, 2017

For the HTTPJsonPath adapter I get a rather ugly message when trying to create it:

(400). Additional information: Null multiValueJSONPath
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@102f1aac; line: 1, column: 148] (through reference chain: org.graylog2.rest.models.system.lookup.$AutoValue_DataAdapterApi$Builder["config"]->org.graylog2.lookup.adapters.$AutoValue_HTTPJSONPathDataAdapter_Config$Builder["multi_value_jsonpath"])
Copy link
Member

@kroepke kroepke left a comment

lgtm apart from the rather ugly error message from the http json path adapter.

@bernd
Copy link
Member Author

@bernd bernd commented Jun 14, 2017

@kroepke Good catch, thanks! The forms should only validate on load when edited, new entities will always be invalid...

Fixed in 4b0f23d

@kroepke kroepke merged commit dcb1d94 into master Jun 14, 2017
4 checks passed
4 checks passed
@garybot2
ci-web-linter Jenkins build graylog-pr-linter-check 1744 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@garybot2
graylog-project/pr Jenkins build graylog-project-pr-snapshot 231 has succeeded
Details
@kroepke kroepke deleted the lut-error-handling branch Jun 14, 2017
@bernd bernd added this to Done in Lookup Tables Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants