Skip to content

Conversation

ilia-shipitsin
Copy link
Contributor

Description

warmup Azure CLI during image generation to improve first run timing

Related issue:

#8296

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

ilia-shipitsin and others added 2 commits October 2, 2023 09:17
Improve Azure CLI first run timing.
Follow up: actions#8294

Co-authored-by: Jesse Houwing <jesse.houwing@gmail.com>
@jessehouwing
Copy link
Contributor

Replaces the part of this pull request that performs the redirection of the .azure folder and the warmup of az:

Comment on lines 28 to 32
az --help
if ($LASTEXITCODE -ne 0)
{
throw "Command 'az --help' failed"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have tests that do the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even if we do, it would be a leaked abstraction.
tests do testing, warmup does warmup

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current test does az --version. Which is nice too, as it causes the caching of the version information on disk (as az --version does an update check and caches the result).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someone once may want to change tests behavior. I would not like to depend on those changes, thus dedicated warm up makes sense (even if it's identical)

Copy link
Contributor

@vpolikarpov-akvelon vpolikarpov-akvelon Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I would only hide az's output then and put braces according to 1TBS rule.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used VS Code with whatever we have in .vscode, I wonder why do you think code is not compliant

@mikhailkoliada
Copy link
Contributor

/azp run windows2019,windows2022

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Alexey-Ayupov
Copy link
Contributor

/azp run windows2019,windows2022

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@mikhailkoliada mikhailkoliada merged commit 0795b9e into actions:main Oct 5, 2023
@ilia-shipitsin ilia-shipitsin deleted the warmup_az_2 branch October 5, 2023 14:43
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.

5 participants