Commit Graph

186 Commits (88d6487f4a95dfd4d699bdc155f1fff57a792efb)

Author SHA1 Message Date
Mark Rushakoff c2d88d4e70 ci: ensure go.sum matches original file from checkout
In go1.11, go mod vendor can modify go.sum when go.mod contains replace
directives. This behavior has been fixed in go1.12, so just work around
it for now.

Fixes #2056.
2018-12-20 10:04:55 -05:00
zhulongcheng a1f3ca5151 fix(ci): add required jobs 2018-12-16 18:21:33 +08:00
AJ Bond ac61849bc4 chore(ci): Setup nightly build 2018-12-13 16:48:09 -05:00
Mark Rushakoff c7064463a4 ci: use -p=4 on circle
The docker container we're using has 2 vCPUs. -p=8 was working fine for
a while, but diagnosing #1832 looks like the tsi1.test process was
likely getting OOM-killed. Reducing from -p=8 to -p=4 ought to reduce
memory pressure enough to avoid OOM kills, hopefully.

Also remove a stale TODO.
2018-12-13 08:46:00 -08:00
AJ Bond 5a0bcd7f2c chore(ci): Reset CircleCI cache logic 2018-12-07 14:17:03 -08:00
Michael Desa a4a9e1b45f chore: remove make test-integration from circle ci tests
Temporarily remove the call to make test-integration so that nightly
builds are not broken.

Related to https://github.com/influxdata/platform/issues/1676
2018-12-04 15:17:45 -05:00
Brandon Farmer f04d420709 Remove yarn in favor of just npm 2018-11-30 17:02:31 -08:00
Michael Desa 56de056085 feat(vault): add vault implementation of secret service
test(platform): run testcontainer integration tests for nightly release

Integration tests for the vault secret service using testcontiners
should not run along with unit tests, however, they should run on some
regular schedule. This commit introduces `make test-integration` which
runs integration tests for vault using testcontainers. The command introduced
relies on docker being available on the host it is executed on.

chore(platform): make go modules tidy

chore: try to fix go mod

chore(platform): remove explicit logrus dependency

chore(platform): run go mod tidy

chore(platform): replace github.com/Sirupsen/logrus with github.com/sirupsen/logrus

chore(platform): update docker dependency

feat(vault): add vault implementation of secret service

test(platform): run testcontainer integration tests for nightly release

Integration tests for the vault secret service using testcontiners
should not run along with unit tests, however, they should run on some
regular schedule. This commit introduces `make test-integration` which
runs integration tests for vault using testcontainers. The command introduced
relies on docker being available on the host it is executed on.

chore(platform): make go modules tidy

chore: try to fix go mod

chore(platform): run go mod tidy

feat(vault): add vault implementation of secret service

chore(platform): make go modules tidy

feat(platform): add Put/Patch/Delete methods on secret service

feat(vault): add Put/Patch/Delete methods on vault secret service

feat(http): add http handler methods for secret service

feat(bolt): add Put/Delete/Patch methods to bolt secret service

feat(testing): add tests for Put/Patch/Delete methods in secret service

feat(mock): add mock secret service

feat(http): add tests for secrets endpoints

feat(http): update swagger for secrets endpoints

chore: run go mod tidy
2018-11-30 13:07:32 -08:00
Edd Robinson 2471024253 Use staticcheck on next branch 2018-11-30 10:53:53 +00:00
Mark Rushakoff a7fdd17815 ci: re-enable race builds in circle config
I looked through the past few days of Circle Go failures, and they all
appeared to be real test errors, indicating that the -p=8 flag most
likely fixed the linker OOMs we were seeing.

If the race-enabled tests continue to OOM, we can try setting -p=2 to
match the number of CPUs actually available on our Circle container.
2018-11-12 08:24:43 -08:00
Mark Rushakoff d8dedc5644 ci: use -p=8 in GOFLAGS to reduce linker OOMs
The environment Go runs in thinks there are 32 CPUs, but according to
https://circleci.com/docs/2.0/configuration-reference/#resource_class
that's a known issue, and only 2 CPUs are actually available.

