Repository: fsouza/fake-gcs-server
Pull request #1598 (2024-05-06 18:18:27)

build(deps): bump golangci/golangci-lint-action from 5.1.0 to 5.3.0
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5.1.0 to 5.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint-action/releases">golangci/golangci-lint-action's releases</a>.</em></p>
<blockquote>
<h2>v5.3.0</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li>feat: uses 2 dots compare syntax for push diff by <a href="https://github.com/ldez"><code>@​ldez</code></a> in <a href="https://redirect.github.com/golangci/golangci-lint-action/pull/1030">golangci/golangci-lint-action#1030</a></li>
<li>feat: add option to control cache invalidation interval by <a href="https://github.com/ldez"><code>@​ldez</code></a> in <a href="https://redirect.github.com/golangci/golangci-lint-action/pull/1031">golangci/golangci-lint-action#1031</a></li>
<li>feat: use OS and working-directory as cache key by <a href="https://github.com/ldez"><code>@​ldez</code></a> in <a href="https://redirect.github.com/golangci/golangci-lint-action/pull/1032">golangci/golangci-lint-action#1032</a></li>
<li>feat: improve log about pwd/cwd by <a href="https://github.com/ldez"><code>@​ldez</code></a> in <a href="https://redirect.github.com/golangci/golangci-lint-action/pull/1033">golangci/golangci-lint-action#1033</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/golangci/golangci-lint-action/compare/v5.2.0...v5.3.0">https://github.com/golangci/golangci-lint-action/compare/v5.2.0...v5.3.0</a></p>
<h2>v5.2.0</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/aebff4bd9cd0198ff4f020915c27258a9edc4c01">feat: add an option to enable/disable annotations</a> by <a href="https://github.com/ldez"><code>@​ldez</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/golangci/golangci-lint-action/compare/v5.1.0...v5.2.0">https://github.com/golangci/golangci-lint-action/compare/v5.1.0...v5.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/38e1018663fa5173f3968ea0777460d3de38f256"><code>38e1018</code></a> feat: improve log about pwd/cwd (<a href="https://redirect.github.com/golangci/golangci-lint-action/issues/1033">#1033</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/21e9e6b47f3490b8adcca53fe65c03e2687b503c"><code>21e9e6b</code></a> feat: use OS and working-directory as cache key (<a href="https://redirect.github.com/golangci/golangci-lint-action/issues/1032">#1032</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/dbe4fc23f1260a21484a6c6c008545afc299faa3"><code>dbe4fc2</code></a> chore: use getBooleanInput</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/dbb7ebcd4c72c62f0b6fe5dd8f2cf90cc85c7946"><code>dbb7ebc</code></a> feat: add option to control cache invalidation interval (<a href="https://redirect.github.com/golangci/golangci-lint-action/issues/1031">#1031</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/ecb32920c642fc861819e7d1e27c1f9fff303882"><code>ecb3292</code></a> feat: uses 2 dots compare syntax for push diff (<a href="https://redirect.github.com/golangci/golangci-lint-action/issues/1030">#1030</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/046435d14ca6ec39fd472741e51e3bfbc403b4a7"><code>046435d</code></a> doc: improve options documentation</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/ca8befdfb6b98e59b2a2d1d65070c6e66a858ae1"><code>ca8befd</code></a> doc: improve options documentation</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/d9c9b53e53fa63215cdd19637cd95fbc34fdf4a1"><code>d9c9b53</code></a> chore: improve marketplace style</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/aebff4bd9cd0198ff4f020915c27258a9edc4c01"><code>aebff4b</code></a> feat: add option to enable/disable annotations</li>
<li><a href="https://github.com/golangci/golangci-lint-action/commit/2bff40627723077fc557d83b223b2fcf2d4c6974"><code>2bff406</code></a> doc: improve options documentation</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint-action/compare/v5.1.0...v5.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golangci/golangci-lint-action&package-manager=github_actions&previous-version=5.1.0&new-version=5.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml
index 487fe31..5b3eade 100644
--- a/.github/workflows/docker-push.yml
+++ b/.github/workflows/docker-push.yml
@@ -10,7 +10,7 @@ jobs:
   build-and-push:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - name: docker meta
         id: meta
diff --git a/.github/workflows/goreleaser-run.yml b/.github/workflows/goreleaser-run.yml
index b2ce495..005adaa 100644
--- a/.github/workflows/goreleaser-run.yml
+++ b/.github/workflows/goreleaser-run.yml
@@ -11,7 +11,7 @@ jobs:
   release:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
         with:
           fetch-depth: 0
 
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0c4c83f..efe3301 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -29,7 +29,7 @@ jobs:
     name: tests (${{ matrix.os }}/go-${{ matrix.go_version }}-${{ matrix.arch }})
     runs-on: ${{ matrix.os }}-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - uses: actions/setup-go@v5.0.1
         id: go
@@ -52,15 +52,15 @@ jobs:
     name: lint
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
-      - uses: golangci/golangci-lint-action@v5.1.0
+      - uses: golangci/golangci-lint-action@v5.3.0
 
   staticcheck:
     name: staticcheck
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - uses: actions/setup-go@v5.0.1
         id: go
@@ -90,7 +90,7 @@ jobs:
     name: build
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - uses: actions/setup-go@v5.0.1
         id: go
@@ -163,7 +163,7 @@ jobs:
       - lint
       - staticcheck
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - name: download binary
         uses: actions/download-artifact@v4.1.7
