Skip to content

Conversation

@abhinav
Copy link
Owner

@abhinav abhinav commented Feb 22, 2025

BindToProvider in Kong will create new instances of bindings
that come from a provider function every time they're requested
by another binding.

This means that we always re-open some of these resources
multiple times: e.g. repository is opened when requested by state.Store,
by spice.Service, and then by individual commands.

Work around this with a sync.Once until the new
BindSingletonProvider option
is released.

BindToProvider in Kong will create new instances of bindings
that come from a provider function every time they're requested
by another binding.

This means that we always re-open some of these resources
multiple times: e.g. repository is opened when requested by state.Store,
by spice.Service, and then by individual commands.

Work around this with a sync.Once until the new
[BindSingletonProvider option](alecthomas/kong#501)
is released.
@abhinav
Copy link
Owner Author

abhinav commented Feb 22, 2025

This change is part of the following stack:

Change managed by git-spice.

@abhinav abhinav added the skip changelog PRs that don't need a changelog. label Feb 22, 2025
@abhinav abhinav marked this pull request as ready for review February 22, 2025 13:56
@abhinav abhinav enabled auto-merge (squash) February 22, 2025 13:56
@abhinav abhinav merged commit 958b0ca into main Feb 22, 2025
12 of 13 checks passed
@abhinav abhinav deleted the bindonce branch February 22, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog PRs that don't need a changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants