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 static cloud compatibility check for inputs #19033

Closed
wants to merge 1 commit into from

Conversation

patrickmann
Copy link
Contributor

@patrickmann patrickmann commented Apr 12, 2024

/nocl (bug in unreleased change)
/prd Graylog2/graylog-plugin-enterprise#7044

Relates to Graylog2/graylog-plugin-enterprise#7019

#18769 changed the signature of MessageInput.Descriptor methods to be static, to support pre-install compatibility checks for content packs. However, other parts of the code rely on dynamic overriding of these methods.

To support both use cases, we revert back to the original state and instead introduce a static check method, specifically for content pack imports in Cloud. All MessageInput subclasses that want to be cloud-compatible need to define this new static method in MessageInput.Descriptor.

How Has This Been Tested?

  • Can create inputs in Cloud and on-prem
  • Cloud only shows cloud-compatible inputs; on-prem shows all
  • Cloud-incompatible inputs are ignored when importing a content pack in Cloud

Note: an exception is thrown when uninstalling a content pack. It is related to audit logging and is not relevant to this issue, since it reproduces on master. We should fix that separately (#19034).

2024-04-12 12:25:04,859 WARN : org.graylog.plugins.auditlog.jersey.AuditLogFilter - Couldn't capture response entity
java.lang.IllegalArgumentException: No serializer found for class

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@patrickmann patrickmann marked this pull request as ready for review April 15, 2024 05:07
@patrickmann patrickmann deleted the staticCloudCompat branch April 15, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant