sakura-editor / changelog-sakura

changelog for sakura
MIT License
1 stars 3 forks source link

Ruby 2.5 + github_changelog_generator v1.15.0.pre.rc の環境で github_changelog_generator が制御を返さない #15

Closed m-tmatma closed 5 years ago

m-tmatma commented 5 years ago

https://github.com/sakura-editor/changelog-sakura/pull/13#issuecomment-447158981

改めて、Ruby 2.5 + github_changelog_generator v1.15.0.pre.rc の環境を用意して確認しました。

* ビルド結果 : https://ci.appveyor.com/project/takke/changelog-sakura-djw7o/builds/20999165

  * 20分以上経っても返ってこないので手動で停止しています。

* そのときのソース : https://github.com/takke/changelog-sakura/tree/spec_change_work

ちなみに、Ruby 2.5 + github_changelog_generator v1.15.0.pre.beta であれば停止せずに動作します。日本語が通らない問題の検証のため、rc で追加された -require オプションで Ruby のファイルを挟んで内部エンコーディングの確認などをしていたので、今回は Ruby 2.4 + github_changelog_generator v1.15.0.pre.rc にしました。

m-tmatma commented 5 years ago

git bisect で問題のコミットを特定しました。

https://github.com/github-changelog-generator/github-changelog-generator/commit/5bb4d51b96adb472d8949abd5a9ce33329d39d84

テスト用のバッチファイル

以下ようなバッチファイルを用意する。

setlocal

PATH=C:\Ruby25-x64\bin;C:\Ruby25\bin;%PATH%
call gem uninstall -a -x  github_changelog_generator

git checkout -f .github_changelog_generator
del *.gem
call gem build github_changelog_generator
call gem install *.gem

set ACCOUNTNAME=sakura-editor
set PROJECTNAME=sakura
set OUTFILENAME=CHANGELOG-out.md
set EXCLUDELABELS=duplicate,question,invalid,wontfix,CI,management,refactoring

github_changelog_generator                           ^
    -u %ACCOUNTNAME%                                 ^
    -p %PROJECTNAME%                                 ^
    -o %OUTFILENAME%                                 ^
    --exclude-labels %EXCLUDELABELS%                 ^
    --cache-file %TEMP%\github-changelog-http-cache  ^
    --cache-log  %TEMP%\github-changelog-logger.log

endlocal

オリジナルリポジトリの clone

git clone https://github.com/github-changelog-generator/github-changelog-generator.git
cd github-changelog-generator

問題が発生する

git checkout -f 5bb4d51b96adb472d8949abd5a9ce33329d39d84

問題が発生しない

git checkout -f 5bb4d51b96adb472d8949abd5a9ce33329d39d84~
m-tmatma commented 5 years ago

https://github.com/sakura-editor/changelog-sakura/pull/13#issuecomment-447178259

Ctrl+C で見えるスタックトレースが同じなので、github-changelog-generator/github-changelog-generator#668 が本件に相当するようです。

あえて再度報告するまでもないと思います。

github_changelog_generator がアップデートされたときに改めて Ruby 2.5 (以降) を試すということでどうでしょうか。

https://github.com/github-changelog-generator/github-changelog-generator/issues/668https://github.com/github-changelog-generator/github-changelog-generator/issues/663 の duplicate とされているが、 2018/7/20 に報告されてから修正されていない。

takke commented 5 years ago

https://github.com/github-changelog-generator/github-changelog-generator/pull/676 で修正済みじゃないですかね?

m-tmatma commented 5 years ago

github-changelog-generator/github-changelog-generator#676 で修正済みじゃないですかね?

おや? そうですね。master で試したら他のエラーで落ちますが、ハングはしなくなりました。 チケットがオープンのままなので、修正されてないと勘違いしてました。

#<Thread:0x00000000270dcf38@C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:319 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        22: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:321:in `block (3 levels) in fetch_tag_shas_async'
        21: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:255:in `fetch_compare'
        20: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:397:in `check_github_response'
        19: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
        18: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
        17: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
        16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:398:in `block in check_github_response'
        15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:255:in `block in fetch_compare'
        14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/client/commits.rb:198:in `compare'
        13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/connection.rb:19:in `get'
        12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/connection.rb:156:in `request'
        11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call'
        10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:138:in `get'
         9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
         8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
         7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:115:in `call'
         6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:142:in `call!'
         5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:195:in `process'
         4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:290:in `fetch'
         3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
         2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
         1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:9:in `block in call'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/sakura-editor/sakura/compare/c1357c0cf2b5dcee5458d2e48f2b0b3130643db9...v2.3.2.0: 404 - No common ancestor between c1357c0cf2b5dcee5458d2e48f2b0b3130643db9 and v2.3.2.0. // See: https://developer.github.com/v3/repos/commits/#compare-two-commits (Octokit::NotFound)
Traceback (most recent call last):
        22: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:321:in `block (3 levels) in fetch_tag_shas_async'
        21: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:255:in `fetch_compare'
        20: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:397:in `check_github_response'
        19: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
        18: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
        17: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
        16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:398:in `block in check_github_response'
        15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/octo_fetcher.rb:255:in `block in fetch_compare'
        14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/client/commits.rb:198:in `compare'
        13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/connection.rb:19:in `get'
        12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/connection.rb:156:in `request'
        11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call'
        10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:138:in `get'
         9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
         8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
         7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:115:in `call'
         6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:142:in `call!'
         5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:195:in `process'
         4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:290:in `fetch'
         3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
         2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
         1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:9:in `block in call'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/sakura-editor/sakura/compare/c1357c0cf2b5dcee5458d2e48f2b0b3130643db9...v2.3.2.0: 404 - No common ancestor between c1357c0cf2b5dcee5458d2e48f2b0b3130643db9 and v2.3.2.0. // See: https://developer.github.com/v3/repos/commits/#compare-two-commits (Octokit::NotFound)
m-tmatma commented 5 years ago

github-changelog-generator/github-changelog-generator#676 で修正済みじゃないですかね?

ちゃんとリンクはられてますね。

m-tmatma commented 5 years ago

おや? そうですね。master で試したら他のエラーで落ちますが、ハングはしなくなりました。

17 で登録しました。