Skip to content

Commit

Permalink
Merge tag 'v1.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonPowr committed Nov 28, 2024
2 parents cdeb990 + 1d73795 commit b3af047
Show file tree
Hide file tree
Showing 77 changed files with 7,051 additions and 1,968 deletions.
67 changes: 31 additions & 36 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,44 @@ updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
interval: weekly
groups:
go-deps:
applies-to: version-updates
patterns:
- "*"

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
interval: weekly
groups:
github-actions-deps:
applies-to: version-updates
patterns:
- "*"

- package-ecosystem: docker
directory: /examples/deployment/docker/db_client
schedule:
interval: daily

- package-ecosystem: docker
directory: /examples/deployment/docker/db_server
schedule:
interval: daily

- package-ecosystem: docker
directory: /examples/deployment/docker/envsubst
schedule:
interval: daily

- package-ecosystem: docker
directory: /examples/deployment/docker/log_server
schedule:
interval: daily

- package-ecosystem: docker
directory: /examples/deployment/docker/log_signer
schedule:
interval: daily

- package-ecosystem: docker
directory: /examples/deployment/kubernetes/mysql/image
schedule:
interval: daily

- package-ecosystem: docker
directory: /integration/cloudbuild/testbase
schedule:
interval: daily
directories:
- /examples/deployment/docker/db_server
- /examples/deployment/docker/db_server/postgresql
- /examples/deployment/docker/envsubst
- /examples/deployment/docker/log_server
- /examples/deployment/docker/log_signer
- /examples/deployment/kubernetes/mysql/image
- /integration/cloudbuild/testbase
schedule:
interval: weekly
ignore:
- dependency-name: "mysql"
versions: [">= 9.0"]
groups:
docker-deps:
applies-to: version-updates
patterns:
- "*"

- package-ecosystem: npm
directory: /scripts/gcb2slack
schedule:
interval: daily
interval: weekly
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -72,6 +72,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
category: "/language:${{matrix.language}}"
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: "1.21"
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.55.1
args: --timeout=8m
4 changes: 2 additions & 2 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Run govulncheck
steps:
- id: govulncheck
uses: golang/govulncheck-action@7da72f730e37eeaad891fcff0a532d27ed737cd4 # v1.0.1
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
go-version-input: 1.21.6
go-version-file: go.mod
go-package: ./...
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -59,14 +59,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.1.27
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
sarif_file: results.sarif
22 changes: 11 additions & 11 deletions .github/workflows/test_crdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@ jobs:
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.21'
go-version-file: go.mod
check-latest: true
cache: true

- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: 'v1.55.1'
args: ./storage/crdb

unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.21'
go-version-file: go.mod
check-latest: true
cache: true

Expand All @@ -47,11 +47,11 @@ jobs:
integration:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.21'
go-version-file: go.mod
check-latest: true
cache: true

Expand All @@ -62,7 +62,7 @@ jobs:
run: docker run --rm -d --name=roach -p 8080:8080 -p 26257:26257 -v "${PWD}/cockroach-data:/cockroach/cockroach-data" cockroachdb/cockroach:latest start-single-node --insecure

- name: Wait for CockroachDB
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_seconds: 15
max_attempts: 3
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/test_pgdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: Test PostgreSQL
on:
push:
branches:
- master
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: go.mod
check-latest: true
cache: true

- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: 'v1.55.1'
args: ./storage/postgresql

integration-and-unit-tests:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--name pgsql
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: go.mod
check-latest: true
cache: true

- name: Build before tests
run: go mod download && go build ./...

- name: Run integration tests
run: ./integration/integration_test.sh
env:
TEST_POSTGRESQL_URI: postgresql:///defaultdb?host=localhost&user=postgres&password=postgres
POSTGRESQL_IN_CONTAINER: true
POSTGRESQL_CONTAINER_NAME: pgsql

- name: Run unit tests
run: go test -v ./storage/postgresql/... ./quota/postgresqlqm/...

9 changes: 9 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ linters-settings:
issues:
# Don't turn off any checks by default. We can do this explicitly if needed.
exclude-use-default: false

exclude-rules:
# The following grpc linters are excluded because grpc.Dial, grpc.DialContext and grpc.WithBlock will be supported throughout 1.x.
- linters: [staticcheck]
text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
- linters: [staticcheck]
text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
- linters: [staticcheck]
text: 'SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient'
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
Antonio Marcedone <[email protected]>
Google LLC
Internet Security Research Group
Sectigo Limited
Vishal Kuo <[email protected]>
Loading

0 comments on commit b3af047

Please sign in to comment.