-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement programmatic default providers based on context in the engine and Go #16204
Open
tgummerer
wants to merge
2
commits into
master
Choose a base branch
from
tg/default-providers-take-2
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changelog[uncommitted] (2024-06-05)Features
|
tgummerer
force-pushed
the
tg/default-providers-take-2
branch
3 times, most recently
from
May 16, 2024 07:48
f34ca8e
to
7f9200a
Compare
Frassle
reviewed
May 17, 2024
tgummerer
force-pushed
the
tg/default-providers-take-2
branch
6 times, most recently
from
May 23, 2024 09:02
4451116
to
ab691c3
Compare
Frassle
reviewed
May 23, 2024
tgummerer
force-pushed
the
tg/default-providers-take-2
branch
from
May 23, 2024 16:20
ab691c3
to
5b7821c
Compare
…ne and Go This PR takes an alternative approach for implementing programmatic default providers, that was suggested in the internal design doc. Instead of making the default provider global, we create an API with a callback that creates a new subcontext. In that subcontext and only in that subcontext is the provider set as the default provider. We achieve this by setting up a new monitor with a different port, so the engine can distinguish between the contexts.
tgummerer
force-pushed
the
tg/default-providers-take-2
branch
2 times, most recently
from
May 24, 2024 14:34
e64b47f
to
f20b7ac
Compare
When the `disable-default-providers` settings is set, we want to make sure to not create any new default providers implicitly. However programmatic default providers are explicitly set, but they are using the same `defaultProviders` implementation. When we have already set a default provider through the programmatic default provider mechanism, we don't want to error out here. It's safe to just move the loading of the default provider above the denyCreation check, as we won't set an implicit default provider if this setting is set, so we'll always hit the denyCreation code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR takes an alternative approach for implementing programmatic default providers, that was suggested in the internal design doc.
Instead of making the default provider global, we create an API with a callback that creates a new subcontext. In that subcontext and only in that subcontext is the provider set as the default provider. We achieve this by setting up a new monitor with a different port, so the engine can distinguish between the contexts.
/xref #2059
Fixes #16169
Fixes #16163
Checklist
make tidy
to update any new dependenciesmake lint
to verify my code passes the lint checkgofumpt
make changelog
and committed thechangelog/pending/<file>
documenting my change