Work on Go Modules has been moving steadily with basic support in 1.11
and more mature support in the recently released 1.12. Eventually we
should look at using it for dependency management (away from `dep`) but
let's start by simply declaring the package name in a new `go.mod` to
allow building of our project outside the hell that is `GOPATH`.
Change-Id: I90b9f35194afe5538dce8db67b2b7c2d551bfaff
Wrote an OpenAPI 3.0 spec for Blubberoid that provides `x-amples`
entries compatible with service-checker.
The written spec includes basic schema for Blubber config objects that
may be later factored out for use in validation.
Note that OpenAPI 3.0 supports only the v4 draft of the JSON Schema
standard, so some parts of the configuration could not be fully
described. Specifically, v4 does not include the `patternProperties`
definition introduced in the JSON Schema v6 draft that would allow us to
describe `variants` and `runs.environment` and everything beneath.
Blubberoid was refactored slightly to incorporate the new spec as well
as assume JSON as the canonical and default configuration format. It was
also refactored to include a versioned namespace ("v1") after the server
endpoint.
Bug: T205920
Change-Id: I28a341aa503b8920d802715660d4c4d62be45475
Implemented additional rules in the Makefile to be more conventional.
Now you can do `make [all]` for both blubber and blubberoid binaries
without installing them, or `make blubber` and `make blubberoid` to
build them independently.
A `make clean` rule was also added.
Change-Id: Iaf52d9fbbc1c377c26a0cb21810af2e3d93778e5
Missed during the rename from blubberd -> blubberoid. The shell needed
to be changed to /bin/bash to accommodate the "{}" shell expansion which
doesn't work with sh.
Change-Id: I1743d58b17fe794b517e8d1d947ae29135bdc73d
The `blubber` command already gets everything it needs from explicit
inputs, which makes it an easy candidate for running as a simple
microservice. This patch provides exactly that in the form of
`blubberoid`, an HTTP server that processes Blubber configuration.
To start the daemon:
make && blubberoid
To use it:
curl -i -X POST --data-binary @blubber.example.yamlhttp://:8748/[variant]
Change-Id: Ieea73048d092b974da424ba40ddc90eaf693af0b
The `lint` rule was previous surfacing purely whitespace output of
`gofmt` as a failure and running `go tool vet` instead of `go vet` (the
former accepts source files as arguments, the latter takes package
names).
A real lint error in `config/node.go` was also fixed.
Change-Id: I7f13dcbb45a448f1ecac87e97527a7f4ed4d2c48
With the move to Gerrit and away from Phabricator/Arcanist, we lost an
easy way to run linters. New rules have been added to the `Makefile`,
`lint`, `unit`, and `test` that run linters, unit tests, and both
linters and unit tests, respectively.
Bug: T200452
Change-Id: I0742daaa14389841d88f13eba47dee07ac127cf2
All import paths and other references to the previously Blubber repo in
Phabricator have been changed to point to the new Gerrit project URL.
Note that building or testing against this change will require you to
move your working directory to `$GOPATH/src/gerrit.wikimedia.org/r/blubber`.
Contribution documentation was updated to reflect the changes, and the
`.arcvendor` submodule has been removed.
Bug: T200452
Change-Id: I3ab23e420b2825e86e2bd7c9b3da9d4de23edaa1
Summary: See upstream bug https://github.com/golang/go/issues/24359
Test Plan:
Run `make` from a symlink targetting the blubber directory under `GOPATH` and
verify that `blubber --version` outputs the version and commit.
Reviewers: thcipriani, #release-engineering-team
Reviewed By: thcipriani, #release-engineering-team
Tags: #release-engineering-team
Differential Revision: https://phabricator.wikimedia.org/D1061
Summary:
Since we now use ldflags to set global variables it's helpful to
automate via Make. Using a single global GOPATH seems to jive more with
the best-practice established in the go community[0] and make
testing/code review easier.
[0]. <https://github.com/golang/go/wiki/GOPATH#use-a-single-gopath>
Test Plan: run make
Reviewers: dduvall, #release-engineering-team
Reviewed By: dduvall, #release-engineering-team
Tags: #release-engineering-team
Differential Revision: https://phabricator.wikimedia.org/D998
Summary:
Our current lack of dependency management is leading to issues with
Debian packaging and risks inconsistent builds. Let's use `dep`, the
"official experiment" for go dependency management, and commit the
vendor directory which is small enough following a `dep prune`.
Fixes T180530
Depends on D881
Test Plan:
Run `make` or `go build -v` and examine output to ensure use of `vendor/`
packages.
Reviewers: thcipriani, Joe, #release-engineering-team
Reviewed By: thcipriani, #release-engineering-team
Tags: #release-engineering-team
Maniphest Tasks: T180530
Differential Revision: https://phabricator.wikimedia.org/D882
Summary:
The `go build` tool can accept linker options that dynamically set
variable values at build time. Let's make use of that in our `Makefile`
and `debian/rules` to know and expose meta data such as version and Git
commit at runtime.
Test Plan:
Run `make bin/blubber && bin/blubber --version` and verify that it outputs
"0.0.1-[git head commit]". Build and install the debian package and verify
the same using the installed binary.
Reviewers: thcipriani, hashar, Joe, #release-engineering-team
Reviewed By: thcipriani, #release-engineering-team
Tags: #release-engineering-team
Differential Revision: https://phabricator.wikimedia.org/D816
Summary:
Now that our Phabricator instance handles `go get` requests, we can use
a path without the `.git` suffix as the canonical import path.
Test Plan: Run `go test ./...` and `go build`.
Reviewers: thcipriani, #release-engineering-team
Reviewed By: thcipriani, #release-engineering-team
Tags: #release-engineering-team
Differential Revision: https://phabricator.wikimedia.org/D780
Summary:
Added a Makefile so you don't need any special mangling of your go path
Test Plan:
None
Reviewers: dduvall, mmodell, #release-engineering-team
Reviewed By: mmodell
Subscribers: Joe
Tags: #release-engineering-team
Revert Plan:
None
Differential Revision: https://phabricator.wikimedia.org/D671