samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
185 stars 124 forks source link

How should we use the installation template? #492

Closed mjgiarlo closed 7 years ago

mjgiarlo commented 7 years ago

How should Hyrax use the installation template? @jcoyne and I went back and forth on this for Sufia 7.x, with the two options being:

  1. README always points at the template in the master branch, and the template is updated with each release to point at the latest release. This means that the README will always install the latest stable release of Hyrax.
  2. README always points at the template corresponding to the current release. So if you're reading the README for Hyrax 1.2.0, you get Hyrax 1.2.0 installed. If you're reading the README for 0.1.0, you get 0.1.0 installed. If you're reading the README in master, you get the latest stable release of Hyrax. (In order to do this, we'd need to update the README and the template with each release, as ticketed here: projecthydra/sufia#2784)

I'd welcome @projecthydra-labs/hyrax-code-reviewers thoughts on this.

Past discussions

tpendragon commented 7 years ago

I vote for #2.

mcritchlow commented 7 years ago

+1 on #2. Seems like a reasonable step in the release workflow, and I (personally) like that it's more explicit.

jcoyne commented 7 years ago

I'm for #1. I don't believe there is a use case where someone wants to use the template, knows the version they want to install, and it's not the most recent version.

jcoyne commented 7 years ago

I'm actually going to propose a 1.1 option. The template should just say gem 'hyrax'. Bundler will grab the most up to date version.

mjgiarlo commented 7 years ago

@jcoyne It seems like you're (perhaps reasonably) making a YAGNI argument. But, given the :+1:s above (and my own :+1:), and the very low cost of going with option number 2, is there another reason not to do this?

jcoyne commented 7 years ago

Yes, YAGNI. It's just one more little thing to do. It's fine to outvote me, but now you know my mind

.

mcritchlow commented 7 years ago

As one of the 👍 'ers, I should say I'm also happy to help with this process also. Wouldn't be very fair to say "yes, someone else should do this extra thing" :)

no-reply commented 7 years ago

I'm currently trying to start a new project based on 1.0.0.rc1. The template included in that tag points to 2.0.0.alpha in conflict with the Gemfile version. The error output I get is:

Fetching dependency metadata from https://rubygems.org/..
Could not find gem 'hyrax (= 1.0.0.alpha)' in https://github.com/projecthydra-labs/hyrax.git (at master@a8ee769).
Source contains 'hyrax' at: 2.0.0.alpha ruby
    generate    hyrax:install
The git source https://github.com/projecthydra-labs/hyrax.git is not yet checked out. Please run `bundle install` before trying to start your application
       rails    db:migrate
The git source https://github.com/projecthydra-labs/hyrax.git is not yet checked out. Please run `bundle install` before trying to start your application
       rails    hyrax:workflow:load
The git source https://github.com/projecthydra-labs/hyrax.git is not yet checked out. Please run `bundle install` before trying to start your application
         run  bundle install
Fetching https://github.com/projecthydra-labs/hyrax.git
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/.......
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Could not find gem 'hyrax (= 1.0.0.alpha)' in https://github.com/projecthydra-labs/hyrax.git (at master@a8ee769).
Source contains 'hyrax' at: 2.0.0.alpha ruby
         run  bundle exec spring binstub --all
The git source https://github.com/projecthydra-labs/hyrax.git is not yet checked out. Please run `bundle install` before trying to start your application

The README.md also simply points to the current master, which successfully installs Hyrax 2.0.0.alpha, so users need to know to update that template to the tagged ref manually in order to even reach the above error state.

Essentially, I think I need option 2 even before we have a real release of the project. I only expect this to become more complicated as more releases appear.

jcoyne commented 7 years ago

@no-reply if you install the template on master (which is 2.0.0.alpha) it will install 1.0.0.rc1 (the most recent release. This is how I believe you should do it.

mjgiarlo commented 7 years ago

All, given the discussion and voting above, I'm going to say we're going with option 2 -- I don't see a downside, other than a very small cost (a few extra seconds) at the time we cut a release, which isn't that often.

I hope that will prevent the Tom Johnsons of the future from getting bitten by the template. I will update our release management documentation so that it includes the necessary steps.

Thanks for the discussion, y'all.