fluent-plugin-google-cloud 0.6.10.pre.2 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4efb3cf43c3d546d06bbc467466b6b9d9c3aae98
4
- data.tar.gz: e821c6049fb4ef9fb1e8e653532667b739140864
3
+ metadata.gz: d1d9303278baab1ded1484eaa6c2974c5dbb3bc5
4
+ data.tar.gz: 313c3e168ab212dd65e276b0e0a3562e718fcaa1
5
5
  SHA512:
6
- metadata.gz: 062c16f5280a6378de952a2f4c1f943cccc44f61f4fb118f69cc1672295fccbe67ee0af58b2b7aedc46c7cd7e0f467664a0c092f0c20e7322bca35c700e5303c
7
- data.tar.gz: bfe2e60d895d989dddf2964261867cac2586ba30ae599af75d3c2b334c4ac10a649d50c91919de1f2d0adf5d45f34b01e0add5eace33f1231181f522fead426f
6
+ metadata.gz: 2a67095d29a49fb9b264a23f78949d98f28614428381ae4f85b886fb14d5b7d34d4974649ca8ab1c740dbc172e2e036ab64f2b788d4818d94dc3d50ba0529a8a
7
+ data.tar.gz: 3ec89701d9d83e380e90eb06f4b3d9a25a7d7b223420a1384dd07b110af43c8fb4aeccd59bdfaffda4140ba74bfc4b0d5804d4dc74b627b7527d8981205a7bc5
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-google-cloud (0.6.10.pre.2)
4
+ fluent-plugin-google-cloud (0.6.10)
5
5
  fluentd (~> 0.10)
6
6
  google-api-client (~> 0.14)
7
7
  google-cloud-logging (~> 1.2, >= 1.2.3)
8
8
  googleapis-common-protos (~> 1.3)
9
+ googleauth (~> 0.6)
9
10
  grpc (~> 1.0)
10
11
  json (~> 1.8)
11
12
 
@@ -10,7 +10,7 @@ eos
10
10
  gem.homepage =
11
11
  'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
12
12
  gem.license = 'Apache-2.0'
13
- gem.version = '0.6.10.pre.2'
13
+ gem.version = '0.6.10'
14
14
  gem.authors = ['Todd Derr', 'Alex Robinson']
15
15
  gem.email = ['salty@google.com']
16
16
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -23,6 +23,7 @@ eos
23
23
  gem.add_runtime_dependency 'googleapis-common-protos', '~> 1.3'
24
24
  gem.add_runtime_dependency 'google-api-client', '~> 0.14'
25
25
  gem.add_runtime_dependency 'google-cloud-logging', '~> 1.2', '>= 1.2.3'
26
+ gem.add_runtime_dependency 'googleauth', '~> 0.6'
26
27
  gem.add_runtime_dependency 'grpc', '~> 1.0'
27
28
  gem.add_runtime_dependency 'json', '~> 1.8'
28
29
 
@@ -125,8 +125,6 @@ module Fluent
125
125
 
126
126
  # Internal constants.
127
127
  module InternalConstants
128
- DEFAULT_LOGGING_API_URL = 'logging.googleapis.com'.freeze
129
-
130
128
  # The label name of local_resource_id in the json payload. When a record
131
129
  # has this field in the payload, we will use the value to retrieve
132
130
  # monitored resource from Stackdriver Metadata agent.
@@ -195,7 +193,7 @@ module Fluent
195
193
  Fluent::Plugin.register_output('google_cloud', self)
196
194
 
197
195
  PLUGIN_NAME = 'Fluentd Google Cloud Logging plugin'.freeze
198
- PLUGIN_VERSION = '0.6.10.pre.2'.freeze
196
+ PLUGIN_VERSION = '0.6.10'.freeze
199
197
 
200
198
  # Name of the the Google cloud logging write scope.
201
199
  LOGGING_SCOPE = 'https://www.googleapis.com/auth/logging.write'.freeze
@@ -323,15 +321,6 @@ module Fluent
323
321
  :default => nil,
324
322
  :secret => true
325
323
 
326
- # The URL of Stackdriver Logging API. Right now this only works with the
327
- # gRPC path (use_grpc = true).
328
- config_param :logging_api_url, :string, :default => DEFAULT_LOGGING_API_URL
329
-
330
- # Whether to use a secure channel when talking to the Logging API. This
331
- # should only be false if the Stackdriver Logging Agent is set up to talk
332
- # to a mocked / stubbed Logging API. Otherwise the requests will fail.
333
- config_param :use_secure_channel, :bool, :default => true
334
-
335
324
  # Whether to collect metrics about the plugin usage. The mechanism for
336
325
  # collecting and exposing metrics is controlled by the monitoring_type
337
326
  # parameter.
@@ -380,15 +369,6 @@ module Fluent
380
369
  ' partial_success flag will be ignored.'
381
370
  end
382
371
 
