Skip to content

Conversation

@stealthybox
Copy link
Member

@stealthybox stealthybox commented Sep 10, 2025

Commits:

  • Handle controller-runtime failing to add BadgerGC
  • Upgrade badger to v4.8.0

badger v3.x -> v4.0 isn't a breaking change,
just an update from calver to semver
(no binary format change)
https://github.com/hypermodeinc/badger/blob/main/CHANGELOG.md#400---2023-02-27

The v4.x series does contain 2 breaking changes:

  1. change to metrics names + new metrics
    badger uses the go expvar format.
    We enable these on our Badger by default, but we don't actually expose them in controller-runtime Prometheus format...
    no impact
  2. change to runtime errors deprecating pkg/errors
    investigated this: our dependency on their error types for the GC is covered in a test and it's still functioning + unchanged)

Loadtest also rebased and good: #763 (comment)

Closes: #811

Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀


if badgerGC != nil {
mgr.Add(badgerGC)
err := mgr.Add(badgerGC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow I didn't know you could add runnable things to controller-runtime's Manager :o

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, the first try at the GC was a mess of signal handlers and channels -- was delighted to find this 😮‍💨

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup

@stefanprodan stefanprodan added the dependencies Pull requests that update a dependency label Sep 10, 2025
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @stealthybox

@stefanprodan stefanprodan merged commit 45b73c9 into main Sep 10, 2025
7 checks passed
@stefanprodan stefanprodan deleted the badger-v4 branch September 10, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade Badger to v4

4 participants