Skip to content

feat(build): fail early when a node's source file is missing - #692

Open
yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/build-missing-sources
Open

yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/build-missing-sources

Conversation

@yadavchiragg

Copy link
Copy Markdown

Problem

When a node's source file is missing from the source directory, mkconcore.py only logs Script 'x.py' not found in sourcedir ... and still exits 0. concore build reports success and the generated study fails later at run time (cp ./src/x.py in the build script, or a node with no code).

This affects 10 bundled workflows when built with their own directory as the source, e.g. testsou/test3.graphml, testsou/twopid.graphml, demo/generalcontrol.graphml, gi/stimeaextcon.graphml. concore validate already reports "Missing source file", but build never calls it.

Change

concore build checks node labels (ID:file.ext) against the source directory before running mkconcore and stops with the list of missing files, creating no output.

  • labels without an extension (pulled containers like CZ:cpymat) and port-only nodes (IN:) are skipped
  • mkconcore.py itself is unchanged

Behavior change

Builds that previously "succeeded" while logging errors now fail up front. Happy to add an opt-out flag if you prefer.

Testing

  • tests/test_build_missing_sources.py (4 tests)
  • existing CLI tests unchanged, ruff clean
  • tried on testsou/test3.graphml

mkconcore.py only logs 'Script ... not found' for a missing node source and still exits 0, so the generated study fails later at run time. concore build now checks the node labels against the source directory first and stops with the list of missing files. Pulled-container and port-only labels are skipped. Tests and docs included.
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.

1 participant