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

Updated Gradle and Google Cloud Storage client library #20

Merged
merged 14 commits into from
Oct 4, 2022

Conversation

andsel
Copy link
Contributor

@andsel andsel commented Aug 23, 2022

Release notes

Updates Cloud Storage dependencies forcing this plugin to be compatible only with Logstash >= 8.3.0

What does this PR do?

Update Google Cloud Storage client (and transitive dependencies) from 1.62.0 to 1.118.1

Imposes Logstash 8.3.0 runtime requirement due to alignment on jackson-core 2.13.3

Why is it important/What is the impact to the user?

  • Keeps libraries updated
  • Removes 7.x branch testing from Travis matrix test

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

Closes elastic/logstash#14474

@andsel andsel self-assigned this Sep 20, 2022
@andsel andsel requested a review from robbavey September 20, 2022 08:14
@robbavey
Copy link
Contributor

@andsel I was unable to test this on my development laptop, due to the following error:

[FATAL] 2022-09-21 12:17:46.872 [main] Logstash - Logstash stopped processing because of an error: (VersionConflict) Bundler could not find compatible versions for gem "mimemagic":
  In Gemfile:
    logstash-input-google_cloud_storage was resolved to 0.11.1, which depends on
      mimemagic (>= 0.3.3)

Could not find gem 'mimemagic (>= 0.3.3)', which is required by gem 'logstash-input-google_cloud_storage', in any of the sources.
org.jruby.exceptions.StandardError: (VersionConflict) Bundler could not find compatible versions for gem "mimemagic":
  In Gemfile:
    logstash-input-google_cloud_storage was resolved to 0.11.1, which depends on
      mimemagic (>= 0.3.3)

Could not find gem 'mimemagic (>= 0.3.3)', which is required by gem 'logstash-input-google_cloud_storage', in any of the sources.

@andsel
Copy link
Contributor Author

andsel commented Sep 22, 2022

@robbavey how did you tested this?
Did you used the following definition in your Gemfile?

gem "logstash-input-google_cloud_storage", :path => "/path_to/logstash-input-google_cloud_storage"

Or did you generated the gem and installed on Logstash?

plugin> gem build logstash-input-google_cloud_storage.gemspec

logstash> bin/logstash-plugin install --local /path_to/logstash-input-google_cloud_storage/logstash-input-google_cloud_storage-0.11.1-java.gem

CHANGELOG.md Outdated
@@ -1,3 +1,6 @@
## 0.11.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make this a minor update.

CHANGELOG.md Outdated
@@ -1,3 +1,6 @@
## 0.11.1
- Updated Google Cloud Storage client library [#20](https://github.com/logstash-plugins/logstash-input-google_cloud_storage/pull/20)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should explicitly state the limitation on logstash version imposed by this new version in the changelog

@robbavey
Copy link
Contributor

I added the definition in my Gemfile. Let me try the other

@robbavey
Copy link
Contributor

@andsel Same result, this time when installing the plugin

Using system java: /usr/bin/java
Validating /Users/robbavey/code/plugins/logstash-input-google_cloud_storage/logstash-input-google_cloud_storage-0.11.1-java.gem
Installing logstash-input-google_cloud_storage
Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "mimemagic":
  In Gemfile:
    logstash-input-google_cloud_storage (= 0.11.1) was resolved to 0.11.1, which depends on
      mimemagic (>= 0.3.3)

Could not find gem 'mimemagic (>= 0.3.3)', which is required by gem 'logstash-input-google_cloud_storage (= 0.11.1)', in any of the sources or in gems cached in vendor/cache.

@andsel
Copy link
Contributor Author

andsel commented Sep 26, 2022

I was able to reproduce the same error on a clean Ubuntu 22.04.
Once I installed by hand the mimemagic gem into Logstash with:

bin/ruby -S gem install mimemagic -v '>= 0.3.7'

then, I was able to install the plugin with:

bin/logstash-plugin install --local /path_to/logstash-input-google_cloud_storage-0.12.0-java.gem

The same problem happens also on main branch, so it shouldn't be related to this PR.

Comment on lines 37 to 52
[NOTE]
================================================================================
When installing this plugin you could receive an error message about the
impossibility to find compatible versions for gem "mimemagic".
This is error could be circumvented by installing the required dependency directly into
the Logstash Ruby gem's cache.

This could be done going into Logstash installation folder and using the bundled Ruby gems instance:

[source,bash]
----------------------------------
bin/ruby -S gem install mimemagic -v '>= 0.3.7'
----------------------------------

================================================================================

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @karenzone , I've added this note to describe how to avoid an installation problem. Would be great if you could review it, or ping me if you need more context on the problem we are facing.

Copy link
Contributor

@roaksoax roaksoax Sep 27, 2022

Choose a reason for hiding this comment

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

@andsel I would do something like this:

Attempting to install this plugin may result in an error about "<post here a sample error that you actually get from installation". If this error occurs, you can fix it by manually by installing the "mime magic" dependency directly into the Logstash Ruby Gem's cache (<provide a link here to where that would be, or the location.). This could be done using the bundled Ruby gems instance inside the Logstash installation folder (< provide references, e.g. a link that shows where things are installed based on the installation method>)

Copy link
Contributor Author

@andsel andsel Sep 28, 2022

Choose a reason for hiding this comment

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

That's a good idea, I rephrased it in 64647d0 5c1a507

Copy link
Contributor

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

LGTM - over to @karenzone for final approval

@andsel andsel requested review from roaksoax and removed request for karenzone September 27, 2022 16:19
Comment on lines 37 to 52
[NOTE]
================================================================================
When installing this plugin you could receive an error message about the
impossibility to find compatible versions for gem "mimemagic".
This is error could be circumvented by installing the required dependency directly into
the Logstash Ruby gem's cache.

This could be done going into Logstash installation folder and using the bundled Ruby gems instance:

[source,bash]
----------------------------------
bin/ruby -S gem install mimemagic -v '>= 0.3.7'
----------------------------------

================================================================================

Copy link
Contributor

@roaksoax roaksoax Sep 27, 2022

Choose a reason for hiding this comment

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

@andsel I would do something like this:

Attempting to install this plugin may result in an error about "<post here a sample error that you actually get from installation". If this error occurs, you can fix it by manually by installing the "mime magic" dependency directly into the Logstash Ruby Gem's cache (<provide a link here to where that would be, or the location.). This could be done using the bundled Ruby gems instance inside the Logstash installation folder (< provide references, e.g. a link that shows where things are installed based on the installation method>)

@andsel andsel requested a review from roaksoax September 28, 2022 06:59
Copy link
Contributor

@roaksoax roaksoax left a comment

Choose a reason for hiding this comment

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

couple suggestions, otherwise looks good to me

@andsel andsel merged commit ba639d8 into logstash-plugins:main Oct 4, 2022
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.

[Meta] Logstash Update Gradle version and dependencies for Google plugins
3 participants