383
- # TODO(qingling128): Remove this warning after the support is added. Also
384
- # remove the comment in the description of this configuration.
385
- unless @logging_api_url == DEFAULT_LOGGING_API_URL || @use_grpc
386
- @log.warn 'Detected customized logging_api_url while use_grpc is not' \
387
- ' enabled. Customized logging_api_url for the non-gRPC path' \
388
- ' is not supported. The logging_api_url option will be' \
389
- ' ignored.'
390
- end
391
-
392
372
  # If monitoring is enabled, register metrics in the default registry
393
373
  # and store metric objects for future use.
394
374
  if @enable_monitoring
@@ -1733,16 +1713,12 @@ module Fluent
1733
1713
 
1734
1714
  def api_client
1735
1715
  if @use_grpc
1736
- if @use_secure_channel
1737
- ssl_creds = GRPC::Core::ChannelCredentials.new
1738
- authentication = Google::Auth.get_application_default
1739
- creds = GRPC::Core::CallCredentials.new(authentication.updater_proc)
1740
- creds = ssl_creds.compose(creds)
1741
- else
1742
- creds = :this_channel_is_insecure
1743
- end
1716
+ ssl_creds = GRPC::Core::ChannelCredentials.new
1717
+ authentication = Google::Auth.get_application_default
1718
+ creds = GRPC::Core::CallCredentials.new(authentication.updater_proc)
1719
+ creds = ssl_creds.compose(creds)
1744
1720
  @client = Google::Logging::V2::LoggingServiceV2::Stub.new(
1745
- @logging_api_url, creds)
1721
+ 'logging.googleapis.com', creds)
1746
1722
  else
1747
1723
  unless @client.authorization.expired?
1748
1724
  begin
@@ -62,17 +62,6 @@ module BaseTest
62
62
  assert_equal 1, exception_count
63
63
  end
64
64
 
65
- def test_configure_logging_api_url
66
- setup_gce_metadata_stubs
67
- {
68
- APPLICATION_DEFAULT_CONFIG => DEFAULT_LOGGING_API_URL,
69
- CUSTOM_LOGGING_API_URL_CONFIG => CUSTOM_LOGGING_API_URL
70
- }.each do |(config, url)|
71
- d = create_driver(config)
72
- assert_equal url, d.instance.instance_variable_get(:@logging_api_url)
73
- end
74
- end
75
-
76
65
  def test_configure_custom_metadata
77
66
  setup_no_metadata_service_stubs
78
67
  d = create_driver(CUSTOM_METADATA_CONFIG)
@@ -1368,14 +1357,14 @@ module BaseTest
1368
1357
 
1369
1358
  def setup_auth_stubs
1370
1359
  # Used when loading credentials from a JSON file.
1371
- stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
1360
+ stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
1372
1361
  .with(body: hash_including(grant_type: AUTH_GRANT_TYPE))
1373
1362
  .to_return(body: %({"access_token": "#{FAKE_AUTH_TOKEN}"}),
1374
1363
  status: 200,
1375
1364
  headers: { 'Content-Length' => FAKE_AUTH_TOKEN.length,
1376
1365
  'Content-Type' => 'application/json' })
1377
1366
 
1378
- stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
1367
+ stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
1379
1368
  .with(body: hash_including(grant_type: 'refresh_token'))
1380
1369
  .to_return(body: %({"access_token": "#{FAKE_AUTH_TOKEN}"}),
1381
1370
  status: 200,
@@ -20,7 +20,6 @@ module Constants
20
20
 
21
21
  # Generic attributes.
22
22
  HOSTNAME = Socket.gethostname
23
- CUSTOM_LOGGING_API_URL = 'custom.logging.googleapis.com'.freeze
24
23
 
25
24
  # TODO(qingling128) Separate constants into different submodules.
26
25
  # Attributes used for the GCE metadata service.
@@ -139,10 +138,6 @@ module Constants
139
138
  APPLICATION_DEFAULT_CONFIG = %(
140
139
  ).freeze
141
140
 
142
- CUSTOM_LOGGING_API_URL_CONFIG = %(
143
- logging_api_url #{CUSTOM_LOGGING_API_URL}
144
- ).freeze
145
-
146
141
  DETECT_JSON_CONFIG = %(
147
142
  detect_json true
148
143
  ).freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-google-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.10.pre.2
4
+ version: 0.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Derr
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-11-16 00:00:00.000000000 Z
12
+ date: 2017-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -73,6 +73,20 @@ dependencies:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.2.3
76
+ - !ruby/object:Gem::Dependency
77
+ name: googleauth
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.6'
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.6'
76
90
  - !ruby/object:Gem::Dependency
77
91
  name: grpc
78
92
  requirement: !ruby/object:Gem::Requirement
@@ -229,9 +243,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
229
243
  version: '2.0'
230
244
  required_rubygems_version: !ruby/object:Gem::Requirement
231
245
  requirements:
232
- - - ">"
246
+ - - ">="
233
247
  - !ruby/object:Gem::Version
234
- version: 1.3.1
248
+ version: '0'
235
249
  requirements: []
236
250
  rubyforge_project:
237
251
  rubygems_version: 2.4.8