422 Commits

Author SHA1 Message Date
VAL
4536681edf
Clarify backport instructions further (#28908) 2024-11-13 21:59:47 +00:00
Kuba Wieczorek
619843589b
CI: Pin VCM version used in Run Autopilot upgrade tests workflow (#28820) 2024-10-31 16:51:04 +00:00
Ryan Cragun
31b139c8ce
pipeline: include the version in the dynamic config key (#28793)
Cache scopes allow other branches to inherit default branch scopes,
which means that release branches can restore a key from main. Instead,
we now include the vault version as part of the cache key to ensure
we don't include versions that are incompatible with our version.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-10-29 16:02:00 +00:00
Ryan Cragun
ce5885279b
VAULT-31181: Add pipeline tool to Vault (#28536)
As the Vault pipeline and release processes evolve over time, so too must the tooling that drives them. Historically we've utilized a combination of CI features and shell scripts that are wrapped into make targets to drive our CI. While this 
approach has worked, it requires careful consideration of what features to use (bash in CI almost never matches bash in developer machines, etc.) and often requires a deep understanding of several CLI tools (jq, etc). `make` itself also has limitations in user experience, e.g. passing flags.

As we're all in on Github Actions as our pipeline coordinator, continuing to utilize and build CLI tools to perform our pipeline tasks makes sense. This PR adds a new CLI tool called `pipeline` which we can use to build new isolated tasks that we can string together in Github Actions. We intend to use this utility as the interface for future release automation work, see VAULT-27514.

For the first task in this new `pipeline` tool, I've chosen to build two small sub-commands:

* `pipeline releases list-versions` - Allows us to list Vault versions between a range. The range is configurable either by setting `--upper` and/or `--lower` bounds, or by using the `--nminus` to set the N-X to go back from the current branches version. As CE and ENT do not have version parity we also consider the `--edition`, as well as none-to-many `--skip` flags to exclude specific versions.

* `pipeline generate enos-dynamic-config` - Which creates dynamic enos configuration based on the branch and the current list of release versions. It takes largely the same flags as the `release list-versions` command, however it also expects a `--dir` for the enos directory and a `--file` where the dynamic configuration will be written. This allows us to dynamically update and feed the latest versions into our sampling algorithm to get coverage over all supported prior versions.

We then integrate these new tools into the pipeline itself and cache the dynamic config on a weekly basis. We also cache the pipeline tool itself as it will likely become a repository for pipeline specific tooling. The caching strategy for the `pipeline` tool itself will make most workflows that require it super fast.


Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-10-23 15:31:24 -06:00
Deniz Onur Duzgun
afd023e41c
ci: update the security-scanner gha token (#28410)
* ci: update the security-scanner gha token

* fix codeql version

---------

Co-authored-by: mickael e <mickael@hashicorp.com>
2024-10-23 13:53:35 -06:00
Kuba Wieczorek
80729f063f
[VAULT-28762] Run Autopilot upgrade tests on main and PRs to main on ENT if the AP code has changed (#28697)
Co-authored-by: Josh Black <raskchanky@gmail.com>
2024-10-14 16:59:00 +01:00
Steven Clark
8fec0056c1
Update buf to 1.45.0 (#28632) 2024-10-08 15:02:15 -06:00
Ryan Cragun
b6145bc3bb
protobuf: rebuild protos with protobuf 1.35.1 (main) (#28617)
* protobuf: rebuild protos with protobuf 1.35.1
* protobuf: unpin protoc-gen-go-grpc on main

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-10-07 14:54:51 -06:00
Ryan Cragun
c8e6169d5d
VAULT-31402: Add verification for all container images (#28605)
* VAULT-31402: Add verification for all container images

Add verification for all container images that are generated as part of
the build. Before this change we only ever tested a limited subset of
"default" containers based on Alpine Linux that we publish via the
Docker hub and AWS ECR.

Now we support testing all Alpine and UBI based container images. We
also verify the repository and tag information embedded in each by
deploying them and verifying the repo and tag metadata match our
expectations.

This does change the k8s scenario interface quite a bit. We now take in
an archive image and set image/repo/tag information based on the
scenario variants.

To enable this I also needed to add `tar` to the UBI base image. It was
already available in the Alpine image and is used to copy utilities to
the image when deploying and configuring the cluster via Enos.

Since some images contain multiple tags we also add samples for each
image and randomly select which variant to test on a given PR.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-10-07 10:16:22 -06:00
Steven Clark
159e780d74
Have go-test timeout before the GH step timeout to gather information (#28559)
- If we encounter a deadlock/long running test it is better to have go
   test timeout. As we've noticed if we hit the GitHub step timeout, we
   lose all information about what was running at the time of the timeout
   making things harder to diagnose.
 - Having the timeout through go test itself on a long running test it
   outputs what test was running along with a full panic output within
   the logs which is quite useful to diagnose
2024-10-02 10:27:25 -04:00
Kuba Wieczorek
1736addedf
Send the UI test results from the CI to DataDog (#28412) 2024-09-17 12:29:04 +01:00
Luis (LT) Carbonell
146ad63256
Add build for FIPS ARM Docker images (#28310)
* Add build for FIPS ARM Docker images

* arm64 build
2024-09-11 15:07:34 -04:00
Ryan Cragun
c9340dc7d5
VAULT-30640: support running test-go in parallel on multiple branches (#28296)
In order for our enterprise nightlies to run the same test-go job but
across a matrix of different base references we need to consider the
checkout ref in our failure and summary uploads in order to prevent
an upload race.

We also configure Git with our token before setting up Go so that
enterprise CI workflows can execute without downloading a module cache.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-09-06 15:14:55 -06:00
John-Michael Faircloth
b682a79551
actions: support ent plugins in plugin update workflow (#28295) 2024-09-05 15:53:08 -05:00
Chelsea Shaw
111d6a83ea
adds back chrome version pin (#28176) 2024-08-23 16:21:58 -05:00
Ryan Cragun
f6df23c7cf
enos: install go toolchain on lint (#28182)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-23 14:23:47 -06:00
Ryan Cragun
b5d32b7bec
enos: add shfmt formatting to enos module scripts (#28142)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-23 13:45:30 -06:00
Ryan Cragun
438fae0952
ui: rebuild fontconfig cache on Github hosted runners (#28177)
It appears that with the latest runner image[0] that we occasionally see
a flaky test with an error related to our fontconfig cache:

```
Error: Browser timeout exceeded: 10s
Error while executing test: Acceptance | wrapped_token query param functionality: it authenticates when used with the with=token query param
Stderr:
 Fontconfig error: No writable cache directories
[0822/180212.113587:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
```

This change rebuilds the fontconfig cache on Github hosted runners.
Hopefully we can remove this at some point when a new runner image is
released.

[0] https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20240818.1

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-23 19:23:28 +00:00
Chelsea Shaw
1488f0956d
UI: remove pinned chrome version (#28159) 2024-08-22 20:47:57 +00:00
dependabot[bot]
33b567ddb2
Bump browser-actions/setup-chrome from 1.7.1 to 1.7.2 (#28101)
Bumps [browser-actions/setup-chrome](https://github.com/browser-actions/setup-chrome) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/browser-actions/setup-chrome/releases)
- [Changelog](https://github.com/browser-actions/setup-chrome/blob/master/CHANGELOG.md)
- [Commits](db1b524c26...facf10a55b)

---
updated-dependencies:
- dependency-name: browser-actions/setup-chrome
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>
2024-08-19 15:16:14 -07:00
dependabot[bot]
754e97018f
Bump actions/setup-node from 4.0.2 to 4.0.3 (#27738)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](60edb5dd54...1e60f620b9)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2024-08-16 16:15:59 -07:00
dependabot[bot]
f3e9f854d6
Bump actions/download-artifact from 4.1.7 to 4.1.8 (#27704)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.7 to 4.1.8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](65a9edc588...fa0a91b85d)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2024-08-16 14:48:16 -07:00
akshya96
ae6854e9f2
updating remaining occurances of setup-go (#28110) 2024-08-16 13:00:48 -07:00
Ryan Cragun
d5c67768c5
scan: skip running if the PR head is a fork (#28107)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-16 13:49:05 -06:00
akshya96
62e0e62742
updating remaining occurances of upload-artifact (#28108) 2024-08-16 11:46:08 -07:00
dependabot[bot]
219e53134d
Bump actions/setup-go from 5.0.1 to 5.0.2 (#27756)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](cdcb360436...0a12ed9d6a)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2024-08-15 15:41:52 -07:00
dependabot[bot]
3b2ea90fdb
Bump actions/upload-artifact from 4.3.3 to 4.3.6 (#28008)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65462800fd...834a144ee9)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2024-08-15 15:18:47 -07:00
VAL
a4e8063eff
Add LTS label instructions to PR template (#27924)
* Add LTS explanation and clarify other label explanations

* Link to doc containing LTS calendar

* Change order for simpler cognitive load

* A bit simpler based on feedback
2024-08-15 10:40:01 -07:00
Ryan Cragun
843ae09948
scan: fixup ent labels (#28083)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-14 15:20:06 -06:00
Ryan Cragun
aff0eae0f9
VAULT-28638: Cost optimize the Security scan workflow (#28067)
Optimize the cost of the Security `scan` workflow by utilizing a
different runner. Previously this workflow would use the
`custom-linux-xl` in `vault` vs. the `c6a.4xlarge` on-demand runner in
`vault-enterprise. This resulted in the `vault` workflow costing an
order of magnitude more each month.

I tested with the following instances sizes to compare cost to execution
time:

| Runnner | Estimated Time | Cost Factor | Cost Score |
|---------|-----------------|-------------|-------------|
|ubuntu-latest|19m|1|19|
|custom-linux-small|21.5m|2|43|
|custom-linux-medium|11.5m|4|46|
|custom-linux-xl|8.5m|16|136|

Currently the `CI` and `build` require workflows take anywhere from
16-20 minutes on `vault`. Our goal is to not exceed that.

At this time we're going to try out `ubuntu-latest` as it gives us ~85%
savings and by far the best bang for our buck. If it ends up being a
burden we can switch to `custom-linux-medium` for ~66% cost savings but
still a reasonable runtime.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-14 14:29:34 -06:00
Ryan Cragun
74b6cc799a
VAULT-29583: Modernize default distributions in enos scenarios (#28012)
* VAULT-29583: Modernize default distributions in enos scenarios

Our scenarios have been running the last gen of distributions in CI.
This updates our default distributions as follows:
  - Amazon: 2023
  - Leap:   15.6
  - RHEL:   8.10, 9.4
  - SLES:   15.6
  - Ubuntu: 20.04, 24.04

With these changes we also unlock a few new variants combinations:
  - `distro:amzn seal:pkcs11`
  - `arch:arm64 distro:leap`

We also normalize our distro key for Amazon Linux to `amzn`, which
matches the uname output on both versions that we've supported.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-08-09 13:43:28 -06:00
Steven Clark
297a9831f1
Pin protoc-gen-go-grpc to 1.4.0 (#27892)
* Pin protoc-gen-go-grpc to 1.4.0

They introduced a replace statement within the go.mod file which
causes failures running go install protoc-gen-go-grpc@latest

Workaround for now is to pin to the previous version

See https://github.com/grpc/grpc-go/issues/7448

* Add missing v to version v1.4.0 instead of 1.4.0 within tools/tools.sh
2024-07-29 14:36:43 +00:00
Kuba Wieczorek
5d172d5861
[VAULT-28666] Use the retry script to check release version for gotestsum in CI (#27878) 2024-07-26 16:41:01 +00:00
Kuba Wieczorek
7a4cf3d273
[VAULT-28666] Use the retry script to check release versions for external tools installed in CI (#27873) 2024-07-26 10:17:32 -04:00
Kuba Wieczorek
920c08966c
[VAULT-28666] Enable the --clobber flag on GitHub CLI release downloads in CI to avoid errors when retrying (#27852) 2024-07-24 12:24:30 +01:00
Kuba Wieczorek
74d15e3d50
[VAULT-28666] Remove the errexit option from the retry script and add increasing wait on failure (up to 5 seconds and 5 retries) (#27842)
Co-authored-by: VAL <val@hashicorp.com>
2024-07-23 17:58:37 +00:00
Kuba Wieczorek
b7d9008e5b
[VAULT-28666] Retry tool download from GitHub releases on failure in GitHub Actions (GHA) (#27786) 2024-07-16 09:07:30 +01:00
Kuba Wieczorek
d9cd3a094a
[VAULT-28666] Retry staticcheck download on failure in GitHub Actions (GHA) (#27781) 2024-07-15 13:19:16 -04:00
Josh Black
56b32081f0
add a retry-command script (#27754)
* add a retry-command script

* add license header to retry script
2024-07-12 13:18:41 -07:00
Ryan Cragun
44c988328f
actions: don't use linux runs-on label (#27674)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-07-08 09:47:41 -06:00
Kuba Wieczorek
1b794a5579
[VAULT-28664] Enable the --rerun-fails option in gotestsum for enterprise to reduce the impact of flaky tests on the CI (#27695) 2024-07-04 18:42:51 +01:00
Violet Hynes
64ce6e74da
Update actions/checkout to 4.1.7 (#27636) 2024-07-02 09:25:21 -04:00
dependabot[bot]
93bda36235
Bump actions/add-to-project from 1.0.1 to 1.0.2 (#27584)
Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/actions/add-to-project/releases)
- [Commits](9bfe908f2e...244f685bbc)

---
updated-dependencies:
- dependency-name: actions/add-to-project
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-06-27 18:48:58 +00:00
dependabot[bot]
281f6931b0
Bump test-summary/action from 2.3 to 2.4 (#27626)
Bumps [test-summary/action](https://github.com/test-summary/action) from 2.3 to 2.4.
- [Release notes](https://github.com/test-summary/action/releases)
- [Commits](032c8a9cec...31493c76ec)

---
updated-dependencies:
- dependency-name: test-summary/action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-06-27 18:44:29 +00:00
Ryan Cragun
ad5ca3e7b7
actions: use the Github API for pull request labels (#27603)
We have seen instances where the github.event.pull_request.labels.*.name
context in Github Actions doesn't actually include the labels.

Instead, we now pull and parse them ourselves instead of relying on that
context.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-06-25 16:32:12 -06:00
Ryan Cragun
e0199efb19
ui: pin chrome in UI tests (#27580)
* ui: pin chrome in UI tests

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-06-24 14:16:07 -06:00
Ryan Cragun
84935e4416
[QT-697] enos: add descriptions and quality verification (#27311)
In order to take advantage of enos' ability to outline scenarios and to
inventory what verification they perform we needed to retrofit all of
that information to our existing scenarios and steps.

This change introduces an initial set of descriptions and verification
declarations that we can continue to refine over time.

As doing this required that I re-read every scenanario in its entirety I
also updated and fixed a few things along the way that I noticed,
including adding a few small features to enos that we utilize to make
handling initial versions programtic between versions instead of having a
delta between our globals in each branch.

* Update autopilot and in-place upgrade initial versions
* Programatically determine which initial versions to use based on Vault
  version
* Partially normalize steps between scenarios to make comparisons easier
* Update the MOTD to explain that VAULT_ADDR and VAULT_TOKEN have been
  set
* Add scenario and step descriptions to scenarios
* Add initial scenario quality verification declarations to scenarios
* Unpin Terraform in scenarios as >= 1.8.4 should work fine
2024-06-13 11:16:33 -06:00
Ryan Cragun
80e6d81a4b
backport: bump backport-assistant to v0.4.3 (#27484)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-06-13 10:29:52 -06:00
Violet Hynes
a4347e9098
Update backport assistant in CE (#27482) 2024-06-13 14:54:26 +00:00
Violet Hynes
a40265de6e
Remove changelog checklist item from PR template (#27460)
* Remove changelog checklist item from PR template

* Update ent PR guidance
2024-06-12 12:59:03 -04:00