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

[close #88] Raise error when no source given #134

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Conversation

schneems
Copy link
Contributor

  14) Java a simple java app on jdk-openjdk-9.0.4 should deploy
      Failure/Error:
        Hatchet::Runner.new(
          buildpacks: ["https://github.com/heroku/heroku-buildpack-java"],
          config: {
            "JVM_COMMON_BUILDPACK" => "https://api.github.com/repos/heroku/heroku-buildpack-jvm-common/tarball/#{jvm_common_branch}"
          }
        ).tap do |app|
          # app.before_deploy do
          #   set_java_version(Dir.pwd, version)
          # end
          # app.deploy do

      ArgumentError:
        unknown keywords: :buildpacks, :config
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:49:in `[]'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:49:in `block in path_for_name'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:48:in `each'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:48:in `detect'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:48:in `path_for_name'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/app.rb:40:in `initialize'
      # ./test/spec/java_spec.rb:17:in `new'
      # ./test/spec/java_spec.rb:17:in `block (4 levels) in <top (required)>'

This PR defaults to a value then raises an error when that value is not assigned manually by the programmer.

```
  14) Java a simple java app on jdk-openjdk-9.0.4 should deploy
      Failure/Error:
        Hatchet::Runner.new(
          buildpacks: ["https://github.com/heroku/heroku-buildpack-java"],
          config: {
            "JVM_COMMON_BUILDPACK" => "https://api.github.com/repos/heroku/heroku-buildpack-jvm-common/tarball/#{jvm_common_branch}"
          }
        ).tap do |app|
          # app.before_deploy do
          #   set_java_version(Dir.pwd, version)
          # end
          # app.deploy do

      ArgumentError:
        unknown keywords: :buildpacks, :config
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:49:in `[]'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:49:in `block in path_for_name'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:48:in `each'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:48:in `detect'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/config.rb:48:in `path_for_name'
      # /Users/rschneeman/.gem/ruby/2.7.1/gems/heroku_hatchet-6.0.0/lib/hatchet/app.rb:40:in `initialize'
      # ./test/spec/java_spec.rb:17:in `new'
      # ./test/spec/java_spec.rb:17:in `block (4 levels) in <top (required)>'
```

This PR defaults to a value then raises an error when that value is not assigned manually by the programmer.
@schneems schneems merged commit facd693 into main Sep 21, 2020
@schneems schneems deleted the schneems/no-app-error branch September 21, 2020 18:26
@edmorley
Copy link
Member

@schneems Hi! I don't know if you'd seen it, but there was an intermittent on the CI of this post merge:
https://circleci.com/gh/heroku/hatchet/709

@schneems
Copy link
Contributor Author

Thanks, I logged it in my "flappy tests" issue. CI seems to be less robust than "regular" tests.

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

Successfully merging this pull request may close these issues.

2 participants