Skip to content

Prune older function versions#278

Merged
GrahamCampbell merged 2 commits into
4.xfrom
prune-function-versions
Jun 7, 2026
Merged

Prune older function versions#278
GrahamCampbell merged 2 commits into
4.xfrom
prune-function-versions

Conversation

@mnapoli
Copy link
Copy Markdown
Contributor

@mnapoli mnapoli commented May 19, 2026

This replaces https://github.com/claygregory/serverless-prune-plugin and makes it a first class feature.

This implementation contains less options though and goes directly in provider:

provider:
  pruneFunctionVersions: true # keeps 10 versions per default

or

provider:
  pruneFunctionVersions:
    number: 20

Pruning is automatic on deployment.

It is disabled by default so no breaking change, it's completely opt-in.

@GrahamCampbell GrahamCampbell self-requested a review May 19, 2026 21:20
@mnapoli mnapoli marked this pull request as ready for review May 19, 2026 21:25
@GrahamCampbell GrahamCampbell force-pushed the prune-function-versions branch from 9aac853 to be3211a Compare June 7, 2026 00:01
Co-authored-by: Matthieu Napoli <720328+mnapoli@users.noreply.github.com>
@GrahamCampbell GrahamCampbell force-pushed the prune-function-versions branch from be3211a to bd1f227 Compare June 7, 2026 00:02
@GrahamCampbell
Copy link
Copy Markdown
Contributor

Squashed and rebased on latest 4.x No code changes made. I'll review this next.

@GrahamCampbell
Copy link
Copy Markdown
Contributor

Reviewed and applied feedback.

@GrahamCampbell GrahamCampbell merged commit cd5a127 into 4.x Jun 7, 2026
8 checks passed
@GrahamCampbell GrahamCampbell deleted the prune-function-versions branch June 7, 2026 01:03
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