Repository navigation
Fix Python syntax check silently skipping all nested packages - #1752
Open
Madhavan N (Madhan0zx) wants to merge 1 commit into
Open
Madhavan N (Madhan0zx) wants to merge 1 commit into
Madhavan N (Madhan0zx) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
The python-syntax-check workflow compiled application/single_app/*.py with a single-level glob, so it only checked files directly in that directory. Every nested package was silently skipped - most notably all 44 files under semantic_kernel_plugins/, which hold the action plugins. A PR touching only those files would report "All Python files compiled successfully!" without compiling anything. Switch the loop to a recursive find, excluding __pycache__, so all 269 Python files are checked. Adds functional_tests/test_python_syntax_check_workflow_scope.py to guard the discovery logic and confirm nested files are covered.
Madhavan N (Madhan0zx)
force-pushed
the
fix/python-syntax-check-recursive-glob
branch
from
October 13, 2026 16:08
6f7ada2 to
7e9a5ac
Compare
This branch has not been deployed
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.
Summary
The
Python Syntax Checkworkflow compiles files using a single-level shell glob, so it only ever checked the.pyfiles sitting directly inapplication/single_app/and silently skipped every nested package.Measured on the current tree:
application/single_app/*.py(what the workflow compiled)application/single_app/**/*.py(all Python files)semantic_kernel_plugins/(never checked)The workflow's path filter on line 9 (
application/single_app/**.py) correctly triggers on nested files, but the step body then compiled nothing. A PR touching onlysemantic_kernel_plugins/would report:without compiling a single file. That package holds every action plugin (
mcp_plugin.py,sql_query_plugin.py,openapi_plugin.py,databricks_plugin.py,yamcs_plugin.py, …), which are surfaced to users indocs/reference/actions/index.md.Changes
.github/workflows/python-syntax-check.yml— replace thefor file in *.pyglob with a recursivefindthat walks the whole tree and excludes__pycache__. Coverage goes from 225 to all 269 Python files.functional_tests/test_python_syntax_check_workflow_scope.py— new regression test that guards the discovery logic.The loop already relied on bash arrays (
failed_files=(),${#failed_files[@]}) and process substitution, sofind | sort -zis the same class of construct already in use — no new shell dependencies. Ordering is preserved viasort -zso logs stay readable.Verification
The exact workflow body was executed against the repository:
Clean tree: all 269 files compile, exit 0.
Deliberately broken nested file (
semantic_kernel_plugins/_tmp_broken_check.pycontainingdef broken(:):The old workflow would have passed this silently.
The new test reports
3/3passing, and drops to2/3when run against the pre-fix workflow — confirming it actually guards the regression:The test follows the existing functional test conventions in
functional_tests/(version header, per-test functions, emoji status output, non-zero exit on failure). Its bash-dependent check degrades to a skip when no bash is available rather than failing spuriously.Notes for reviewers
config.pyversion bump and a release notes entry. I deliberately left both out to keep the diff to the CI fix plus its test — happy to add them if maintainers prefer.