Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project to use Go v1.19.2 #4470

Merged
merged 4 commits into from Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yaml
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: 1.19.2

- name: Initialize CodeQL Go
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yaml
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.8
go-version: 1.19.2
id: go

- name: Extract version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/esti.yaml
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: 1.19.2
id: go

- name: Cache Go modules and builds
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: 1.19.2
id: go

- name: Retrieve generated code
Expand Down Expand Up @@ -527,7 +527,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17.8
go-version: 1.19.2
id: go

- name: Generate uniquifying value
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yaml
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: 1.19.2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/spark.yaml
Expand Up @@ -17,6 +17,10 @@ jobs:
- name: Setup Scala
uses: olafurpg/setup-scala@v13

- name: validate format
working-directory: clients/spark
run: sbt scalafmtCheck

- name: run tests, validate and package
working-directory: clients/spark
run: sbt test scalafmtCheck "scalafix --check" package
run: sbt test "scalafix --check" package
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: 1.19.2
id: go
- name: Generate code
run: make gen
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: 1.19.2
id: go

# No way to share code between workflows :-( If you change this, find and change the
Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Expand Up @@ -8,7 +8,6 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
Expand All @@ -30,11 +29,9 @@ linters:
- rowserrcheck
- exportloopref
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.17.8-alpine AS build
FROM --platform=$BUILDPLATFORM golang:1.19.2-alpine AS build

ARG VERSION=dev

Expand Down
2 changes: 1 addition & 1 deletion cmd/lakectl/cmd/completion.go
Expand Up @@ -62,7 +62,7 @@ $ lakectl completion fish > ~/.config/fish/completions/lakectl.fish
`,
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
case "bash":
Expand Down
2 changes: 1 addition & 1 deletion cmd/lakefs/cmd/completion.go
Expand Up @@ -62,7 +62,7 @@ $ lakefs completion fish > ~/.config/fish/completions/lakefs.fish
`,
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
case "bash":
Expand Down
3 changes: 2 additions & 1 deletion cmd/lakefs/cmd/run.go
Expand Up @@ -317,7 +317,8 @@ var runCmd = &cobra.Command{

logging.Default().WithField("listen_address", cfg.GetListenAddress()).Info("starting HTTP server")
server := &http.Server{
Addr: cfg.GetListenAddress(),
Addr: cfg.GetListenAddress(),
ReadHeaderTimeout: time.Minute,
Handler: http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
// If the request has the S3 GW domain (exact or subdomain) - or carries an AWS sig, serve S3GW
if httputil.HostMatches(request, cfg.GetS3GatewayDomainNames()) ||
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Expand Up @@ -98,7 +98,7 @@ Want to dive deeper into our system tests infrastructure? Need to debug the test
Open a GitHub pull request with your change. The PR description should include a brief explanation of your change.
You should also mention the related GitHub issue. If the issue should be automatically closed after the merge, please [link it to the PR](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

After submitting your pull request, [GitHub Actions](https://github.com/treeverse/lakeFS/actions) will automatically run tests on your changes and make sure that your updated code builds and runs on Go 1.17.x.
After submitting your pull request, [GitHub Actions](https://github.com/treeverse/lakeFS/actions) will automatically run tests on your changes and make sure that your updated code builds and runs on Go 1.19.x.

Check back shortly after submitting your pull request to make sure that your code passes these checks. If any of the checks come back with a red X, then do your best to address the errors.

Expand Down
1 change: 1 addition & 0 deletions docs/reference/commands.md
Expand Up @@ -2186,6 +2186,7 @@ lakectl ingest --from <object store URI> --to <lakeFS path URI> [--dry-run] [fla
-h, --help help for ingest
--s3-endpoint-url string URL to access S3 storage API (by default, use regular AWS S3 endpoint
--to string lakeFS path to load objects into (e.g. "lakefs://repo/branch/sub/path/")
-v, --verbose print stats for each individual object staged
```


Expand Down
2 changes: 1 addition & 1 deletion esti/ops/docker-compose-dynamodb.yaml
Expand Up @@ -31,7 +31,7 @@ services:
ports:
- "6432:8000"
esti:
image: "golang:1.17.8-alpine"
image: "golang:1.19.2-alpine"
links:
- lakefs:s3.local.lakefs.io
- lakefs:testmultipartupload.s3.local.lakefs.io
Expand Down
2 changes: 1 addition & 1 deletion esti/ops/docker-compose.yaml
Expand Up @@ -32,7 +32,7 @@ services:
POSTGRES_USER: lakefs
POSTGRES_PASSWORD: lakefs
esti:
image: "golang:1.17.8-alpine"
image: "golang:1.19.2-alpine"
links:
- lakefs:s3.local.lakefs.io
- lakefs:testmultipartupload.s3.local.lakefs.io
Expand Down
3 changes: 2 additions & 1 deletion esti/webhook_server_test.go
Expand Up @@ -54,7 +54,8 @@ func startWebhookServer() (*webhookServer, error) {
port := listener.Addr().(*net.TCPAddr).Port
fmt.Println("Using port:", port)
s := &http.Server{
Handler: mux,
ReadHeaderTimeout: time.Minute,
Handler: mux,
}
host := os.Getenv("TEST_WEBHOOK_HOST")
if host == "" {
Expand Down