Promote Phase 1 script extraction refactor to main#24
Merged
Conversation
…t tests (#22) Refactor only — no behavior change. Moves the Python embedded in three reusable workflows into proper .py files for syntax highlighting, linting, local debuggability, and unit testability. New scripts (mechanical extraction from inline YAML): - scripts/deploy_fabric_cicd.py — fabric-cicd two-phase deploy - scripts/run_fabric_etl.py — Fabric Job runner with name resolution and LRO polling - scripts/deploy_bulk.py — Bulk Import API deploy with payload build, POST, LRO polling Workflows updated to invoke 'python scripts/<name>.py' instead of 'python -c "..."'. Small helper functions extracted from each script's main() to enable testing of the pure logic that won't change in the upcoming bulk gap-bridging work: - deploy_fabric_cicd.py: remaining_types_for_phase2() - run_fabric_etl.py: find_item_id_by_name(), interpret_poll_response() - deploy_bulk.py: interpret_post_response() Unit tests covering the helpers and the existing pure functions: - tests/test_deploy_bulk.py — 19 tests - tests/test_deploy_fabric_cicd.py — 6 tests - tests/test_run_fabric_etl.py — 13 tests requirements-dev.txt: added requests, azure-identity, fabric-cicd so local imports resolve and the test runner can import the scripts. CI installs the same packages per workflow.
Promote refactor: extract inline Python + add unit tests
michaeldeongreen
added a commit
that referenced
this pull request
May 9, 2026
Phase 1 extracted inline Python from this workflow into scripts/run_fabric_etl.py but the corresponding actions/checkout step was never added. The other two refactored reusables (reusable-deploy-supported.yml, reusable-deploy-bulk.yml) both have it; only this one was missed. Without checkout, the runner has no scripts/ directory and the python invocation fails with 'No such file or directory'. The Phase 1 refactor's test-environment ETL run looked successful because workflow_run-triggered workflows execute the workflow file from the default branch — at that moment main still held the pre-refactor inline-Python version. The bug surfaced as soon as PR #24 promoted the refactored workflow to main, breaking the next prod ETL run.
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.
Promotes the Phase 1 refactor from
testtomain.What's in this promotion
Extracted inline Python from 3 reusable workflows into
scripts/*.pyfiles, plus 38 new unit tests:scripts/deploy_fabric_cicd.py(extracted fromreusable-deploy-supported.yml) — 6 testsscripts/run_fabric_etl.py(extracted fromreusable-fabric-etl.yml) — 13 testsscripts/deploy_bulk.py(extracted fromreusable-deploy-bulk.yml) — 19 testsTotal: 107 tests passing locally and in CI.
Risk
Low. Pure code-structure change, behavior-preserving. Already validated end-to-end in
testvia the fabric-cicd deploy path (DEPLOY_METHOD=fabric-cicd).Already merged via