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

[AppServices] RestoreAzureWebAppSnapshot fetch the data from Microsoft.Web RP similar to other commands #26685

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

Conversation

vkarasala
Copy link

@vkarasala vkarasala commented Nov 14, 2024

[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

image
image

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change 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

Copy link

azure-client-tools-bot-prd bot commented Nov 14, 2024

️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.Websites
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️File Change Check
⚠️PowerShell Core - Windows
Type Cmdlet Description Remediation
⚠️ It is required to update ChangeLog.md if you want to release a new version for Az.Websites. Add a changelog record under Upcoming Release section with past tense.
⚠️Windows PowerShell - Windows
Type Cmdlet Description Remediation
⚠️ It is required to update ChangeLog.md if you want to release a new version for Az.Websites. Add a changelog record under Upcoming Release section with past tense.
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️PowerShell Core - Linux
️✔️PowerShell Core - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

@VeryEarly VeryEarly self-assigned this Nov 15, 2024
@VeryEarly
Copy link
Contributor

please update changelog: https://github.com/vkarasala/azure-powershell/blob/user/vkarasala/restore-snapshot-to-user-web-rp/src/Websites/Websites/ChangeLog.md

@VeryEarly
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@vkarasala
Copy link
Author

@jsharmaMSFT
Copy link
Member

LGTM. No mocks/tests to add here?

@vkarasala
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants