Skip to content

Fix weird daemon folder#1064

Merged
haixuanTao merged 1 commit intomainfrom
fix-weird-daemon-working-dir
Jul 15, 2025
Merged

Fix weird daemon folder#1064
haixuanTao merged 1 commit intomainfrom
fix-weird-daemon-working-dir

Conversation

@haixuanTao
Copy link
Copy Markdown
Collaborator

The current working folder when using distributed dora-daemon is a folder that does not exist making it impossible to spawn build command.

@haixuanTao
Copy link
Copy Markdown
Collaborator Author

@phil-opp , I am struggling to understand this?

Is this change ok?

@haixuanTao haixuanTao merged commit be993a9 into main Jul 15, 2025
149 checks passed
@haixuanTao haixuanTao deleted the fix-weird-daemon-working-dir branch July 15, 2025 13:23
@phil-opp
Copy link
Copy Markdown
Collaborator

I think the proper fix is to use create_dir_all to create the working directory if it doesn't exist.

This PR places uses the same working dir for all dataflows run by the daemon, which can lead to conflicts when multiple dataflows are run in parallel.

@phil-opp phil-opp restored the fix-weird-daemon-working-dir branch July 15, 2025 14:37
phil-opp added a commit that referenced this pull request Jul 15, 2025
The working directory deliberatly included the session ID in distributed
settings to avoid conflicts when multiple dataflows are run on the same
daemon.

The session ID is a unique identifier created for each dataflow.yaml
file. By using this ID as part of the working directory, we can ensure
that no other dataflow is running in the same directory. Sharing a
working directory between multiple distinct dataflows could easily lead
to unexpected behavior, e.g. by overwriting files of the other dataflow
run. So it's better to avoid this.

By using the session ID, the daemon will still be able to reuse build
artifacts etc of previous dataflow runs. So incremental compilation
still works.

Reverts #1064
@phil-opp
Copy link
Copy Markdown
Collaborator

phil-opp commented Jul 15, 2025

I saw that you're about to create a new release, so I merged #1065 to revert this change before you cut the new release.

@phil-opp phil-opp deleted the fix-weird-daemon-working-dir branch July 15, 2025 14:50
@phil-opp
Copy link
Copy Markdown
Collaborator

I opened #1066 with the proper fix (i.e. create the directories if they don't exist). Could you try whether this fixes your issue?

(I'm open to changing the working directoy name if you don't like the _work name. We should just keep in mind that we already used this folder in the v3.12 release (and it should work as expected with git repo sources), so changing the name again might be a bit surprising.)

phil-opp added a commit that referenced this pull request Jul 22, 2025
We forgot to create the working directory in a few cases in #901. This
PR fixes this by adding the proper `create_dir_all` calls.

Alternative to #1064
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.

2 participants