Monitored tags not displaying recent or failed jobs
therobfonz opened this issue · 13 comments
Horizon Version
5.25.0
Laravel Version
10.48.14
PHP Version
8.3.8
Redis Driver
PhpRedis
Redis Version
6.2.6
Database Driver & Version
Postgis 14 for Ubuntu 22.04
Description
We have several jobs that have tags defined in them for horizon to use
public function tags(): array
{
return ['customer-teams-migration'];
}
When visiting horizon/monitoring
, and adding a tag to monitor, I can see the tag and the count just fine.
However, when clicking into that monitored tag to see the most recent or failed jobs, the loading indicator just keeps spinning and the following error is thrown
Too few arguments to function Laravel\\Horizon\\Http\\Controllers\\MonitoringController::paginate(), 1 passed in
Steps To Reproduce
- Add a tag definition to any job
- Go into Horizon and add that tag to be monitored
- Drop a job with that tag into the queue and let it finish
- Go to
horizon/monitoring
and click on the monitored tag name to view the details. The loading indicator will just spin and throw the network error mentioned above
Thank you for reporting this issue!
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Thank you!
Thank you. Would appreciate a PR for this one.
cc @therobfonz ^
I think I forgot to recompile the JS for distribution with the fix (newb contributor here).
I'll try and carve out some time to investigate this week.
@therobfonz assets are compiled whenever something's merged to the default branch so that can't be it. Maybe you didn't recompile locally while testing?
@driesvints i thought I did and had it working but possible I missed something when I moved over to the repo.
@driesvints I checked this morning, and it doesn't look like /dist/app.js
updated with the merge of my PR. I confirmed this by running npm run build
with the latest horizon installed in my project and the tag monitoring page worked.
When I look at the Action that commits the recompiled assets after the merge of my PR it says 'Nothing to commit', which is most likely the issue.
Bit stumped here. I can't figure out why assets aren't compiling the same on the action as they do locally. Here's a new run I tried with Node 21 like I have locally: https://github.com/laravel/horizon/actions/runs/10473422636/job/29005245820
Still shows no changes to commit. Really need to figure this one out because it's not good if changes like these aren't being compiled anymore...
@driesvints I think I found the reason behind this (see PR #1495).
That's weird, but still nothing😕. Maybe assets are already up-to-date?
Run stefanzweifel/git-auto-commit-action@v5
Started: bash /home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v5/entrypoint.sh
INPUT_REPOSITORY value: .
INPUT_STATUS_OPTIONS:
INPUT_FILE_PATTERN: dist/
Working tree clean. Nothing to commit.
Yeah I think so. I've just done a new release so let's see if things work now.