Commit Graph

37 Commits

Author SHA1 Message Date
Hamid Ghaf
163c03f514 exclude changelog in verifying doc/ui PRs (#23601) 2023-10-11 08:18:23 -07:00
hashicorp-copywrite[bot]
0b12cdcfd1 [COMPLIANCE] License changes (#22290)
* Adding explicit MPL license for sub-package.

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Adding explicit MPL license for sub-package.

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Updating the license from MPL to Business Source License.

Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl.

* add missing license headers

* Update copyright file headers to BUS-1.1

* Fix test that expected exact offset on hcl file

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Sarah Thompson <sthompson@hashicorp.com>
Co-authored-by: Brian Kassouf <bkassouf@hashicorp.com>
2023-08-10 18:14:03 -07:00
Nick Cabatoff
7398afcc9a Instead of looking for a comment that contains our signature string, require that it startswith that string. (#22047) 2023-07-25 09:57:07 -04:00
miagilepner
3b00dde1ba Limit number of tests in CI comment (#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
2023-07-20 11:21:49 +02:00
miagilepner
dc104898f7 VAULT-17660: create CI github comment (#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>
2023-07-18 17:31:29 +02:00
Hamid Ghaf
f3e9d159d3 report build failures in a PR comment (#21722)
* report build failures in a PR comment

* address action linter

* linter

* add an id

* change permission

* report failure from build yaml

* linter fix

* report workflow url

* reorder jobs

* complete boolean eval

* single quote

* experiment getting failed jobs

* linter

* pass failed jobs one by one

* failed jobs are reported cancelled

* use * instead of @

* some polishing

* find comment ID, create or update it

* some clean up

* missing }
2023-07-17 07:45:32 -07:00
John-Michael Faircloth
c121728a69 plugin automation: use gh cli and add labels (#21657)
* plugin automation: use gh cli and add labels

* remove unneeded fields

* reorder steps

* remove comment

* fix typo

* add some validation
2023-07-12 16:28:56 -04:00
Mike Palmiotto
702c521489 Auto-balancing test runners (#21745)
Integrate the `test-go` workflow with `gotestsum tool ci-matrix`. The
tool uses the output of `go list ./...` along with timing files emitted
by `gotestsum` to generate a test matrix of 16 runners with evenly
distributed runtimes.

We intentionally ignore binary, docker-based test files for the initial
matrix creation and then inject a 17th runner, dedicated to building
Vault and running the entire binary test suite together. This avoids
duplication of build overhead when binary tests are rebalanced across
multiple runners in the generated matrix.

In order to maintain test results from previous runs, we cache the test
results after every run of `gotestsum`. Each cache entry occupies ~36MB
after compression on enterprise, at the time of this commit.

We'll have to keep an eye on this to make sure timing data is not
evicted from the cache, but in theory it should be toward the top of the
LRU entries.
2023-07-12 11:19:50 -04:00
Hamid Ghaf
3443ff1cc1 use verify changes for docs to skip tests (#21620)
* use verify changes for docs to skip tests

* add verify-changes to the needed jobs

* skip go tests for doc/ui only changes

* fix a job ref

* change names, remove script

* remove ui conditions

* separate flags

* feedback
2023-07-11 09:06:48 -07:00
John-Michael Faircloth
506db7b9bf workflows: update plugin check job to use branch as ref (#21638)
* workflows: update plugin check job to use branch as ref

* make actionlint happy
2023-07-06 21:18:52 +00:00
kpcraig
9930849f82 Plugin workflow updates (#21581)
Update/Polish plugin-dispatched vault-side plugin workflow
2023-07-06 10:50:09 -04:00
miagilepner
8c18f24b9d VAULT-17734, VAULT-17735: Combine linters (#21611)
* 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
2023-07-06 15:18:42 +02:00
Peter Wilson
5c02e3f255 VAULT-17772: audit event base (#21577)
* observability/event package, and basic error
* sink types (and validation test)
* event types (and validation test)
* options for events (and tests)
* audit event type (and tests)
2023-07-06 10:06:27 +00:00
kpcraig
bbb01ed554 update plugin-dependency-check workflow (#21525) 2023-06-30 16:57:49 +00:00
kpcraig
3feb157fc7 fix curl, add reviewers, fix label call (#21522) 2023-06-30 15:49:28 +00:00
John-Michael Faircloth
00295d2bf5 plugin automation: fix create pr (#21518)
* plugin automation: fix create pr

* get vault pr num
2023-06-29 22:20:01 +00:00
kpcraig
208336d251 Add some debugging to figure out what is happening (#21516)
* println debugging

* add more print debugs
2023-06-29 21:07:28 +00:00
John-Michael Faircloth
ab97243ed0 plugin automation: fix branch name (#21515)
* plugin automation: fix branch name

* fix input name
2023-06-29 19:45:53 +00:00
John-Michael Faircloth
cc5240f47d updates to plugin update check (#21511)
* updates to plugin update check

* use script to make curl request easier
2023-06-29 16:23:52 +00:00
Christopher Swenson
cf48236a3c Move database connections map out to separate package (#21207)
The upcoming event main plugin will use a very similar pattern
as the database plugin map, so it makes sense to refactor this and move
this map out. It also cleans up the database plugin backend so that
it does not have to keep track of the lock.

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-06-22 10:20:13 -07:00
miagilepner
30aac443d0 Fix verify test packages GOPRIVATE (#21318) 2023-06-16 16:54:58 +00:00
Nick Cabatoff
d3ae2085ae Rework the test package tester to avoid grep pitfalls. (#21281) 2023-06-15 19:08:37 +00:00
Violet Hynes
f0c9519023 VAULT-15835 Add GHA that checks for nil, nil returns on functions that return an error (#21099)
* VAULT-15385 Add GHA that checks for nil, nil returns on functions that return an error

* VAULT-15385 add failing function, for sanity

* VAULT-15385 fix makefile

* VAULT-15385 remove test dir

* VAULT-15385 Fix typo

* VAULT-15385 fix job name

* VAULT-15385 Add test to packages

* VAULT-15835 add opt-out

* VAULT-15835 Wrong file for comment

* VAULT-15835 remove failing function

* VAULT-15835 return not nil-nil :)

* VAULT-15835 Restrict to two-result functions
2023-06-13 12:32:06 -04:00
Anton Averchenkov
21eccf8b8d agent: Add agent process supervisor tests (#20741) 2023-05-30 18:06:44 +00:00
Alexander Scheel
b8082f5234 sdk/helper/nonce -> go-secure-stdlib/nonceutil (#20737)
Depends on https://github.com/hashicorp/go-secure-stdlib/pull/73

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-05-25 20:57:08 +00:00
Alexander Scheel
b1f0d4e495 Add nonce service to sdk/helpers, use in PKI (#20688)
* Build a better nonce service

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add internal nonce service for testing

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add benchmarks for nonce service

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add statistics around how long tidy took

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Replace ACME nonces with shared nonce service

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add an initialize method to nonce services

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Use the new initialize helper on nonce service in PKI

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add additional tests for nonces

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Format sdk/helper/nonce

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Use default 90s nonce expiry in PKI

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Remove parallel test case as covered by benchmark

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add additional commentary to encrypted nonce implementation

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add nonce to test_packages

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-05-23 19:44:05 +00:00
Violet Hynes
3d7d8f4965 VAULT-15547 Agent/proxy decoupling, take two (#20634)
* VAULT-15547 Additional tests, refactoring, for proxy split

* VAULT-15547 Additional tests, refactoring, for proxy split

* VAULT-15547 Import reorganization

* VAULT-15547 Some missed updates for PersistConfig

* VAULT-15547 address comments

* VAULT-15547 address comments
2023-05-19 13:17:48 -04:00
Violet Hynes
6b4b0f7aaf VAULT-15547 First pass at agent/proxy decoupling (#20548)
* VAULT-15547 First pass at agent/proxy decoupling

* VAULT-15547 Fix some imports

* VAULT-15547 cases instead of string.Title

* VAULT-15547 changelog

* VAULT-15547 Fix some imports

* VAULT-15547 some more dependency updates

* VAULT-15547 More dependency paths

* VAULT-15547 godocs for tests

* VAULT-15547 godocs for tests

* VAULT-15547 test package updates

* VAULT-15547 test packages

* VAULT-15547 add proxy to test packages

* VAULT-15547 gitignore

* VAULT-15547 address comments

* VAULT-15547 Some typos and small fixes
2023-05-17 09:38:34 -04:00
Jaymala
a9aa744ae4 Update verify-changes to support external docs branches (#20535)
* Update verify-changes to support external docs branches

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Revert QT-545 as it Enos workflow is not a workflow_run event

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-05-08 15:03:23 -04:00
Nick Cabatoff
7012ce2637 Use a dedicated runner for the binary-based tests. (#20377) 2023-04-27 09:41:49 -04:00
Jaymala
788f337bbf Fix script to verify docs changes (#20317)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-24 13:16:01 -04:00
Jaymala
166f270613 [QT-517] Skip builds for docs PRs (#20036)
* [QT-517] Skip builds for docs changes

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* [QT-545] Enable Enos tests to also run on forked PRs

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Add comments and fix CI errors

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-21 10:58:47 -04:00
Alexander Scheel
c83a5629a6 Remove acme from CI test_packages (#19841)
Of course, forgetting to add it, I forgot to remove it...

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-03-30 07:20:58 -04:00
Alexander Scheel
c3fce3512c Tighten JWS algorithm lists (#19797)
* Add new PKI ACME subpackage to test_packages list

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Restrict JWS keys to specified algorithms

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-03-28 20:49:07 +00:00
Raymond Ho
ba963a8c65 VAULT-13614 Support SCRAM-SHA-256 encrypted passwords for PostgreSQL (#19616) 2023-03-21 12:12:53 -07:00
Hamid Ghaf
e55c18ed12 adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00
Marc Boudreau
d6c71614a8 Introduce GitHub Actions CI Workflow (#19449)
* Migrate subset of CircleCI ci workflow to GitHub Actions

Runs test-go and test-go-remote-docker with a static splitting of test packages

* [skip actions] add comment to explain the purpose of test-generate-test-package-lists.sh and what to do if it fails

* change trigger to push

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-03-06 16:57:55 -05:00