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

[vm-repair] Fix public IP resource name; Add option to skip public IP creation #7820

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GISGuy
Copy link

@GISGuy GISGuy commented Jul 23, 2024


  • Fix public IP resource name
    When the extension prompts the user for public IP creation, if the user chooses y, it currently creates a public IP with the name False.
    image

After the fix, it will create the public IP resource using the default naming convention.
image

  • Add option --no to skip public IP creation
    When the user adds --no to the command parameter, the extension will skip prompting the user for the public IP creation and bypass the creation process.

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copy link

azure-client-tools-bot-prd bot commented Jul 23, 2024

⚠️Azure CLI Extensions Breaking Change Test
⚠️vm-repair
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vm repair create cmd vm repair create added parameter no

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 23, 2024

vm-repair

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jul 23, 2024
Copy link
Contributor

Thank you for your contribution GISGuy! We will review the pull request and get back to you soon.

@GISGuy
Copy link
Author

GISGuy commented Jul 23, 2024

@microsoft-github-policy-service agree company="Microsoft"

Copy link

⚠️ Release Suggestions

Module: vm-repair

  • ⚠️ Please update VERSION to be 1.1.0 in src/vm-repair/setup.py

Notes

  • Stable/preview tag is inherited from last release. If needed, please add stable/preview label to modify it.
  • Major/minor/patch/pre increment of version number is calculated by pull request code changes automatically. If needed, please add major/minor/patch/pre label to adjust it.
  • For more info about extension versioning, please refer to Extension version schema

@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 23, 2024
@@ -33,6 +33,7 @@ def load_arguments(self, _):
c.argument('associate_public_ip', help='Option to create repair vm with public ip')
c.argument('distro', help='Option to create repair vm from a specific linux distro (rhel7|rhel8|suse12|ubuntu20|centos7|oracle7)')
c.argument('yes', help='Option to skip prompt for associating public ip and confirm yes to it in no Tty mode')
c.argument('no', help='Option to skip prompt for associating public ip and confirm no to it in no Tty mode')
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of yes and no as separate options. Is it good to add one command as public ip address yes or no?

Copy link
Contributor

Choose a reason for hiding this comment

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

I dont know if we have to maintain the backward compatibility of passing yes.

Copy link
Author

Choose a reason for hiding this comment

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

I personally don't like the parameter name --yes or --no, and I agree with you that using a new parameter like createPublicIp makes more sense. However, for the sake of backward compatibility, I think it's better to use --no in this situation.

Choose a reason for hiding this comment

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

+1. We cannot break backward compat. I also don't like --yes, --no. Another option could be to introduce a new param and have it enable yes and no. That way, users can use the new param to specify yes/no and the old value van remain with yes support only. We can update documentation to remove --yes over time.

@@ -33,6 +33,7 @@ def load_arguments(self, _):
c.argument('associate_public_ip', help='Option to create repair vm with public ip')
c.argument('distro', help='Option to create repair vm from a specific linux distro (rhel7|rhel8|suse12|ubuntu20|centos7|oracle7)')
c.argument('yes', help='Option to skip prompt for associating public ip and confirm yes to it in no Tty mode')
c.argument('no', help='Option to skip prompt for associating public ip and confirm no to it in no Tty mode')

Choose a reason for hiding this comment

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

+1. We cannot break backward compat. I also don't like --yes, --no. Another option could be to introduce a new param and have it enable yes and no. That way, users can use the new param to specify yes/no and the old value van remain with yes support only. We can update documentation to remove --yes over time.

@@ -1,6 +1,11 @@

Release History
===============
1.0.8
++++++
Add option `--no` to skip public IP creation during `az vm repair create` command.

Choose a reason for hiding this comment

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

This feature is not in the critical path as we don't have many asks for it. So, we could wait this out till after the CrowdStrike usage dips.

Copy link
Author

Choose a reason for hiding this comment

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

CrowdStrick fix script is pretty stable as of now. Do you think we should merge this change now?

@AllyW AllyW added Docs and removed Docs labels Jul 23, 2024
@GISGuy
Copy link
Author

GISGuy commented Jul 31, 2024

@GISGuy GISGuy closed this Jul 31, 2024
@GISGuy GISGuy reopened this Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants