Before this commit, events in the output of `tsh play --format=yaml` were
separated by a newline. This commit ensures that these events are now
separated by `---`, allowing the command output to play well with `yq`.
For consistency, the output of `tsh play --format=yaml <session-id>`
now mirrors what we get e.g. with `tctl nodes ls --format=yaml`.
The same applies to `tsh play --format json`.
* configure golangci-lint misspell to check for anglicized spellings
* Americanize spellings
* fix aws constant value with british spelling 🇬🇧
* update api types with americanized spellings
* use american spellings .cloudbuild/scripts
* Enable map key sorting in `utils.FastMarshal`
This enables map key sorting during JSON serialization to ensure
`CompareAndSwap` opertions work consistently if the resource in
question has embedded map values (e.g. labels).
Note that this is hypothetically a breaking change: it makes
comparisons consistent, so if it saves a variant that consistently
fails a `CompareAndSwap()`, it will... fail consistently rather
than sometimes work. In practice, today only `CertificateAuthority`
resources use `CompareAndSwap()` and under normal circumstances they
never have labels attached.
In the unlikely event that some resource is affected, a load/store
should save it with sorted key ordering and fix the problem.
* Log a warning if CAs fail a compare-and-swap with multiple labels
This attempts to mitigate compare-and-swap failures if CAs have
multiple labels by logging a warning instructing users to re-save
their CertificateAuthority resource.
* Fix copied comment typo and make the logged warning actionable
* Fix log.Warn() call with formatting directives
This commit fixes an issue when tctl
output in YAML was not compatible with tctl create.
Before:
```
$ tctl get users
- User: value
- User: value
```
After:
```
$ tctl get users
User: value
---
User: value
```