Skip to content

When using gcp storage, multiple "Error 403: Access denied., forbidden" in "gcp.removeInProgressMetadata" #2012

Open

Description

@RangelReale

Describe the bug
Using gcp storage, very frequently I get this "Error 403: Access denied., forbidden" from GCS, always in the "gcp.removeInProgressMetadata" step.

Looking at the code, it seems this is using "object.update" to clear object metadata.
The service account has "storageAdmin" permissions, calling the API directly in the exact same file to remove the metadata works every time.

Error Message
If applicable add error message to help explain your problem or console output enclose in triple back-ticks eg,

```console
{"http-method":"GET","http-path":"/cloud.google.com/go/secretmanager/@v/v1.14.1.mod","kind":"Internal Server Error","level":"error","module":"","msg":"googleapi: Error 403: Access denied., forbidden","operation":"download.VersionModuleHandler","ops":["download.VersionModuleHandler","pool.GoMod","protocol.GoMod","protocol.processDownload","gcslock.Stash","stash.Pool","stasher.Stash","gcp.save","gcp.removeInProgressMetadata"],"request-id":"13cb4103-3c37-423a-b5d6-f7a7df1bbdf5","time":"2024-12-12T18:21:20Z","version":""}
```

To Reproduce
It happens every time on our big monorepo.

Expected behavior
No error as the service account have the correct permission.

Environment (please complete the following information):

  • OS: Linux 64bit
  • Go version : 1.23.1
  • Proxy version : 0.15.4
  • Storage gcp :

Additional context
It looks like some kind of locking problem, maybe it is setting the metadata but the file isn't really there yet as GCS is eventually consistent? I saw some terraform threads about this message being really "object not found" instead of a permission error.

Activity

  1. added
    triage
    on Dec 25, 2024
  2. fnkr commented on Sep 3, 2025

    @fnkr

    This seems to have been fixed here: 33f32fd

    Unfortunately there is no new release yet. This image works for me:

    image: docker.io/gomods/athens@sha256:8218bbc8be9a283d9c17f8935d711f6addfc728dd484cbe8a183f37f1ba82648
  3. DrPsychick commented on Sep 12, 2025

    @DrPsychick
    Member

    Release is out, please let us know if the issue is fixed with this.

  4. fnkr commented on Sep 16, 2025

    @fnkr

    No issues on v0.16.1.

  5. RangelReale commented on Sep 16, 2025

    @RangelReale
    Author

    Run a full CI build, no problems or errors.

    I also had disabled the "gcp" singleflight, now I reenabled again. Should I use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions