fix: add optional submodules input to python-ci (#39)#40
Merged
Conversation
Adds an optional 'submodules' input to the reusable python-ci workflow. When set (e.g. submodules: schemas), the test job runs git submodule update --init for the named paths after checkout, so tests that read submodule content can resolve it. Defaults to empty -- a no-op for every current consumer. Motivated by dfe-engine: its schema-profile tests resolve from the schemas submodule (common-header/*.yaml) and otherwise fall back to stale bundled profiles, failing CI. Works for a public submodule with the default GITHUB_TOKEN; private submodules still need skipif or a cross-repo token. Reconciles docs/LESSONS.md: skipif for private submodules, the submodules input for public ones. Refs #39
This was referenced Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #39.
What
Adds an optional
submodulesinput to the reusablepython-ci.yml. When set (e.g.submodules: schemas), thetestjob runsgit submodule update --init --depth 1 <paths>after checkout (value passed via env to avoid script injection). Default empty -> a no-op for every current consumer.Why
Consumer tests that read submodule content currently fail in CI because the reusable-workflow checkout fetches no submodules. Concretely:
dfe-engineresolves ClickHouse schema profiles from itsschemassubmodule (schemas/common-header/*.yaml) and falls back to stale bundled profiles when it is absent, so a1.1.0profile test fails in CI while passing locally.Scope / constraints
python-ci.ymlonly for now (the dfe-engine case). Easy to extend to the other language workflows if needed -- see Add optional submodules input to reusable CI (public submodules) #39.testjob, the only one that consumes submodule content (quality lintssrc/, build packagessrc/).GITHUB_TOKEN. A private submodule still can't be cloned by the default token -- those keep using theskipifpattern (or a configured cross-repo token).Docs
docs/LESSONS.mdreconciled:skipiffor private submodules; thesubmodulesinput for public ones.Verification
tests/unit/test_workflow_consistency.py: 45 passed (YAML valid, gates/threading intact).Consumer opt-in (after merge)
A repo with a public submodule adds to its
ci.yml: