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

Sync with upstream v275 #73

Merged
merged 10 commits into from
Jul 4, 2024
Merged

Sync with upstream v275 #73

merged 10 commits into from
Jul 4, 2024

Conversation

Frzk
Copy link

@Frzk Frzk commented Jul 4, 2024

lilacstella and others added 10 commits June 19, 2024 10:26
expect new line at the end of the `which` command output by stripping it to satisfy the test

using the getting started fixture as expected by the current spec file

Co-authored-by: Richard Schneeman <[email protected]>
* Let bundler >= 2.2 handle windows platform

Fixes heroku#1157

Because it has support for multiple platforms in Gemfile.lock. So deleting Gemfile.lock when one of the platforms is windows is not good.
Bundler's error message tells the user how to handle it.
```
Your bundle only supports platforms ["mingw"] but your local platform is x86_64-linux. Add the current platform to the lockfile with
`bundle lock --add-platform x86_64-linux` and try again.
```

* Test and document Windows bundler 2.2+ behavior

* Update changelogs/unreleased/windows_gemfile.md

Co-authored-by: Ed Morley <[email protected]>

---------

Co-authored-by: Rune Philosof <[email protected]>
Co-authored-by: Ed Morley <[email protected]>
…eroku#1471)

Bumps the ruby-dependencies group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [heroku_hatchet](https://github.com/heroku/hatchet) | `8.0.2` | `8.0.4` |
| [rspec-core](https://github.com/rspec/rspec-core) | `3.12.2` | `3.13.0` |
| [excon](https://github.com/excon/excon) | `0.109.0` | `0.110.0` |
| [rake](https://github.com/ruby/rake) | `13.1.0` | `13.2.1` |
| [parallel_tests](https://github.com/grosser/parallel_tests) | `4.4.0` | `4.7.1` |
| [json](https://github.com/flori/json) | `2.7.1` | `2.7.2` |
| [ci-queue](https://github.com/Shopify/ci-queue) | `0.44.0` | `0.55.0` |
| [redis](https://github.com/redis/redis-rb) | `5.0.8` | `5.2.0` |



Updates `heroku_hatchet` from 8.0.2 to 8.0.4
- [Changelog](https://github.com/heroku/hatchet/blob/main/CHANGELOG.md)
- [Commits](heroku/hatchet@v8.0.2...v8.0.4)

Updates `rspec-core` from 3.12.2 to 3.13.0
- [Release notes](https://github.com/rspec/rspec-core/releases)
- [Changelog](https://github.com/rspec/rspec-core/blob/main/Changelog.md)
- [Commits](rspec/rspec-core@v3.12.2...v3.13.0)

Updates `rspec-expectations` from 3.12.3 to 3.13.1
- [Release notes](https://github.com/rspec/rspec-expectations/releases)
- [Changelog](https://github.com/rspec/rspec-expectations/blob/main/Changelog.md)
- [Commits](rspec/rspec-expectations@v3.12.3...v3.13.1)

Updates `excon` from 0.109.0 to 0.110.0
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](excon/excon@v0.109.0...v0.110.0)

Updates `rake` from 13.1.0 to 13.2.1
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](ruby/rake@v13.1.0...v13.2.1)

Updates `parallel_tests` from 4.4.0 to 4.7.1
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](grosser/parallel_tests@v4.4.0...v4.7.1)

Updates `json` from 2.7.1 to 2.7.2
- [Release notes](https://github.com/flori/json/releases)
- [Changelog](https://github.com/flori/json/blob/master/CHANGES.md)
- [Commits](ruby/json@v2.7.1...v2.7.2)

Updates `ci-queue` from 0.44.0 to 0.55.0
- [Release notes](https://github.com/Shopify/ci-queue/releases)
- [Commits](Shopify/ci-queue@v0.44.0...v0.55.0)

Updates `redis` from 5.0.8 to 5.2.0
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](redis/redis-rb@v5.0.8...v5.2.0)

---
updated-dependencies:
- dependency-name: heroku_hatchet
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: ruby-dependencies
- dependency-name: rspec-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
- dependency-name: rspec-expectations
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
- dependency-name: excon
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
- dependency-name: rake
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
- dependency-name: parallel_tests
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
- dependency-name: json
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: ruby-dependencies
- dependency-name: ci-queue
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
- dependency-name: redis
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: ruby-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add platform information to windows support docs

Update windows docs to specify how to add Heroku's platform to the Gemfile.lock. In heroku#1469 the behavior changed for Windows users. However if they're depending on a platform specific gem and they don't have the `x86_64-linux` platform locked then their dependency resolution will not use that information and their deploy will fail with a message saying to run those commands. 

By adding the instructions into the descanter article, warning message, and changelog entry there's a better chance windows users will succeed on their first deploy after heroku#1469 

## Commands breakdown

Install the latest bundler version at the system level:

```
> gem install bundler
```

Update the current project to explicitly use the latest version of bundler:

```
> bundle update --bundler
```

Ensure that both `ruby` and `x86_64-linux` platforms are specified in the `Gemfile.lock`:

```
> bundle lock --add-platform ruby
> bundle lock --add-platform x86_64-linux
```

Ensure bundler has resolved dependencies with all platforms in mind:

```
> bundle install
```

Commit the results to git:

```
> git add Gemfile.lock
> git commit -m "Upgrade bundler"
```

* Fix variable access for windows users


Reported in heroku#1472, the code was using an instance variable that does not exist so it raises an error. The `bundler` call is both a class and instance method https://github.com/heroku/heroku-buildpack-ruby/blob/4d2621c7dedff3edc95ee809d1cd71d6186fb796/lib/language_pack/ruby.rb#L27-L33. Internally it's stored as a class instance variable https://www.ruby-lang.org/en/documentation/faq/8/ so the data can be shared between the class and instances.

The fix is to use `bundler` instead of `@bundler`. The test exercises and asserts that codepath was executed.

Close heroku#1472

* Update warning message to be less confusing

Based on this conversation heroku#1469 (comment)
Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
@Frzk Frzk self-assigned this Jul 4, 2024
@Frzk Frzk marked this pull request as ready for review July 4, 2024 08:09
@Frzk Frzk requested a review from EtienneM July 4, 2024 08:09
@Frzk Frzk merged commit 3da44bc into master Jul 4, 2024
1 check passed
@Frzk Frzk deleted the deps/upstream_v275 branch July 4, 2024 08:29
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.

4 participants