Skip to content

Run examples on CI#23

Merged
haixuanTao merged 19 commits intomainfrom
object-detection-test
Jan 15, 2026
Merged

Run examples on CI#23
haixuanTao merged 19 commits intomainfrom
object-detection-test

Conversation

@phil-opp
Copy link
Copy Markdown
Contributor

This PR adds CI jobs for the examples in this repo.

Fixes #1

phil-opp added a commit to dora-rs/dora that referenced this pull request Jan 14, 2026
This same example will be tested in the `node-hub` repo as part of dora-rs/dora-hub#23

Testing with external deps will likely lead to version mismatches of the message crate. So it requires synchronous changes to two repos, which makes development difficult.
@phil-opp
Copy link
Copy Markdown
Contributor Author

@haixuanTao The plot node of the object detection example seems to fail. Perhaps we're missing some special handling of the CI env variable for the rerun node?

Also, the keyboard example requires some DISPLAY env variable that is not set on the CI. Do you know what this is for and how we can make the example work on CI?

@phil-opp
Copy link
Copy Markdown
Contributor Author

This is the full log output of the failed object detection job by the way: 12_Object detection dataflow.zip

@haixuanTao
Copy link
Copy Markdown
Contributor

Yes for rerun we need:

          export OPERATING_MODE=SAVE

Which is basically a headless mode.

I don't think we should test all examples as it's going to take a lot of CI times and some like keyboard requires hardware. I think testing as it was before was enough as is. There is unit test run at the node level and I think that this is enough.

@phil-opp
Copy link
Copy Markdown
Contributor Author

Thanks I'll try that!

I don't think we should test all examples as it's going to take a lot of CI times and some like keyboard requires hardware. I think testing as it was before was enough as is. There is unit test run at the node level and I think that this is enough.

I thought you wanted to keep the object detection/yolo example running on CI to ensure that we don't accidentally break something?

Even with unit tests, I still think that we should run the examples on CI to ensure that they work as expected. The unit tests also seem a bit sparse in many cases, for example for dora-yolo:

def test_import_main():
    """TODO: Add docstring."""
    from dora_yolo.main import main

    # Check that everything is working, and catch dora Runtime Exception as we're not running in a dora dataflow.
    with pytest.raises(RuntimeError):
        main()

It looks like this test just verifies that the node initialization fails without even running the event loop.

@phil-opp
Copy link
Copy Markdown
Contributor Author

Hmm, I still get the same error after b93aa93 . Any other ideas?

2026-01-14T15:02:46.1295536Z 15:02:46 stdout  plot:  DEBUG Searching for default Python interpreter in virtual environments, managed installations, or search path
2026-01-14T15:02:46.1311163Z 15:02:46 stdout  plot:  DEBUG Found `cpython-3.12.3-linux-x86_64-gnu` at `/home/runner/work/dora-hub/dora-hub/.venv/bin/python3` (active virtual environment)
2026-01-14T15:02:46.1316290Z 15:02:46 stdout  plot:  DEBUG Using Python 3.12.3 interpreter at: /home/runner/work/dora-hub/dora-hub/.venv/bin/python3
2026-01-14T15:02:46.1320038Z 15:02:46 stdout  plot:  DEBUG Running `dora-rerun`
2026-01-14T15:02:46.1363069Z 15:02:46 stdout  plot:  DEBUG Spawned child 17673 in process group 17660
2026-01-14T15:02:46.1556627Z dataflow started: 019bbd07-d60c-7cbf-88f1-035853b85da1
2026-01-14T15:03:26.2005641Z 
2026-01-14T15:03:26.2005714Z 
2026-01-14T15:03:26.2006169Z [ERROR]
2026-01-14T15:03:26.2006827Z Dataflow 019bbd07-d60c-7cbf-88f1-035853b85da1 failed:
2026-01-14T15:03:26.2007351Z 
2026-01-14T15:03:26.2007605Z Node `plot` failed: exited with code 143
2026-01-14T15:03:26.2007959Z 
2026-01-14T15:03:26.2007970Z 
2026-01-14T15:03:26.2008119Z Location:
2026-01-14T15:03:26.2008944Z     /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dora-cli-0.4.0/src/common.rs:30:17
2026-01-14T15:03:26.2027877Z ##[error]Process completed with exit code 1.

@haixuanTao
Copy link
Copy Markdown
Contributor

So OPERATING_MODE: SAVE need to be set before dora up otherwise it's not taken in the context of the daemon that launch the process.

@haixuanTao
Copy link
Copy Markdown
Contributor

@claude could you move OPERATING_MODE: SAVE within the env of dora up so that when the daemon is spawned the env variable is available

@haixuanTao
Copy link
Copy Markdown
Contributor

I thought you wanted to keep the object detection/yolo example running on CI to ensure that we don't accidentally break something?

Sorry I was reference example beyond what was originally tested within the dora CI. I think there is example within this PR that was not covered before.

@phil-opp
Copy link
Copy Markdown
Contributor Author

Yes, I try to run as many examples as possible to ensure that they are and keep working. If the CI time is a concern we can of course modify the job to run less often, e.g. only on commits to main and not for PRs

@phil-opp phil-opp marked this pull request as ready for review January 14, 2026 18:52
@haixuanTao haixuanTao merged commit 58d380b into main Jan 15, 2026
256 of 257 checks passed
@phil-opp phil-opp deleted the object-detection-test branch January 15, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run examples on CI

2 participants