-
Notifications
You must be signed in to change notification settings - Fork 281
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
refactor: AgentSettings Circular Structure and improve internals #4641
Merged
tracyboehrer
merged 3 commits into
main
from
southworks/fix/circular-structure-expose-agent
Apr 16, 2024
Merged
refactor: AgentSettings Circular Structure and improve internals #4641
tracyboehrer
merged 3 commits into
main
from
southworks/fix/circular-structure-expose-agent
Apr 16, 2024
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
Pull Request Test Coverage Report for Build 8543859968Details
💛 - Coveralls |
tracyboehrer
approved these changes
Apr 16, 2024
This was referenced Jul 18, 2024
This was referenced Jul 28, 2024
This was referenced Sep 7, 2024
This was referenced Oct 30, 2024
This was referenced Nov 6, 2024
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.
#minor
Description
This PR replaces the
skipProperties
functionality with an internal_replacer
function when theJSON.stringify
function gets called in thecalculateChangeHash
.The
calculateChangeHash
has been changed to use a new internalstringify
function, that allows to detect and handle Circular Structures.Additionally, the AgentSettings configuration has being added to the
getRuntimeServices
function, so internal functionalities can use them. Not only that, the SkillClient has being updated based on this configuration, that work for both Composer and non-Composer bots.Specific Changes
BotState
class has being updated, removing all theskipProperties
functionality.calculateChangeHash
has being refactored to handle Circular Structures and generate a hash, instead of a plainJSON.stringify
value, so it is easier to debug and identify.ConnectorClientOptions
to thestart
andgetRuntimeServices
functions for Composer bots, so it can be customizable, and delegate to the internalCoreBot
to use.BeginSkill
has being updated, removing theskipProperties
and introducing the new internal_replace
function, for thestringify
functionality to execute.stringify
function that encapsulates the nativeJSON.stringify
function, with the addition to handle Circular Structures and expose the internal_replacer
function to customize it.botFrameworkClientFetchImpl
function to use a single instance ofaxios
and handle its configuration fromConnectorClientOptions
.Testing
The following images show how the
ConnectorClientOptions
can be provided from a Composer bot perspective, the newstringify
functionality that detects and replaces circular references, and the generated hash string.