Azure / Azure-Proactive-Resiliency-Library-v2

Azure Proactive Resiliency Library v2 (APRL) - Source for Azure WAF reliability guidance and associated ARG queries
https://azure.github.io/Azure-Proactive-Resiliency-Library-v2/
MIT License
69 stars 82 forks source link

đź’ˇ Feature Request - Option/switch to bypass "resetting" APRL folder and git clone in 1_wara_collector.ps1 #111

Open ehaslett opened 6 months ago

ehaslett commented 6 months ago

Describe the solution you'd like

For customers that manually download the APRL repro because of firewall restrictions, an option to bypass the automatic git clone process in the LocalFiles function, so that it does not forcefully and recursively remove items in the clone path.

From customer feedback:

Include a switch parameter that allows bypass the “git” checks. Specifically in the LocalFiles function. The problem with the way it runs right now when you run the script if you have manually grabbed the required files/folders from git the script while running the checks in the LocalFiles function detects that the files/folder exists locally and it then says “resetting” it. It will try to use git to clone the repo from the git server. The problem is that the act of trying to clone from the server, even if its unable to reach the server, still clears , deletes the files you’ve copied manually.

In our environment we cannot directly clone from the git server (unless we’ve done all the magic to allow git client to go through the firewalls). So while playing with the script the localfiles check would end up killing the required files that the script uses for its checks so it fails to generate anything.

Describe alternatives you've considered

Customer implemented a work around by commenting out the code referened above in the LocalFiles function:

        #Get-Item -Path $Global:clonePath | Remove-Item -Recurse -Force
        #git clone $repoUrl $clonePath --quiet
      }
    else
      {
        #git clone $repoUrl $clonePath --quiet

Additional context

image

ehaslett commented 3 months ago

As a lot has changed since this request, is this still a valid request?