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

Add CI on GitHub for 1.x-stable branch #2640

Merged
merged 12 commits into from
Dec 28, 2022

Conversation

marcogregorius
Copy link

@marcogregorius marcogregorius commented Nov 21, 2022

As branch 1.x-stable doesn't have CI on GitHub, I added the test workflow based on master branch.

Notable changes:

@marcogregorius marcogregorius changed the title Add CI on GitHub Add CI on GitHub for 1.x-stable branch Nov 21, 2022
@marcogregorius marcogregorius marked this pull request as ready for review November 21, 2022 14:21
@mshibuya
Copy link
Member

What prevents you from upgrading to a later version of CarrierWave? I don't recommend people to stay on 1.x, without a good reason.

Even if you want to, please don't change Ruby and Rails versions from what's in .travis.yml. 1.x is meant to be compatible with them.

@jacobvosmaer
Copy link

jacobvosmaer commented Nov 22, 2022

Hi @mshibuya, I'm chiming in as a colleague of @marcogregorius at GitLab.

We are trying to upgrade GitLab to Ruby 3.0. GitLab uses CarrierWave so we want to make sure CarrierWave works with Ruby 3.0.

Several years ago we added a series of monkey patches to CarrierWave 1.x in GitLab. You can read about them here. These modifications make it more difficult for us to upgrade to 2.x. Additionally, we have some concerns about different use of ActiveRecord callbacks in CarrierWave 2.x so we may want to wait for CarrierWave 3.x.

Because of the large number of Ruby gems GitLab depends on, upgrading to Ruby 3.0 is proving to be a lot of work. We would like to avoid making GitLab's Ruby 3.0 upgrade dependent on resolving our (self-created) CarrierWave challenges. What we would need for that is a 1.x version of CarrierWave that is known to work with Ruby 3.

I would completely understand if you do not want to make these kind of changes to the 1.x-stable branch. At the same time, the changes required for Ruby 3 itself seem minor enough so we thought we should at least ask if we can address them here in this repo.

@mshibuya are you open to having a CarrierWave 1.x release with Ruby 3 support?

@mshibuya
Copy link
Member

Adding Ruby 3.0 support to 1.x-stable is OK, as long as you maintain the compatibility with Ruby >= 2.2 and Rails >= 4.0. I can cut a new gem release for 1.x if you need it.

And I have one proposal with your 3.0 migration plan.
I don't recommend having monkey-patches since it will make upgrade harder, like you're facing. Are you interested in stopping monkey-patching and integrating features you need to the official repo?
Is the feature you need something similar to carrierwave_direct?

@marcogregorius marcogregorius force-pushed the add-ci branch 3 times, most recently from 051d55d to a089375 Compare November 23, 2022 17:16
@jacobvosmaer
Copy link

I don't recommend having monkey-patches since it will make upgrade harder, like you're facing. Are you interested in stopping monkey-patching and integrating features you need to the official repo?

This is a very reasonable question and I appreciate the invitation. I really struggle deciding how to answer this though.

We are not happy with the monkey patches but they work. At this time it is not clear which of the challenges we have with our current solution are most important to address. Being stuck on CarrierWave 1.x is just one of the problems.

Having said that, I want to say again I appreciate the invitation to work inside the CarrierWave code base instead of around it.

@marcogregorius
Copy link
Author

Adding Ruby 3.0 support to 1.x-stable is OK, as long as you maintain the compatibility with Ruby >= 2.2 and Rails >= 4.0. I can cut a new gem release for 1.x if you need it.

Thanks @mshibuya , that would be much appreciated!

However, I tried adding Ruby >= 2.2 and Rails >= 4.0 and changed pg to sqlite3 adapter, but the CI failed only for Rails 4.x. I think there is an issue with the sqlite3 version and ActiveRecord 4.x with handling JSON column. Do you have any suggestion on how to handle this?

Alternatively, I also tried using the original postgres as the 1.x-stable branch originally had, in this branch marcogregorius#2. However, I ran into different errors:

@mshibuya mshibuya merged commit 8f38657 into carrierwaveuploader:1.x-stable Dec 28, 2022
@mshibuya
Copy link
Member

OK I can handle the rest. Thank you!

@mshibuya
Copy link
Member

@jacobvosmaer @marcogregorius Can I proceed with creating a new 1.x release, or do you need some more changes?

@jacobvosmaer
Copy link

@mshibuya thanks for asking. I see we now have green CI on the 1.x-stable branch, including jobs with Ruby 3.0, which is what we were looking for.

You can go ahead with the release!

@mshibuya
Copy link
Member

mshibuya commented Feb 2, 2023

Released!
https://rubygems.org/gems/carrierwave/versions/1.3.3

@marcogregorius marcogregorius deleted the add-ci branch February 8, 2023 04:36
@marcogregorius
Copy link
Author

@mshibuya Thanks for the release! We have bumped GitLab to use the new version since. Again, thanks for the effort!

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