Commit Graph

17340 Commits

Author SHA1 Message Date
hc-github-team-secure-vault-core
46a72c0417 backport of commit 02f43ecbc2 (#21587) (#21997)
* VAULT-17590 Add failure notifications for OSS builds

* VAULT-17590 Incur build failure for testing purposes

* VAULT-17590 head_ref for testing

* VAULT-17590 rework to rely on completed status checks

* VAULT-17590 Use slackapi/slack-github-action

* VAULT-17590 Remember dollar sign

* VAULT-17590 finalize PR

* VAULT-17590 add extra empty line

* Update .github/workflows/build.yml



* Update .github/workflows/ci.yml



* VAULT-17590 fix typo

* VAULT-17590 ent workflow

* VAULT-17590 typo

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-21 12:56:45 +00:00
hc-github-team-secure-vault-core
6392634939 backport of UI: Remove logic that skips sending object if not changed (#21758)
Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
2023-07-21 00:22:12 +00:00
hc-github-team-secure-vault-core
29cc2b2586 [QT-590] Optimize the CI testing workflow (#21959) (#21984)
We further optimize the CI workflow for better costs and speed.
We tested the Go CI workflows across several instance classes
and update our compute choices. We achieve an average execution
speed improvement of 2-2.5 minutes per test workflow while
reducing the infrastructure cost by about 20%. We also also save
another ~2 minutes by installing `gotestsum` from the Github release
instead of downloading the Go modules and compiling it every time.

In addition to the speed improvements, we also further reduced our cache
usage by updating the `security-scan` workflow to not cache Go modules.
We also use the `cache/save` and `cache/restore` actions for timing
caches. This results is saving half as many cache results for timing
data.

*UI test results*
results for 2x runs:
* c6a.2xlarge (12m54s, 11m55s)
* c6a.4xlarge (10m47s, 11m6s)
* c6a.8xlarge (11m32s, 10m51s)
* m5.2xlarge (15m23s, 14m16s)
* m5.4xlarge (14m48s, 12m54s)
* m5.8xlarge (12m27s, 12m24s)
* m6a.2xlarge (11m55s, 12m20s)
* m6a.4xlarge (10m54s, 10m43s)
* m6a.8xlarge (10m33s, 10m51s)

Current runner:
m5.2xlarge (15m23s, 14m16s, avg 14m50s) @ 0.448/hr = $0.11

Faster candidates
* c6a.2xlarge (12m54s, 11m55s, avg 12m24s) @ 0.3816/hr = $0.078
* m6a.2xlarge (11m55s, 12m20s, avg 12m8s) @ 0.4032/hr = $0.081
* c6a.4xlarge (10m47s, 11m6s, avg 10m56s) @ 0.7632/hr = $0.139
* m6a.4xlarge (10m54s, 10m43s, avg 10m48s) @ 0.8064/hr = $0.140

Best bang for the buck for test-ui:
  m6a.2xlarge, > 25% cost savings from current and we save ~2.5 minutes.

*Go test results*
During testing the external replication tests, when not broken up, will
always take the longest. Our original analysis focuses on this job.
Most other tests groups will finish ~3m faster so we'll use subtract
that time when estimating the cost for the whole job.

external replication job results:
* c6a.2xlarge (20m49s, 19m20s, avg 20m5s)
* c6a.4xlarge (19m1s, 19m38s, avg 19m20s)
* c6a.8xlarge (19m51s, 18m54s, avg 19m23s)
* m5.2xlarge (22m12s, 20m29s, avg 21m20s)
* m5.4xlarge (20m7s, 19m3s, avg 20m35s)
* m5.8xlarge (20m24s, 19m42s, avg 20m3s)
* m6a.2xlarge (21m10s, 19m37s, avg 20m23s)
* m6a.4xlarge (18m58s, 19m51s, avg 19m24s)
* m6a.8xlarge (19m27s, 18m47s, avg 19m7s)

There is little separation in time when we increase class size. In the
best case a class size increase yields about a ~5% performance increase
and doubles the cost. For test-go our best bang for the buck is
certainly going to be in the 2xlarge class.

Current runner:
m5.2xlarge (22m12s, 20m29s, avg 21m20s) @ 0.448/hr (16@avg-3m + 1@avg) = $2.35

Candidates in the same class
* c6a.2xlarge (20m49s, 19m20s, avg 20m5s) @ 0.3816/hr (16@avg-3m + 1@avg) = $1.86
* m6a.2xlarge (21m10s, 19m37s, avg 20m23s) @ 0.4032/hr (16@avg-3m + 1@avg) = $2.00

Best bang for the buck for test-go:
  c6a.2xlarge: 20% cost savings and save about ~2.25 minutes.

We ran the tests with similar instances and saw similar execution times as
with test-go. Therefore we can use the same recommended instance sizes.

After breaking up test-go's external replication tests, the longest group
was shorter on average. I choose to look at group 3 as it was usually the
longest grouping:

* c6a.2xlarge: (14m51s, 14m48s)
* c6a.4xlarge: (14m14s, 14m15)
* c6a.8xlarge: (14m0s, 13m54s)
* m5.2xlarge: (15m36s, 15m35s)
* m5.4xlarge: (14m46s, 14m49s)
* m5.8xlarge: (14m25s, 14m25s)
* m6a.2xlarge: 14m51s, 14m53s)
* m6a.4xlarge: 14m16s, 14m16s)
* m6a.8xlarge: (14m2s, 13m57s)

Again, we see ~5% performance gains between the 2x and 8x instance classes
at quadruple the cost. The c6a and m6a families are almost identical, with
the c6a class being cheaper.

*Notes*
* UI and Go Test timing results: https://github.com/hashicorp/vault-enterprise/actions/runs/5556957460/jobs/10150759959
* Go Test with data race detection timing results: https://github.com/hashicorp/vault-enterprise/actions/runs/5558013192
* Go Test with replication broken up: https://github.com/hashicorp/vault-enterprise/actions/runs/5558490899

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-07-20 16:36:07 -06:00
hc-github-team-secure-vault-core
dba044da75 backport of commit 5ba848dbdd (#21991)
Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
2023-07-20 21:17:27 +00:00
hc-github-team-secure-vault-core
030b0af136 backport of commit 4ce8e4b00f (#21987)
Co-authored-by: Max Bowsher <maxbowsher@gmail.com>
2023-07-20 21:11:59 +00:00
hc-github-team-secure-vault-core
3ac2cd37b2 [QT-588] test: fix drift between enos directories (#21695) (#21980)
* Sync missing scenarios and modules
* Clean up variables and examples vars
* Add a `lint` make target for enos
* Update enos `fmt` workflow to run the `lint` target.
* Always use ipv4 addresses in target security groups.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-07-20 14:36:28 -06:00
hc-github-team-secure-vault-core
3b48c4727f cherry-picking changes (#21919)
Co-authored-by: akshya96 <araghavan@hashicorp.com>
2023-07-20 20:25:26 +00:00
hc-github-team-secure-vault-core
a420deb5e4 Backport of Limit number of tests in CI comment into release/1.13.x (#21970)
* backport of commit dc104898f7 (#21853)

* fix multiline

* shellcheck, and success message for builds

* add full path

* cat the summary

* fix and faster

* fix if condition

* base64 in a separate step

* echo

* check against empty string

* add echo

* only use matrix ids

* only id

* echo matrix

* remove wrapping array

* tojson

* try echo again

* use jq to get packages

* don't quote

* only run binary tests once

* only run binary tests once

* test what's wrong with the binary

* separate file

* use matrix file

* failed test

* update comment on success

* correct variable name

* bae64 fix

* output to file

* use multiline

* fix

* fix formatting

* fix newline

* fix whitespace

* correct body, remove comma

* small fixes

* shellcheck

* another shellcheck fix

* fix deprecation checker

* only run comments for prs

* Update .github/workflows/test-go.yml

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Update .github/workflows/test-go.yml

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* fixes

---------

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* backport of commit 3b00dde1ba (#21936)

* limit test comments

* remove unecessary tee

* fix go test condition

* fix

* fail test

* remove ailways entirely

* fix columns

* make a bunch of tests fail

* separate line

* include Failures:

* remove test fails

* fix whitespace

* backport of commit 245430215c (#21973)

* only add binary tests if they exist

* shellcheck

---------

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
2023-07-20 15:07:01 +02:00
hc-github-team-secure-vault-core
f5f8c861a5 backport of commit 215687795d (#21953)
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
2023-07-19 18:33:35 +00:00
hc-github-team-secure-vault-core
f4f0b71e42 backport of commit def7c1b0a7 (#21944)
Co-authored-by: Paul Banks <pbanks@hashicorp.com>
2023-07-19 15:33:52 +00:00
Anton Averchenkov
46863a79a3 Backport #21426 (#21922) 2023-07-18 17:08:30 -04:00
hc-github-team-secure-vault-core
afcade6040 backport of commit a9977fab80 (#21909)
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-07-18 13:03:40 +00:00
hc-github-team-secure-vault-core
5418ef3f7e backport of commit e1a9d85a18 (#21878)
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2023-07-17 09:46:21 -07:00
hc-github-team-secure-vault-core
a687b6a6ad Go test failure summaries fixes and improvements (#21888) (#21894)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-17 16:16:13 +00:00
hc-github-team-secure-vault-core
463e09f89b backport of commit f3e9d159d3 (#21890)
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
2023-07-17 08:08:04 -07:00
hc-github-team-secure-vault-core
0c731bede0 backport of commit 5d97159f05 (#21885)
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-07-17 13:03:29 +00:00
Kuba Wieczorek
d1e54e6c7e Fix UI tests on 1.13.x in CI workflow (#21860)
* Back out an accidental backport of a node version change to UI tests in CI

* Specify the Node version directly in the workflow
2023-07-14 15:38:08 +00:00
Steven Clark
f75217ae7b Remove accidently committed merge failure file (#21858) 2023-07-14 13:34:51 +00:00
Steven Clark
98032aa8dd Add back paths to TestProperAuthing - take 2 (#21856)
- Since the backport's for the OpenAPI list haven't occurred yet, we need both the existing path and the new path for when they do get backported.
2023-07-14 13:02:20 +00:00
hc-github-team-secure-vault-core
0d4bd48079 Update TestProperAuthing test for backports (#21851)
Co-authored-by: Steve Clark <steven.clark@hashicorp.com>
2023-07-14 12:09:55 +00:00
hc-github-team-secure-vault-core
810e1fb561 backport of commit ba52063705 (#21848)
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
2023-07-14 10:22:41 +00:00
hc-github-team-secure-vault-core
9e4a34ed5e backport of commit 0b0b15f968 (#21838)
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
2023-07-13 15:25:29 -07:00
hc-github-team-secure-vault-core
c0007f936e VAULT-12958 Add link to logs to the test failure summary in CI (#21736) (#21824)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-13 18:55:16 +00:00
Austin Gebauer
b622eaf295 auth/azure: upgrade to v0.13.1 for bug fix (#21799)
* auth/azure: upgrade to v0.13.1 for bug fix

* adds changelog
2023-07-13 10:06:25 -07:00
hc-github-team-secure-vault-core
86aec28a23 backport of commit 2a05a48016 (#21815)
Co-authored-by: Rebecca Willett <47540675+rebwill@users.noreply.github.com>
2023-07-13 12:09:13 -04:00
hc-github-team-secure-vault-core
c39d22f3ba backport of commit 702c521489 (#21780)
Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
2023-07-13 11:24:10 -04:00
hc-github-team-secure-vault-core
f1ad714c40 Backport of Add additional debug output to TestCertStorageMetrics into release/1.13.x (#21809)
* backport of commit 8d74143872

* Add missing strings import

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2023-07-13 13:38:55 +00:00
hc-github-team-secure-vault-core
9eebd596a8 backport of commit bfa93fdeda (#21782) (#21785)
* use shas instead of versions and fix milestones

* remove trailing space

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-07-13 15:19:16 +02:00
hc-github-team-secure-vault-core
59a02a1631 backport of commit a29ba45a3a (#21713) (#21753)
* fix milestone

* only pr milestone check and fix actionlint

* fix actionlint

* add comments saying that the event types work

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-07-13 10:25:21 +02:00
hc-github-team-secure-vault-core
43b6d90445 backport of commit a98c0d9cbe (#21796)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-07-12 21:04:23 +00:00
hc-github-team-secure-vault-core
5bd8506c3a [QT-589] Use the go module cache between CI and build (#21764) (#21789)
In order to reliably store Go test times in the Github Actions cache we
need to reduce our cache thrashing by not using more than 10gb over all
of our caches. This change reduces our cache usage significantly by
sharing Go module cache between our Go CI workflows and our build
workflows. We lose our per-builder cache which will result in a bit of
performance hit, but we'll enable better automatic rebalancing of our CI
workflows. Overall we should see a per branch reduction in cache sizes
from ~17gb to ~850mb.

Some preliminary investigation into this new strategy:

Prior build workflow strategy on a cache miss:
  Download modules: ~20s
  Build Vault: ~40s
  Upload cache: ~30s
  Total: ~1m30s

Prior build workflow strategy on a cache hit:
  Download and decompress modules and build cache: ~12s
  Build Vault: ~15s
  Total: ~28s

New build workflow strategy on a cache miss:
  Download modules: ~20
  Build Vault: ~40s
  Upload cache: ~6s
  Total: ~1m6s

New build workflow strategy on a cache hit:
  Download and decompress modules: ~3s
  Build Vault: ~40s
  Total: ~43s

Expected time if we used no Go caching:
  Download modules: ~20
  Build Vault: ~40s
  Total: ~1m

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-07-12 19:20:41 +00:00
Sarah Chavis
64b74211bb Manual backport of user lock updates to 1.13.x branch (#21766) 2023-07-11 15:49:15 -07:00
hc-github-team-secure-vault-core
e64f54487f backport of commit 237b9f7140 (#21659)
Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
2023-07-11 15:58:48 -04:00
hc-github-team-secure-vault-core
73c9a5be39 Backport of update github.com/protonmail/go-crypto into release/1.13.x (#21575)
* update github.com/protonmail/go-crypto

Updates the transitive dependency github.com/cloudflare/circl which will help address scanning noise related to CVE-2023-1732.

Vault is not affected by this issue as it does not use the vulnerable functionality.

* go mod tidy

---------

Co-authored-by: mickael e <mickael@hashicorp.com>
2023-07-11 19:18:33 +00:00
hc-github-team-secure-vault-core
c49f9ea384 backport of commit a053c616ba (#21691)
Co-authored-by: Rebecca Willett <47540675+rebwill@users.noreply.github.com>
2023-07-11 15:16:14 +00:00
hc-github-team-secure-vault-core
6b68741911 backport of commit 9ace8751ff (#21726)
Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>
2023-07-10 12:50:58 -07:00
hc-github-team-secure-vault-core
7709549221 backport of commit 9c8a7422ad (#21664)
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
2023-07-10 19:16:11 +00:00
Ryan Cragun
b465b7e111 ci: use the correct version of node for test-ui (#21733)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-07-10 12:52:59 -06:00
hc-github-team-secure-vault-core
a63e7cb4b8 backport of commit ece2995ee1 (#21730)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-10 18:06:48 +00:00
hc-github-team-secure-vault-core
7c8408e6af backport of commit e29842e49e (#21711)
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2023-07-10 13:55:12 +00:00
hc-github-team-secure-vault-core
5ee5e2ce46 backport of 8c18f24b9d (#21611) (#21614)
* combine into one checker

* combine and simplify ci checks

* add to test package list

* remove testing test

* only run deprecations check

* only run deprecations check

* remove unneeded repo check

* fix bash options

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-07-10 15:25:45 +02:00
hc-github-team-secure-vault-core
e3646c2ff7 backport of commit 5919645a70 (#21706)
Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-07-10 10:59:13 +00:00
hc-github-team-secure-vault-core
e1220bf6ad backport of commit d18242dae4 (#21696)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-07-07 20:24:33 +00:00
hc-github-team-secure-vault-core
25a8958676 backport of commit 87d37fecb7 (#21687)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-07-07 19:55:02 +00:00
hc-github-team-secure-vault-core
b46f39a001 backport of commit 34d1d200ee (#21675)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-07-07 15:35:31 -04:00
hc-github-team-secure-vault-core
d9489b8daf VAULT-17592 Extract failed Go test results across runners (#21625) (#21671)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-07 19:30:51 +00:00
hc-github-team-secure-vault-core
d45a05c701 backport of commit 95b44add74 (#21668)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-07 16:42:30 +00:00
Bianca Moreira
39752b870a Add high privilege namespace (#21215) (#21647) 2023-07-07 16:03:41 +02:00
hc-github-team-secure-vault-core
d66520d12b backport of commit 4fd4a0693d (#21402)
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
2023-07-06 20:01:32 +00:00
Austin Gebauer
8a9e9bf92c secrets/azure: upgrade to v0.15.1 for bug fix (#21632)
* secrets/azure: upgrade to v0.15.1 for bug fix

* adds changelog
2023-07-06 12:57:24 -07:00