Commit Graph

422 Commits

Author SHA1 Message Date
Violet Hynes
2db5d6aa54 Automate feature changelog checking (#27450)
* Automate feature changelog checking

* Add changelog for testing

* Simplify check

* Forgot the end of line thing

* Escape the characters

* More testing

* Last test?

* Delete test changelog
2024-06-12 08:54:29 -04:00
Josh Black
1710f59688 add PR template (#27392)
* add PR template

* adjustments

* PR feedback and add a docs template as well

* Update .github/docs/pull_request_template.md

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>

* further feedback

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-06-11 18:48:27 +00:00
dependabot[bot]
5517d0764c Bump browser-actions/setup-chrome from 1.6.2 to 1.7.1 (#27246)
Bumps [browser-actions/setup-chrome](https://github.com/browser-actions/setup-chrome) from 1.6.2 to 1.7.1.
- [Release notes](https://github.com/browser-actions/setup-chrome/releases)
- [Changelog](https://github.com/browser-actions/setup-chrome/blob/master/CHANGELOG.md)
- [Commits](9683066f53...db1b524c26)

---
updated-dependencies:
- dependency-name: browser-actions/setup-chrome
  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: Peter Wilson <peter.wilson@hashicorp.com>
2024-06-11 17:13:00 +01:00
Ryan Cragun
a9114742b2 actions: update actions-slack-status to v2.0.1 (#27440)
Fix a node deprecation warning by updating our actions-slack-status to
v2.0.1, which pulls in a newer version of the github-script action that
causes the deprecation warning.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-06-11 16:12:08 +00:00
Ryan Cragun
f7c16796ed lint: fix misspell linter install (#27408)
It appears that starting with v0.5.2 the misspell linter embeds the
version directory into the release archive.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-06-07 19:14:20 -04:00
Rebecca Willett
c28739512a Add Amazon Linux, openSUSE Leap, and SUSE SLES support to Enos scenarios and modules (#25983)
Add Consul edition support to Enos scenarios and modules
Add Linux distros and Consul edition to Enos samples
Bump RHEL versions to 9.3 and 8.9
2024-06-05 12:58:35 -04:00
Mike Palmiotto
e99e8870ec Add a CI check for do-not-merge label (#27325) 2024-06-04 09:37:10 -04:00
John-Michael Faircloth
ab9ee4a452 gha: add branch as input to plugin update workflow (#27204)
* gha: add branch as input to plugin update workflow

* name => set_name

* Revert "name => set_name"

This reverts commit de9ee4f33637729f09d17096d20f200061913a84.
2024-05-23 15:58:21 -05:00
claire labry
3c28e9dd1f SMRE/BPA Onboarding LTS (#27053)
* onboard to use backport-assistant with lts support

* add active releases manifest file

* fix CE active release versions

* update manifest and backport files for 0.4.1 bpa version

* remove BACKPORT_LABEL_TEMPLATE

* remove extra container;

* seperate backport.yml files

---------

Co-authored-by: Jeanne Franco <jeanne.franco@hashicorp.com>
2024-05-20 10:05:52 -05:00
Bianca Moreira
db388a5ecd legal: include license in release zip and docker image (#26801)
* legal: include license in release zip and docker image

* Move license logic to script

* Add cp license to build vault action

* test

* Trigger Build
2024-05-17 17:18:38 +02:00
dependabot[bot]
2718994242 Bump actions/checkout from 4.1.5 to 4.1.6 (#27096)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](44c2b7a8a4...a5ac7e51b4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-05-17 10:06:45 -04:00
dependabot[bot]
c0a27b4e00 Bump browser-actions/setup-chrome from 1.6.1 to 1.6.2 (#27072)
Bumps [browser-actions/setup-chrome](https://github.com/browser-actions/setup-chrome) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/browser-actions/setup-chrome/releases)
- [Changelog](https://github.com/browser-actions/setup-chrome/blob/master/CHANGELOG.md)
- [Commits](361a23fcf9...9683066f53)

---
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: Violet Hynes <violet.hynes@hashicorp.com>
2024-05-16 11:50:43 -04:00
dependabot[bot]
a3f8a49009 Bump hashicorp/setup-copywrite from 1.1.2 to 1.1.3 (#26955)
Bumps [hashicorp/setup-copywrite](https://github.com/hashicorp/setup-copywrite) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/hashicorp/setup-copywrite/releases)
- [Commits](867a1a2a06...32638da2d4)

---
updated-dependencies:
- dependency-name: hashicorp/setup-copywrite
  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-05-13 14:19:17 +00:00
dependabot[bot]
b81a2666b2 Bump actions/checkout from 4.1.4 to 4.1.5 (#26920)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](0ad4b8fada...44c2b7a8a4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-05-10 18:15:07 +00:00
Ryan Cragun
fc4042bd2e [QT-687] use new packaging action (#26905)
Update hashicorp/actions-packaging-linux to our rewritten version
that no longer requires building a Docker container or relies on code
hosted in a non-hashicorp repo for packaging.

As internal actions are not managed in the same manner as external
actions in via the tsccr trusted components db, the tsccr helper is
unable to easily re-pin hashicorp/* actions. As such, we unpin some
pinned hashicorp/* actions to automatically pull in updates that are
compatible.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-05-10 16:51:06 +00:00
dependabot[bot]
f3b3f32176 Bump hashicorp/setup-copywrite from 1.1.2 to 1.1.3 (#26921)
Bumps [hashicorp/setup-copywrite](https://github.com/hashicorp/setup-copywrite) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/hashicorp/setup-copywrite/releases)
- [Commits](867a1a2a06...32638da2d4)

---
updated-dependencies:
- dependency-name: hashicorp/setup-copywrite
  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-05-10 11:37:18 -04:00
John-Michael Faircloth
f75b057081 workflow: add reviewer input to plugin update (#26895)
* workflow: add reviewer input to plugin update

* fix typo and change commit msg
2024-05-10 08:58:39 -05:00
dependabot[bot]
28612efd26 Bump hashicorp/vault-action from 2.8.0 to 3.0.0 (#26847)
Bumps [hashicorp/vault-action](https://github.com/hashicorp/vault-action) from 2.8.0 to 3.0.0.
- [Release notes](https://github.com/hashicorp/vault-action/releases)
- [Changelog](https://github.com/hashicorp/vault-action/blob/main/CHANGELOG.md)
- [Commits](9f522b8598...d1720f055e)

---
updated-dependencies:
- dependency-name: hashicorp/vault-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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-05-09 15:13:05 -04:00
Violet Hynes
73506d1395 Update hashicorp/set-product-version to version 2 (#26908) 2024-05-09 13:48:57 -04:00
Victor Rodriguez
4a9ffe24d4 Build the HSM binary for running ENT tests that require it. (#26902) 2024-05-09 12:08:36 -04:00
Ryan Cragun
842dff8342 [QT-711] actions: use next generation CRT actions (#26882)
Update the Github Actions pins to use the next generation of actions
that are supported by CRT.

In some cases these are simply to resolve Node 16 deprecations. In
others, we can now use `action/upload-artifact@v4` and
`actions/download-artifact@v4` since the next generation of actions like
`hashicorp/actions-docker-build@v2` and
`hashicorp/actions-persist-metadata@v2` use the `v4` versions of these.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-05-08 15:17:20 -06:00
Ryan Cragun
1f2f3ff20a [QT-711] Pin to latest github actions (#26789)
Pin to the latest actions in preparation for the migration to
`actions/upload-artifact@v4`, `actions/download-artifact@v4`, and
`hashicorp/actions-docker-build@v2` on May 6 or 7.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-05-02 13:29:20 -06:00
Kuba Wieczorek
cb36fba177 Remove duplicated text field in tests-completed Slack payload (#26733) 2024-05-01 13:06:47 +00:00
Kuba Wieczorek
98894d4f7c Improve the Slack CI feed message for when data races are detected in Go tests (#26731) 2024-05-01 12:32:39 +00:00
akshya96
5671d67483 add re-run flag for 32 bit nightly tests (#26526) 2024-04-30 13:01:22 -07:00
Christopher Swenson
9643471081 Install tools when doing test-ui builds (#26505) 2024-04-18 17:44:45 +00:00
Steven Clark
3140dbe209 Adapt CI to use new filenames for misspell releases (#26506) 2024-04-18 17:11:07 +00:00
Christopher Swenson
961bf20bdb Use enumer to generate String() methods for most enums (#25705)
We have many hand-written String() methods (and similar) for enums.
These require more maintenance and are more error-prone than using
automatically generated methods. In addition, the auto-generated
versions can be more efficient.

Here, we switch to using https://github.com/loggerhead/enumer, itself
a fork of https://github.com/diegostamigni/enumer, no longer maintained,
and a fork of the mostly standard tool
https://pkg.go.dev/golang.org/x/tools/cmd/stringer.
We use this fork of enumer for Go 1.20+ compatibility and because
we require the `-transform` flag to be able to generate
constants that match our current code base.

Some enums were not targeted for this change:
2024-04-17 11:14:14 -07:00
Ryan Cragun
71758f4def terraform: pin to 1.7.5 until 1.8.0 crash is resolved (#26356)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-04-10 21:39:12 +00:00
John-Michael Faircloth
69fd338c78 fix plugin update check pr num fetching (#26066) 2024-03-20 18:57:42 +00:00
Ryan Cragun
c7bdac4081 [QT-688] Pin to latest tsccr actions (#26006)
This should resolve various Node JS 16 deprecation errors.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-03-18 18:56:12 +00:00
Peter Wilson
6f5ed9ddd0 Try to make sure we don't run build on CE community PRs (#25909) 2024-03-13 17:53:22 +00:00
Ryan Cragun
bcd2510716 [QT-685] ci: remove re-runs logic for the 1.15.x branch (#25324)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-03-08 14:20:39 -07:00
Ryan Cragun
3b459f64e6 [QT-683] only create artifact metadata on changes that build artifacts (#25823)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-03-07 10:53:12 -07:00
Ryan Cragun
a79d8a3f69 ci: install gosimports (#25400)
https://github.com/hashicorp/vault/pull/25383 add gosimports to the list
of external tools that are required. The precheck for some linting
workflows fail because we didn't add a corresponding workflow to install
them.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-14 09:56:28 -07:00
Ryan Cragun
f19a04b4b5 build: don't build artifacts on UI only changes (#25389)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-13 14:44:18 -07:00
Ryan Cragun
70725fb0f7 build: allow building all artifacts with empty pull requests (#25376)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-12 23:02:47 +00:00
Ryan Cragun
d255cb86b2 build: use the version with metadata in our metadata file (#25372)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-12 21:24:11 +00:00
Ryan Cragun
b34e05e3cf ci: namespace data race logs (#25370)
* Namespace our data race logs so that other workflows don't use them to
set their status[0].
* Namespace our test results to avoid downloading other workflow
  results.
* Handle multiline output of data race results

[0] https://github.com/hashicorp/vault-enterprise/actions/runs/7875954928/job/21490054433?pr=5411#step:3:39

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-12 12:46:12 -07:00
Ryan Cragun
15eb4e4060 ci: fix notifications and comments (#25356)
* Fix the build notification. It appears that during a rebase the JSON
  payload was slightly corrupted.
* Don't create a successful CI step summary if the CI workflow is
  cancelled.
* Don't create a successful CI comment if the workflow was cancelled.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-12 09:52:13 -07:00
Hamid Ghaf
a041111206 remove regular expression comparison in a GHA script (#25347) 2024-02-09 13:57:46 -08:00
Ryan Cragun
505590fecb ci: always upload data race logs (#25322)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-08 16:11:43 -07:00
Ryan Cragun
53d66cf592 test-go: only install datadog-ci if necessary (#25317)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-08 14:14:17 -07:00
Ryan Cragun
a3fb68cab8 build: fix scheduled workflow logic (#25300)
* The scheduled workflow event name is `schedule` not `scheduled`.
* We should skip our completed workflow entirely in draft mode.
* Clean up and flesh out the build workflow comment a bit more.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-08 18:59:42 +00:00
Ryan Cragun
90c1515f84 ci: fix status result determination (#25268)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-08 01:28:54 +00:00
Ryan Cragun
3f2f8ab64d ci: fix changed file detection (#25262)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-07 18:02:02 +00:00
Ryan Cragun
3b970f51c9 ci: always trigger slack notification for any failure (#25244)
Don't rely on the pass/fail result of the CI workflow for notifications.
We do this to ensure we notify Slack on failures but still allow for
merging.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-06 22:12:18 +00:00
Ryan Cragun
89c75d3d7c [QT-637] Streamline our build pipeline (#24892)
Context
-------
Building and testing Vault artifacts on pull requests and merges is
responsible for about 1/3rd of our overall spend on Vault CI. Of the
artifacts that we ship as part of a release, we do Enos testing scenarios
on the `linux/amd64` and `linux/arm64` binaries and their derivative
artifacts. The extended build artifacts for non-Linux platforms or less
common machine architectures are not tested at this time. They are built,
notarized, and signed as part of every pull request update and merge. As
we don't actually test these artifacts, the only gain we get from this
rather expensive behavior is that we wont merge a change that would prevent
Vault from building on one of the extended targets. Extended platform or
architecture changes are quite rare, so performing this work as frequently
as we do is costly in both monetary and developer time for little relative
safety benefit.

Goals
-----
Rethink and implement how and when we build binaries and artifacts of Vault
so that we can spend less money on repetitive work and while also reducing
the time it takes for the build and test pipelines to complete.

Solution
--------
Instead of building all release artifacts on every push, we'll opt to build
only our testable (core) artifacts. With this change we are introducing a
bit of risk. We could merge a change that breaks an extended platform and
only find out after the fact when we trigger a complete build for a release.
We'll hedge against that risk by building all of the release targets on a
scheduled cadence to ensure that they are still buildable.

We'll make building all of the targets optional on any pull request by
use of a `build/all` label on the pull request.

Further considerations
----------------------
* We want to reduce the total number of workflows and runners for all of our
  pipelines if possible. As each workflow runner has infrastructure cost and
  runner time penalties, using a single runner over many is often preferred.
* Many of our jobs runners have been optimized for cost and performance. We
  should simplify the choices of which runners to use.
* CRT requires us to use the same build workflow in both CE and Ent.
  Historically that meant that modifying `build.yml` in CE would result in a
  merge conflict with `build.yml` in Ent, and break our merge workflows.
* Workflow flow control in both `build.yml` and `ci.yml` can be quite
  complicated, as each needs to maintain compatibility whether executed as CE
  or Ent, and when triggered with various Github events like pull_request,
  push, and workflow_call, each with their own requirements.
* Many jobs utilize similar patterns of flow control and metadata but are not
  reusable.
* Workflow call depth has a maximum of four, so we need to be quite
  considerate when calling other workflows.
* Called workflows can only have 10 inputs.

Implementation
--------------
* Refactor the `build.yml` workflow to be agnostic to whether or not it is
  executing in CE or Ent. That makes future updates to the build much easier
  as we won't have to worry about merge conflicts when the change is merged
  downstream.
* Extract common steps in workflows into composite actions that we can reuse.
* Fix bugs where some but not all workflows would use different Git
  references when building and testing a pull request.
* We rewrite the application, docs, and UI change helpers as a composite
  action. This allows us to re-use this logic to make consistent behavior
  choices across build and CI.
* We combine several `build.yml` and `ci.yml` jobs into our final job.
  This reduces the number of workflows required for the same behavior while
  saving time overall.
* Update most of our action pins.

Results
-------

| Metric            | Before   | After   | Diff  |
|-------------------|----------|---------|-------|
| Duration:         | ~14-18m  | ~15-18m | ~ =   |
| Workflows:        | 43       | 18      | - 58% |
| Billable time:    | ~1h15m   | 16m     | - 79% |
| Saved artifacts:  | 34       | 12      | - 65% |

Infra costs should map closely to billable time.
Network I/O costs should map closely to the workflow count.
Storage costs should map directly with saved artifacts.

We could probably get parity with duration by getting more clever with
our UBI container build, as that's where we're seeing the increase. I'm
not yet concerned as it takes roughly the same time for this job to
complete as it did before.

While the CI workflow was not the focus on the PR, some shared
refactoring does show some marginal improvements there.

| Metric            | Before   | After    | Diff   |
|-------------------|----------|----------|--------|
| Duration:         | ~24m     | ~12.75m  | - 15%  |
| Workflows:        | 55       | 47       | - 8%   |
| Billable time:    | ~4h20m   | ~3h36m   | - 7%   |

Further focus on streamlining the CI workflows would likely result in a
few more marginal improvements, but nothing on the order like we've seen
with the build workflow.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-02-06 21:11:33 +00:00
Violet Hynes
a174ed395b VAULT-23732 Update github actions to non-deprecated versions (#25203) 2024-02-06 10:49:40 -05:00
divyaac
c60d1ce11a Applied Ent Changes (#25160) 2024-02-01 08:46:20 -08:00