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

Users/lukillgo/googleapi v3 #134

Merged
merged 18 commits into from Aug 6, 2019
Merged

Users/lukillgo/googleapi v3 #134

merged 18 commits into from Aug 6, 2019

Conversation

lkillgore
Copy link
Contributor

@lkillgore lkillgore commented Aug 2, 2019

Bumped the version for Google Play Promote and Google Play Release to accommodate the change in V3 of the API. Each 'track' now can have its own percentage of users. Release does the initial upload.
Promote moves from track-to-track. Rollout changes the percentage within a track.

image

image

I added tests to this project, bumped the versions of packages to reduce vulnerabilities, and tried to pull out common code into a submodule.

Fixes #129.

Lucas Killgore added 10 commits July 17, 2019 14:26
Coverted all tasks to use V3
Updated vsts-task-lib to azure-pipelines-task-lib
Added tests to rollout update task
(which fixed runtime errors on the agent,
the version of Node isn't properly supported)

Updated Task UI to have rollout checkbox

Minor improvements
@@ -0,0 +1,227 @@
// common code shared by all tasks
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is duplicated 3x. There may be a way to share the code across tasks if I demand a higher version of Node. I may look into that as a future change.

Copy link
Member

@pjquirk pjquirk Aug 2, 2019

Choose a reason for hiding this comment

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

I don't understand why you can't share the code due to the node version, can you summarize? Can you pull just the interface types out into a .d.ts file in a common location?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The pattern we use for sharing common code is to create a 'common package'. See this for some examples. When I refactored to use with that pattern, one of the modules I included required that I upgrade the version of TypeScript that's used (why? I don't really know), which cascaded into a couple of errors that showed up only during runtime, which I eventually traced to this issue. (That's over-simplifying things as there were a half-dozen other errors to work through to get to that one.) For whatever reason, using googleapis with a common library requires bumping the version of TypeScript that gets used, which requires many of the dependencies to bump their versions, which leads to a series of runtime errors.

To answer your question, there's likely a way to use another pattern and share code, but exactly what that way should be is not really clear to me. After much time spent trying to get it to work the 'right' way, I downshifted to code duplication. It was already duplicated across all the tasks anyway, so this isn't 'worse' than before.

The existing build scripts don't seem to me to allow a common build folder to be included, but if you have a suggestion on how to do it, I'd be happy to hear it.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha (mostly). I'll take your word for it, and I agree, no worse than where it was at before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

'mostly' ... pretty much me too. :)

Copy link
Member

Choose a reason for hiding this comment

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

I'd argue that this is better than a "common" folder. We've had a lot of issues with that in the other tasks repo as it makes it harder to update individual tasks that all rely on the same common files (since a common folder has no versioning)

"googleapis": "^2.1.5",
"vsts-task-lib": "2.1.0"
"azure-pipelines-task-lib": "2.8.0",
"gaxios": "1.8.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gaxios include fixes the build issues I was having when this task ran on Node 6.10.x

@@ -14,7 +14,7 @@
],
"version": {
"Major": "1",
Copy link
Member

Choose a reason for hiding this comment

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

The other tasks had a major bump, is this okay to just have a minor bump?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this one was already using V3 of the google APIs (a issue from last year), so the UI didn't need to change. So, a minor version is all that's necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, I released that there is a gap in functionality that required me to update this afterall. We need a way to increase the rollout fraction in any track, so I added 'track' and bumped the version here.

Copy link
Member

@pjquirk pjquirk left a comment

Choose a reason for hiding this comment

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

I don't know a ton about Google Play, but the changes look reasonable.

Lucas Killgore added 3 commits August 2, 2019 11:18
Added a few more L0's
Have all the tasks send any existing release notes
Tasks/google-play-release/GooglePlay.ts Show resolved Hide resolved
Tasks/google-play-promote/google-play-promote.ts Outdated Show resolved Hide resolved
Tasks/google-play-release/GooglePlay.ts Show resolved Hide resolved
Tasks/google-play-release/GooglePlay.ts Show resolved Hide resolved
Lucas Killgore added 2 commits August 5, 2019 13:42
Don't call updateGlobalParams as a side effect
Copy link
Contributor

@davidstaheli davidstaheli 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!

Tasks/google-play-promote/task.json Show resolved Hide resolved
Tasks/google-play-release/task.json Show resolved Hide resolved
Tasks/google-play-rollout-update/task.json Show resolved Hide resolved
@lkillgore lkillgore merged commit b24fdb4 into master Aug 6, 2019
@lkillgore lkillgore deleted the users/lukillgo/googleapi_v3 branch August 7, 2019 21:52
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.

Google Play APIs v1 and v2 are about to be retired
6 participants