Skip to content

Force reinstall internal runtime deps#96

Merged
Pigbibi merged 1 commit into
mainfrom
fix/force-internal-runtime-deps
Jul 4, 2026
Merged

Force reinstall internal runtime deps#96
Pigbibi merged 1 commit into
mainfrom
fix/force-internal-runtime-deps

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary\n- force reinstall internal git direct dependencies during runtime deploy updates\n- cover the runtime workflow guard in tests\n\n## Why\nThe runtime venv can otherwise keep an installed package with the same package version even when the git pin changed, leaving stale code in place.\n\n## Validation\n- PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/CryptoStrategies/src:. python3 -m pytest -q tests/test_watchdog_workflow.py\n- python3 -m ruff check .\n- PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/CryptoStrategies/src:. python3 -m unittest discover -s tests -v

Co-Authored-By: Codex <noreply@openai.com>
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pigbibi Pigbibi merged commit a725b01 into main Jul 4, 2026
2 checks passed
@Pigbibi Pigbibi deleted the fix/force-internal-runtime-deps branch July 4, 2026 04:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d81970d7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

install_with_retry "Force reinstall internal dependency ${requirement%% @ *}" \
"$VENV_PATH/bin/pip" install --force-reinstall --no-deps "$requirement"
fi
done < <(grep -E '^(quant-platform-kit|crypto-strategies) @ git\\+' "$REQ_FILE" || true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Match git+ direct references when forcing reinstall

Under grep -E (extended regex; checked grep --help), this single-quoted git\\+ pattern looks for a backslash before the +, so it returns no rows for the current requirements-lock.txt entries like quant-platform-kit @ git+https://.... When only an internal git SHA changes, force_reinstall_internal_git_deps therefore skips both packages and the cached runtime venv can still keep the stale installed code that this change is meant to refresh.

Useful? React with 👍 / 👎.

echo "$REQ_FILE changed or cache is cold; updating dependency venv."
install_with_retry "Upgrade pip" "$VENV_PATH/bin/pip" install -U pip
install_with_retry "Install runtime dependencies" "$VENV_PATH/bin/pip" install -r "$REQ_FILE"
force_reinstall_internal_git_deps

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reinstall internal deps when reusing the hot cache

Because this call is only reached in the cache-miss branch, a self-hosted runner whose requirements.sha256 already matches the current lock file skips the new repair path. That is the exact state left after an earlier run recorded the new requirements hash while pip kept an older same-version direct-url install, and this workflow-only commit does not change requirements-lock.txt, so the stale internal package can continue to run until the lock file changes again or the venv is deleted.

Useful? React with 👍 / 👎.

while IFS= read -r requirement; do
if [ -n "$requirement" ]; then
install_with_retry "Force reinstall internal dependency ${requirement%% @ *}" \
"$VENV_PATH/bin/pip" install --force-reinstall --no-deps "$requirement"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve dependencies for refreshed git packages

When an internal git pin adds or changes an install dependency while keeping the same package version, the preceding pip install -r can skip the already-installed package and never see the new metadata; this repair install then passes --no-deps, which python3 -m pip install --help defines as “Don't install package dependencies.” The workflow can therefore run refreshed internal code without its newly required dependency in the runtime venv.

Useful? React with 👍 / 👎.

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.

1 participant