| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Just a few really minor comments to check for, LGTM otherwise
Sorry, something went wrong.
There was a problem hiding this comment.
I would say all comments are mostly bike shedding, but in particular I think not using configuration and use dispatch update is important, I think it can get a bit confusing for people dealing with dispatches and configuration (as in config manager) too. I really think we should replace all `configuration mentions to update/dispatch update.
Also I found the example a bit confusing, which ideally it shouldn't be the case, the example should help make things less confusing :P
Sorry, something went wrong.
| match running: | ||
| case RunningState.STOPPED: | ||
| _logger.info("Stopping dispatch...") | ||
| await self._stop_actors("Dispatch stopped") |
There was a problem hiding this comment.
Maybe "Stopped by a dispatch".
Sorry, something went wrong.
|
I don't like update much in this context either though. How about DispatchParameterUpdate |
Sorry, something went wrong.
Why don't you like update? Adding Parameter doesn't make it better IMHO, there is no concept of a dispatch parameter in the API. Another option would be change instead of update, but for me update sounds more accurate in this context, this is why I wonder what you don't like about update. |
Sorry, something went wrong.
There was a problem hiding this comment.
I see there was not much progress or replies on my comments. I guess you are focusing on getting shit to work, which sounds totally reasonable, but just saying that I didn't review much in this round.
Sorry, something went wrong.
There was a problem hiding this comment.
Very nice to see the new scheduling algorithm! 🎉 Way better than what we had before.
Lots of comments, so here is a summary:
Things I think needs to be addressed before merging:
These commits need a commit message with a body that describes what's going on, it is really hard to review them without more information of what was wrong and how it was fixed:
Finish the renaming of config -> update
The hack in the tests (session-wide event_loop fixture), we can't really merge this if something is so fucked up that makes tests hang or make the interpreter segfault 😬
Figure out if we really need to support multiple actors, it is still make noise in my head, my feeling is we should encourage having one actor to handle one dispatch type, if that actor needs other supporting actors, it should be the actor itself in charge of spawning them.
If we are doing more renaming (like DispatchManagingActor and payload -> options), it might be good to do them now too to avoid having breaking changes in the future.
The rest is minor or too big for this PR, so I will create follow-up issues.
Sorry, something went wrong.
| dry_run: bool | ||
| """Whether this is a dry run.""" | ||
|
|
||
| payload: dict[str, Any] |
There was a problem hiding this comment.
bikeshedding: Payload sounds weird to me. For a whole dispatch it makes sense (or at least it was the best we could find) but in this context maybe something like options is more intuitive? To be honest I think options might be a good choice for the specs too.
Sorry, something went wrong.
There was a problem hiding this comment.
how about inputs?
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, that could work too, I think we discussed options at some point but wasn't perfectly accurate as some "options" might not be optional. I guess inputs is an improvement in that sense. Maybe parameters could work too.
Sorry, something went wrong.
|
And I still think "update" sucks and "configuration" was better. "Update" doesn't fit at all in the whole naming scheme |
Sorry, something went wrong.
|
Addressed points 1 - 5 |
Sorry, something went wrong.
There was a problem hiding this comment.
A few more instances of config and we need support for multiple actors for now (temporarily). I will also create issues for the stuff we can address in the future.
Sorry, something went wrong.
| dry_run: bool | ||
| """Whether this is a dry run.""" | ||
|
|
||
| payload: dict[str, Any] |
There was a problem hiding this comment.
Yeah, that could work too, I think we discussed options at some point but wasn't perfectly accurate as some "options" might not be optional. I guess inputs is an improvement in that sense. Maybe parameters could work too.
Sorry, something went wrong.
|
Sorry, something went wrong.
| [tool.pytest.ini_options] | ||
| testpaths = ["tests", "src"] | ||
| asyncio_mode = "auto" | ||
| asyncio_default_fixture_loop_scope = "function" |
There was a problem hiding this comment.
OK, this seems to be related to an update to https://github.com/pytest-dev/pytest-asyncio/releases/tag/v0.24.0. Issue: pytest-dev/pytest-asyncio#924
Sorry, something went wrong.
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
* Dispatch.running() was always returning RUNNING for duration None * Dispatch.next_run_after() was made aware that there is no next run for inf. Duration * Dispatch._until() now raises when used with Dispatch.None * Actor: delay marking a Dispatch as deleted, otherwise checks wrongly detect it as no longer running. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
The internal scheduling architecture was rewritten: Instead of using one task per dispatch that will start/stop them, we now have a queue of events and a timer that is rescheduled to the earliest next event each time it triggers. Previously we had to do complicated re-scheduling and cancelling of tasks, now we always just update the event in the queue. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
A useful actor to help control and manange another actor using dispatches. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
As recommended by the deprecation warning Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
The merge-base changed after approval.
|
It looks like now cross-arch tests are consistently failing. This must be definitely a timing issue, the slowest the system is, the more likely we hit this bug and tests hang. Created an issue about it: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.