Skip to content

Fix workflow CWD safety for file locks and git diff logging#2253

Open
gyx09212214-prog wants to merge 1 commit into
microsoft:mainfrom
gyx09212214-prog:fix-workflow-cwd-safety
Open

Fix workflow CWD safety for file locks and git diff logging#2253
gyx09212214-prog wants to merge 1 commit into
microsoft:mainfrom
gyx09212214-prog:fix-workflow-cwd-safety

Conversation

@gyx09212214-prog

Copy link
Copy Markdown

Summary

  • resolve file:// tracking URIs to local absolute paths before creating the workflow file lock
  • skip uncommitted-code logging when the current directory is not a git work tree
  • run git diff/status commands without shell=True and capture stderr to avoid noisy startup output
  • add focused regression tests for the CWD-sensitive path and git logging behavior

Fixes #2252.

Tests

  • .\.venv\Scripts\python -m pytest tests\test_workflow_cwd_safety.py -q

Attempted:

  • .\.venv\Scripts\python -m pytest tests\test_workflow.py tests\test_workflow_cwd_safety.py -q
    • blocked during collection because this local shallow clone/test env does not have compiled qlib.data._libs.rolling

@gyx09212214-prog

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

qlib.workflow: FileLock and _log_uncommitted_code both unsafe vs CWD

1 participant