Skip to content
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

Allow runs without HEROKU_API_KEY when no app is being deployed #155

Open
schneems opened this issue Nov 5, 2020 · 0 comments
Open

Allow runs without HEROKU_API_KEY when no app is being deployed #155

schneems opened this issue Nov 5, 2020 · 0 comments

Comments

@schneems
Copy link
Contributor

schneems commented Nov 5, 2020

Right now if you Heroku::Runner.new() it will look for a HEROKU_API_KEY or shell out to heroku token even if you never plan on deploying.

====>> Hatchet setup
  #!/bin/bash -eo pipefail
bundle exec hatchet ci:setup

Traceback (most recent call last):
	3: from /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/heroku_hatchet-7.3.3/etc/ci_setup.rb:16:in `<main>'
	2: from /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/heroku_hatchet-7.3.3/etc/ci_setup.rb:16:in `open'
	1: from /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/heroku_hatchet-7.3.3/etc/ci_setup.rb:19:in `block in <main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/heroku_hatchet-7.3.3/etc/ci_setup.rb:19:in `fetch': key not found: "HEROKU_API_USER" (KeyError)
bundler: failed to load command: hatchet (/home/circleci/project/vendor/bundle/ruby/2.7.0/bin/hatchet)
RuntimeError: Command /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/heroku_hatchet-7.3.3/etc/ci_setup.rb failed:
== Setting Up CI ==

This is an issue for people who are using hatchet locally and never need to deploy (if they're using in_directory_fork for example).

The issue is that the reaper needs the API token, and the reaper is created in the initialize method.

Ideas to fix:

  • Introduce a Hatchet::Local that only has a very limited set of hatchet features and does not depend on the reaper
  • Refactor the reaper relationship in App to be lazilly initialized when it's called.
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

1 participant