Download failure leaves invalid file
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 48/100
調査の方向性
まず、ダウンロードが保存先パスに書き込む libraries/github_asset.rb の 94 行目付近を読みます。失敗時の動作と既存のリソースフローを確認し、そのうえで、ダウンロードに失敗した場合に保存先のアーカイブが残らず、成功した場合には issue で説明されている一時ファイルのフローを通じて生成されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
I just ran into an issue where Github failed to serve up a file properly, and that prevented all future runs of my cookbook from converging successfully.
The github_asset resource downloads directly into the destination file (/var/chef/cache/github_assets/org/repo/version/foo-version.tar.gz). If the download fails it leaves a zero-length archive behind with that name, and future cookbook runs don't re-download the file because the zero-length file exists. See https://github.com/reset/github-cookbook/blob/master/libraries/github_asset.rb#L94.
Suggested solution: download to a temporary file and rename it if the download completes successfully. I suggest downloading to a temporary name in the same directory so that the rename step doesn't also require a copy, if (for example) the /tmp directory is on a different volume than the /var/chef/cache/github_assets directory.
- 主要言語
- Ruby
- スター
- 25
- フォーク
- 25
- 平均マージ
- 5時間 40分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sous-chefs/github のほかの issue
-
Feature Request
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
sous-chefs/github#47 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
sous-chefs/github#46 ·
-
Dependency Dashboardオープン
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
sous-chefs/github#26 ·
-
Feature Request
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
sous-chefs/github#19 ·
sous-chefs/github の issue をすべて見る
似ている issue
-
🐞 bug pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CircuitVerse/CircuitVerse#8031 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
BazaRb::Fake#enter rejects dotted badges accepted by BazaRb#enter対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
riscv/riscv-unified-db#2740 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信