-
Notifications
You must be signed in to change notification settings - Fork 110
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
Consume Protobuf events from dispatcher and pass them to the statemachine #3733
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3733 +/- ##
==========================================
+ Coverage 58.74% 58.88% +0.14%
==========================================
Files 539 541 +2
Lines 40101 40255 +154
Branches 3638 3638
==========================================
+ Hits 23557 23706 +149
- Misses 15531 15536 +5
Partials 1013 1013
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
73bd2c7
to
df400a8
Compare
c7f2973
to
e20e826
Compare
54b4519
to
74233ed
Compare
208aa17
to
057a3ce
Compare
4af480d
to
6ea0c71
Compare
91a376e
to
9154369
Compare
fcba0a6
to
87725d4
Compare
]: | ||
if experiment_id is not None: | ||
|
||
def func( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe call this something more descriptive, like node_status
? (since we use a node_status_builder
to make it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed both: node_builder
and event_builder
respectivelly.
|
||
else: | ||
|
||
def func2(status: str, real_id: Optional[int] = None) -> CloudEvent: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def cloudevent
?
Noting a crash:
(this includes a bug-fix on line 240 of base_run_model where an f-string misses an 'f') |
This crash exists prior to this PR. |
The file |
d7c9c2e
to
12ded12
Compare
Agree, but as you said .. not in this PR :) |
4330d60
to
5c103eb
Compare
Resolves equinor#3699. Split base_run_model dispatch into CloutEvent and Protobuf versions. This requires to add mypy_protobuf, types-protobuf, pylint-protbuf as dependecies. Additionally when type checking we need to compile the protobuf stub file before type checking. Experiment also gets a new attribute _iter_map thats contains mapping between iter_num and ensemble_id. This also adds a basic implementation of state machine, which currently only overwrites status and propagates STEP_SUCCESS upwards in order to get the propert successful realizations number. The protobuf schema gets updates by dedicated statuses. A new helper function is introduced node_status_builder, which alleviates creation of distinct DispatcherMessages. Note that when experiment_id is set we switch sending CloudEvent to DispatcherMessages. All the protobuf handling along with the basic implementation of state machine is now located in its own _ert_com_protocol module. All based_run_models are able to run with `--enable-experiment-server` enabled.
ee544ec
to
157d103
Compare
It's fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, huge job!
Issue
Resolves #3699
Approach
This contains the following sketches:
STEP_SUCCESS
upwards. NOTE: this PR doesn't solve state machine issue (Design and implement experiment statemachine #3407) but requires a minimum running version of the state machine to process the protobuf events.mypy and pylint requires additional dependencies for type-checking, wherein mypy stabs needs to be compiled first though (check typing.yml workflow).
Pre review checklist
Adding labels helps the maintainers when writing release notes. This is the list of release note labels.