Skip to content

Discussion: Default working directories #1073

@phil-opp

Description

@phil-opp

There were some reports that our current working directory selection is too complicated and unintuitive. Let's try to find better defaults in this discussion.

Issue Report

Originally posted by @theol0403 in #1066 (comment):

I ran into this issue today when trying to set up distributed nodes.

Using just a local python node works fine:

  - id: keyboard_controller
    build: pip install -e keyboard_controller
    path: keyboard_controller/src/main.py
    inputs:
      tick: dora/timer/millis/100

  - id: rust_node
    build: cargo build -p rust_node
    path: target/debug/rust_node
    inputs:
      tick: dora/timer/millis/100

Then, dora build and dora start work as expected and start the python and rust nodes locally.

However, making just the rust node distributed:

  - id: rust_node
    _unstable_deploy:
      machine: other
    path: dynamic
    inputs:
      tick: dora/timer/millis/100

Causes keyboard_controller on the LOCAL daemon to fail.

keyboard_controller on default daemon : stdout    /opt/homebrew/Cellar/[email protected]/3.12.11/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/theol/Documents/github/rust-ethercat/_work/01981518-3271-7b98-9fcc-97fd5d61297c/keyboard_controller/src/main.py': [Errno 2] No such file or directory
keyboard_controller on default daemon : stdout    
keyboard_controller on default daemon : stdout    
keyboard_controller on default daemon : ERROR  daemon    exited with code 2 with stderr output:
---------------------------------------------------------------------------------
/opt/homebrew/Cellar/[email protected]/3.12.11/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/theol/Documents/github/rust-ethercat/_work/01981518-3271-7b98-9fcc-97fd5d61297c/keyboard_controller/src/main.py': [Errno 2] No such file or directory
---------------------------------------------------------------------------------

Then, changing the python node to:

  - id: keyboard_controller
    build: pip install -e ../../keyboard_controller
    path: ../../keyboard_controller/src/main.py
    inputs:
      tick: dora/timer/millis/100

solves the problem. But, I think this is very unintuitive and was very difficult to troubleshoot. Now, when commenting out the distributed rust node, the python node fails because the paths are wrong!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions