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

Bump mongoid-locker from 2.0.0 to 2.0.1 #869

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps mongoid-locker from 2.0.0 to 2.0.1.

Changelog

Sourced from mongoid-locker's changelog.

2.0.1 (2020-06-17)

  • #86: Upgraded to RuboCop 0.81.0 - @dks17.
  • #86: Fixed issue with ruby delegate method - @dks17.
  • #86: Update Ruby and JRUby versions for Travis config - @dks17.
  • #88: Add RSpec test examples - @dks17.
Commits
  • ad42f52 Preparing for release, 2.0.1.
  • b9059a6 Merge pull request #88 from dks17/test-examples
  • 50c5e4c RSpec test examples
  • fbda61d Merge pull request #86 from dks17/add-forwardable
  • 75eb9a6 Add forwardable module and upgrade rubocop
  • 1a3e793 Preparing for next development iteration, 2.0.1.
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Jun 18, 2020
@Cruikshanks
Copy link
Member

I do suspect something was broken in 2.0.1 from 2.0.1. Having a look at the commits I found mongoid/mongoid-locker#86 had been committed. This makes a change to this line and the whole PR is about fixing this issue.

The issue mentions

Mongoid gem doesn't use ActiveSupport method delegate since 7.1 version

So basically something seems to be going on around delegate though I'm not sure what. We may just have to stick with 2.0.0 and focus on the Rails and Ruby upgrade instead.

The front-office and back-office apps when the engine has been bumped have also taken on the latest version of mongoid-locker (v2.0.1) because it was not pinned.

Though only a minor change it appears it has a dependency on Mongoid v7 and changes it has made around not using ActiveSupport method `delegate` since version 7.1

We ascertained this from a statement made in the issue [mongoid 7.1.0 issue with arguments](mongoid/mongoid-locker#85 (comment))

> Mongoid gem doesn't use ActiveSupport method delegate since 7.1 version.

The issue was fixed in the mongoid-locker PR [Add forwardable module and upgrade rubocop](mongoid/mongoid-locker#86). And that change seems to be the key difference between version 2.0.0 and 2.0.1.

The error we see in the apps when v2.0.1 is being used is

```
An error occurred while loading ./spec/forms/waste_carriers_engine/base_forms_spec.rb.
Failure/Error: delegate :contact_address, :contact_email, :registered_address, to: :registration
ArgumentError:
  wrong number of arguments (given 4, expected 1)
```

In this example if you go to order_copy_cards_registration.rb:10 you'll find

```ruby
    delegate :contact_address, :contact_email, :registered_address, to: :registration
```

Depending on whether you run rspec or try to hit a page in the app this is the error that gets thrown.

So we are pinning the version of mongoid-locker we use, until we can complete the work to upgrade the version of ruby and rails we are using. We should then be able to use Mongoid v7.1 (or greater) and hopefully the issue goes away!
@Cruikshanks Cruikshanks merged commit 8730699 into master Jun 18, 2020
@Cruikshanks Cruikshanks deleted the dependabot/bundler/mongoid-locker-2.0.1 branch June 18, 2020 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant