Commit Graph

164 Commits

Author SHA1 Message Date
R.B. Boyer bbd38e95ce
chore: upgrade mockery to v2 and regenerate (#12836) 2022-04-21 09:48:21 -05:00
DanStough a050aa39b9 Update go version to 1.18.1 2022-04-18 11:41:10 -04:00
John Murret 4d57b7d5e0
Setting DOCKER_DEFAULT_PLATFORM in make dev-docker so arm64 can build an amd64 containerwith and amd64 binary. (#12769) 2022-04-13 10:24:35 -05:00
R.B. Boyer 67bedd02cc
build: remove unused tools from being installed (#12671) 2022-04-05 16:01:02 -05:00
R.B. Boyer 744d79f55c
build: conditionally install or reinstall protobuf supporting tools as needed (#12674) 2022-04-05 11:58:07 -05:00
R.B. Boyer 9daed50c3d
build: run mog separately after the protobufs are generated (#12665)
Also ensure that we run mog serially on each package in dependency
order.
2022-03-31 13:49:42 -05:00
Eric 91a493efe9 Bump go-control-plane
* `go get cloud.google.com/go@v0.59.0`
* `go get github.com/envoyproxy/go-control-plane@v0.9.9`
* `make envoy-library`
* Bumpprotoc to 3.15.8
2022-03-30 13:11:27 -04:00
R.B. Boyer c5a2de0c9b
need two dollar signs for a shell variable in makefiles (#12657) 2022-03-30 10:37:44 -05:00
R.B. Boyer 232da6e8f4
build: auto install correct version of protoc locally (#12651) 2022-03-30 10:08:17 -05:00
R.B. Boyer 356d068a4f
build: install mog and execute it during protobuf compilation (#12647)
- also import replace isn't needed anymore
2022-03-29 15:18:05 -05:00
R.B. Boyer dcfcac433d
build: enforce protoc binary is the expected version (#12641) 2022-03-29 12:02:43 -05:00
Eric 14c9389fa9 code review changes 2022-03-29 09:36:34 -04:00
Eric ab5b5e85f5 remove the rest of gogo 2022-03-28 17:34:41 -04:00
Dhia Ayachi 5cb24b9bf8
split `pbcommon` to `pbcommon` and `pbcommongogo` (#12587)
* mogify needed pbcommon structs

* mogify needed pbconnect structs

* fix compilation errors and make config_translate_test pass

* add missing file

* remove redundant oss func declaration

* fix EnterpriseMeta to copy the right data for enterprise

* rename pbcommon package to pbcommongogo

* regenerate proto and mog files

* add missing mog files

* add pbcommon package

* pbcommon no mog

* fix enterprise meta code generation

* fix enterprise meta code generation (pbcommongogo)

* fix mog generation for gogo

* use `protoc-go-inject-tag` to inject tags

* rename proto package

* pbcommon no mog

* use `protoc-go-inject-tag` to inject tags

* add non gogo proto to make file

* fix proto get
2022-03-22 16:30:00 -04:00
R.B. Boyer 7b569127f6
build: ensure 'make linux' puts the binary in the expected location (#12494)
Fixes regression from #10833

Fixes dev-docker and test-docker targets
2022-03-02 14:18:26 -06:00
Daniel Nephin bb7f2f15b3 ca: require that tests that use Vault are named correctly
Previously we were using two different criteria to decide where to run a
test.  The main `go-test` job would skip Vault tests based on the
presence of the `vault` binary, but the `test-connect-ca-providers` job
would run tests based on the name.

This led to a scenario where a test may never run in CI.

To fix this problem I added a name check to the function we use to skip
the test. This should ensure that any test that requires vault is named
correctly to be run as part of the `test-connect-ca-providers` job.

At the same time I relaxed the regex we use. I verified this runs the
same tests using `go test --list Vault`.  I made this change because a
bunch of tests in `agent/connect/ca` used `Vault` in the name, without
the underscores. Instead of changing a bunch of test names, this seemed
easier.

With this approach, the worst case is that we run a few extra tests in
the `test-connect-ca-providers` job, which doesn't seem like a problem.
2022-02-28 16:13:53 -05:00
R.B. Boyer d2a5a06006
ensure make dev target puts the newly constructed binary onto the PATH (#12318)
This restores the prior behavior of make dev and ensures that tests
using the sdk package (like the api package) will correctly locate the
consul binary under test.

Also ensure the constructed consul binary is present on the path for sdk-based tests.
2022-02-11 10:45:37 -06:00
Daniel Nephin 7080e26c83 Replace build script with 'go build' 2022-02-03 07:19:57 -08:00
Jared Kirschner 40e6a4ead2 docs: link from makefile to compile instructions
Some practitioners look to the makefile directly rather than to the consul
website for information on how to compile from source. Link to the website
instructions directly from the makefile so the practitioner can accomplish
their task successfully without a careful read of the makefile.
2022-02-01 09:32:48 -08:00
R.B. Boyer 573670e8f7
build: switch to 'go install' over 'go get' (#11582)
Also add lint-consul-retry to the 'make tools' set.
2021-11-16 12:04:49 -06:00
Daniel Nephin 34c2d3737e build-support: remove test-flake machinery
This machinery was not used, and does not appear to be maintained. In practice we really
don't need anything to detect flaky tests. Our CI system identifies flaky tests at
https://app.circleci.com/insights/github/hashicorp/consul/workflows/go-tests/tests?branch=main

Mostly what we need is a way to reproduce flakes, which can be done directly with the Go
CLI, using the -race, -count, and (new in Go 1.17) -shuffle flags.
2021-10-21 17:16:25 -04:00
Daniel Nephin c7b09499a6 Update CI config and Makefile for vendor removal
Now that vendor is removed our CI can check that 'go mod tidy' makes no changes, instad of
checking vendor/modules.txt
2021-07-21 18:39:07 -04:00
Daniel Nephin 0cb479f782
Merge pull request #10353 from hashicorp/dnephin/prune-build-scripts-1
Remove a few unused things from build-support
2021-07-16 14:27:00 -04:00
R.B. Boyer 0537922c6c
connect/ca: require new vault mount points when updating the key type/bits for the vault connect CA provider (#10331)
progress on #9572
2021-07-13 11:11:46 -05:00
Daniel Nephin 1e0b233472 Remove a few unused things from build-support 2021-07-05 13:56:26 -04:00
Daniel Nephin c2cc9b6bda Update references to the main branch
The main branch is being renamed from master->main. This commit should
update all references to the main branch to the new name.

Co-Authored-By: Mike Morris <mikemorris@users.noreply.github.com>
2021-06-29 17:17:38 -04:00
R.B. Boyer 2b8da141c0
build: ensure each tool is built separately (#10303) 2021-05-26 16:40:15 -05:00
Dhia Ayachi 6aa915db8d
upgrade golangci-lint to v1.40.1 (#10276)
Also: fix linter issue detected with newer version
2021-05-24 22:22:37 -04:00
R.B. Boyer a305b9da8c
dev: adding a make target to regenerate envoy golden files (#10158) 2021-04-30 11:27:12 -05:00
R.B. Boyer 06cd0aaa8d
xds: ensure that all envoyproxy/go-control-plane protobuf symbols are linked into the final binary (#10131)
This ensures that if someone does include some extension Consul does not currently make use of, that extension is actually usable. Without linking these envoy protobufs into the main binary it can't round trip the escape hatches to send them down to envoy.

Whenenver the go-control-plane library is upgraded next we just have to re-run 'make envoy-library'.
2021-04-29 14:58:26 -05:00
R.B. Boyer 91d9544803
connect: connect CA Roots in the primary datacenter should use a SigningKeyID derived from their local intermediate (#9428)
This fixes an issue where leaf certificates issued in primary
datacenters using Vault as a Connect CA would be reissued very
frequently (every ~20 seconds) because the logic meant to detect root
rotation was errantly triggering.

The hash of the rootCA was being compared against a hash of the
intermediateCA and always failing. This doesn't apply to the Consul
built-in CA provider because there is no intermediate in use in the
primary DC.

This is reminiscent of #6513
2021-02-08 13:18:51 -06:00
Kyle Havlovitz 968fd8660d Update CI for leader renew CA test using Vault 2020-10-09 05:48:15 -07:00
Mike Morris 80aef1ca1d
test(vault): generate test coverage and upload to CodeCov (#8870) 2020-10-07 16:32:25 -04:00
Alvin Huang 28c8ac91bc
ci: fix bindata autoupdate (#8801)
* update bindata on ui-v2/ changes

* Revert "Remove GIT_SHA environment variable"

This reverts commit f620f9aefd41362ce76c3a8e0f4addf402ee0ca2.

* Revert "Hardcode in an app version for ember-cli-app-version"

This reverts commit 5ae493d79b34ef2143d78a44c21a63623140bba8.

* revert modtime change in #8712
2020-10-02 15:23:38 -04:00
Paul Banks 4c4c7266e6
Update all the references in CI and makefile to the bindata file location 2020-10-01 16:19:10 +01:00
Paul Banks a6c748ec1b
Refactor uiserver to separate package, cleaner Reloading 2020-10-01 11:32:25 +01:00
Alvin Huang a7353d925e
ci:add check for bindata_assetfs changes (#8712)
* add check for bindata_assetfs changes

* Remove GIT_SHA environment variable

* Hardcode in an app version for ember-cli-app-version

* change ' to " for CONSUL_UI_SETTINGS_PLACEHOLDER

Co-authored-by: John Cowen <jcowen@hashicorp.com>
Co-authored-by: hashicorp-ci <hashicorp-ci@users.noreply.github.com>
2020-09-29 17:03:45 -04:00
Daniel Nephin 1abd042162 ci: Add check-generated
And remove makefile targets that can be accomplished with --always-make
2020-07-29 12:10:44 -04:00
Daniel Nephin fb73c75411 Add script to print available module updates 2020-07-23 16:13:20 -04:00
Alvin Huang b478b09312
remove GIT_DESCRIBE variable since we have a revision line (#8310) 2020-07-14 15:17:45 -04:00
Daniel Nephin dcc76f8774
Make envoy integration tests a `go test` suite (#7842)
* test/integration: only run against 1 envoy version

These tests are slow enough that it seems unlikely that anyone is
running multiple versions locally. If someone wants to, a for loop
outside of run_test.sh should do the right thing.

Remove unused vars.

* Remove logic to iterate over test cases, run a single case

* Add a golang runner for integration tests

* Use build tags for envoy integration tests

And add junit-xml report
2020-05-19 14:00:00 -04:00
Daniel Nephin db1fb95f21
Merge pull request #7485 from hashicorp/dnephin/do-not-skip-tests-on-ci
ci: Make it harder to accidentally skip tests on CI, and doc why some are skipped
2020-03-31 11:15:44 -04:00
Daniel Nephin 874788dd66 Add lint to makefile
And support for setting build tags in CI lint job.

Removed the unused 'test-ci' target.
2020-03-24 16:34:02 -04:00
Daniel Nephin 8b6e07d960 ci: Run all connect/ca tests from the integration suite
To reduce the chance of some tests not being run because it does not
match the regex passed to '-run'.

Also document why some tests are allowed to be skipped on CI.
2020-03-24 15:22:01 -04:00
Daniel Nephin 4d485649d1 ci: Use golangci-lint for linting
Using golangci-lint has a number of advantages:

- adding new linters becomes much easier, its a couple lines of yaml config
  instead of more bash scripting

- it enables whitelisting of issues using inline comments or regex

- when running multiple linters less work is done. The parsed source can be reused
  by multiple linters

- linters are run in parallel to reduce CI runtime.
2020-03-17 13:43:40 -04:00
R.B. Boyer 0394ed2967
Switch to go 1.13.7 (#7262)
- You can no longer cross submodule boundaries with ./... in go
  subcommands like `go list` or `go test`. The makefile and CI scripts
  were updated accordingly.

- Also of note: `go mod vendor` now omits things build ignored.
2020-02-12 10:15:24 -06:00
R.B. Boyer 91ffba64e6
add 'make go-mod-tidy' to serially run tidy on all submodules in the correct order (#7179)
- also make go-mod-tidy a dependency of update-vendor
2020-02-03 10:12:26 -06:00
Matt Keeler cdacfcaa6d
Pass the git commits year through as an env var to the ui build (#7126) 2020-01-24 10:40:14 -05:00
R.B. Boyer 988273f2a1
test: run both the TestVaultProvider and TestVaultCAProvider tests in CI (#7097) 2020-01-21 12:01:35 -06:00
Kit Patella 7a4a55f570
Add CI test-integrations job for connect Vault CA provider (#6949)
* vault-ca-provider: add make target and CI test-integration job for /agent/connect/ca/ Vault Provider tests

* load env vars in the vault-ca-provider ci job

* add checkout task, see if we need to attach workspace or not

* ci: remove vault dependency from go-test job to ensure we only run the vault-provider tests in their job

* ci: fix from RB and Alvin code review, add mod cache after checkout

* ci: add CI context to make target and store test results

* ci: fix whitespace

* ci: create test results directory before we try to write to it
2019-12-17 13:22:32 -08:00