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

Conversation

Projects
2 participants
@bernd
Member

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 some commits Jun 12, 2017

Validate caches/adapters when opening edit form
The user does not see problems until she changed something, otherwise.
Fix refresh handling in CSV data adapter
Do not clear error at the beginning and make sure to check the file if
an error exists.
Ensure cache/adapter service lifecycle methods never throw an error
We handle start/stop/refresh errors internally.

@bernd bernd added this to the 2.3.0 milestone Jun 12, 2017

@bernd bernd requested a review from kroepke Jun 12, 2017

@kroepke

This comment has been minimized.

Member

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"])
@kroepke

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

@bernd

This comment has been minimized.

Member

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

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
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