-
Notifications
You must be signed in to change notification settings - Fork 69
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
Rails API with Mission Control #60
Comments
Hey @tooney92, yes! It shouldn't be any difference, as long as your application has jobs that you need to manage, you should be able to use Mission Control for it. Are you encountering any problems there? |
Hi @rosa Thanks for the feedback, this is the error I get for context, I have no assets folder since my application is purely a rails API. |
Oh, right, of course 🤦♀️ The API-only app doesn't know about JS assets or anything related to them. I'd need some more time to figure out how to fix this in your app. Let me know if you fix it! |
I had to give up on API mode to use it.
|
I'm not exactly sure how they do it but Sidekiq has a web UI that works with an API-only Rails app. https://github.com/sidekiq/sidekiq/wiki/Monitoring#rails If anyone has a solution that doesn't involve leaving API mode, I'd be interested in hearing it. 🙏 |
@joshforbes They are using a custom rack app to handle routes, views and assets (see https://github.com/sidekiq/sidekiq/tree/main/lib/sidekiq/web). I don't think that's a good option for Mission Control as it's Rails-based. I may be wrong, but maybe it's possible for the Mission Control Rails engine to load its required middleware if they're not loaded already by the main Application, and add a propshaft dependency if necessary. |
@zavan yes! I think we could make it work; it's just that we didn't think about API mode when we built this. I probably won't have time to work on this soon, but if anyone wants to try, it'd be super welcome. Otherwise, we'll eventually get to it 😊 |
@rosa Can you take a look at #87? @joshforbes @tooney92 If you could test the branch out on your applications that would help too: gem "mission_control-jobs", git: "https://github.com/basecamp/mission_control-jobs.git", ref: "pull/87/head" |
Will do @zavan |
@tooney92 Yeah I got this a few times too but it worked at some point. Can you try using the branch from my fork please: gem "mission_control-jobs", github: "zavan/mission_control-jobs", branch: "api-only" |
Can confirm that this works for my API-only Rails app without any issues so far, thank you so much for your work! |
I know this is being addressed, just wanted to mention this is not an api-only issue. You'll get the same error if you use something like |
Hi, @zavan. First of all, thanks for your PR focused on API-only apps. I tried it out, but somehow columns for error and button actions, as well as "Recurring tasks" menu item, are not being shown. This is what I get from mission_control-jobs 0.2.0 together with sprockets-rails: This is what I get from mission_control-jobs 0.2.0 together with propshaft (no error column, no discard and retry buttons per job entry): This is what I get from your PR (no error column, no discard and retry buttons per job entry, no "Recurring tasks" menu item): Could you please let me know we need any additional changes? |
Hey @fabianof, this is because my branch is behind v0.2.0. I’ll come back to this PR tomorrow and hopefully get it ready to merge. |
The issue is that following CSS is rendered out of the box by sprockets-rails, but not by propshaft.
|
Hi, @zavan. Are you planning coming back to this change any time soon? Unfortunately we are still facing the issue. Somehow Mission Control Jobs CSS is handled out of the box by sprockets-rails, but not by propshaft.
Not sure you will be able to handle that as well. |
@fabianof I have rebased my branch to be current with main and I believe fixed the CSS importing. Can you try it? |
Issue persists, @zavan. Somehow Mission Control jobs styles are not being loaded properly. Note that word break is missing here, which prevents showing other dashboard columns: |
Thanks for your pr @zavan |
@arikarim, huh! That's weird, let me look into that. |
Hmm... @arikarim, I can't reproduce that. Pausing and resuming is working correctly for me, with Solid Queue. Are you referring to Solid Queue or Resque? And can you grab the logs for the Resume request? |
That's correct, the request goes to |
below is the server log: |
Hm... yeah, that's the pause request... so weird. I'll try again to reproduce it. |
After installing i get
on my web |
if css used as CDN, can't we have custom CSS be embedded with <style> tags and remove propshaft despendency? |
Since 0.3.3 release, we are getting the error:
To revert to the working API-only version, please do the following in your
|
@sasharevzin: I was trying the same idea but from a fast check you would have troubles with hotwire/turbo rails (used for example for filtering). From my standpoint, the UI could be updated to use only inline resources (without Hotwire I suppose). Both ways require some effort (in different ways). |
Anyone know what happened here? I'm on Rails 8 rc2 with Inertia and vite_ruby. Posting here because I saw @grin said vite_ruby users are also affected. |
Is there a way to use mission control UI for a rails API backend application?
The text was updated successfully, but these errors were encountered: