Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: use enums instead of str for task creation #4664

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

Merged
merged 4 commits into from
Sep 10, 2020

Conversation

busunkim96
Copy link
Contributor

@busunkim96 busunkim96 requested a review from a team as a code owner September 10, 2020 18:25
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 10, 2020
Copy link
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

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

LGTM, but concerned about ongoing failures due to library issues upstream.

Copy link
Contributor

@averikitsch averikitsch left a comment

Choose a reason for hiding this comment

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

Still concerned about this breaking customer code and users not wanting this extra overhead.

@busunkim96
Copy link
Contributor Author

Sorry folks, I should have left more of an explanation in the PR body.

All the Python libraries are taking major version bumps as they move onto the new generator. Important changes are described in the migration guide at the root of the repo. https://github.com/googleapis/python-tasks/blob/master/UPGRADING.md This was a 1.x.x -> 2.0.0 change, so I think it's unlikely for folks to upgrade on accident.

The sample changes needed for the tasks samples left in this repository were made as additional commits to #4622.

We discovered that proto-plus (used by all the microgen libraries) wasn't able to convert enum strings into library enum types ( the library raises errors instead about enums having to be int or long). There is a more detailed description in googleapis/proto-plus-python#52.

We released a fix for that issue but had to revert it because it caused regressions elsewhere (which is when these samples started feeling). googleapis/proto-plus-python#118 is the PR that should resolve the stringy enum issue for good. At that point it will be fine to pass a string like 'POST' or use the library provided enum type: tasks.Http.method.POST.

@busunkim96 busunkim96 added the automerge Merge the pull request once unit tests and other checks pass. label Sep 10, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit 41a97a1 into master Sep 10, 2020
@gcf-merge-on-green gcf-merge-on-green bot deleted the fix-appengine-tasks branch September 10, 2020 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

appengine.flexible.tasks.snippets_test: test_delete_task failed
4 participants