Commit Graph

102 Commits

Author SHA1 Message Date
Daniel Nephin 801bfb9477 ci: debugging for golangci-lint download failing
We've seen a few CI runs fail with "exit status 52". This will hopefully give us more detail about what is failing.
2020-05-11 19:54:18 -04:00
Alvin Huang fad0d74182 use environment variables in website-docker-image for website docker image push 2020-04-28 13:38:38 -04:00
Jeff Escalante 6945548f42
circle docker image config 2020-04-28 12:53:26 -04:00
Daniel Nephin 2d0895c2ae Upgrade gotestsum to latest
0.4.2 should fix some bugs in test2json causing missing output.
2020-04-21 14:05:46 -04:00
Hans Hasselberg b78220981c
connect: support envoy 1.14.1 (#7624) 2020-04-09 20:58:22 +02:00
Alvin Huang c5f5cfddf6
filter out non go branches from the 'go-tests' workflow (#7606) 2020-04-07 15:39:23 -04:00
Daniel Nephin 4abb00cd17 ci: Fix working_directory for go mod download
The previous PR which added these was accidentally performing the download
in the root directory. For the api, and sdk directories it should be in done
in the same directory that will be used to run tests. Otherwise the
wrong dependencies will be downloaded which may add unnecessary time to
the CI run.
2020-04-01 17:02:23 -04:00
Daniel Nephin 2b5eb83ffb Upload coverage from each job
Allows us to remove the merge coverage report step
2020-03-31 14:43:13 -04:00
Daniel Nephin cbd6508b5f ci: Increase GOMAXPROCS so that the tests run faster 2020-03-31 12:32:23 -04:00
Daniel Nephin 62ed95fbef ci: small improvements
Run 'go mod download' first so that dependencies are pulled in a
separate step. This makes the test splitting and test output easier
to scroll through.

Remove test splitting from the api/sdk test runs. These jobs do not
use parallelism, so there is no test timing data injected into the
job. They can't be split.

Remove the dependencies from the go-test job, so that we can start
the slowest test job earlier in the workflow.
2020-03-31 11:52:58 -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
Alvin Huang 6961fb571e
rebuild UI for master/ui-staging dev docker image (#7530) 2020-03-27 15:33:49 -04:00
Alvin Huang ce81e026de
add ssh package and push to branch before notifying (#7517) 2020-03-26 15:23:31 -04:00
Daniel Nephin 759ea803e5
Merge pull request #7496 from hashicorp/dnephin/add-lint-to-makefile
Add lint to makefile
2020-03-26 10:48:21 -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 3b0696565d
Merge pull request #7481 from hashicorp/dnephin/go1.14
ci: Upgrade Go to 1.14.1
2020-03-24 16:23:53 -04:00
Daniel Nephin 8fa1388ba3
Merge pull request #7440 from hashicorp/dnephin/golangci-lint
ci: Use golangci-lint for linting
2020-03-24 16:00:59 -04:00
Daniel Nephin e3b4cd9b90 ci: Upgrade Go to 1.14.1 2020-03-24 15:55:47 -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 8e0df141ff ci: fix cherry-pick job by using newer git
37897bfc27 made it possible to use
the -m flag with cherry-pick, even when the target is not a merge commit.

This commit changes the image used to run the cherry-pick job to alpine so that we get
a more recent version of git.

The alpine image will also download much faster when the CI node does not have the image cached.
2020-03-23 14:30:32 -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
Daniel Nephin ebe622b4a3 ci: Remove restore_cache
As of go1.13 it is faster to download dependencies from the module
proxy service, than to download a cached /go/pkg/mod
2020-03-11 15:50:42 -04:00
Alvin Huang c2b5edf805
add auto cherry-picking (#7406)
* add auto cherry-picking

* exit on git cherry-pick failure

* release branches are #.#.x
2020-03-06 17:59:14 -05:00
Mike Morris 89abe301aa Update config.yml 2020-02-18 13:27:48 -05:00
Alvin Huang ea809b3f17
skip go build and tests on ui/* branches (#7303)
* skip go build and tests on ui/* branches

* also filter out lint-consul-retry since it runs in parallel with check-vendor
2020-02-14 09:40:02 -05:00
Alvin Huang c0a85ffdb7
only run website workflow on docs/* branches (#7299) 2020-02-13 21:41:37 -05:00
Alvin Huang a2ed78453e
remove docker layer caching (#7277) 2020-02-12 13:56:16 -05: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
Hans Hasselberg 4ae725cab2
add envoy version 1.12.2 and 1.13.0 to the matrix (#7240)
* add 1.12.2

* add envoy 1.13.0

* Introduce -envoy-version to get 1.10.0 passing.

* update old version and fix consul-exec case

* add envoy_version and fix check

* Update Envoy CLI tests to account for the 1.13 compatibility changes.

Co-authored-by: Matt Keeler <mkeeler@users.noreply.github.com>
2020-02-10 14:53:04 -05:00
John Cowen ee956a4cfe
Merge pull request #7241 from hashicorp/ui-staging
UI Release Merge (ui-staging merge)
2020-02-07 16:07:05 +00:00
John Cowen 4be0f6c061
ui: Run 2 separate test runs oss and ent (#7214)
* ui: Make API integration tests aware of CONSUL_NSPACES_ENABLED

* ui: Allow passing CONSUL_NSPACES_ENABLED in via the cli in ember

* ui: Add more makefile targets/package scripts to switch NSPACEs on/off

* ui: Ensure all acceptance tests continue to pass with NSPACEs on/off

This required a little tweaking of the dictionary, at some point
page-navigation and some of these little tweaks will no longer be
required

* ui: Try running CI frontend tests in two parellel runs oss/ent

* ui: Use correct make target, use different names for the reports
2020-02-07 11:02:53 +00:00
Kenia cabc189b50
Merge pull request #7235 from hashicorp/ui-staging
ui: UI Release Merge (ui-staging merge)
2020-02-06 15:34:02 -05:00
Hans Hasselberg b528667328
build: update to golang 1.12.16 (#7153) 2020-02-03 18:20:03 +01:00
John Cowen 0d44ebb588
ui: Actually remove CI parallelism (#7190) 2020-01-31 14:47:39 +00:00
John Cowen ca6f73abe2
ui: Move CI to use the Makefile for testing (+ tmporary removal of exam) (#7188)
* ui: Move CI to use the Makefile for testing (+ tmporary removal of exam)

* ui: make a specific test-ci target as we are using --path dist

--path dist looks for a previous build to test against, in CI this
exists as we run a build first, but locally potentially this dist folder
doesn't
2020-01-31 14:12:35 +00:00
Alvin Huang 98a83dbf89
use 4 parallelism for go-test and print package names (#7152) 2020-01-28 12:21:55 -05:00
Kit Patella a0425c64de
CI: Extract remaining values of /tmp/test-results into yaml reference (#6964)
* ci: extract value /tmp/test-results into yaml reference calls

* ci: correctly subtitute a var in bash, womp womp
2019-12-17 15:18:10 -08: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
Mike Morris 3a98249607
coverage: disable comment and project status, set informational mode (#6954)
* ci: set verbose mode for CodeCov upload

* coverage: rename config to codecov.yml
2019-12-17 11:51:52 -05:00
R.B. Boyer 88d9d0fb09
build: fix makefile and CI 'fmt' and 'vet' tasks (#6937) 2019-12-11 12:32:11 -06:00
Mike Morris 5a2a8ec6f3
ci: set GOMAXPROCS (#6908)
* ci: add comment clarify rationale for setting GOMAXPROCS
2019-12-09 15:57:39 -05:00
Matt Keeler 71c6b77c6f
Turn down some parallelism 2019-11-25 14:34:24 -05:00
Alvin Huang 3fecef1368
add code coverage reporting (#6682)
* add coverage reporting

* add codecov reports

* pass in SHA to codecov

* ignore bindata_assetfs.go file from codecov
2019-11-22 11:49:02 -05:00
Alvin Huang 9bdc65a915
upgrade go to 1.12.13 (#6759) 2019-11-08 13:59:32 -05:00
Alvin Huang bd0f9e3358
ignore all workflows except website for stable-website (#6747) 2019-11-08 12:55:56 -05:00
Alvin Huang 8dad4143f3
modify netlify-cli installation (#6674)
* modify netlify CLI installation

* bump middleman-hashicorp to 0.3.40 to include ssh
2019-10-23 13:54:19 -04:00
Matt Keeler f9a43a1e2d
ACL Authorizer overhaul (#6620)
* ACL Authorizer overhaul

To account for upcoming features every Authorization function can now take an extra *acl.EnterpriseAuthorizerContext. These are unused in OSS and will always be nil.

Additionally the acl package has received some thorough refactoring to enable all of the extra Consul Enterprise specific authorizations including moving sentinel enforcement into the stubbed structs. The Authorizer funcs now return an acl.EnforcementDecision instead of a boolean. This improves the overall interface as it makes multiple Authorizers easily chainable as they now indicate whether they had an authoritative decision or should use some other defaults. A ChainedAuthorizer was added to handle this Authorizer enforcement chain and will never itself return a non-authoritative decision.

* Include stub for extra enterprise rules in the global management policy

* Allow for an upgrade of the global-management policy
2019-10-15 16:58:50 -04:00
Alvin Huang 1df7b0b829
add go cache to distro builds (#6600) 2019-10-08 15:55:36 -04:00
John Cowen 338812f5c2
ui: UI Release Merge (ui-staging merge) (#6527)
## HTTPAdapter (#5637)

## Ember upgrade 2.18 > 3.12 (#6448)

### Proxies can no longer get away with not calling _super

This means that we can't use create anymore to define dynamic methods.
Therefore we dynamically make 2 extended Proxies on demand, and then
create from those. Therefore we can call _super in the init method of
the extended Proxies.

### We aren't allowed to reset a service anymore

We never actually need to now anyway, this is a remnant of the refactor
from browser based confirmations. We fix it as simply as possible here
but will revisit and remove the old browser confirm functionality at a
later date

### Revert classes to use ES5 style to workaround babel transp. probs

Using a mixture of ES6 classes (and hence super) and arrow functions
means that when babel transpiles the arrow functions down to ES5, a
reference to this is moved before the call to super, hence causing a js
error.

Furthermore, we the testing environment no longer lets use use
apply/call on the constructor.

These errors only manifests during testing (only in the testing
environment), the application itself runs fine with no problems without
this change.

Using ES5 style class definitions give us freedom to do all of the above
without causing any errors, so we reverted these classes back to ES5
class definitions

### Skip test that seems to have changed due to a change in RSVP timing

This test tests a usecase/area of the API that will probably never ever
be used, it was more testing out the API. We've skipped the test for now
as this doesn't affect the application itself, but left a note to come
back here later to investigate further

### Remove enumerableContentDidChange

Initial testing looks like we don't need to call this function anymore,
the function no longer exists

### Rework Changeset.isSaving to take into account new ember APIs

Setting/hanging a computedProperty of an instantiated object no longer
works. Move to setting it on the prototype/class definition instead

### Change how we detect whether something requires listening

New ember API's have changed how you can detect whether something is a
computedProperty or not. It's not immediately clear if its even possible
now. Therefore we change how we detect whether something should be
listened to or not by just looking for presence of `addEventListener`

### Potentially temporary change of ci test scripts to ensure deps exist

All our tooling scripts run through a Makefile (for people familiar with
only using those), which then call yarn scripts which can be called
independently (for people familar with only using yarn).

The Makefile targets always check to make sure all the dependencies are
installed before running anything that requires them (building, testing
etc).

The CI scripts/targets didn't follow this same route and called the yarn
scripts directly (usually CI builds a cache of the dependencies first).

For some reason this cache isn't doing what it usually does, and it
looks as though, in CI, ember isn't installed.

This commit makes the CI scripts consistently use the same method as all
of the other tooling scripts (Makefile target > Install Deps if
required > call yarn script). This should install the dependencies if
for some reason the CI cache building doesn't complete/isn't successful.

Potentially this commit may be reverted if, the root of the problem is
elsewhere, although consistency is always good, so it might be a good
idea to leave this commit as is even if we need to debug and fix things
elsewhere.

### Make test-parallel consistent with the rest of the tooling scripts

As we are here making changes for CI purposes (making test-ci
consistent), we spotted that test-parallel is also inconsistent and also
the README manual instructions won't work without `ember` installed
globally.

This commit makes everything consistent and changes the manual
instructions to use the local ember instance that gets installed via
yarn

### Re-wrangle catchable to fit with new ember 3.12 APIs

In the upgrade from ember 3.8 > 3.12 the public interfaces for
ComputedProperties have changed slightly. `meta` is no longer a public
property of ComputedProperty but of a ComputedDecoratorImpl mixin
instead.

7e4ba1096e/packages/%40ember/-internals/metal/lib/computed.ts (L725)

There seems to be no way, by just using publically available
methods, to replicate this behaviour so that we can create our own
'ComputedProperty` factory via injecting the ComputedProperty class as
we did previously.

3f333bada1/ui-v2/app/utils/computed/factory.js (L1-L18)

Instead we dynamically hang our `Catchable` `catch` method off the
instantiated ComputedProperty. In doing it like this `ComputedProperty`
has already has its `meta` method mixed in so we don't have to manually
mix it in ourselves (which doesn't seem possible)

This functionality is only used during our work in trying to ensure
our EventSource/BlockingQuery work was as 'ember-like' as possible (i.e.
using the traditional Route.model hooks and ember-like Controller
properties). Our ongoing/upcoming work on a componentized approach to
data a.k.a `<DataSource />` means we will be able to remove the majority
of the code involved here now that it seems to be under an amount of
flux in ember.

### Build bindata_assetfs.go with new UI changes
2019-09-30 14:47:49 +01:00
R.B. Boyer 1d54909333
connect: intermediate CA certs generated with the vault provider lack URI SANs (#6491)
This only affects vault versions >=1.1.1 because the prior code
accidentally relied upon a bug that was fixed in
https://github.com/hashicorp/vault/pull/6505

The existing tests should have caught this, but they were using a
vendored copy of vault version 0.10.3. This fixes the tests by running
an actual copy of vault instead of an in-process copy. This has the
added benefit of changing the dependency on vault to just vault/api.

Also update VaultProvider to use similar SetIntermediate validation code
as the ConsulProvider implementation.
2019-09-23 12:04:40 -05:00