fix(gateway): scope default-profile adapter construction under multiplex#71108
Open
xrwang8 wants to merge 1 commit into
Open
fix(gateway): scope default-profile adapter construction under multiplex#71108xrwang8 wants to merge 1 commit into
xrwang8 wants to merge 1 commit into
Conversation
Default/primary-profile adapters were built via a bare _create_adapter call with no _profile_runtime_scope. Under gateway.multiplex_profiles, get_secret fails closed on an unscoped read, so any adapter resolving an optional secret in its constructor (e.g. Weixin's WEIXIN_CDN_BASE_URL) aborted gateway startup with UnscopedSecretError before opening a network connection. Route the two default-profile construction sites (GatewayRunner.start and the platform reconnect watcher) through a _create_default_profile_adapter helper that enters the default profile's runtime scope when multiplexing is on, mirroring the secondary-profile path. When multiplexing is off it calls _create_adapter directly, leaving legacy os.environ resolution unchanged. Fixes NousResearch#70652 Signed-off-by: xrwang8 <xrwang8@gmail.com>
This file contains hidden or 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
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.
Summary
Fixes #70652 - Weixin default-profile adapter reads secrets unscoped
Changes
Testing
Related
Fixes #70652