Enable build tags in 2.8

It would appear we were missing the Go build tags on 2.8.X branch so the
images would not have the necessary support for some storage drivers
causing breakages to end users trying to use them.

This commit fixes both the build and linting issues.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2023-05-19 17:51:37 +01:00 committed by Sebastiaan van Stijn
parent 2d62a4027a
commit 110cb7538d
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
3 changed files with 3 additions and 4 deletions

View file

@ -9,7 +9,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
DOCKER_BUILDTAGS: "include_oss include_gcs" BUILDTAGS: "include_oss,include_gcs"
CGO_ENABLED: 1 CGO_ENABLED: 1
GO111MODULE: "auto" GO111MODULE: "auto"
GOPATH: ${{ github.workspace }} GOPATH: ${{ github.workspace }}

View file

@ -50,7 +50,7 @@ version/version.go:
check: ## run all linters (TODO: enable "unused", "varcheck", "ineffassign", "unconvert", "staticheck", "goimports", "structcheck") check: ## run all linters (TODO: enable "unused", "varcheck", "ineffassign", "unconvert", "staticheck", "goimports", "structcheck")
@echo "$(WHALE) $@" @echo "$(WHALE) $@"
@GO111MODULE=off golangci-lint run @GO111MODULE=off golangci-lint --build-tags "${BUILDTAGS}" run
test: ## run tests, except integration test with test.short test: ## run tests, except integration test with test.short
@echo "$(WHALE) $@" @echo "$(WHALE) $@"

View file

@ -37,12 +37,11 @@ const driverName = "oss"
const minChunkSize = 5 << 20 const minChunkSize = 5 << 20
const defaultChunkSize = 2 * minChunkSize const defaultChunkSize = 2 * minChunkSize
const defaultTimeout = 2 * time.Minute // 2 minute timeout per chunk
// listMax is the largest amount of objects you can request from OSS in a list call // listMax is the largest amount of objects you can request from OSS in a list call
const listMax = 1000 const listMax = 1000
//DriverParameters A struct that encapsulates all of the driver parameters after all values have been set // DriverParameters A struct that encapsulates all of the driver parameters after all values have been set
type DriverParameters struct { type DriverParameters struct {
AccessKeyID string AccessKeyID string
AccessKeySecret string AccessKeySecret string