fix(ci): include lib in PYTHONPATH for legacy run-tests#401
Closed
captainsafia wants to merge 1 commit intomainfrom
Closed
fix(ci): include lib in PYTHONPATH for legacy run-tests#401captainsafia wants to merge 1 commit intomainfrom
captainsafia wants to merge 1 commit intomainfrom
Conversation
The webhook control-plane migration relocates the shared `oz_workflows` package from `.github/scripts/oz_workflows` to a new top-level `lib/oz_workflows`. While that migration PR (#400) is open, the legacy reusable `run-tests.yml` on main keeps running against the merge ref of every open PR, and the `PYTHONPATH=.github/scripts` it sets fails to import `oz_workflows` once a PR has performed the move. Add `lib` to `PYTHONPATH` so the reusable workflow tolerates both the pre- and post-migration repo layouts. Non-existent path entries are ignored by Python, so PRs that have not migrated yet are unaffected. Co-Authored-By: Oz <oz-agent@warp.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 webhook control-plane migration in #400 relocates the shared
oz_workflowspackage from.github/scripts/oz_workflowsto a new top-levellib/oz_workflows.While that PR is open,
pr-hooks.ymlonmainkeeps invoking the legacy reusablerun-tests.ymlagainst every open PR's merge ref. Because that workflow setsPYTHONPATH=.github/scripts, thepython -m unittest discover -s .github/scripts/testsstep fails withModuleNotFoundError: No module named 'oz_workflows'once a PR has performed the move (e.g. #400 itself):Change
Add
libto thePYTHONPATHthe legacy reusable workflow exports beforepython -m unittest discover -s .github/scripts/tests. Python silently ignores non-existent entries onPYTHONPATH, so PRs that have not migrated yet (wherelib/does not exist) keep behaving exactly as they do today.This unblocks PR #400's
run_tests_on_push / Run testscheck without modifying the migration PR. Once #400 lands,pr-hooks.ymland the legacy reusable workflow will be retired entirely.Validation
python -m unittest discover -s .github/scripts/testspasses againstmain(nolib/present, behavior unchanged).PYTHONPATH=lib:.github/scripts(verified locally on the merge ref: 110 passed, 14 subtests passed fortests/; legacy suite resolvesoz_workflowsfromlib/).Conversation: https://staging.warp.dev/conversation/1b6aa5c7-03cf-46a0-82a5-b9fe805e2fb6
Run: https://oz.staging.warp.dev/runs/019dd6af-d7da-7f05-a8c1-4da156024d76
This PR was generated with Oz.