We're still overallocating with -p=8, so if we continue to get OOMs we
may need to reduce that further.
2018-11-02 17:21:33 -07:00
Mark Rushakoff 68c0ad29e2 ci: add megacheck to tools.go 2018-11-01 13:25:22 -07:00
Mark Rushakoff b37279c50e ci: remove 2/3 disabled exit-non-zero flags for megacheck
The one remaining failing static check is in a pigeon-generated promql
file. It looks like megacheck is supposed to ignore generated files by
default, so it's unclear at this time if this is a bug in megacheck, or
if fixing pigeon is the only path forward.
2018-11-01 12:54:46 -07:00
Mark Rushakoff 9acc251ab0 ci: re-enable megacheck 2018-11-01 12:46:33 -07:00
Michael Desa fdbec9303d chore(ui): update misc build files related to moving chronograf/ui to ui 2018-10-29 14:00:45 -04:00
Chris Goller 5c5b5f50c8 ci(tests): remove go race tests from circle
We think we are being OOM-killed as our plan as 4 GB of ram.
2018-10-26 15:56:11 -05:00
Jonathan A. Sternberg f3b2959e89
feat: save and restore the /go/pkg/mod directory in circleci 2018-10-11 16:11:36 -05:00
Jonathan A. Sternberg 0e14b63425
feat: checktidy will check the go.mod and go.sum files in circleci 2018-10-10 15:35:02 -05:00
Chris Goller 2f2334a3f3 ci(gofmt): check go formatting with each PR 2018-10-08 17:23:54 -05:00
Andrew Watkins e34d2e76ea
chronograf(v2-views): Introduce new view patterns, linting, and TypeScript 3.x (#901)
* Simplifiy color type

* Fix type

* Introduce V2 data shape for views

* WIP Split style and parsing to separate Dygraph components

* Add basic dygraph view types

* Add Gauge to v2 view shapes

* Upgrade TypeScript to ^3.0

* Add tsc to Circle build

* Fix Dygraph component paths

* Add testURL to jest config

* Upgrade lodash types

* Remove redundant test linter stetp

* Upgrade to TypeScript ^3

* Remove TableGraph (temporarily)
2018-09-27 10:46:48 -07:00
Jonathan A. Sternberg 46ed9bc4fb feat: switch to using go modules for building
This updates the dependency manager to use go modules instead of dep so
that we can remove dep as a dependency and we can begin using and giving
feedback on modules within this project. It should simplify dependency
management and make it faster to run the builds too.

The big change is updating the various Makefiles to stop relying on the
vendor directory because it no longer exists. This change creates a
`tools.go` file with the revisions of the tools we use that are currently
in the `required` section of `Gopkg.toml`. We are currently in other
discussions to modify how we handle tool dependency management, but this
change does not change that.
2018-09-20 08:33:15 -07:00
Mark Rushakoff a177069b49 ci: restore cache for deploy job
The last few runs of deploy took 3m33s, 3m40s, and 4m27s. It should be
noticeably faster after we restore the cache.
2018-08-28 15:20:36 -07:00
Mark Rushakoff 8a6749fc1c ci: share yarn cache on Circle
On a cache miss, `yarn install` via `make node_modules` takes about 42
seconds, plus about 19 seconds to upload the cache. See
https://circleci.com/gh/influxdata/platform/1872.

On a cache hit, `make node_modules` takes about 7 seconds to download
the cache plus 19 seconds to `yarn install`. See
https://circleci.com/gh/influxdata/platform/1877. Using the cache here
is a net gain of about 16 seconds on cache hit, which is the most likely
case given a random commit.
2018-08-28 14:43:04 -07:00
Mark Rushakoff 66b0ea1f14 ci: cache dep too
Running `dep ensure` via `make vendor`, with a clean dep cache, takes
around 30 seconds.

For run https://circleci.com/gh/influxdata/platform/1838, we can see
that `make vendor` took 33 seconds and saving the dep cache took 38
seconds. The 38 seconds to save the dep cache is paid the first time
that a particular version of Gopkg.lock is pushed. A subsequent run that
fully uses the dep cache costs 14 seconds to restore the dep cache and 5
seconds to run `make vendor`, so this saves about 10 seconds for any run
that doesn't change Gopkg.lock. See
https://circleci.com/gh/influxdata/platform/1840.
2018-08-28 13:59:25 -07:00
Mark Rushakoff d26233f47e ci: enable GOCACHE for Circle
With a clean GOCACHE, `make test-go` took about 30 seconds. It's hard to
tell the exact time since `make vendor` was implicitly executed in the
same block.

Now, `make test-go` uses GOCACHE and takes about 5 seconds to restore
the cache, then about 8 seconds to run through a fully cached set of
tests. If any test is actually broken or doesn't compile, this will give
us fast feedback.

But this change also runs `go test -race -count=1`, so that we fully
exercise any possible data races. That currently takes about 19 seconds.

Then finally we save GOCACHE, which has our `go test` results, and a
populated build cache for our test files, including built with the race
detector. Saving that takes about 14 seconds.

That means we took about 30 seconds originally to just run `go test
-count=1`, and now we take (5+8+19+14)=46 seconds to run plain go test
and go test with the race detector. There's probably an argument to be
made for just running with the race detector, but running both gives us
more coverage IMO, and it does allow us to run tests that aren't enabled
on race builds.

See https://circleci.com/gh/influxdata/platform/1840 for a run with full
caching.
2018-08-28 13:59:25 -07:00
Mark Rushakoff 548bf5d3da ci: use Go 1.11 in CircleCI 2018-08-28 13:59:25 -07:00
lukevmorris 7e9f90dbce
chore(ci): parallelize js and go tests (#670)
This PR teases apart the golang and js build steps so that they can be run in parallel in circleci, or locally with make test -j2.

Closes #599
2018-08-27 08:34:17 -07:00
Chris Goller 0ce8bb57ed ci(deploy): nightlies use circleci/golang:1.10.3-node-browsers 2018-07-25 17:27:33 -05:00
Michael Desa dc7418f7fe makefile: fix make file to run go generate 2018-07-23 17:42:03 -04:00
Jonathan A. Sternberg 54dde88da1 fix(circleci): setup remote docker so that the deploy works for nightlies 2018-07-17 17:32:34 -05:00
Jonathan A. Sternberg de61a79483 feat(docker): create a fluxd nightly docker image 2018-07-17 15:06:31 -05:00
Nathaniel Cook 08eb19805d chore(CI): Create nightly builds of ifqld
The builds are really anytime a commit is made to master not nightly.
Builds use goreleaser with the snapshot setting.
2018-05-23 09:13:46 -06:00
j. Emrys Landivar (docmerlin) 2f33928e1c add make vet 2018-05-23 00:21:26 -05:00
j. Emrys Landivar (docmerlin) 85c13d5f12 enable vet 2018-05-22 17:05:17 -05:00
Nathaniel Cook eb7210b107 fix(ci): fix circleci to use make file 2018-05-22 14:50:10 -06:00
docmerlin (j. Emrys Landivar) 6925c4b161 Circle ci 2018-05-16 10:43:33 -05:00