Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Download failure leaves invalid file

オープン
#9 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
github, ruby
領域
devops

調査の方向性

まず、ダウンロードが保存先パスに書き込む libraries/github_asset.rb の 94 行目付近を読みます。失敗時の動作と既存のリソースフローを確認し、そのうえで、ダウンロードに失敗した場合に保存先のアーカイブが残らず、成功した場合には issue で説明されている一時ファイルのフローを通じて生成されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Bug

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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sous-chefs/github のほかの issue

sous-chefs/github の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。