Skip to content

docs(samples): Changing machine type sample #9042

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 15 commits into from
Feb 4, 2023
Merged

Conversation

m-strzelczyk
Copy link
Contributor

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: compute Issues related to the Compute Engine API. labels Jan 24, 2023
@m-strzelczyk m-strzelczyk marked this pull request as ready for review January 26, 2023 16:20
@m-strzelczyk m-strzelczyk requested review from a team as code owners January 26, 2023 16:20
@snippet-bot
Copy link

snippet-bot bot commented Jan 26, 2023

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment



# <INGREDIENT change_machine_type>
def change_machine_type(project_id: str, zone: str, instance_name: str, new_machine_type: str) -> NoReturn:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not just None? Is NoReturn 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.

You are right, I'm using NoReturn here incorrectly now that I checked the documentation. I'll fix this.


wait_for_extended_operation(operation, "changing machine type")

return
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the return necessary? (the code will work identical without the return)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not necessary, it's my personal preference to put it there, like a period at the end of a sentence :D I'll remove it.

@kweinmeister kweinmeister added the automerge Merge the pull request once unit tests and other checks pass. label Feb 4, 2023
@kweinmeister kweinmeister merged commit fc54b2f into main Feb 4, 2023
@kweinmeister kweinmeister deleted the compute-machine-type branch February 4, 2023 01:00
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 4, 2023
telpirion pushed a commit that referenced this pull request Mar 13, 2023
* docs(samples): Changing machine type sample

* Applying suggestions

* Wording fix

* Update compute/client_library/ingredients/instances/change_machine_type.py

Co-authored-by: Dan Lee <[email protected]>

* Applying suggestions

---------

Co-authored-by: Karl Weinmeister <[email protected]>
Co-authored-by: Dan Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants