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

Cloud compatibility annotation #19054

Merged
merged 2 commits into from Apr 15, 2024
Merged

Cloud compatibility annotation #19054

merged 2 commits into from Apr 15, 2024

Conversation

patrickmann
Copy link
Contributor

@patrickmann patrickmann commented Apr 15, 2024

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

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.

Instead we introduce a class annotation @CloudCompatible to indicate that an input class is compatible with Cloud.

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 06:27
@kodjo-anipah kodjo-anipah self-requested a review April 15, 2024 07:25
@patrickmann patrickmann requested review from kodjo-anipah and removed request for kodjo-anipah April 15, 2024 07:56
Copy link
Contributor

@kodjo-anipah kodjo-anipah left a comment

Choose a reason for hiding this comment

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

Install still ignoring error incompatible inputs
2024-04-15 11:57:33,506 WARN : org.graylog2.contentpacks.ContentPackService - Ignoring incompatible input org.graylog2.inputs.syslog.udp.SyslogUDPInput in cloud
creating inputs is possible again:
image
All inputs that a cloud compatible have the new annotation

Copy link
Contributor

@kodjo-anipah kodjo-anipah left a comment

Choose a reason for hiding this comment

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

LGT

@patrickmann patrickmann merged commit fd427cd into master Apr 15, 2024
7 checks passed
@patrickmann patrickmann deleted the cloudCompatAnnotation branch April 15, 2024 10:19
patrickmann added a commit that referenced this pull request Apr 15, 2024
* refactor static cloud compatibility check

* cloud compat annotation

(cherry picked from commit fd427cd)
kodjo-anipah pushed a commit that referenced this pull request Apr 16, 2024
* refactor static cloud compatibility check

* cloud compat annotation

(cherry picked from commit fd427cd)
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

2 participants