diff --git a/fakestorage/response.go b/fakestorage/response.go
index 4c0a87a..3163883 100644
--- a/fakestorage/response.go
+++ b/fakestorage/response.go
@@ -49,6 +49,10 @@ type bucketResponse struct {
 	Updated               string            `json:"updated,omitempty"`
 	Location              string            `json:"location,omitempty"`
 	StorageClass          string            `json:"storageClass,omitempty"`
+	ProjectNumber         string            `json:"projectNumber"`
+	Metageneration        string            `json:"metageneration"`
+	Etag                  string            `json:"etag"`
+	LocationType          string            `json:"locationType"`
 }
 
 type bucketVersioning struct {
@@ -66,6 +70,10 @@ func newBucketResponse(bucket backend.Bucket, location string) bucketResponse {
 		Updated:               formatTime(bucket.TimeCreated), // not tracking update times yet, reporting `updated` = `timeCreated`
 		Location:              location,
 		StorageClass:          "STANDARD",
+		ProjectNumber:         "0",
+		Metageneration:        "1",
+		Etag:                  "RVRhZw==",
+		LocationType:          "region",
 	}
 }
 
@@ -179,6 +187,8 @@ func getAccessControlsListFromObject(obj ObjectAttrs) []*objectAccessControl {
 			Entity: string(aclRule.Entity),
 			Object: obj.Name,
 			Role:   string(aclRule.Role),
+			Etag:   "RVRhZw==",
+			Kind:   "storage#objectAccessControl",
 		}
 	}
 	return aclItems
diff --git a/go.mod b/go.mod
index 9662341..c8b69d0 100644
--- a/go.mod
+++ b/go.mod
@@ -10,7 +10,7 @@ require (
 	github.com/minio/minio-go/v7 v7.0.70
 	github.com/pkg/xattr v0.4.9
 	github.com/stretchr/testify v1.9.0
-	golang.org/x/oauth2 v0.19.0
+	golang.org/x/oauth2 v0.20.0
 	google.golang.org/api v0.177.0
 	google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6
 )
@@ -58,7 +58,7 @@ require (
 	golang.org/x/text v0.14.0 // indirect
 	google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda
 	google.golang.org/grpc v1.63.2
-	google.golang.org/protobuf v1.34.0
+	google.golang.org/protobuf v1.34.1
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
 
diff --git a/go.sum b/go.sum
index f2fece0..5c4d533 100644
--- a/go.sum
+++ b/go.sum
@@ -137,8 +137,8 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
 golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
 golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg=
-golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8=
+golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
+golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -195,8 +195,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
-google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
+google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=


Test patch:
diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml
index 9f68a36..a0c6500 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -9,7 +9,7 @@ jobs:
     name: test-dockerfile
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - name: setup qemu
         uses: docker/setup-qemu-action@v3.0.0
diff --git a/.github/workflows/goreleaser-test.yml b/.github/workflows/goreleaser-test.yml
index 2679f74..b91b95e 100644
--- a/.github/workflows/goreleaser-test.yml
+++ b/.github/workflows/goreleaser-test.yml
@@ -14,7 +14,7 @@ jobs:
   test-goreleaser:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4.1.4
+      - uses: actions/checkout@v4.1.5
 
       - uses: actions/setup-go@v5.0.1
         with:
diff --git a/fakestorage/bucket_test.go b/fakestorage/bucket_test.go
index ee73dea..977b492 100644
--- a/fakestorage/bucket_test.go
+++ b/fakestorage/bucket_test.go
@@ -130,6 +130,18 @@ func TestServerClientBucketAttrs(t *testing.T) {
 		if attrs.StorageClass != "STANDARD" {
 			t.Errorf("wrong bucket storage class returned\nwant %q\ngot  %q", "STANDARD", attrs.StorageClass)
 		}
+		if attrs.ProjectNumber != 0 {
+			t.Errorf("wrong bucket project number returned\nwant %q\ngot  %q", "0", attrs.ProjectNumber)
+		}
+		if attrs.MetaGeneration != 1 {
+			t.Errorf("wrong bucket metageneration returned\nwant %q\ngot  %q", "1", attrs.MetaGeneration)
+		}
+		if attrs.Etag != "RVRhZw==" {
+			t.Errorf("wrong bucket etag returned\nwant %q\ngot  %q", "RVRhZw==", attrs.Etag)
+		}
+		if attrs.LocationType != "region" {
+			t.Errorf("wrong bucket location type returned\nwant %q\ngot  %q", "region", attrs.LocationType)
+		}
 	})
 }
 
diff --git a/fakestorage/object_test.go b/fakestorage/object_test.go
index 7687391..038b9b0 100644
--- a/fakestorage/object_test.go
+++ b/fakestorage/object_test.go
@@ -1919,8 +1919,8 @@ func TestServerClientObjectProjection(t *testing.T) {
 
 		url := fmt.Sprintf("https://storage.googleapis.com/storage/v1/b/%s/o/%s", bucketName, objectName)
 		fullACL := []objectAccessControl{
-			{Bucket: bucketName, Object: objectName, Entity: "user-1", Role: "OWNER"},
-			{Bucket: bucketName, Object: objectName, Entity: "user-2", Role: "READER"},
+			{Bucket: bucketName, Object: objectName, Entity: "user-1", Role: "OWNER", Etag: "RVRhZw==", Kind: "storage#objectAccessControl"},
+			{Bucket: bucketName, Object: objectName, Entity: "user-2", Role: "READER", Etag: "RVRhZw==", Kind: "storage#objectAccessControl"},
 		}
 
 		t.Run("full projection", func(t *testing.T) {