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

[enhancement]: Consider caching .azure-devops cache folder #19007

Closed
jessehouwing opened this issue Sep 21, 2023 · 1 comment
Closed

[enhancement]: Consider caching .azure-devops cache folder #19007

jessehouwing opened this issue Sep 21, 2023 · 1 comment

Comments

@jessehouwing
Copy link
Contributor

Task name

AzureCLI

Describe your feature request here

Whenever Azure CLI invokes and az devops task, it retrieves the OPTIONS /_api/ and GET /_api/ResourceAreas and then caches it. The time to fetch these varies greatly.

The AzureCLI task could cache the data in most cases, since the resource areas and supported APIs rarely change in any meaningful way.

Adding:

- task: Cache@2
      inputs:
        key: '".az-devops"'
        path: 'C:\Users\VssAdministrator\.azure-devops'

    - pwsh: |
        (dir C:\Users\VssAdministrator\.azure-devops\python-sdk\cache\*.json) | %{$_.LastWriteTime = Get-Date} 

to the pipeline shaves off a couple of precious seconds.

Consider calling HEAD instead to see when the data was last updated instead of relying on the age of the files on disk.

Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

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

No branches or pull requests

2 participants