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

refactor validation of generic_resolver rules to startup #694

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dtrai2
Copy link
Collaborator

@dtrai2 dtrai2 commented Nov 5, 2024

  • Move validation logic to __attrs_post_init__ in GenericResolverRule.
  • Remove redundant error handling in GenericResolver processor.
  • Update corresponding tests to reflect changes.

- Move validation logic to `__attrs_post_init__` in GenericResolverRule.
- Remove redundant error handling in GenericResolver processor.
- Update corresponding tests to reflect changes.
@dtrai2 dtrai2 requested a review from djkhl November 5, 2024 12:04
@dtrai2 dtrai2 added the enhancement New feature or request label Nov 5, 2024
@dtrai2 dtrai2 marked this pull request as ready for review November 5, 2024 13:48
Copy link
Collaborator

@djkhl djkhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good and works as expected :)

@ppcad
Copy link
Collaborator

ppcad commented Nov 8, 2024

Getters need to be updated on the fly in the generic resolver. They are going to be refreshed periodically to get updated data from the HTTP getter.
Therefore, raising a configuration error leads to problems, since this can happen when Logprep is already running.
I'm going to create a pull request for this.

@dtrai2
Copy link
Collaborator Author

dtrai2 commented Nov 8, 2024

Getters need to be updated on the fly in the generic resolver. They are going to be refreshed periodically to get updated data from the HTTP getter.
Therefore, raising a configuration error leads to problems, since this can happen when Logprep is already running.
I'm going to create a pull request for this.

but isn't it already working with the general config refresh we have in Logprep? That way the configuration is also reloaded periodically and in case an exception is thrown, Logprep will continue running with the previous configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants