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

Get-PNPSiteCollectionAppcatalogs slower in 1.11.0 and later #2986

Closed
1 of 6 tasks
Ambergahill opened this issue Apr 6, 2023 · 4 comments
Closed
1 of 6 tasks

Get-PNPSiteCollectionAppcatalogs slower in 1.11.0 and later #2986

Ambergahill opened this issue Apr 6, 2023 · 4 comments
Labels
azure-automation Includes Azure Functions or Azure Runbooks enhancement New feature or request

Comments

@Ambergahill
Copy link

Reporting an Issue or Missing Feature

I recently noticed that calling the Get-PNPSiteCollectionAppcatalogs command used to take a few seconds and now seems to run forever. I tracked it down to it working fine in 1.10.0. In 1.11.0, it errors out. This was the same time you introduced Get-PNPSiteCollectionAppcatalog (singular) and started throwing a warning to stop using Get-PNPSiteCollectionAppcatalogs. I am assuming it is related to this. In 1.12.0, the error with it crashing seems to be fixed, but now it does not run quickly anymore. The results are the same whether you use Get-PNPSiteCollectionAppcatalog or Get-PNPSiteCollectionAppcatalogs

Expected behavior

Get-PNPSiteCollectionAppcatalog should return all sites with an app catalog in a reasonable amount of time.

Actual behavior

Works fine in 1.10.0. Crashes in 1.11.0. Takes forever in 1.12.0 and later. See screenshot
AppCatalogIssue

Steps to reproduce behavior

Load PnP module 1.12.0 or later. Connect to tenant. Run Get-PNPSiteCollectionAppcatalog. Our tenant is very large with 108,457 sites and 4,554 sites have app catalog. Not sure if you will be able to repro this is a small environment.

What is the version of the Cmdlet module you are running?

Works fine in 1.10.0. Crashes in 1.11.0. Takes forever in 1.12.0 and later.

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@Ambergahill Ambergahill added the bug Something isn't working label Apr 6, 2023
@veronicageek veronicageek added enhancement New feature or request azure-automation Includes Azure Functions or Azure Runbooks and removed bug Something isn't working labels Apr 7, 2023
@veronicageek veronicageek changed the title [BUG] Get-PNPSiteCollectionAppcatalogs Broken in 1.11.0 and later Get-PNPSiteCollectionAppcatalogs Broken in 1.11.0 and later Apr 7, 2023
@KoenZomers
Copy link
Collaborator

Thanks for reporting this @Ambergahill . I did some digging into this scenario. I can trace the reason for what you are experiencing back to June 29, 2022, this commit specifically. We had an issue reported to us that this cmdlet would return the old URLs if the URL had been changed. To fix that, what we're doing now, is for every result, we are actively checking one by one if the URL that is passed back is still the actual one or if it has been renamed. This is what makes it slower now, especially if you have a bunch of these site collection app catalogs.

What I could do is add an optional new flag to the cmdlet to bypass this extra validation check which we've added last year. With that though, it would happen again that it returns URLs that have been renamed and no longer exist, but it would be back at the speeds you have experienced before. Would that help you out?

@KoenZomers KoenZomers changed the title Get-PNPSiteCollectionAppcatalogs Broken in 1.11.0 and later Get-PNPSiteCollectionAppcatalogs slower in 1.11.0 and later Apr 14, 2023
@Ambergahill
Copy link
Author

Ambergahill commented Apr 14, 2023 via email

@KoenZomers
Copy link
Collaborator

The option will be added through PR #3025

@gautamdsheth
Copy link
Collaborator

Closing this , the PR is now merged. Will be available in the nightly builds tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-automation Includes Azure Functions or Azure Runbooks enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants