-
Notifications
You must be signed in to change notification settings - Fork 1
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
Mahler v4 release #70
Merged
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
Simplifies the default operation type, removing the unnecessary source property for the general case. Change-type: patch
This updates the sensor interface to no longer require a state reference as input, but simply return a subscribable for changes on a specific path. This makes the interface simpler and moves the responsibility of updating the state to sensor subscribers. This is however a breaking change, even though the contructor interface does not changes. Change-type: major
pipex
force-pushed
the
v4
branch
7 times, most recently
from
May 27, 2024 14:53
99c7e27
to
7596476
Compare
pipex
force-pushed
the
v4
branch
10 times, most recently
from
July 19, 2024 03:58
6e99131
to
b88e6f2
Compare
pipex
force-pushed
the
v4
branch
2 times, most recently
from
July 19, 2024 18:55
6203ed2
to
58c35b2
Compare
This updates the agent runtime and observer to report on changes rather than the full state. Changes are now aggregated in the Agent to communicate to subscribers. Change-type: patch
The `observe` module would observe changes on a state and revert to the previous state if an error occurred, however this had a flaw as the rollback would revert the whole state object, causing problems if concurrent changes were performed in parallel branches of the plan. This moves the reversal to the Agent runtime, where the path information can be used to revert, limiting the reverted changes only to the path that the action modifies. Change-type: patch
The property has been replaced by a `trace` property, receiving an `AgentRuntimeEvent`. The property can be used to implement any type of logging behaviour based on the agent runtime state machine. The previous `Logger` interface has been moved to `mahler/utils` and a basic human readable tracer has been provided under the same path with the name `readableTrace`. This also exports a diff function in utils to be potentially used for state comparison in traces. Change-type: major
This also re-lints the code to comply with the latest balena-lint improvements
The Pointer type has been updated to reflect the result of Pointer.from, returning never if the type does not exist, or undefined if the parent exists. Change-type: minor
This prevents a large task database from searching forever without finding a suitable plan and without making progress. If that happens that means the knowledge database should be optimized using some additional methods Change-type: minor
I self-certify! |
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.
Operation
instancesOperation
to the observertrace
logger, move human logging tomahler/utils
Closes: #68
Release Notes
Breaking changes
Simplified Sensor interface
The ouput of a Sensor is now a
Subscribable
instance that emitsOperation
values. The sensor no longer modifies the agent state but only returns changes that are applied by the Agent runtime.This makes state management more robust as state is only modified by the agent runtime, preventing non-determinism on state reporting because of concurrency.
Removed logger option when constructing an Agent
The option has been replaced by a single
trace
option, which expects a void function that will be called for each agent runtime event. The function can be used to generate human readable logs or to log agent progress on disk. The agent runtime events relate to each other according to the following diagram.Note that this also means that the Agent runtime no longer produces human readable logs by default. In order to get a readable log a
readableTrace
function has now be added onmahler/utils
. The function accepts a Logger instance.Minor improvements
plannerMaxWaitMs
configuration option has been added to the Agent constructor. This value defaults to 60 seconds and allows the agent to interrupt planning if it's taking too long. A long planning time usually means that there is some scenario not being considered and that a Method should be added to the task knowledge databased to help prune the search tree. A planning timeout is reported to the trace function with the event nameplan-timeout
.Other improvements
Other changes include refactoring, better linting, improved types and some updated dev dependencies.