"credentials" method name conflicts with the config setting of the same name.#20
Open
RichardN wants to merge 1 commit intologstash-plugins:mainfrom
Open
"credentials" method name conflicts with the config setting of the same name.#20RichardN wants to merge 1 commit intologstash-plugins:mainfrom
RichardN wants to merge 1 commit intologstash-plugins:mainfrom
Conversation
…s with the deprecated config setting (which creates a method of the same name)
Author
|
I've fixed up my fork of https://github.com/RichardN/logstash-input-s3 so that the rspec passes if this change is made to this mixin. The alternative to doing this is that the legacy "credentials" setting is removed any plugin which uses this mixin. |
1 similar comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm trying to fix the tests so the s3 input plugin using the aws-sdk-v2 pull request code and discovered that this is the probable issue.
The current rspec tests pass with this change, and testing on a rebased version of the above logstash-input-s3 code gives the following changes (which I believe are what we'd expect..)
LogStash::Inputs::S3#get_s3object with deprecated credentials option should instantiate AWS::S3 clients with a proxy set
Failure/Error: subject.send(:get_s3object)
<#Module:0x48e07006::Resource (class)> received :new with unexpected arguments
expected: ({:access_key_id=>"1234", :secret_access_key=>"secret", :http_proxy=>"http://example.com", :region=>"us-east-1"})
got: ({:credentials=>#<Aws::Credentials access_key_id="1234">, :http_proxy=>"http://example.com", :region=>"us-east-1"})
./lib/logstash/inputs/s3.rb:388:in `get_s3object'
./spec/inputs/s3_spec.rb:78:in`block in (root)'
LogStash::Inputs::S3#get_s3object with modern access key options should instantiate AWS::S3 clients with a proxy set
Failure/Error: subject.send(:get_s3object)
<#Module:0x48e07006::Resource (class)> received :new with unexpected arguments
expected: ({:access_key_id=>"1234", :secret_access_key=>"secret", :http_proxy=>"http://example.com", :region=>"us-east-1"})
got: ({:credentials=>#<Aws::Credentials access_key_id="1234">, :http_proxy=>"http://example.com", :region=>"us-east-1"})
./lib/logstash/inputs/s3.rb:388:in `get_s3object'
./spec/inputs/s3_spec.rb:100:in`block in (root)'