Open vkarasala opened 1 week ago
/azp run
please update changelog: https://github.com/vkarasala/azure-powershell/blob/user/vkarasala/restore-snapshot-to-user-web-rp/src/Websites/Websites/ChangeLog.md
Updated.
LGTM. No mocks/tests to add here?
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.
/azp run
[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.)
[x] Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:SHOULD update
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.SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
SHOULD have proper test coverage for changes in pull request.
SHOULD NOT adjust version of module manually in pull request