Skip to content

[CDTOOL-1317] Add Support for the max_use and max_lifetime backend parameters#1779

Merged
rcaril merged 4 commits intomainfrom
CDTOOL-1317-support-for-backend-connection-reuse-limits
May 7, 2026
Merged

[CDTOOL-1317] Add Support for the max_use and max_lifetime backend parameters#1779
rcaril merged 4 commits intomainfrom
CDTOOL-1317-support-for-backend-connection-reuse-limits

Conversation

@rcaril
Copy link
Copy Markdown
Member

@rcaril rcaril commented May 7, 2026

Change summary

This PR adds new --max-use and --max-lifetime parameters to fastly service backend create and fastly service backend update, which can be used to specify the max_use and max_lifetime backend fields.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?
make test TEST_ARGS="-run TestBackendCreate ./pkg/commands/service/backend"
ok      github.com/fastly/cli/pkg/commands/service/backend      1.204s

make test TEST_ARGS="-run TestBackendList ./pkg/commands/service/backend"
ok      github.com/fastly/cli/pkg/commands/service/backend      1.130s

make test TEST_ARGS="-run TestBackendDescribe ./pkg/commands/service/backend"
ok      github.com/fastly/cli/pkg/commands/service/backend      1.071s

make test TEST_ARGS="-run TestBackendUpdate ./pkg/commands/service/backend"
ok      github.com/fastly/cli/pkg/commands/service/backend      1.133s

make test TEST_ARGS="-run TestBackendDelete ./pkg/commands/service/backend"
ok      github.com/fastly/cli/pkg/commands/service/backend      1.065s

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

@rcaril rcaril marked this pull request as ready for review May 7, 2026 13:58
@rcaril rcaril requested a review from a team as a code owner May 7, 2026 13:58
@rcaril rcaril requested a review from jedisct1 May 7, 2026 13:58
@rcaril rcaril requested a review from ulyssa May 7, 2026 13:59
Comment thread pkg/commands/service/backend/create.go Outdated
@rcaril rcaril requested a review from philippschulte May 7, 2026 14:00
Copy link
Copy Markdown
Member

@philippschulte philippschulte left a comment

Choose a reason for hiding this comment

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

The implementation looks good to me overall. One small consistency nitt: CreateCommand.MaxUse and CreateCommand.MaxLifetime should probably be unexported as maxUse and maxLifetime, matching nearby fields like maxConn, firstByteTimeout, and healthCheck. They do not appear to need to be exported. The update command already uses exported fields consistently, so no issue there.

Comment thread pkg/commands/service/backend/create.go Outdated
@rcaril rcaril requested a review from philippschulte May 7, 2026 14:33
Copy link
Copy Markdown
Member

@philippschulte philippschulte left a comment

Choose a reason for hiding this comment

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

Thank you!

@rcaril rcaril merged commit c7f3337 into main May 7, 2026
13 checks passed
@rcaril rcaril deleted the CDTOOL-1317-support-for-backend-connection-reuse-limits branch May 7, 2026 14:44
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.

3 participants