fix: add offline wheel lookup to repackaged plugins#67
Conversation
📝 WalkthroughWalkthroughThe PR refactors how the repackaging script configures offline wheel installation. A new ChangesOffline Requirements Update Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugin_repackaging.sh`:
- Around line 157-160: The current awk snippet in plugin_repackaging.sh that
rewrites "$REQFILE" only removes one exact combined flag and misses other forms;
update the filter to remove any lines that are standalone "--no-index", any
"--find-links" using "=" or space, with or without "./" and trailing slashes
(e.g. "--find-links=./wheels", "--find-links ./wheels",
"--find-links=../wheels/"), and also remove the case where "--no-index" and
"--find-links" are on separate lines; then prepend the canonical combined line
"--no-index --find-links=./wheels/" at the top as before and write back to
"$REQFILE" (use patterns like /^--no-index($|[[:space:]])/ and
/^--find-links([=[:space:]]).*(\/?wheels\/?)$/ to identify and drop all
variants).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| awk ' | ||
| BEGIN { print "--no-index --find-links=./wheels/" } | ||
| $0 !~ /^--no-index[[:space:]]+--find-links=\.\/wheels\/?$/ { print } | ||
| ' "$REQFILE" > "$REQFILE.tmp" && mv "$REQFILE.tmp" "$REQFILE" |
There was a problem hiding this comment.
Dedup logic misses common --find-links forms, so offline flags can accumulate.
The awk filter only removes one exact combined line. Existing lines like --find-links=./wheels, --find-links ./wheels, or separate --no-index remain, so repeated runs can keep stale/duplicate resolver flags.
Suggested fix
awk '
- BEGIN { print "--no-index --find-links=./wheels/" }
- $0 !~ /^--no-index[[:space:]]+--find-links=\.\/wheels\/?$/ { print }
+ BEGIN { print "--no-index --find-links=./wheels/" }
+ # Drop any existing no-index / find-links directives so output is canonical and idempotent.
+ $0 ~ /^[[:space:]]*--no-index([[:space:]]|$)/ { next }
+ $0 ~ /^[[:space:]]*--find-links([=[:space:]]|$)/ { next }
+ { print }
' "$REQFILE" > "$REQFILE.tmp" && mv "$REQFILE.tmp" "$REQFILE"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@plugin_repackaging.sh` around lines 157 - 160, The current awk snippet in
plugin_repackaging.sh that rewrites "$REQFILE" only removes one exact combined
flag and misses other forms; update the filter to remove any lines that are
standalone "--no-index", any "--find-links" using "=" or space, with or without
"./" and trailing slashes (e.g. "--find-links=./wheels", "--find-links
./wheels", "--find-links=../wheels/"), and also remove the case where
"--no-index" and "--find-links" are on separate lines; then prepend the
canonical combined line "--no-index --find-links=./wheels/" at the top as before
and write back to "$REQFILE" (use patterns like /^--no-index($|[[:space:]])/ and
/^--find-links([=[:space:]]).*(\/?wheels\/?)$/ to identify and drop all
variants).
Summary by CodeRabbit
Improvements
Chores