rails / mission_control-jobs

Dashboard and Active Job extensions to operate and troubleshoot background jobs
MIT License
610 stars 71 forks source link

Remove full-stack Rails as a dependency #121

Closed nimmolo closed 2 weeks ago

nimmolo commented 6 months ago

mission_control-jobs does not appear to depend on the whole Rails stack.

I would like to try the gem in production, but our app does not need to load ActiveStorage, ActionText or ActionMailbox. I think it's pretty common for people to just use some Rails gems.

Other gem examples:
nimmolo commented 3 months ago

@dorianmariecom pourquoi le downvote?

dorianmariecom commented 3 months ago

@nimmolo I think rails-related gems should just depend on rails, that's a lot simpler to maintain and accounts for 99% of use cases

rosa commented 3 months ago

@nimmolo, could you run bundle install and commit the updated Gemfile.lock?

nimmolo commented 3 months ago

@rosa Thanks! I should have done that before... Done.

nimmolo commented 3 months ago

@rosa I don't know how to fix the CI failures, but i'm happy to do more if you can suggest what to do. I figure it must need to be set up to work with/test many different Ruby versions, but i've never done this before.

I can install all the Ruby versions, but that seems like it will only affect my local.

rosa commented 3 months ago

Thanks a lot, @nimmolo! No worries, I'll check those. It seems they're happening independently of the Ruby version:

cannot load such file -- action_cable/engine (LoadError)
    from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
    from bin/rails:21:in `<main>'

Ah, yes, because bin/rails needs to be updated as well, to look more similar to this. Right now it's loading everything: https://github.com/rails/mission_control-jobs/blob/7f71ec89b6213361e29dbc985495b5b8f473d995/bin/rails#L13

rosa commented 3 months ago

Sorry I'm dumb! 😆 It's late over here 😆 The line number didn't match the error, and then I realised you did that already in this PR! But it seems you left action_cable here, so I think that one should go.

nimmolo commented 3 months ago

Got it... committed that change.

nimmolo commented 1 month ago

@rosa - congrats on the 1.0 release!

I am psyched to start using mission control jobs... I think this PR is ready to merge, I've made the requested changes.

nimmolo commented 4 weeks ago

Resolved merge conflicts

blocknotes commented 3 weeks ago

Hey. While I think it would be nice to reduce the number of dependencies, I fear that this PR will bring issues to the Sprockets users - as it happened recently: https://github.com/rails/mission_control-jobs/issues/169

Did you have a chance to make tests with Sprockets too?

rosa commented 2 weeks ago

Done in the end in #194.