Concurrent project renames can nest projects and mix files on push
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in the project manager that implements get_local_project_path and rename_project_and_contents, and follow how PushManager._push_project and _push_metadata use the returned destination. Reproduce the interleaving in a test using a temporary filesystem, then make destination claiming reject an already-occupied target and reselect instead of relying on shutil.move. Done means both main.py files stay in separate sibling trees and get_source_files on each destination returns only its own file.
索引モデルが issue の本文から書いたものです。
説明
Problem
Destination selection and project renaming are not atomic. Two pushes in the same workspace can select the same currently free sanitized name. If one moves first, the other shutil.move nests its source inside the now-existing destination rather than rejecting the collision. Source enumeration then includes both projects' files.
Reproduction and evidence
Reproduced on master at 508863e using real project/configuration managers and a temporary filesystem, with the two operations deliberately interleaved:
- Create
Race@Projectwith cloud ID 1 andmain.pycontaining# SOURCE 1. - Create
Race#Projectwith cloud ID 2 andmain.pycontaining# SOURCE 2. - Resolve both destinations before moving either:
Both return the nonexistentfirst_destination = manager.get_local_project_path(first.name, cloud_id=1, source_path=first) second_destination = manager.get_local_project_path(second.name, cloud_id=2, source_path=second)Race Projectdirectory. - Call
rename_project_and_contents(first, first_destination), thenrename_project_and_contents(second, second_destination). - Both moves return successfully. The second project is now
Race Project/Race#Project, not a separate sibling. get_source_files(second_destination)returns both:main.py:# SOURCE 1Race#Project/main.py:# SOURCE 2
PushManager._push_project resumes at the selected destination after its rename; _push_metadata reads the files there. The interleaving therefore makes the second push consume the first project's root files as well as the nested second project's files.
Expected result
A destination that becomes occupied between lookup and rename must not cause nesting or selection of another project's files. Preserve both source trees and keep their upload inputs separate. Add a regression covering the interleaving above.
Suggestion: make destination claiming/moving reject an occupied target and retry selection, rather than relying on shutil.move's directory-container behavior.
This requires overlapping renames in the same workspace. Serializing pushes is a workaround.
- 主要言語
- Python
- スター
- 335
- フォーク
- 172
- 平均マージ
- 6時間 54分
- マージ済み PR(30日)
- 37
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QuantConnect/lean-cli のほかの issue
-
priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
QuantConnect/lean-cli#792 ·
メンテナーはふだん 1 日以内に返信
-
priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
QuantConnect/lean-cli#786 ·
メンテナーはふだん 1 日以内に返信
-
priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
QuantConnect/lean-cli#785 ·
メンテナーはふだん 1 日以内に返信
-
A partially written live command result aborts polling with JSONDecodeError対応中かも @pcbeingused333 が 3 日前に担当しました。 オープンpriority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
QuantConnect/lean-cli#784 ·
メンテナーはふだん 1 日以内に返信
-
Container lookup failures during result polling are masked by UnboundLocalError対応中かも @pcbeingused333 が 5 日前に担当しました。 オープンpriority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
QuantConnect/lean-cli#783 ·
メンテナーはふだん 1 日以内に返信
QuantConnect/lean-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pimutils/vdirsyncer#1242 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
open-webui/open-webui#35360 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信