Skip to content

cmd: upgrade automemlimit to v1.0.0 - #7978

Merged
mohammed90 merged 1 commit into
caddyserver:masterfrom
dunglas:fix/automemlimit-v1
Aug 31, 2026
Merged

mohammed90 merged 1 commit into
caddyserver:masterfrom
dunglas:fix/automemlimit-v1

Conversation

@dunglas

@dunglas dunglas commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

automemlimit v1.0.0 renamed SetGoMemLimitWithOpts to Set and removed the other Set* helpers, so Caddy no longer compiles against it:

cmd/main.go:485:18: undefined: memlimit.SetGoMemLimitWithOpts

This keeps anyone building Caddy, or a module that depends on it, pinned to v0.7.5.

Behavior is unchanged. Every option the call passes (WithLogger, WithProvider, ApplyFallback, FromCgroup, FromSystem) survived v1.0.0 untouched, and so did the 0.9 default ratio and the AUTOMEMLIMIT handling, including AUTOMEMLIMIT=off.

v1.0.0 also drops AUTOMEMLIMIT_DEBUG (already deprecated in v0.7.5 in favor of memlimit.WithLogger, which is what this call uses) and AUTOMEMLIMIT_EXPERIMENT. Neither is referenced here, and the cgroup-version-specific providers that were removed (FromCgroupV1, FromCgroupV2, FromCgroupHybrid) are not used either.

go build ./... and go test ./... pass, and the memlimit path still logs as before:

{"level":"info","msg":"GOMEMLIMIT is updated","GOMEMLIMIT":46385646796,"previous":9223372036854775807}

AI Disclosure

Done by Claude.

v1.0.0 renamed SetGoMemLimitWithOpts to Set and dropped the other Set*
helpers. The options this call passes are unchanged, as are the 0.9
default ratio and the AUTOMEMLIMIT handling, so behavior is the same.

Only the already-deprecated AUTOMEMLIMIT_DEBUG and AUTOMEMLIMIT_EXPERIMENT
environment variables are gone, and neither is used here.
@mohammed90
mohammed90 merged commit d0e93c2 into caddyserver:master Aug 31, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants