If local GIT Repo is not available to the user running git pull, process will fail (silently in some cases).
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- git
- 領域
- tooling
調査の方向性
SourceControl.Git.Utils:GetCurrentBranch() と RunGitCommandWithInput("ls-remote", ...) から始め、Pull(1) からの使用箇所を追跡します。アクセスできないリポジトリに対して returnCode と errStream がどのように処理されているかを確認します。git の失敗が空のブランチとして扱われたり pull がスキップされたりするのではなく、エラー出力とともに表面化されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This was discovered whilst diagnosing a CICD pipeline which execute ##class(SourceContorl.Git.API.).Pull(1), by a GitHub Runner - once, the runner is setup (on Windows) to run as a service.
When setup, by default the Service windows identity is NETWORK_SERVICE. This windows account will have access to the windows folder containing the repository, but the ownership would typically be different.
the Pull(1) method executes
- git branch --show-current invoked via the method SourceControl.Git.Utils:GetCurrentBranch(), then executes
- git ls-remote invoked by calling ##class(SourceControl.Git.Utils).RunGitCommandWithInput("ls-remote" ...)
the GetCurrentBranch() never checks error codes, and if it got a branch and in the case of the GitHub Runner service (and a GIT environment not set to make this repo also available to NETWORK_SERVICE), will raise the error (that is logged) saying the command failed fatally as the repo couldnt be accessed.
GetBranch() returns "", and no error condition - and then proceeds to run the second command, which also fails (and doesn't check for failure), but simply reports "Skipping pull because remote branch does not exist".
We need to make all git command handle failures, and this is no exception so I would propose
- SourceControl.Git.Utils:GetCurrentBranch() take to arguments byRef, returnCode and errStream, and, if returnCode >0, writes out errStream content and quits with error.
- ##class(SourceControl.Git.Utils).RunGitCommandWithInput("ls-remote",..., interprets returnCode and if >0 writes out errStream content and quits with error.
Steve
- 主要言語
- ObjectScript
- スター
- 22
- フォーク
- 15
- 平均マージ
- 21日 22時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
intersystems/git-source-control のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
intersystems/git-source-control#1006 ·
-
customer
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
intersystems/git-source-control#1002 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
intersystems/git-source-control#1001 ·
intersystems/git-source-control の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
FuRongJun-1999/dsh-memory#399 ·
メンテナーはふだん 1 日以内に返信
-
area:install bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
`inverse()` of a controlled `CUGate` drops the phase parameter γ対応中かも @rupasri118 が今日担当しました。 オープンbug mod: circuit
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Qiskit/qiskit#17223 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
frostney/known-good-route#129 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信