Skip to content

Comments

Fix Docker build script path handling for subdirectory node sources in mkconcore#428

Merged
pradeeban merged 6 commits intoControlCore-Project:devfrom
Titas-Ghosh:fix-docker-build-subdir-paths
Feb 20, 2026
Merged

Fix Docker build script path handling for subdirectory node sources in mkconcore#428
pradeeban merged 6 commits intoControlCore-Project:devfrom
Titas-Ghosh:fix-docker-build-subdir-paths

Conversation

@Titas-Ghosh
Copy link

Fixes #420
Hi @pradeeban ,
This PR fixes Docker script generation in mkconcore for node sources in subdirectories (for example script.py).

Problem

Generated build scripts used incorrect relative paths (../src/...) and incorrect directory return (cd ..) when Docker build directories were nested (like docker-subdir/script).
This broke Docker workflows for valid subdirectory source layouts.

Fix

  • In mkconcore.py, compute Docker build directory depth and derive a correct relative prefix.
  • Use that prefix for all generated cp commands to src/....
  • Use matching cd <prefix> to return to the study root after each node build step.

Test

Added regression test in test_cli.py:

  • test_run_command_docker_subdir_source_build_paths
  • Verifies generated out/build contains correct ../../src/... copy paths and cd ../../ for subdirectory sources.

@pradeeban
Copy link
Member

@Titas-Ghosh there are many irrelevant linechanges included in this PR in the mkconcore.py file. Perhaps an EoL character? Can you make sure your PR changes the minimal number of files and the least amount of lines necessary in the files? That will help with the PR review and maintenance of the code in the long term.

@Titas-Ghosh Titas-Ghosh force-pushed the fix-docker-build-subdir-paths branch from a5c35b0 to 7a1f0e2 Compare February 20, 2026 18:25
@Titas-Ghosh
Copy link
Author

Hi @pradeeban, thanks for pointing this out, actually you have mentioned this in one of my previous PRs also , i should have been more careful , while making this PR , keeping the maintenance factor in mind . I will make sure this doesn't happen in my future PRs from now on.

I’ve cleaned the branch to keep the PR scoped to only the necessary changes only in these two files
mkconcore.py and test_cli.py

@pradeeban pradeeban merged commit 97dcff1 into ControlCore-Project:dev Feb 20, 2026
6 checks passed
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