Files
renovate/lib/modules
Jamie Tanna dac1985b96 fix(datasource/go): don't cache null on non-404/410 goproxy errors (#45638)
We've previously been incorrectly caching the error responses from the
Go proxy occurs, which leads to a lot of "flapping" of PRs on
Mend-hosted apps, and can be rather frustrating as a user (and a service
owner).

Per the Go proxy protocol[0], a `,` fallback strategy should only
continue to the next entry on 404/410, and otherwise propagate the
error.

However, we currently break out of the loop and return `result` (which
may be `null` if no successful requests have been performed yet).

This `null` would be cached, leading to a "no releases found"
(`no-result`), stored in the "hard TTL" cache, which could lead to many
days without an update for given packages.

To fix this, we can make sure that we propagate errors, which would
mean that on an error:

- if we've previously successfully retrieved the package, serve the
  "last good" result
- if we haven't, it's a full error, and the datasource can retry

[0]: https://go.dev/ref/mod#goproxy-protocol

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-09-03 06:26:58 +00:00
..