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

[changelog skip] Use correct method name in script #1129

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

schneems
Copy link
Contributor

@schneems schneems commented Feb 24, 2021

There's a bug in the release script:

$ be rake buildpack:release
Attempting to deploy v224, overwrite with RELEASE_VERSION env var
rake aborted!
NameError: undefined local variable or method `local_commit' for #<DeployCheck:0x00007fd311b6f238>
Did you mean?  local_commit_sha
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/rake/deploy_check.rb:51:in `remote_tag_matches?'
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/rake/deploy_check.rb:36:in `push_tag?'
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/Rakefile:74:in `block (2 levels) in <top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/bin/bundle:23:in `load'
/Users/rschneeman/.gem/ruby/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => buildpack:release
(See full trace by running task with --trace)

This commit fixes it. This class shells out to git so to test it, dependency injection is used in the tests and this method (which acts
as a default arg) was never being called.

@schneems schneems requested a review from a team as a code owner February 24, 2021 20:37
Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Reviewing since on-call and I got the review request email, but not sure if this was intended for review yet - if not, opening as a draft PR prevents the review request from being sent)

I'm presuming this fixes an issue reported via support ticket or similar? Could you describe the failure mode in the description? Is this something that would be worth testing? :-)

@schneems schneems changed the title Use correct method name in script [changelog skip] Use correct method name in script Feb 24, 2021
@schneems schneems marked this pull request as draft February 24, 2021 21:11
@schneems schneems force-pushed the schneems/fix-script branch from 90ec551 to 45dcee5 Compare February 24, 2021 21:11
@schneems schneems changed the title [changelog skip] Use correct method name in script [changelog skip] Update buildpack tests && Use correct method name in script Feb 24, 2021
@edmorley edmorley marked this pull request as ready for review February 24, 2021 23:46
@schneems schneems changed the title [changelog skip] Update buildpack tests && Use correct method name in script [changelog skip] Use correct method name in script Feb 25, 2021
@schneems schneems marked this pull request as draft February 25, 2021 16:53
schneems added a commit that referenced this pull request Feb 25, 2021
There's a bug in the release script:

```
$ be rake buildpack:release
Attempting to deploy v224, overwrite with RELEASE_VERSION env var
rake aborted!
NameError: undefined local variable or method `local_commit' for #<DeployCheck:0x00007fd311b6f238>
Did you mean?  local_commit_sha
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/rake/deploy_check.rb:51:in `remote_tag_matches?'
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/rake/deploy_check.rb:36:in `push_tag?'
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/Rakefile:74:in `block (2 levels) in <top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/bin/bundle:23:in `load'
/Users/rschneeman/.gem/ruby/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => buildpack:release
(See full trace by running task with --trace)
```

This commit fixes it. This class shells out to git so to test it, dependency injection is used in the tests and this method (which acts as a default arg) was never being called.
@schneems schneems force-pushed the schneems/fix-script branch from 9240fce to 4c53201 Compare February 25, 2021 17:30
There's a bug in the release script:

```
$ be rake buildpack:release
Attempting to deploy v224, overwrite with RELEASE_VERSION env var
rake aborted!
NameError: undefined local variable or method `local_commit' for #<DeployCheck:0x00007fd311b6f238>
Did you mean?  local_commit_sha
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/rake/deploy_check.rb:51:in `remote_tag_matches?'
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/rake/deploy_check.rb:36:in `push_tag?'
/Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/Rakefile:74:in `block (2 levels) in <top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/Users/rschneeman/.gem/ruby/2.6.6/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/Users/rschneeman/.gem/ruby/2.6.6/bin/bundle:23:in `load'
/Users/rschneeman/.gem/ruby/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => buildpack:release
(See full trace by running task with --trace)
```

This commit fixes it. This class shells out to git so to test it, dependency injection is used in the tests and this method (which acts as a default arg) was never being called.
@schneems schneems force-pushed the schneems/fix-script branch from 4c53201 to 60f2fd3 Compare March 10, 2021 19:37
@schneems schneems marked this pull request as ready for review March 10, 2021 20:04
@schneems schneems merged commit a09bc9b into main Mar 10, 2021
@schneems schneems deleted the schneems/fix-script branch March 10, 2021 20:07
krisrang added a commit to skyltmax/heroku-buildpack-ruby that referenced this pull request May 13, 2021
* upstream/main: (52 commits)
  Fix date (heroku#1152)
  Bundler 2.2.16 (heroku#1150)
  v226 (heroku#1149)
  [changelog skip] Remove Heroku-16 from tests: (heroku#1146)
  [close 1135] Update bundler 2.x to 2.2.15 (heroku#1144)
  [changelog skip] Clean up mime magic in repos (heroku#1145)
  Clean up CNB release process (heroku#1139)
  Use correct method name in script heroku#1129 (heroku#1129)
  Post-release updates: heroku/ruby 0.1.0 (heroku#1138)
  Add package.toml (heroku#1137)
  Add CNB release scripts (heroku#1136)
  Release v225 (heroku#1133)
  [close heroku#1126] Update bundler to 2.2.11 (heroku#1132)
  Update buildpack tests (heroku#1131)
  v224 (heroku#1128)
  Use jvm buildpack to install JRuby dependencies (heroku#1119)
  Fix YAML formatting (heroku#1116)
  Rails 2, 3, and 4 LTS tests (heroku#1115)
  v223 (heroku#1114)
  Fail detection with a CNB-friendly exit code (heroku#1112)
  ...
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