deploy fails to redeploy due to global config
まだ誰も着手していません。
評価
調査の方向性
まず、deploy コマンドがプロジェクトの rsconnect-python ディレクトリとグローバルな /Users/{ME}/Library/Application Support/rsconnect-python の場所で、どのように状態を読み書きするかを追跡します。サンプルのアプリケーション ID を使って削除して再デプロイする手順を再現し、その後、プロジェクトを移動したときに状態がどう扱われるべきかを確認します。再デプロイによってグローバルな状態に依存せず新しいアプリケーションが作成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Replaces https://github.com/posit-dev/connect/issues/30437
System details
OS Version : OSX Sonoma
Problem Statement
Creating it as a "bug" because it could be perceived as one from the users.
Steps to Reproduce
- Deploy an application (I'm using a streamlit dashboard, but shouldn't matter)
- The application is deployed with an ID, for example:
87a2d580-58fd-4e85-9027-c7946958806c
- The application is deployed with an ID, for example:
- Delete the application
Removed application 87a2d580-58fd-4e85-9027-c7946958806c ("main")
- Deploy the same application again
- The deploy fails with an error:
Posit Connect reported an error (calling /__api__/applications/87a2d580-58fd-4e85-9027-c7946958806c): The requested object does not exist.
- The deploy fails with an error:
Actual Behavior
The deploy fails because it tries to reuse an application that was deleted.
This happens even when the user deletes the rsconnect-python directory from the application itself.
That is caused by rsconnect-python saving a global state in /Users/{ME}/Library/Application Support/rsconnect-python where the application ID is stored.
There are 3 problems that I see:
- The user is unable to deploy the application again after deleting it
rsconnect-pythonbehaviour is different based on the computer where it gets run as the global state is different- Moving the project directory around causes a mismatch between the global state and the project state (because the global state stores the PATH) even though the project is the same and its state didn't change.
Expected Behavior
- Doing the deploy again succeeds and creates a new application
- There is no global state.
- I think it's perfectly reasonable to store the state in the application itself (as it already does within the
$PROJECT_DIR/rsconnect-pythonsubdirectory) so that it can be committed.
- I think it's perfectly reasonable to store the state in the application itself (as it already does within the
- 主要言語
- Python
- スター
- 37
- フォーク
- 28
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
posit-dev/rsconnect-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
posit-dev/rsconnect-python#786 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
posit-dev/rsconnect-python#543 · コメント 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
posit-dev/rsconnect-python#513 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
posit-dev/rsconnect-python#178 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
posit-dev/rsconnect-python#855 ·
posit-dev/rsconnect-python の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100