Skip to content

Remove unused argument from associations in Environment

This is basically a revert of !104149 (merged).

What does this MR do and why?

In Rails 7 upgrade branch, the specs introduced by !104149 (merged) are failing. Given the fix can be done on master and then merged back into upgrade-rails-7, I was instructed to target master instead.

We currently rely on the fact that Rails didn't support preloading of instance dependent associations in order to prevent the preloading of certain associations in the Environment model. In Rails 7, the expected error in those specs is not raised anymore, which is why they're failing in the upgrade branch. Support for preloading instance dependent associations was introduced here and included in Rails 7.0.0-alpha.

I've removed the failing specs and the unused argument from the associations. However, we may need to find another way of avoiding preloading those associations. Rubocop, maybe? 🤔

Screenshots or screen recordings

N/A

How to set up and validate locally

N/A

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Paulo Barros

Merge request reports