Skip to content

Error when run against module with a second module merged into it. #665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
david22swan opened this issue Jul 23, 2018 · 1 comment
Closed

Comments

@david22swan
Copy link

david22swan commented Jul 23, 2018

The changelog generator rake task seems to throw an error whenever it is run against a module that had previously had a separate orphaned module merged into to it. The error it shows is:

rake aborted! for tags: 50/68
Octokit::NotFound: GET https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/compare/b305bbeac7a0560a271f34026f936b88b88da477...2.1.3: 404 - No common ancestor between b305bbeac7a0560a271f34026f936b88b88da477 and 2.1.3. // See: https://developer.github.com/v3/repos/commits/#compare-two-commits
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/octokit-4.9.0/lib/octokit/response/raise_error.rb:16:in `on_complete'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-0.15.2/lib/faraday/response.rb:9:in `block in call'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-0.15.2/lib/faraday/response.rb:61:in `on_complete'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-0.15.2/lib/faraday/response.rb:8:in `call'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:290:in `fetch'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:195:in `process'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:142:in `call!'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-http-cache-2.0.0/lib/faraday/http_cache.rb:115:in `call'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-0.15.2/lib/faraday/rack_builder.rb:143:in `build_response'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-0.15.2/lib/faraday/connection.rb:387:in `run_request'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/faraday-0.15.2/lib/faraday/connection.rb:138:in `get'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/octokit-4.9.0/lib/octokit/connection.rb:156:in `request'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/octokit-4.9.0/lib/octokit/connection.rb:19:in `get'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/octokit-4.9.0/lib/octokit/client/commits.rb:198:in `compare'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/bundler/gems/github-changelog-generator-20ee04ba1234/lib/github_changelog_generator/octo_fetcher.rb:254:in `block in fetch_compare'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/bundler/gems/github-changelog-generator-20ee04ba1234/lib/github_changelog_generator/octo_fetcher.rb:396:in `block in check_github_response'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/bundler/gems/github-changelog-generator-20ee04ba1234/lib/github_changelog_generator/octo_fetcher.rb:395:in `check_github_response'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/bundler/gems/github-changelog-generator-20ee04ba1234/lib/github_changelog_generator/octo_fetcher.rb:254:in `fetch_compare'
/Users/david.swan/GitHub/puppetlabs-stdlib/.bundle/gems/ruby/2.4.0/bundler/gems/github-changelog-generator-20ee04ba1234/lib/github_changelog_generator/octo_fetcher.rb:319:in `block (3 levels) in fetch_tag_shas_async'
Tasks: TOP => changelog

Encountered this problem when starting a new release on the puppetlabs-stdlib module. Here is a link to my fork of said module and the branch that the changes currently exit on:

https://github.com/david22swan/puppetlabs-stdlib/tree/PreRelease

Attempted to avoid issue by setting it so that only commits made after the last release would be counted but the issue still hit.

@justynspooner
Copy link

justynspooner commented Jul 28, 2020

I am having a similar issue with the current version. Is there any way to work around this issue? I'd love to be able to use this tool but currently it errors out.

I ran this:

github_changelog_generator -u [USER] -p [PROJECT] -t [GITHUB_TOKEN] --since-tag [A_RECENT_TAG]

Traceback (most recent call last):
	22: from /Library/Ruby/Gems/2.6.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/octo_fetcher.rb:323:in `block (3 levels) in fetch_tag_shas_async'
	21: from /Library/Ruby/Gems/2.6.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/octo_fetcher.rb:257:in `fetch_compare'
	20: from /Library/Ruby/Gems/2.6.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/octo_fetcher.rb:399:in `check_github_response'
	19: from /Library/Ruby/Gems/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
	18: from /Library/Ruby/Gems/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
	17: from /Library/Ruby/Gems/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
	16: from /Library/Ruby/Gems/2.6.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/octo_fetcher.rb:400:in `block in check_github_response'
	15: from /Library/Ruby/Gems/2.6.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/octo_fetcher.rb:257:in `block in fetch_compare'
	14: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/client/commits.rb:198:in `compare'
	13: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/connection.rb:19:in `get'
	12: from /Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/connection.rb:156:in `request'
	11: from /Library/Ruby/Gems/2.6.0/gems/sawyer-0.8.2/lib/sawyer/agent.rb:94:in `call'
	10: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/connection.rb:198:in `get'
	 9: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/connection.rb:492:in `run_request'
	 8: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/rack_builder.rb:153:in `build_response'
	 7: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:115:in `call'
	 6: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:135:in `call!'
	 5: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:187:in `process'
	 4: from /Library/Ruby/Gems/2.6.0/gems/faraday-http-cache-2.2.0/lib/faraday/http_cache.rb:283:in `fetch'
	 3: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/response.rb:11:in `call'
	 2: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/response.rb:65:in `on_complete'
	 1: from /Library/Ruby/Gems/2.6.0/gems/faraday-1.0.1/lib/faraday/response.rb:12:in `block in call'
