Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 25.9 KB

breaking-changes.md

File metadata and controls

20 lines (15 loc) · 25.9 KB

Breaking Changes since 9/24/2017

  • Additional Q&A about breaking changes can be found here
  • To ask a question about breaking changes use this

5.0.302.958

1711235[EV2] Add configurable bake time


The Content Unbundler EV2 template files that are shipped are now formatted to accept customized monitor durations (the time to wait between each stage of a deployment, also known as bake time).  
To accommodate this, the files have been renamed from:
Blackforest.RolloutParameters.PT6H.json
to:
Blackforest.RolloutParameters.{MonitorDuration}.json

You can specify the monitor duration by updating your ServiceGroupRootReplacements.json file to include a new array called "MonitorDuration".  EG:

"Test": {
    "AzureSubscriptionId": "0531c8c8-df32-4254-a717-b6e983273e5f",
    "TargetContainerName": "hostingservicedf",
    "ContactEmail": "[email protected]",
    "PortalExtensionName": "Microsoft_Azure_Resources",
    "FriendlyNames": [
      "friendlyname1"
    ],
    "MonitorDuration": [
        "PT1H",
        "PT30M"
    ]

If no monitor durations are specified then the content unbundler ev2 generation will default to 6 hours (PT6H) and 1 day (P1D)

5.0.302.951

1711235[EV2] Add configurable bake time


The Content Unbundler EV2 template files that are shipped are now formatted to accept customized monitor durations (the time to wait between each stage of a deployment, also known as bake time).  
To accommodate this, the files have been renamed from:
Blackforest.RolloutParameters.PT6H.json
to:
Blackforest.RolloutParameters.{MonitorDuration}.json

You can specify the monitor duration by updating your ServiceGroupRootReplacements.json file to include a new array called "MonitorDuration".  EG:

"Test": {
    "AzureSubscriptionId": "0531c8c8-df32-4254-a717-b6e983273e5f",
    "TargetContainerName": "hostingservicedf",
    "ContactEmail": "[email protected]",
    "PortalExtensionName": "Microsoft_Azure_Resources",
    "FriendlyNames": [
      "friendlyname1"
    ],
    "MonitorDuration": [
        "PT1H",
        "PT30M"
    ]

If no monitor durations are specified then the content unbundler ev2 generation will default to 6 hours (PT6H) and 1 day (P1D)

5.0.302.915

8393815[Perf] Implement way to prevent us & extension authors to use CSS selectors ending with tags


A new PDL warning has been added to warn developers when they are using CSS selectors ending with generic HTML tags.

PDL0313
The following StyleSheet contains at least a selector that ends with a common HTML tag, which causes a major style recalculation when inserted in the DOM (browsers evaluate CSS selectors from right to left).  Please replace all generic tags by classes. StyleSheet to blame : '{0}'.

This has been added because of performance reasons; we've noticed some extensions had "Recalculate Styles" events during their loading process caused by such CSS selectors, which can spike the CPU for hundreds of milliseconds.

The fix to get rid of this warning is to replace all instances of generic HTML tags by classes and apply such classes to the targeted elements in your templates; for example :

\HubsExtension\Deployments\Templates\TemplateViewer.html
 -         <a href="#" data-bind="text: templateTab.title, css: templateTab.css, click: templateClick"></a>
 -         <a href="#" data-bind="text: parametersTab.title, css: parametersTab.css, click: parametersClick"></a>
 +         <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: templateTab.title, css: templateTab.css, click: templateClick"></a>
 +         <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: parametersTab.title, css: parametersTab.css, click: parametersClick"></a>
           <!-- ko if: showLanguageOptions() -->
 -             <a href="#" data-bind="text: cliTab.title, css: cliTab.css, click: cliClick"></a>
 -             <a href="#" data-bind="text: cli2Tab.title, css: cli2Tab.css, click: cli2Click"></a>
 -             <a href="#" data-bind="text: powershellTab.title, css: powershellTab.css, click: powershellClick"></a>
 -             <a href="#" data-bind="text: dotNetTab.title, css: dotNetTab.css, click: dotNetClick"></a>
 -             <a href="#" data-bind="text: rubyTab.title, css: rubyTab.css, click: rubyClick"></a>
 +             <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: cliTab.title, css: cliTab.css, click: cliClick"></a>
 +             <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: cli2Tab.title, css: cli2Tab.css, click: cli2Click"></a>
 +             <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: powershellTab.title, css: powershellTab.css, click: powershellClick"></a>
 +             <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: dotNetTab.title, css: dotNetTab.css, click: dotNetClick"></a>
 +             <a class="ext-hubs-tabssection-tab" href="#" data-bind="text: rubyTab.title, css: rubyTab.css, click: rubyClick"></a>

\HubsExtension\Deployments\TemplateViewer.css
 - .ext-hubs-tabssection a {
 + .ext-hubs-tabssection-tab {
       padding: 4px 10px 8px; 
       text-decoration: none; 
       display: inline-block;

1667478[Hosting Service] Add support for creating removeFriendlyName templates in ContentUnbundler

The Content Unbundler/Express V2 Deployment Template Generator has been updated to support generating templates to remove friendly names from Hosting Service deployments.  
In order to support this feature, the friendlyname template file names were renamed to specify the action they were performing (SetFriendlyName vs RemoveFriendlyName).  

EG:
Old friendlyname template file name:
Test.RolloutSpec.friendlyname1.json

New friendlyname template file name(s):
Test.RolloutSpec.RemoveFriendlyName.friendlyname1.json
Test.RolloutSpec.SetFriendlyName.friendlyname1.json

1652963Remove Fx/Internal modules

The portal modules under "Fx/Internal" have been removed. These modules are internal details of the portal that extensions should not use.  Extensions using these internal modules will no longer compile.

1633894Upgrade PortalFx.TypeScript package to exclude ambient length property from .d.ts and avoid scoping issues when converting from var to let/const


With JavaScript in a browser, properties of the Window object are ambiently available in the global context. One such property is length, a common variable name used in many other contexts. This behavior can introduce bugs when converting from var to let/const.


In the following example code, the scope of the length variable used by the for loop is hoisted by JavaScript so it is visible to the entire function:


for (var i = 0, length = something ; i < length ; i++) {

    ...

}

doSomethingWith(length);


Converting that code from var to let changes the scope of the length variable to just the for loop, meaning the subsequent use of length references Window.length instead (which will have the value 0 in extension IFRAMEs):


for (let i = 0 ; length = something ; i < length ; i++) {

    ...

}

doSomethingWith(length);


To avoid bugs like this, we have removed the ambient definition of length from TypeScript's definition files in order to generate a compile error in the code above. To fix the new error when converting code, change the scope of the length variable as follows:


const length = something;

for (let i = 0 ; i < length ; i++) {

    ...

}

doSomethingWith(length);


1579900[Uservoice] Set multiple ranges for DateTime picker

i.e.) dateTimePickerViewModel.enabledDateTimeRange()   gets a compile error.

Now the "enabledDateTimeRange" can be both KnockoutObservable<MsPortalFx.DateUtil.DateTimeRange> and KnockoutObservableArray<MsPortalFx.DateUtil.DateTimeRange>.

To resolve the compile error for exising code, explicitly cast the type of the "enabledDateTimeRange()".

i.e.) (<MsPortalFx.DateUtil.DateTimeRange>dateTimePickerViewModel.enabledDateTimeRange())

1577034[Essentials] Essentials' Promises should be typed as Q.Promise instead of FxBase.PromiseV

If you encounter compile errors using the Promise returned from 'foobar', be aware that the Promise type returned from 'foobar' has been changed to the Q Promise type.  When you see these compile errors, update your extension code to use this returned Promise according to the Q Promise APIs
all FxBase.PromiseV / Promise types are changed to  Q.Promise

1503823Portal/Shell Move the KnockoutComputed without lifetimeManger to unsafeAPI

  • ko.utils.twoWayBinding
    • now change to following signature.  require first argument as lifetimeManager to make sure it is lifetimeManager's responsibility to dispose().  It also provide consistent API guideline.
    • twoWayBinding<T>(lifetime: MsPortalFx.Base.LifetimeManager, source: KnockoutObservableBase<T>, destination: KnockoutObservableBase<T>): MsPortalFx.Base.DisposableLifetimeManager;
  • MsPortalFx.Services.DataSetAssetExpansionMapper.connectDataSet
    • now change to following signature.  require first argument as lifetimeManager to make sure it is lifetimeManager's responsibility to dispose().  It also provide consistent API guideline.
    • function connectDataSet<T>(lifetimeManager: MsPortalFx.Base.LifetimeManager, dataSet: KnockoutObservableArray<T>, results: KnockoutObservableArray<any>, mapFunc: (value: T, context?: any) => AssetDetails, context?: any): MsPortalFx.Base.DisposableLifetimeManager;

  • MsPortalFx.Services.DataSetSubscription.subscribeDataSet

    • now change to following signature.  require first argument as lifetimeManager to make sure it is lifetimeManager's responsibility to dispose().  It also provide consistent API guideline.
    • subscribeDataSet<T>(lifetimeManager: MsPortalFx.Base.LifetimeManager, sourceDataSet: KnockoutObservableArray<T>, insertFunc?: (value: T, index: number, context?: any) => void, removeFunc?: (value: T, index: number, context?: any) => void, context?: any): MsPortalFx.Base.DisposableLifetimeManager;

  • All Fields or Form ViewModel's following properties change from MsPortalFx.Base.Promise to Q.Promise to have consistent A+ Promise standard.

    • clearValidation(): Q.Promise<any>

    • triggerValidation(): Q.Promise<boolean>

      • must check value to be true to be valid.  Only after Promise resolved, ViewModel.valid() will reflect the value afterword.

  • All Validation's constructor's validate argument and validate property change return type from change from MsPortalFx.Base.Promise to Q.Promise to have consistent A+ Promise standard and scheduler.
    • validate: (value: TValue) => Q.Promise<ValidationResult>;
  • All MsPortalFx.Base.LifetimeManager & it's method createChildManager will provide following:
    • If ?trace=lifetime is added, it will capture _createCallstack & _disposeCallstack.
    • if any dispose() method throw, capture all the exception
      • If devMode is on, throw immediately.
      • If in production, it will allow the dispose to succeed, and log a UnhandleRejection to ClientEvents and ExtEvents
        • This is to address the issue when common nullref during all registeredForDispose() had been silently swallowed in MPAC/PROD.

5.0.302.901

8904521[Editor] suggestions and error pop ups are not visible for large typescript files in the editor

 
The enum value for "Jade" has been changed to "Pub" under MsPortalFx.ViewModels.Controls.Documents.Editor.ContentType. Additionally, the enum has now been changed from a regular enum to a const enum in order to reduce the JavaScript file size.
 

1526900Move Fx/Controls/Toolbar/MoveResourceToolbarButton to approved module path Fx/Controls/Toolbar.MoveResourceButton

The MoveResourceToolbarButton module has been moved.
Update any imports of "Fx/Controls/Toolbar/MoveResourceToolbarButton" to be "Fx/Controls/Toolbar.MoveResourceButton"

1526899Move Fx/Base/Base.Net.Batch.ts to approved module path Fx/Net.Batch.ts

The Base.Net.Batch module has been moved.
Update any imports of "Fx/Base/Base.Net.Batch" to be "Fx/Net.Batch"

1512165[SDK] Add build check so that extensions get an error when the framework dll is included in extension

A build error has been added when extensions directly reference to Microsoft.Portal.Framework.Client.dll.  This assembly should not be referenced directly by extensions and should be removed.  The TypeScript Definitions for Microsoft.Portal.Framework.Client.dll are shipped in the Microsoft.Portal.Tools NuGet package. and exist under /Client/Definition/Fx.d.ts.


If you have a scenario where you need Microsoft.Portal.Framework.Client.dll please let us know.


Microsoft.Portal.Tools.targets target named CheckTypeScriptToolsVersion has been renamed to ExtensionConfigHealthChecks. if you have and explicit override this then you will need to also change the name.

10234363Specify TypeConverter for AppRelativePath

A TypeConverter has been added to the AppRelativePath type. This changes will the way objects of that type are serialized and deserialized.

10233552ICM 46833682: [parseResourceDescriptor] API caches results - so if result is modified it results in


For the following ResourceTypesService helper methods. The return object now are all have readonly properties.
parseSubscriptionDescriptor
parseResourceGroupDescriptorHelper
parseResourceDescriptor
parseResourceManagerDescriptor
parseDeploymentDescriptor
parseTagDescriptor

Background: Performance background: In many blade open,  paresResourceDescriptor is been call about 3-6x time per resource ID.  For example, this parser been executed  4500 times when open a VM on a customer with 400 virtual machine. 
To improve the performance, we will start to cache the parse result.   and return the cache object.  Less than 0.1% of all code will change the return object. 
But ICM 46833682 indicate that that .1% does change the now cached parse result (thus incorrect).
To fix this, we change the interface to be read only to ensure compiler error occurs when the situation happen.
The remedy is easy, for that .1 % of code can use simply do a MsPortalFx.clone -- Build break will help the extension team to catch the situation.
For 4 month (start from 9/9/2017), Framework will continue to clone the object. At end of 4 month support, we should be able to remove the clone code to gain the performance back.

10227953_addProperty method of the Properties Part ViewModel is inefficient

Extensions using the _addProperty method of the Properties Part ViewModel must switch to setProperties method.