Skip to content

Conversation

@quartzmo
Copy link
Member

@quartzmo quartzmo commented May 24, 2019

This is the narrowest possible fix for the 3 errors in recent CI builds (see full log). I'll be happy to update with a more general solution once we better understand the scope of the problem.

Update: @dazuma identified the change responsible for these errors as googleapis/google-api-ruby-client#776

  1) Error:
Google::Cloud::Storage::Bucket::update::mock_storage::lifecycle (Object Lifecycle Management)#test_0003_can update lifecycle inside of a block:
MockExpectationError: mocked method :patch_bucket called with unexpected arguments ["new-bucket-1558720909", #<Google::Apis::StorageV1::Bucket:0x000055e4ef8c2bc8 @lifecycle=#<Google::Apis::StorageV1::Bucket::Lifecycle:0x000055e4ef8c2da8 @rule=[#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef8c3208 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef8c3320 @storage_class="COLDLINE", @type="SetStorageClass">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef8c3438 @age=32, @created_before=#<Date: 2013-01-15 ((2456308j,0s,0n),+0s,2299161j)>, @is_live=true, @matches_storage_class=["MULTI_REGIONAL"], @num_newer_versions=3>>, #<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef8c2ec0 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef8c2fd8 @storage_class=nil, @type="Delete">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef8c30f0 @age=40, @created_before=nil, @is_live=false, @matches_storage_class=[], @num_newer_versions=nil>>]>>, {:predefined_acl=>nil, :predefined_default_object_acl=>nil, :user_project=>nil}]
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:113:in `block in patch_bucket'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:568:in `execute'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:112:in `patch_bucket'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/bucket.rb:2058:in `patch_gapi!'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/bucket.rb:910:in `update'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/test/google/cloud/storage/bucket_update_test.rb:544:in `block (3 levels) in <top (required)>'
  2) Error:
Google::Cloud::Storage::Bucket::update::mock_storage::lifecycle (Object Lifecycle Management)#test_0006_updates Lifecycle rules in a block to lifecycle:
MockExpectationError: mocked method :patch_bucket called with unexpected arguments ["new-bucket-1558720909", #<Google::Apis::StorageV1::Bucket:0x000055e4ef91b868 @lifecycle=#<Google::Apis::StorageV1::Bucket::Lifecycle:0x000055e4ef91ba48 @rule=[#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef91bea8 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef90e9d8 @storage_class="NEARLINE", @type="SetStorageClass">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef90c0c0 @age=32, @created_before=#<Date: 2013-01-15 ((2456308j,0s,0n),+0s,2299161j)>, @is_live=true, @matches_storage_class=["MULTI_REGIONAL"], @num_newer_versions=3>>, #<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef91bb60 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef91bc78 @storage_class=nil, @type="Delete">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef91bd90 @age=40, @created_before=nil, @is_live=false, @matches_storage_class=[], @num_newer_versions=nil>>]>>, {:predefined_acl=>nil, :predefined_default_object_acl=>nil, :user_project=>nil}]
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:113:in `block in patch_bucket'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:568:in `execute'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:112:in `patch_bucket'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/bucket.rb:2058:in `patch_gapi!'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/bucket.rb:268:in `lifecycle'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/test/google/cloud/storage/bucket_update_test.rb:634:in `block (3 levels) in <top (required)>'
  3) Error:
Google::Cloud::Storage::Bucket::update::mock_storage::lifecycle (Object Lifecycle Management)#test_0005_adds Lifecycle rules in a block to lifecycle:
MockExpectationError: mocked method :patch_bucket called with unexpected arguments ["new-bucket-1558720909", #<Google::Apis::StorageV1::Bucket:0x000055e4ef99c3a0 @lifecycle=#<Google::Apis::StorageV1::Bucket::Lifecycle:0x000055e4ef99c580 @rule=[#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef99d070 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef99d188 @storage_class="NEARLINE", @type="SetStorageClass">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef99d2a0 @age=32, @created_before=#<Date: 2013-01-15 ((2456308j,0s,0n),+0s,2299161j)>, @is_live=true, @matches_storage_class=["MULTI_REGIONAL"], @num_newer_versions=3>>, #<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef99cd28 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef99ce40 @storage_class=nil, @type="Delete">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef99cf58 @age=40, @created_before=nil, @is_live=false, @matches_storage_class=[], @num_newer_versions=nil>>, #<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef99c9e0 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef99caf8 @storage_class=nil, @type="Delete">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef99cc10 @age=nil, @created_before=nil, @is_live=false, @matches_storage_class=[], @num_newer_versions=8>>, #<Google::Apis::StorageV1::Bucket::Lifecycle::Rule:0x000055e4ef99c698 @action=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action:0x000055e4ef99c7b0 @storage_class="COLDLINE", @type="SetStorageClass">, @condition=#<Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition:0x000055e4ef99c8c8 @age=nil, @created_before="2013-01-15", @is_live=nil, @matches_storage_class=["MULTI_REGIONAL", "REGIONAL"], @num_newer_versions=nil>>]>>, {:predefined_acl=>nil, :predefined_default_object_acl=>nil, :user_project=>nil}]
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:113:in `block in patch_bucket'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:568:in `execute'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/service.rb:112:in `patch_bucket'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/bucket.rb:2058:in `patch_gapi!'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/bucket.rb:910:in `update'
    /tmpfs/src/github/google-cloud-ruby/google-cloud-storage/test/google/cloud/storage/bucket_update_test.rb:603:in `block (3 levels) in <top (required)>'

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 24, 2019
@quartzmo quartzmo requested review from blowmage and dazuma May 24, 2019 22:36
@quartzmo quartzmo added api: storage Issues related to the Cloud Storage API. testing labels May 24, 2019
@blowmage blowmage merged commit 49e1752 into googleapis:master May 25, 2019
@quartzmo quartzmo deleted the storage-test-fix branch May 28, 2019 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants