-
Notifications
You must be signed in to change notification settings - Fork 3.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
[AppServices] RestoreAzureWebAppSnapshot fetch the data from Microsoft.Web RP similar to other commands #26685
[AppServices] RestoreAzureWebAppSnapshot fetch the data from Microsoft.Web RP similar to other commands #26685
Conversation
…t.Web RP similar to other commands
️✔️Az.Accounts
️✔️Az.Network
️✔️Az.Websites
|
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Updated. |
LGTM. No mocks/tests to add here? |
There are none defined, also it is understandable as the Snapshots are only available after an hour, tests are hard to define for such. |
src/Websites/Websites/ChangeLog.md
Outdated
@@ -21,6 +21,7 @@ | |||
|
|||
## Version 3.2.2 | |||
* Fix bug where parameters could not be set to false for `Publish-AzWebApp` | |||
* Fix the source app retrival from Microsoft.Web RP instead of ARM cache for `RestoreAzureWebAppSnapshot` |
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.
please move this line under line 20
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
[AppServices] RestoreAzureWebAppSnapshot fetch the data from Microsoft.Web RP similar to other commands
Description
Currently to fetch the source web app information we rely on Azure Resources API(https://learn.microsoft.com/en-us/rest/api/resources/resources/list?view=rest-resources-2021-04-01).
The problem with above API is that the response is paginated, and filter is applied at backend on the paginated block. So, for example, if customer has 1000 sites, in first batch ARM fetches 100 from RP and applies the filter provided. If no results found, an empty collection is returned with nextLink to further query. If the customers have 1000's of resources, we end up making a lot of calls and get no data. The changes are to simplify that process.
For background, we changed to use ARM cache 5 years ago. This is because during an outage our RP is not functional, but ARM cache can help with required data for restore.
So, the changes still retain such handling but improve by calling to WEB RP to get the required data if it functional. Fallback will be made to ARM cache if WebRP is not functional.
Tested locally
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.