Resolve following notices.

Notice: Undefined index: KernelId in Drupal\aws_cloud\Service\AwsEc2Service->updateImages() (line 745 of 
Notice: Undefined index: RamdiskId in Drupal\aws_cloud\Service\AwsEc2Service->updateImages() (line 746 of 
Notice: Undefined index: StateReason in Drupal\aws_cloud\Service\AwsEc2Service->updateImages() (line 750 of 
Notice: Undefined index: Platform in Drupal\aws_cloud\Service\AwsEc2Service->updateImages() (line 751 of 
Notice: Undefined index: Description in Drupal\aws_cloud\Service\AwsEc2Service->updateImages() (line 752 of
Notice: Undefined index: product_code in Drupal\aws_cloud\Service\AwsEc2Service->updateImages()
 
CommentFileSizeAuthor
#3 3015502_20181123.patch5.76 KBxiaohua guan

Comments

Xiaohua Guan created an issue. See original summary.

xiaohua guan’s picture

Issue summary: View changes
xiaohua guan’s picture

StatusFileSize
new5.76 KB
xiaohua guan’s picture

Status: Active » Needs review
yas’s picture

@xiaohua-guan Thank you for the fix. It looks good to me.

@baldwinlouie Could you please check the patch?

baldwinlouie’s picture

@yas and @xiaohua-guan, This looks good.

baldwinlouie’s picture

Status: Needs review » Reviewed & tested by the community

moving to RTBC

yas’s picture

Status: Reviewed & tested by the community » Needs work

Unfortunately, I couldn't apply the patch... Could you please review it again?

Cloning into 'cloud'...
remote: Counting objects: 6125, done.
remote: Compressing objects: 100% (4690/4690), done.
remote: Total 6125 (delta 4167), reused 1658 (delta 991)
Receiving objects: 100% (6125/6125), 2.05 MiB | 92.00 KiB/s, done.
Resolving deltas: 100% (4167/4167), done.
Checking patch modules/cloud_service_providers/aws_cloud/src/Service/AwsEc2Service.php...
Checking patch modules/cloud_service_providers/aws_cloud/tests/mock_data/Functional/Ec2/ImageTest.yml...
Checking patch modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/ImageTest.php...
error: while searching for:
  public function testImportImage() {
    $cloud_context = $this->cloud_context;
    $image_id = 'ami-' . $this->random->name(8, TRUE);
    $name = "Image " . date('Y/m/d - ') . $this->random->name(8, TRUE);
    $this->updateImageInMockData($image_id, $name);

    // Import image
    $this->drupalGet("/clouds/aws_cloud/$cloud_context/images/import");

error: patch failed: modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/ImageTest.php:160
error: modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/ImageTest.php: patch does not apply
On branch 8.x-1.x
Your branch is up to date with 'origin/8.x-1.x'.

nothing to commit, working tree clean
xiaohua guan’s picture

StatusFileSize
new5.76 KB
xiaohua guan’s picture

Status: Needs work » Needs review
xiaohua guan’s picture

@yas

I modified patch file. Please review it again.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@xiaohua-guan Thank you for the fixing. It looks good now. I'll push and merge it.

  • yas committed 69d51aa on 8.x-1.x authored by Xiaohua Guan
    Issue #3015502 by Xiaohua Guan, yas, baldwinlouie: Resolve notices when...
yas’s picture

Status: Reviewed & tested by the community » Fixed

The patch was merged.

yas’s picture

Status: Fixed » Needs work

@xiaohua-guan, Unfortunately, this one couldn't be applied, neither.

Cloning into 'cloud'...
remote: Counting objects: 6142, done.
remote: Compressing objects: 100% (4704/4704), done.
remote: Total 6142 (delta 4173), reused 1660 (delta 991)
Receiving objects: 100% (6142/6142), 2.07 MiB | 343.00 KiB/s, done.
Resolving deltas: 100% (4173/4173), done.
Checking patch modules/cloud_service_providers/aws_cloud/src/Service/AwsEc2Service.php...
error: while searching for:
          'root_device_name' => $image['RootDeviceName'],
          'ami_name' => $image['Name'],
          'name' => $image['Name'],
          'kernel_id' => $image['KernelId'],
          'ramdisk_id'  => $image['RamdiskId'],
          'image_type' => $image['ImageType'],
          'product_code' => $image['product_code'],
          'source' => $image['ImageLocation'],
          'state_reason' => $image['StateReason']['Message'],
          'platform' => $image['Platform'],
          'description' => $image['Description'],
          'visibility' => $image['Public'],
          'block_devices' => implode(', ', $block_devices),
          'created' => strtotime($image['CreationDate']),

error: patch failed: modules/cloud_service_providers/aws_cloud/src/Service/AwsEc2Service.php:761
error: modules/cloud_service_providers/aws_cloud/src/Service/AwsEc2Service.php: patch does not apply
Checking patch modules/cloud_service_providers/aws_cloud/tests/mock_data/Functional/Ec2/ImageTest.yml...
error: while searching for:
      RootDeviceType: ebs
      RootDeviceName: /dev/sda1
      Name: {{name}}
      KernelId: {{kernel_id}}
      RamdiskId: {{ramdisk_id}}
      ImageType: machine
      product_code: {{product_code}}
      ImageLocation: {{image_location}}
      StateReason:
        Message: {{state_reason_message}}
      Platform: {{platform}}
      Description: '{{description}}'
      Public: true
      CreationDate: '{{creation_date}}'

error: patch failed: modules/cloud_service_providers/aws_cloud/tests/mock_data/Functional/Ec2/ImageTest.yml:10
error: modules/cloud_service_providers/aws_cloud/tests/mock_data/Functional/Ec2/ImageTest.yml: patch does not apply
Checking patch modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/ImageTest.php...
error: while searching for:
      'name' => $this->random->name(8, TRUE),
      'kernel_id' => 'aki-' . $this->random->name(8, TRUE),
      'ramdisk_id' => 'ari-' . $this->random->name(8, TRUE),
      'product_code' => $this->random->name(8, TRUE),
      'image_location' => $this->random->name(16, TRUE),
      'state_reason_message' => $this->random->name(8, TRUE),
      'platform' => $this->random->name(8, TRUE),

error: patch failed: modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/ImageTest.php:40
error: modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/ImageTest.php: patch does not apply
On branch 8.x-1.x
Your branch is up to date with 'origin/8.x-1.x'.

nothing to commit, working tree clean
xiaohua guan’s picture

xiaohua guan’s picture

@yas

The patch file 3015502_20181123.patch is an old one, it should be ignored. I've already hidden it.

So the issue is ok, I set the status to fixed.

xiaohua guan’s picture

Status: Needs work » Fixed
yas’s picture

@xiaohua-guan Uh... I'm sorry that I'm confused. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.