Skip to content

docs(samples): Changing machine type sample#9042

Merged
kweinmeister merged 15 commits into
mainfrom
compute-machine-type
Feb 4, 2023
Merged

docs(samples): Changing machine type sample#9042
kweinmeister merged 15 commits into
mainfrom
compute-machine-type

Conversation

@m-strzelczyk
Copy link
Copy Markdown
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
Copy Markdown

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

Comment thread compute/client_library/ingredients/instances/change_machine_type.py Outdated
Comment thread compute/client_library/ingredients/instances/change_machine_type.py Outdated
Comment thread compute/client_library/ingredients/instances/change_machine_type.py Outdated
Comment thread compute/client_library/ingredients/instances/change_machine_type.py Outdated


# <INGREDIENT change_machine_type>
def change_machine_type(project_id: str, zone: str, instance_name: str, new_machine_type: str) -> NoReturn:
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread compute/client_library/ingredients/instances/change_machine_type.py
Comment thread compute/client_library/ingredients/instances/change_machine_type.py Outdated

wait_for_extended_operation(operation, "changing machine type")

return
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread compute/client_library/snippets/instances/change_machine_type.py
Comment thread compute/client_library/snippets/instances/change_machine_type.py Outdated
Comment thread compute/client_library/snippets/instances/change_machine_type.py
Comment thread compute/client_library/snippets/instances/change_machine_type.py Outdated
@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 <71398022+dandhlee@users.noreply.github.com>

* Applying suggestions

---------

Co-authored-by: Karl Weinmeister <11586922+kweinmeister@users.noreply.github.com>
Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>
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