-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to latest App Center Distribution API #6987
Update to latest App Center Distribution API #6987
Conversation
radiantspace
commented
Apr 13, 2018
- Implement usage of the latest App Center Distribution API (destinations)
Tasks/AppCenterDistribute/task.json
Outdated
@@ -13,7 +13,7 @@ | |||
"version": { | |||
"Major": 0, | |||
"Minor": 131, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if this isn't delivering a new feature, I would probably bump Minor to 134 (the current VSTS sprint), or 133 if you're going to port to the release branch, instead of bumping patch. That gives a rough indication of when the task was last modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, bumped the version.
"release_notes": releaseNotes, | ||
"destinations": [ | ||
{ | ||
"id": distributionGroupId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the request have to indicate what version of the API it's calling in some way? Or does the server handle both old and new style requests?
Or is the current version of the task broken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasonable question - both APIs are currently available - http://openapi.appcenter.ms/#/distribute/releases_update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version is in the in the URL /0.1/...
however, we are working on moving the entire team to v1.0. In the meanwhile we will keep support both options but we will remove the old properties from the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look fine, hope you have verified with current version of task when distribution_group is set and not set.
Tasks/AppCenterDistribute/task.json
Outdated
@@ -12,7 +12,7 @@ | |||
"author": "Microsoft Corporation", | |||
"version": { | |||
"Major": 0, | |||
"Minor": 131, | |||
"Minor": 134, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to rename distributionGroupId
to destinationId
. Will this be good enough to avoid breaking current customers? Do we need to bump the major version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dennispan will figure that out with @madhurig and @hashtagchris. Changed the label so we can keep the current users safe and reflect it works both for groups and stores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming input names is a breaking change and will need a major version increment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to rename it just for yaml without a breaking change, you can add "aliases": [ "destinationId" ]
to task.json, allowing people to use either input name in yaml (and the API?). Build definitions saved in the designer will still use distributionGroupId
though.
If you want to fully change the name, a breaking change is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked to Garrett (Distribution PM). Let's make the change and bump the major version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, @dennispan
"loc.input.label.distributionGroupId": "Distribution group ID", | ||
"loc.input.help.distributionGroupId": "ID of the distribution group the app will deploy to. Leave it empty to use the default group.", | ||
"loc.input.label.distributionGroupId": "Destination ID", | ||
"loc.input.help.distributionGroupId": "ID of the distribution group or store the app will deploy to. Leave it empty to use the default group.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it easy to change this loc.input.help.distributionGroupId
and loc.input.label.distributionGroupId
to loc.input.help.destinationId
and loc.input.label.distributionGroupId
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah, just saw the discussion below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nevalenny I agree with @izikl that we should update the label names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it's updated automatically on a building, changed as part of the property rename.
Looks good to me. @madhurig @hashtagchris @izikl do you want to take another look? |
@@ -26,8 +26,8 @@ | |||
"loc.input.help.releaseNotesInput": "Notas de esta versión.", | |||
"loc.input.label.releaseNotesFile": "Release notes file", | |||
"loc.input.help.releaseNotesFile": "Seleccione un archivo de texto con codificación UTF-8 que contenga las notas de esta versión.", | |||
"loc.input.label.distributionGroupId": "Distribution group ID", | |||
"loc.input.help.distributionGroupId": "ID of the distribution group the app will deploy to. Leave it empty to use the default group.", | |||
"loc.input.label.destinationId": "Destination ID", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you manually change all the resources.resjson? That is not required, only commit the one generated resources file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will revert those, thanks for the review!
"Major": 0, | ||
"Minor": 131, | ||
"Major": 1, | ||
"Minor": 134, | ||
"Patch": 0 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "relaseNotes" to indicate to the user whats new or different in 1.* from 0.*. E.g. https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/Maven/task.json#L22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Looks good, left couple of small comments. |
Tasks/AppCenterDistribute/task.json
Outdated
"Patch": 0 | ||
}, | ||
"releaseNotes": "Take an advantage of the new Distribution API to add the support for distribution to stores.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say something simpler like Add support for distribution to stores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@@ -143,11 +144,14 @@ | |||
"visibleRule": "releaseNotesSelection = file" | |||
}, | |||
{ | |||
"name": "distributionGroupId", | |||
"name": "destinationId", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting - you made the old name an alias of the new name. Usually we did the reverse (without bumping the major version). There's a chance this isn't a breaking change. Do you want to test first*, or just proceed with the bump of the major version?
*Use v0 in the designer, specify a value for distributionGroupId, save the BD, switch to v1, see if your value is still there, save the BD and queue a build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just proceed with the major version bump