Skip to content
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

Conversation

radiantspace
Copy link
Member

  • Implement usage of the latest App Center Distribution API (destinations)

@@ -13,7 +13,7 @@
"version": {
"Major": 0,
"Minor": 131,
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link

@izikl izikl Apr 13, 2018

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.

Copy link
Contributor

@hashtagchris hashtagchris left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Contributor

@madhurig madhurig left a 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.

@@ -12,7 +12,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 131,
"Minor": 134,
Copy link
Contributor

@dennispan dennispan Apr 13, 2018

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?

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Member Author

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.",
Copy link

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?

Copy link

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.

Copy link
Contributor

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

Copy link
Member Author

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.

@dennispan
Copy link
Contributor

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",
Copy link
Contributor

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.

Copy link
Member Author

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
},
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

@madhurig
Copy link
Contributor

Looks good, left couple of small comments.

"Patch": 0
},
"releaseNotes": "Take an advantage of the new Distribution API to add the support for distribution to stores.",
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, thanks!

Copy link

@sergey-akhalkov sergey-akhalkov left a 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",
Copy link
Contributor

@hashtagchris hashtagchris Apr 16, 2018

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.

Copy link
Contributor

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

@hashtagchris hashtagchris merged commit 36a3037 into microsoft:master Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants