Address a few different Static Web App deployment issues
- Deprecates usage of swa login. Will now manually query for deployment token and pass via --deployment-token param of swa deploy
- Defaults to default environment name regardless of azd environment name till Enhance static web apps endpoint listing with support for multiple environments. azure-dev-pr#1152 is resolved
- Adds deployment validation check to ensure environment is in "Ready" state
- Now works correctly in Linux based hosts
* Fix debug message when `--help` is passed to CLI
We have logic very early in the startup process of `azd` to do an
initial parse of the command line arguments to see if `--debug` has
been passed (so we can set up our debugging channels to output to the
correct location).
That logic uses `pflag` to parse the command line with a very limited
set of flags (just `--debug`) with it configured to ignore all other
flags. However, pflag treats `--help` as special and when the flag is
not defined returns `ErrHelp` from `Parse` to denote that help was
requested.
Our logic would write any failure from `Parse` to the debug log, which
meant that we would end up printing something like this to stderr at
the start of the command when `--help` was passed:
```
Usage of :
--debug
```
This change adds a `help` parameter so that we don't hit this behavior
if `pflag`. The `--help` parameter will be interpreted correctly
later when we parse the command line "for real" using the normal cobra
logic.
* Add regression test
* Add CHANGELOG.md
Adds support to specify azure location/region to use (defaults to eastus2)
Adds configurable Playwright retries (defaults to 3)
Adds parallelism for azd up/down
Adds output to specify TEST_ONLY run
Adds option to specify whether local & remote cleanup should be performed
This change:
- Adds a product identifier `GhActions` to user agent when the CLI is running on GitHub Actions.
- Centralizes user agent logic
- Adds running platform info `(Go <Version>; [windows|linux|openbsd|..]/<ARCH>)` to user agent
Some of our templates use services which are not supported in all
Azure regions. Long term we hope to encode this information in a way
such that the CLI can restrict the list of locations to offer user to
pick from when they are doing a deployment, but that work is still in
progress. For now, add a note to some of our templates calling out
supported regions.
This list was generated by looking at every RP used for each template
and then fetching information from ARM to see what locations the
resources were suported in. When then intersect all these sets of
locations.
Unsurprisingly, the lists are the same between the node and python
versions of our templates.
He wrote them an is the expert, but due to how we have the source tree
laid out he wasn't being listed as a code-owner. Adjust things so that
he and I are the ones listed as owners for the installer.
* Print a warning when the CLI is out of date
This changes adds an update to date check to our CLI. It works by
fetching the latest version of the CLI from a well-known location and
prints a warning if it is larger. To improve user precived
performance, we run the logic to fetch the latest version in parallel
with the command the user is running and we cache the value we fetch
for 24 hours.
If the CLI is out of date, a warning like the following is printed
when the command completes:
```
warning: your version of azd is out of date, you have 0.0.1-beta.1686705 but the latest version is 0.0.1-beta.1686706
To update to the latest version, run:
powershell -c "Set-ExecutionPolicy Bypass Process -Force; irm 'https://aka.ms/install-azd.ps1' | iex"
```
When run on non windows platforms, the `bash` invocation is printed
instead.
This behavior may be disabled by setting AZD_SKIP_UPDATE_CHECK to
`true`.
* Update version URL; set User-Agent
Move to a new format for the aka.ms link for the latest version that
will give us more flexibility when we want to also include channel
information as part of the update check.
Also, set a custom User Agent as we do on other requests that we make.
* Update CONTRIBUTING.md to use a Fork Based workflow
We no longer need to use topic branches and should be doing fork based
workflows now.
* Exclude `NOTICE.txt` from cspell
This file is auto-generated from existing content based on all the
packages we import. There is no reason to spell check this file.
The logic we used to migrate there repository did not copy over any of
the hidden files at the root of the repository.
This changes re-adds these missing files.