Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

refactor: stop using type nesting in billing extensions #2640

Merged

Conversation

CecileRobertMichon
Copy link
Contributor

Reason for Change:

Addresses breaking change in Azure SDK for Go that causes the struct nesting in vmss extensions to not work properly anymore as the Type field is now both present in VirtualMachineScaleSetExtensionProperties and VirtualMachineScaleSetExtension. See Azure/azure-rest-api-specs#7724 (comment) for more details.

Issue Fixed:

Fixes #2605

Requirements:

Notes:

@jackfrancis
Copy link
Member

Strictly speaking, this doesn't fix anything, right? My interpretation is that this change uses an explicit property de-referencing expression instead of relying upon the struct-embedded child properties being accessible in the parent object. So that if/when (we know that the azure-sdk-for-go actually did remove the struct-embedded property in a future version) the struct-embedded property is no longer accessible on the parent object, our code usage is resilient.

Is that correct?

@CecileRobertMichon
Copy link
Contributor Author

Correct. There's nothing broken at the moment in aks-engine, this is a preventative fix if you will.

@codecov
Copy link

codecov bot commented Jan 28, 2020

Codecov Report

Merging #2640 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2640      +/-   ##
==========================================
- Coverage   71.79%   71.76%   -0.04%     
==========================================
  Files         131      134       +3     
  Lines       24787    25001     +214     
==========================================
+ Hits        17795    17941     +146     
- Misses       5966     6010      +44     
- Partials     1026     1050      +24

@CecileRobertMichon CecileRobertMichon changed the title fix: stop using type nesting in billing extensions refactor: stop using type nesting in billing extensions Jan 28, 2020
@jackfrancis jackfrancis added this to Under Review in backlog Jan 29, 2020
@jackfrancis jackfrancis added this to the v0.47.0 milestone Jan 29, 2020
Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

/lgtm

@acs-bot acs-bot added the lgtm label Jan 30, 2020
@jackfrancis jackfrancis merged commit 00571e8 into Azure:master Jan 30, 2020
backlog automation moved this from Under Review to Done Jan 30, 2020
@acs-bot
Copy link

acs-bot commented Jan 30, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis, xuto2

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,jackfrancis]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
backlog
  
Done
Development

Successfully merging this pull request may close these issues.

The type of VirtualMachineScaleSetExtension is not set correctly
4 participants