Skip to content

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Jun 18, 2025

In an attempt to find the dependency that causes the CI to get stuck (the _max test works so it must be a min dependency)

@github-actions github-actions bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Jun 18, 2025
@Marenz Marenz force-pushed the ci-stuck-test branch 4 times, most recently from cac8172 to e468e9f Compare June 18, 2025 16:29
@github-actions github-actions bot added the part:microgrid Affects the interactions with the microgrid label Jun 18, 2025
@Marenz Marenz changed the title Update channels dependency to 1.9.0 Attempt to fix ci-gets-stuck in shutdown loop Jun 18, 2025
@Marenz Marenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Jun 18, 2025
Comment on lines 265 to 267
while True:
# To prevent entering a shutdown-loop, we explicitly check if there is
# an eventloop running
while asyncio.get_event_loop().is_running():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this stop when there is an exception (like there is no loop)? Or is this being run in some other run_forever() or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more about preventing it to start in the first place. The proper way is probably to do this check in select in the channels repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I think it is fine, if there is no loop an exception is raised in select(), the issue is we are blindly looping on broken code forever.

@github-actions github-actions bot added the part:tests Affects the unit, integration and performance (benchmarks) tests label Jun 19, 2025
@github-actions github-actions bot added the part:core Affects the SDK core components (data structures, etc.) label Jun 19, 2025
@Marenz Marenz force-pushed the ci-stuck-test branch 2 times, most recently from 2ed033f to 5e0bf82 Compare June 19, 2025 08:58
@llucax llucax moved this from To do to Review in progress in Python SDK Roadmap Jun 19, 2025
@llucax llucax added this to the v1.0.0-rc2100 milestone Jun 19, 2025
llucax and others added 5 commits June 19, 2025 11:42
If the test raised an exception in the middle of the test, the
`ComponentPoolStatusTracker` was not stopped, which caused the
`ComponentPoolStatusTracker` to keep running and entering a restart loop
when the asyncio event loop was closed.

Signed-off-by: Leandro Lucarella <[email protected]>
We suspect that the CI is stuck because the forever loop is not sleeping when no exception occurs.

Signed-off-by: Mathias L. Baumann <[email protected]>
We detect if the asyncio event loop is not running and log an error
message and exit instead of retrying.

Signed-off-by: Leandro Lucarella <[email protected]>
`run_forever()` is now more resilient to issues with no running asyncio
event loop, so it is better to use that instead of our custom naïve
loop.

Signed-off-by: Leandro Lucarella <[email protected]>
@Marenz Marenz marked this pull request as ready for review June 19, 2025 09:42
@Marenz Marenz requested a review from a team as a code owner June 19, 2025 09:42
@Marenz Marenz requested review from florian-wagner-frequenz and shsms and removed request for a team and florian-wagner-frequenz June 19, 2025 09:42
@github-project-automation github-project-automation bot moved this from Review in progress to Review approved in Python SDK Roadmap Jun 19, 2025
@llucax llucax added the type:bug Something isn't working label Jun 19, 2025
@Marenz Marenz added this pull request to the merge queue Jun 19, 2025
Merged via the queue into frequenz-floss:v1.x.x with commit 6ac3334 Jun 19, 2025
6 checks passed
@Marenz Marenz deleted the ci-stuck-test branch June 19, 2025 09:54
@github-project-automation github-project-automation bot moved this from Review approved to Done in Python SDK Roadmap Jun 19, 2025
@llucax llucax mentioned this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:core Affects the SDK core components (data structures, etc.) part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

3 participants