/Library/Ruby/Gems/2.6.0/gems/octokit-4.18.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/[USER]/[PROJECT]/compare/c23204d183740a1cee32d91f566a6a2737627761...0.0.9: 404 - No common ancestor between c23204d183740a1cee32d91f566a6a2737627761 and 0.0.9. // See: https://developer.github.com/v3/repos/commits/#compare-two-commits (Octokit::NotFound)

rndmh3ro pushed a commit to dev-sec/ansible-collection-hardening that referenced this issue Dec 13, 2020
the changelog generation fails because we merged other repos into
this one and these commits do not share a common ancestor.
see this issue: github-changelog-generator/github-changelog-generator#665

to workaround this, we change the changelog generation so all tags older than 7.0.0 will be ignored
(--since-tag does not work here because it still works on all tags). This however will remove
 older releases from the changelog so we move these old releases into a separate file.
this is okay for me since these old releases are for ansible-os-hardening  and not the collection.
the new changelog file will contain all changes since 7.0.0.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
rndmh3ro pushed a commit to dev-sec/ansible-collection-hardening that referenced this issue Dec 13, 2020
the changelog generation fails because we merged other repos into
this one and these commits do not share a common ancestor.
see this issue: github-changelog-generator/github-changelog-generator#665

to workaround this, we change the changelog generation so all tags older than 7.0.0 will be ignored
(--since-tag does not work here because it still works on all tags). This however will remove
 older releases from the changelog so we move these old releases into a separate file.
this is okay for me since these old releases are for ansible-os-hardening  and not the collection.
the new changelog file will contain all changes since 7.0.0.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
rndmh3ro added a commit to dev-sec/ansible-collection-hardening that referenced this issue Dec 15, 2020
* fix changelog generation

the changelog generation fails because we merged other repos into
this one and these commits do not share a common ancestor.
see this issue: github-changelog-generator/github-changelog-generator#665

to workaround this, we change the changelog generation so all tags older than 7.0.0 will be ignored
(--since-tag does not work here because it still works on all tags). This however will remove
 older releases from the changelog so we move these old releases into a separate file.
this is okay for me since these old releases are for ansible-os-hardening  and not the collection.
the new changelog file will contain all changes since 7.0.0.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* fix regex in action

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
rndmh3ro pushed a commit to dev-sec/ansible-collection-hardening that referenced this issue Dec 15, 2020
the changelog generation fails because we merged other repos into
this one and these commits do not share a common ancestor.
see this issue: github-changelog-generator/github-changelog-generator#665

to workaround this, we change the changelog generation so all tags older than 7.0.0 will be ignored
(--since-tag does not work here because it still works on all tags). This however will remove
 older releases from the changelog so we move these old releases into a separate file.
this is okay for me since these old releases are for ansible-os-hardening  and not the collection.
the new changelog file will contain all changes since 7.0.0.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this issue Aug 3, 2022
* fix changelog generation

the changelog generation fails because we merged other repos into
this one and these commits do not share a common ancestor.
see this issue: github-changelog-generator/github-changelog-generator#665

to workaround this, we change the changelog generation so all tags older than 7.0.0 will be ignored
(--since-tag does not work here because it still works on all tags). This however will remove
 older releases from the changelog so we move these old releases into a separate file.
this is okay for me since these old releases are for ansible-os-hardening  and not the collection.
the new changelog file will contain all changes since 7.0.0.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* fix regex in action

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants