Commit Graph

129 Commits

Author SHA1 Message Date
Aaron Gable d873e01fa8
Update to go1.15rc2 for tests (#5013)
Go 1.15rc2 was released today. The diff from rc1 only includes one
change to the crypto/ package, but worth upgrading just to be ready
for the official 1.15 stable release.
2020-08-10 11:24:32 -07:00
Roland Bracewell Shoemaker 75b034637b
Update travis go versions (remove 1.14.1, add 1.15rc1) (#5002)
Fixes #4919.
2020-08-04 12:13:09 -07:00
Aaron Gable 696fc4e122
Enable testing on go1.14.5 (#4953)
New go version 1.14.5 was released today:
https://groups.google.com/g/golang-announce/c/XZNfaiwgt2w/m/E6gHDs32AQAJ
It includes a security fix for X.509 verification
(CVE-2020-14039, https://golang.org/issue/39360).
2020-07-14 11:28:39 -07:00
Jacob Hoffman-Andrews ca26126ca9
Replace master with main. (#4917)
Also, update an example username in mailer tests.
2020-06-30 16:39:39 -07:00
Jacob Hoffman-Andrews dbc7be8217
Add Travis testing for `main` branch. (#4900) 2020-06-24 11:22:22 -07:00
Roland Bracewell Shoemaker 2df78800e2
Setup issuance hierarchy in startservers.py (#4846)
Once we de-dupe startservers.install calls we may want to move
setupHierarchy there, but for now we need to call it from
integration-test.py and start.py.

Fixes #4842
2020-06-04 14:53:02 -07:00
Yuri Kunde Schlesner 697c221833
Fix Coveralls branch info and update README badges (#4831)
goveralls was not able to detect the current branch since #4735. Instead
of figuring out which variables are needed for it to work correctly,
this commit just propagates all environment variables with the TRAVIS_
prefix. In addition, to match the migration from travis-ci.org to
travis-ci.com, the service name was changed to `travis-pro`, as per the
Coveralls docs: https://docs.coveralls.io/supported-ci-services

Also updates the badges in the readme file. The badge wasn't updated when
we migrated to travis-ci.com. The travis-ci.org address now just has an
annoying redirect page which requires you to click a link to go to the
new page on travis-ci.com. The new badge just takes you there directly.
2020-05-28 17:35:06 -07:00
Jacob Hoffman-Andrews 908e8b5590
Test with Go 1.14.1 only. (#4785)
Now that we've deployed Go 1.14.1 in prod, we can remove 1.13.2 from our
test matrix.
2020-04-16 16:57:05 -07:00
Jacob Hoffman-Andrews 1f0d8c1e4f
Clean up .travis.yml (#4735)
We have a comment in .travis.yml indicating that Travis' version of docker-compose is too old for us, but that's no longer true, so we can simplify things and speed up by using the stock installed one.

The list of custom hostnames in .travis.yml that all point to localhost are no longer used. Instead we use a custom DNS server within our docker-compose setup. So this PR removes those hostnames.

Remove staging and release as special branches to have tests run. We no longer use branches as part of our release process.
2020-04-06 13:51:57 -07:00
Jacob Hoffman-Andrews 7e926ca4c6
Remove travis-before-install.sh. (#4733)
The comment in that script, that the master branch isn't present in
Travis builds, is no longer accurate. So we don't need this workaround
anymore.
2020-04-06 11:15:43 -07:00
Jacob Hoffman-Andrews df7ffbe206
Update .travis.yml in response to Travis' validation tool. (#4720)
In our builds, under "View config", Travis was showing two warnings and
4 info-level reports:

root: deprecated key sudo (The key `sudo` has no effect anymore.)
root: deprecated key sudo (The key `sudo` has no effect anymore.)
root: missing dist, using the default xenial
root: missing os, using the default linux
root: key matrix is an alias for jobs, using jobs
root: key matrix is an alias for jobs, using jobs

I believe this should fix all of these. I've selected xenial as the dist
for now because that's what we've been defaulting to, but we can switch
to bionic, which is newer (though it doesn't make much difference since
we're running most things in Docker).
2020-04-06 10:27:46 -07:00
Jacob Hoffman-Andrews 995e25e8c3
Start testing Go 1.14.1 in Travis. (#4718)
As part of the process, pin specific versions of protoc-gen-go, mockgen,
and goveralls. Protoc-gen-go recently released a version that was incompatible
with our current version of gRPC. Mockgen has a version that was generating
spurious diffs in our generate test phase, and goveralls recently added
some code that calls git branch --format=..., which breaks on the version of
git in our Docker image.

Pinning versions required forcing go get into module-aware mode, since the
old-style go get doesn't understand versions.
2020-04-06 09:18:00 -07:00
Jacob Hoffman-Andrews d4168626ad Fix orphan-finder (#4507)
This creates the correct type of backend service for the OCSP generator.
It also adds an invocation of orphan-finder during the integration
tests.

This also adds a minor safety check to SA that I hit while writing the
test. Without this safety check, passing a certificate with no DNSNames
to AddCertificate would result in an obscure MariaDB syntax error
without enough context to track it down. In normal circumstances this
shouldn't be hit, but it will be good to have a solid error message if
we hit it in tests sometime.

Also, this tweaks the .travis.yml so it explicitly sets BOULDER_CONFIG_DIR
to test/config in the default case. Because the docker-compose run
command uses -e BOULDER_CONFIG_DIR="${BOULDER_CONFIG_DIR}",
we were setting a blank BOULDER_CONFIG_DIR in default case.
Since the Python startservers script sets a default if BOULDER_CONFIG_DIR
is not set, we haven't noticed this before. But since this test case relies
on the actual environment variable, it became an issue.

Fixes #4499
2019-10-25 09:51:14 -07:00
Jacob Hoffman-Andrews 5ff750076c Move to Go 1.13.2. (#4490) 2019-10-17 15:39:04 -04:00
Daniel McCarney 3c543cca68
travis: remove stale rabbitmq hosts addon. (#4485)
We've long since killed off RabbitMQ usage in Boulder.
2019-10-16 13:39:44 -04:00
Daniel McCarney f5453fd33a
CI: remove Go 1.12.8 support. (#4445)
We've switched Boulder in staging/prod to builds generated with Go 1.13.
2019-09-23 12:38:53 -04:00
Daniel McCarney 93902965e5 Add Go 1.13 support, temporarily disable TLS 1.3 default. (#4435)
A unit test is included to verify that a TLS-ALPN-01 challenge to
a TLS 1.3 only server doesn't succeed when the `GODEBUG` value to
disable TLS 1.3 in `docker-compose.yml` is set. Without this env var
the test fails on the Go 1.13 build because of the new default:

```
=== RUN   TestTLSALPN01TLS13
--- FAIL: TestTLSALPN01TLS13 (0.04s)
    tlsalpn_test.go:531: expected problem validating TLS-ALPN-01 challenge against a TLS 1.3 only server, got nil
    FAIL
    FAIL        github.com/letsencrypt/boulder/va       0.065s
```

With the env var set the test passes, getting the expected connection
problem reporting a tls error:

```
=== RUN   TestTLSALPN01TLS13
2019/09/13 18:59:00 http: TLS handshake error from 127.0.0.1:51240: tls: client offered only unsupported versions: [303 302 301]
--- PASS: TestTLSALPN01TLS13 (0.03s)
PASS
ok      github.com/letsencrypt/boulder/va       1.054s
```

Since we plan to eventually enable TLS 1.3 support and the `GODEBUG`
mechanism tested in the above test is platform-wide vs package
specific I decided it wasn't worth the time investment to write a
similar HTTP-01 unit test that verifies the TLS 1.3 behaviour on a
HTTP-01 HTTP->HTTPS redirect.

Resolves https://github.com/letsencrypt/boulder/issues/4415
2019-09-17 11:00:58 -07:00
Daniel McCarney c2d8876413
test: remove Go 1.12.0 support (#4401) 2019-08-14 17:26:35 -04:00
Roland Bracewell Shoemaker 04fb34c282 tools: add golang1.12.8 to travis (#4400) 2019-08-13 17:32:19 -04:00
Jacob Hoffman-Andrews 6560e8dea5 CI: test that docker-compose up works. (#4287) 2019-06-25 09:42:29 -04:00
Jacob Hoffman-Andrews 1014a81606 Switch to modules (#4211)
Because the package versions in go.mod match what we use in Godeps.json,
there are no substantive code diffs. However, there are some tiny
differences resulting from how go mod vendors things differently than
godep:

go mod does not preserve executable permissions on shell scripts
Some packages have import lines like:
package ocsp // import "golang.org/x/crypto/ocsp"

godep used to remove the comment from these lines, but go mod vendor does not.

This introduces several indirect dependencies that we didn't have
before. This is because godep used to operate at a package level, but
go mod operates at a module (~= repository) level. So if we used a
given repository, but didn't use all of its packages, we wouldn't
previously care about the transitive dependencies of the packages we
weren't using. However, in the go mod world, once we care about the
repository, we care about all of that repository's transitive
dependencies. AFAICT this doesn't affect vendoring.

Fixes #4116
2019-05-23 14:14:00 -07:00
Jacob Hoffman-Andrews e8aea434f4
Test cleanups: pipefail and one lint phase (#4156)
The `set` builtin needs to have a `-o` flag before `pipefail` to
actually set that option. Without `-o`, `pipefail` was ignored.

Also, we had a number of test phases that ran various types of linters,
all of them fast. This moves them all together in a single test phase
to make things easier to read, and to ensure they all run before
the integration and unit tests.
2019-04-16 10:14:32 -07:00
Daniel McCarney 57fc8a4a4c CI: remove Go 1.11.x (#4112)
We're officially on 1.12 in prod/staging and can deprecate the 1.11.x builds/tests in CI.
2019-03-14 12:03:30 -07:00
Jacob Hoffman-Andrews 2f6626afca Add Go 1.12 to Travis. (#4097)
* Add Go 1.12 to Travis.
* Update tag date.
* Fix go vet.
2019-03-06 16:45:11 -05:00
Jacob Hoffman-Andrews 80629eaff8 Remove Go 1.10 from test matrix. (#4092) 2019-03-01 08:13:33 -05:00
Roland Bracewell Shoemaker a6a00cb2ee Add ineffassign to CI tests (#4056) 2019-02-14 09:47:16 -05:00
Jacob Hoffman-Andrews 3cbc291af9
Update Go versions used in build. (#4029) 2019-01-23 16:23:27 -08:00
Daniel McCarney b29c762167 CI/Dev: Update Go 1.11.3 -> 1.11.4, update challtestsrv. (#3996)
1. Updates both boulder tools images to use an update `pebble-challtestsrv`
2. Updates the Go 1.11.3 boulder tools image to Go 1.11.4
3. Updates the vendored `challtestsrv` dep to 1.0.2

This fixes a panic in the `challtestsrv` library and prepares us to move directly 
to 1.11.4 after we've resolved the outstanding issues keeping us on the 1.10.x 
stream in prod/staging.

There are no unit tests to run for item 3.
2019-01-09 11:27:43 -08:00
Jacob Hoffman-Andrews 340c1e4681
Bump Go versions in boulder-tools. (#3987) 2018-12-13 16:26:20 -08:00
Daniel McCarney 965acf381b
CI/Dev: Go 1.11.1 -> 1.11.2 (#3945) 2018-11-19 15:21:53 -05:00
Daniel McCarney 3319246a97 Dev/CI: Add Go 1.11.1 builds (#3888)
Resolves https://github.com/letsencrypt/boulder/issues/3872

**Note to reviewers**: There's an outstanding bug that I've tracked down to the `--load` stage of the integration tests that results in one of the remote VA instances in the `test/config-next` configuration under Go 1.11.1 to fail to cleanly shut down. I'm working on finding the root cause but in the meantime I've disabled `--load` during CI so we can unblock moving forward with getting Go 1.11.1 in dev/CI. Tracking this in https://github.com/letsencrypt/boulder/issues/3889
2018-10-19 09:38:20 -07:00
Daniel McCarney fa9a79b55f
CI/Dev: Remove Go 1.10.2. (#3761)
We've migrated the production/staging Boulder instances to builds using
Go 1.10.3 and can now remove the Go 1.10.2 builds from the travis matrix
and the `tag_and_upload.sh` Boulder tools script.
2018-06-14 12:04:29 -04:00
Daniel McCarney b9dd06ad85 CI/Dev: Add Go 1.10.3 to build matrix. (#3751) 2018-06-11 15:55:26 -07:00
Jacob Hoffman-Andrews dbcb16543e Start using multiple-IP hostnames for load balancing (#3687)
We'd like to start using the DNS load balancer in the latest version of gRPC. That means putting all IPs for a service under a single hostname (or using a SRV record, but we're not taking that path). This change adds an sd-test-srv to act as our service discovery DNS service. It returns both Boulder IP addresses for any A lookup ending in ".boulder". This change also sets up the Docker DNS for our boulder container to defer to sd-test-srv when it doesn't know an answer.

sd-test-srv doesn't know how to resolve public Internet names like `github.com`. Resolving public names is required for the `godep-restore` test phase, so this change breaks out a copy of the boulder container that is used only for `godep-restore`.

This change implements a shim of a DNS resolver for gRPC, so that we can switch to DNS-based load balancing with the currently vendored gRPC, then when we upgrade to the latest gRPC we won't need a simultaneous config update.

Also, this change introduces a check at the end of the integration test that each backend received at least one RPC, ensuring that we are not sending all load to a single backend.
2018-05-23 09:47:14 -04:00
Jacob Hoffman-Andrews ef0324727d Remove exclude for Go 1.10.2 coverage build. (#3728) 2018-05-21 13:07:28 -04:00
Daniel McCarney 700219a4a0
Dev/CI: Remove Go 1.10.1, default to 1.10.2 (#3711)
Production/staging have been updated to a release built with Go 1.10.2.
This allows us to remove the Go 1.10.1 builds from the travis matrix and
default to Go 1.10.2.
2018-05-11 16:25:25 -04:00
Jacob Hoffman-Andrews a4421ae75b Run gRPC backends on multiple IPs instead of multiple ports (#3679)
We're currently stuck on gRPC v1.1 because of a breaking change to certificate validation in gRPC 1.8. Our gRPC balancer uses a static list of multiple hostnames, and expects to validate against those hostnames. However gRPC expects that a service is one hostname, with multiple IP addresses, and validates all those IP addresses against the same hostname. See grpc/grpc-go#2012.

If we follow gRPC's assumptions, we can rip out our custom Balancer and custom TransportCredentials, and will probably have a lower-friction time in general.

This PR is the first step in doing so. In order to satisfy the "multiple IPs, one port" property of gRPC backends in our Docker container infrastructure, we switch to Docker's user-defined networking. This allows us to give the Boulder container multiple IP addresses on different local networks, and gives it different DNS aliases in each network.

In startservers.py, each shard of a service listens on a different DNS alias for that service, and therefore a different IP address. The listening port for each shard of a service is now identical.

This change also updates the gRPC service certificates. Now, each certificate that is used in a gRPC service (as opposed to something that is "only" a client) has three names. For instance, sa1.boulder, sa2.boulder, and sa.boulder (the generic service name). For now, we are validating against the specific hostnames. When we update our gRPC dependency, we will begin validating against the generic service name.

Incidentally, the DNS aliases feature of Docker allows us to get rid of some hackery in entrypoint.sh that inserted entries into /etc/hosts.

Note: Boulder now has a dependency on the DNS aliases feature in Docker. By default, docker-compose run creates a temporary container and doesn't assign any aliases to it. We now need to specify docker-compose run --use-aliases to get the correct behavior. Without --use-aliases, Boulder won't be able to resolve the hostnames it wants to bind to.
2018-05-07 10:38:31 -07:00
Roland Bracewell Shoemaker 9920058ef0 Cleanup .travis.yml (#3691)
Our `.travis.yml` does some weird things that are a bit non-standard. This change brings it into line with the general Travis conventions - https://docs.travis-ci.com/user/customizing-the-build
2018-05-04 19:32:30 -04:00
Daniel McCarney 230db4ebd1 Dev/CI: Add Go 1.10.2 to build matrix. (#3690)
This PR adds Go 1.10.2 to the build matrix along with Go 1.10.1.

After staging/prod have been updated to Go 1.10.2 we can remove Go 1.10.1.

Resolves #3680
2018-05-04 12:35:11 -07:00
Daniel McCarney f235b96339 CI/Dev/Tools: Remove Go 1.10.0 builds/tests. (#3645)
We have updated staging/prod Boulder builds to use Go 1.10.1. This means
we no longer need to support Go 1.10.0 in dev docker images, CI, and our
image building tools.
2018-04-12 13:24:33 -07:00
Daniel McCarney aef2fbb13f Tools: Support multiple Go versions in CI/Dev. (#3622)
This PR updates the `test/boulder-tools/tag_and_upload.sh` script to template a `Dockerfile` for building multiple copies of `boulder-tools`: one per supported Go version. Unfortunately this is required because only Docker 17+ supports an env var in a Dockerfile `FROM`. It's best if we can stay on package manger installed versions of Docker which precludes 17+ 😞.

The `docker-compose.yml` is updated to version "3" to allow specifying a `GO_VERSION` env var in the respective Boulder `image` directives. This requires `docker-compose` version 1.10.0+ which in turn requires Docker engine version 1.13.0+. The README is updated to reflect these new requirements. This Docker engine version is commonly available in package managers (e.g. Ubuntu 16.04). A sufficient `docker-compose` version is not, but this is a simple one binary Go application that is easy to update outside of package managers.

The `.travis.yml` config file is updated to set the `GO_VERSION` in the build matrix, allowing build tasks for different Go versions. Since the `docker-compose.yml` now requires `docker-compose` 1.10.0+ the
`.travis.yml` also gains a new `before_install` for setting up a modern `docker-compose` version.

Lastly tools and images are updated to support both Go 1.10 (our current Go version) and Go 1.10.1 (the new point release). By default Go 1.10 is used, we can switch this once staging/prod are updated.

_*TODO*: One thing I haven't implemented yet is a `sed` expression in `tag_and_upload.sh` that updates both `image` lines in `docker-compose.yml` with an up-to-date tag. Putting this up for review while I work on that last creature comfort._

Resolves https://github.com/letsencrypt/boulder/issues/3551

Replaces https://github.com/letsencrypt/boulder/pull/3620 (GH got stuck from a yaml error)
2018-04-05 14:08:54 -07:00
Jacob Hoffman-Andrews 268d9b1491 Run v2 integration tests as part of v1 tests. (#3569)
- Remove acme-v2 test phase.
- Rename integration-test-v2.py to v2_integration, so it can be imported.
- Import all symbols from v2_integration before running test_*.
- In chisel2:
  - Rename DIRECTORY so it doesn't collide.
  - Incidental logging and error fixes.
- Merge v1 and v2 load testing into a single function.
- Run cert-checker just once, after all other test cases.
- In v2_integration:
  - Remove unnecessary imports.
  - Import chisel2 methods in the chisel2 namespace so they don't
    collide with chisel methods.
  - Remove main and shutdown code.
2018-03-19 10:19:02 -04:00
Daniel McCarney 8954a07a49 Bump Travis to use Go 1.10 (#3522) 2018-03-05 13:38:10 -08:00
Jacob Hoffman-Andrews e5a2c1abc9 Simplify docker-compose by eliminating build step. (#3497)
We have a Dockerfile that builds off of boulder-tools, but does
basically nothing. Removing it saves a build step and avoids some
hard-to-diagnose edge cases.

This change triggered an issue with the "prom" container and
"docker-compose up", saying that prom can't be linked to a not-running
container. Since we rarely use prom in dev/test, I'm removing it for
now. The nice, futuristic way to get containers to talk to each other is
with docker networking, so we can bring it back with a switch to docker
networking in the future if we want.
2018-02-28 09:42:57 -05:00
Jacob Hoffman-Andrews 8261d60ff9 Bump Go version and push new Docker image. (#3453)
Also, move the installation of `mock/model` above the removal of junk
directories; otherwise we get a "getcwd: no such file or directory"
error.
2018-02-16 09:27:19 -05:00
Jacob Hoffman-Andrews b369818ad6 Integration test for ACMEv2 (#3298) 2017-12-21 13:27:32 -05:00
Jacob Hoffman-Andrews b8ed544f86 Make fast_finish work. (#3150)
We have had fast_finish in our .travis.yml for a while but it wasn't working properly. I've moved things around so it now works correctly.
2017-10-06 09:35:40 -04:00
Roland Bracewell Shoemaker e91349217e Switch to using go 1.9 (#3047)
* Switch to using go 1.9

* Regenerate with 1.9

* Manually fix import path...

* Upgrade mockgen and regenerate

* Update github.com/golang/mock
2017-09-06 16:30:13 -04:00
Jacob Hoffman-Andrews 08cd61bcfa Consolidate "rpm" Travis task with another task. (#3022)
Travis only allows us 5 simultaneous build jobs, so going from 6 to 5 jobs per
build should reduce the wall time required to get a CI result on any given
branch.
2017-08-30 11:57:08 -07:00
Roland Bracewell Shoemaker 90ba766af9 Add NewOrder RPCs + methods to SA and RA (#2907)
Fixes #2875, #2900 and #2901.
2017-08-11 14:24:25 -04:00