-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[App Service] az staticwebapp functions link
: Add new parameter --environment-name
to support setting the environment name of static site
#23894
Conversation
Thank you for your contribution tobiasdiez! We will review the pull request and get back to you soon. |
Appservice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobiasdiez, did you try running the rewritten command locally? When I try it, fails with the exception TypeError: request() got an unexpected keyword argument 'environment_name'
.
It looks like the SDK function begin_register_user_provided_function_app_with_static_site
doesn't take an environment_name
parameter. You would need to find a different SDK function that takes a parameter for the environment
Thanks for testing it. I have to admit I couldn't figure out how to test the change myself. How does one do it? For the SDK function, the parameter Edit: I overlooked that the function with the |
Fixes #1343. As outlined there, the azure cli currently doesn't provide means to link a specific environment of a static web app to a function app. This is why we use the python sdk directly. Maybe once Azure/azure-cli#23894 is merged and released, we can remove the script and use the cli.
az staticwebapp functions link
: Add environment-name parameteraz staticwebapp functions link
: Add environment-name parameter
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@tobiasdiez Could you please resolve those CI issues? |
@tobiasdiez Could you please resolve the CI issues? |
Oh, I missed that one. Should be fixed now. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
src/azure-cli/azure/cli/command_modules/appservice/static_sites.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but we should commit @zhoxing-ms's suggestion and fix the CI
@tobiasdiez Any update? Please note that since we will launch the release of this sprint the day after tomorrow. If you cannot address all the comments tomorrow, we will have to postpone the release of this PR to the next sprint (02-07) |
…s.py Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Sorry for the late reaction and thanks @zhoxing-ms for the reminder. I've now committed your suggestion, so hopefully it should be ready to go now! |
@StrawnSC Could you please help review this PR again? If there are no other questions here, please help approve it |
az staticwebapp functions link
: Add environment-name parameteraz staticwebapp functions link
: Add new parameter --environment-name
to support setting the environment name of static site
…environment-name` to support setting the environment name of static site (Azure#23894)
Related command
az staticwebapp functions link
Description
Currently,
az staticwebapp functions link
doesn't provide a way to link a certain environment/deployment slot to an existing function app. This functionality is however available through the web interface, and with this PR will be also available through the cli.Testing Guide
Run
az staticwebapp functions link
as you normally would, but with an additional argumentenvironment-name
parameter. Afterwards, the function app should be linked only to that environment.Note: I've not yet managed to test this myself, since I was running the code in codespaces and had troubles with the authentication.
History Notes
[Appservice]
az staticwebapp functions link
: Add environment-name parameterThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.