From f73b2aee5e511ba666ee09b6fcecfbf85dd1a0a0 Mon Sep 17 00:00:00 2001 From: Christopher Phang Date: Sun, 16 Feb 2020 10:53:08 +0000 Subject: [PATCH 1/4] Update documentation for CircularBlobAccess usage --- pkg/proto/configuration/blobstore/blobstore.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/proto/configuration/blobstore/blobstore.proto b/pkg/proto/configuration/blobstore/blobstore.proto index eff4072ec..c0394c80b 100644 --- a/pkg/proto/configuration/blobstore/blobstore.proto +++ b/pkg/proto/configuration/blobstore/blobstore.proto @@ -47,6 +47,9 @@ message BlobAccessConfiguration { SizeDistinguishingBlobAccessConfiguration size_distinguishing = 5; // Read objects from/write objects to a circular file on disk. + // TODO: CircularBlobAccess should be considered deprecated as it is + // prone to data corruption. LocalBlobAccess should be used instead + // if at all possible. CircularBlobAccessConfiguration circular = 6; // Read objects from/write objects to a GRPC service that From 99bd2f8dc2638ff0a1ed225b77086654440a40fe Mon Sep 17 00:00:00 2001 From: Christopher Phang Date: Sat, 22 Feb 2020 10:41:09 +0000 Subject: [PATCH 2/4] WIP --- .buildkite/pipeline.yml | 13 ------------- .github/workflows/CI.yaml | 32 ++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 33 insertions(+), 14 deletions(-) delete mode 100644 .buildkite/pipeline.yml create mode 100644 .github/workflows/CI.yaml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index 5fe365e88..000000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,13 +0,0 @@ -steps: - - command: 'bazel test -- //... \$(bazel query //... | grep -e "_container\$" -e "_container_push\$" -e "_layer" | while read target; do echo -\$target; done)' - label: 'FreeBSD' - agents: - - "os=freebsd" - - command: 'bazel test -- //... \$(bazel query //... | grep -e "_container\$" -e "_container_push\$" -e "_layer" | while read target; do echo -\$target; done)' - label: 'macOS' - agents: - - "os=darwin" - - command: 'bazel run @com_github_buildbarn_bb_deployments//ci:run-ci' - label: 'Linux' - agents: - - "os=linux" diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 000000000..66e063e4c --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,32 @@ +name: CI +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + gofmt: + runs-on: ubuntu-latest + container: docker://golang:1.13 + steps: + - uses: actions/checkout@v1 + - name: run gofmt + run: test -z "$(gofmt -d . | tee /dev/tty)" + buildifier: + runs-on: ubuntu-latest + container: docker://golang:1.13 + steps: + - uses: actions/checkout@v1 + - name: install buildifier + run: go get github.com/bazelbuild/buildtools/buildifier + - name: run buildifier + run: buildifier -mode=check -r . + build_and_test: + runs-on: ubuntu-latest + container: docker://l.gcr.io/google/bazel:2.1.0 + steps: + - uses: actions/checkout@v1 + - name: build and test + run: bazel test //... diff --git a/README.md b/README.md index 0e0f9895b..f98ed8992 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# The Buildbarn storage daemon [![Build status](https://badge.buildkite.com/212ccc2e6aab9f4df6490b30390492365c5641e65a768e5a51.svg)](https://buildkite.com/buildbarn/bb-storage) [![GoDoc](https://godoc.org/github.com/buildbarn/bb-storage?status.svg)](https://godoc.org/github.com/buildbarn/bb-storage) +# The Buildbarn storage daemon [![Build status](https://github.com/buildbarn/bb-storage/workflows/CI/badge.svg)](https://github.com/buildbarn/bb-storage/actions) [![GoDoc](https://godoc.org/github.com/buildbarn/bb-storage?status.svg)](https://godoc.org/github.com/buildbarn/bb-storage) The Buildbarn project provides an implementation of the [Remote Execution protocol](https://github.com/bazelbuild/remote-apis). From e4b65ffe1131bd19f0a4bdb00431cad5f8934a93 Mon Sep 17 00:00:00 2001 From: Christopher Phang Date: Sat, 22 Feb 2020 11:32:52 +0000 Subject: [PATCH 3/4] bad edit --- .github/workflows/CI.yaml | 2 +- pkg/blobstore/cloud_blob_access.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 66e063e4c..8ea312c6c 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: run gofmt - run: test -z "$(gofmt -d . | tee /dev/tty)" + run: test -z "$(gofmt -d . | tee /dev/stderr)" buildifier: runs-on: ubuntu-latest container: docker://golang:1.13 diff --git a/pkg/blobstore/cloud_blob_access.go b/pkg/blobstore/cloud_blob_access.go index ebe0fd9c6..b508e587f 100644 --- a/pkg/blobstore/cloud_blob_access.go +++ b/pkg/blobstore/cloud_blob_access.go @@ -15,7 +15,7 @@ import ( ) type cloudBlobAccess struct { - bucket *blob.Bucket + bucket *blob.Bucket keyPrefix string storageType StorageType } From e93d68ccfe9d2ab9d83ac6b909a90d38d881a97a Mon Sep 17 00:00:00 2001 From: Christopher Phang Date: Sat, 22 Feb 2020 11:53:36 +0000 Subject: [PATCH 4/4] bad buildifier --- BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD.bazel b/BUILD.bazel index f06bc376e..d3a882a6d 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -6,6 +6,7 @@ load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") # gazelle:resolve proto go build/bazel/remote/execution/v2/remote_execution.proto @com_github_bazelbuild_remote_apis//build/bazel/remote/execution/v2:go_default_library gazelle( name = "gazelle", + foo='bar', ) buildifier(