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

Monitored tags not displaying recent or failed jobs #1478

Closed
therobfonz opened this issue Jul 22, 2024 · 13 comments · Fixed by #1495
Closed

Monitored tags not displaying recent or failed jobs #1478

therobfonz opened this issue Jul 22, 2024 · 13 comments · Fixed by #1495

Comments

@therobfonz
Copy link
Contributor

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.
Screenshot 2024-07-22 at 4 09 44 PM

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

  1. Add a tag definition to any job
  2. Go into Horizon and add that tag to be monitored
  3. Drop a job with that tag into the queue and let it finish
  4. 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
Copy link

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!

@driesvints
Copy link
Member

Thank you. Would appreciate a PR for this one.

@antoniovalenzuela
Copy link

Hi,
Updated to v5.27.1 but I can see the jobs from monitored Tags.

Message "There aren't any jobs for this tag"

  • Flush Redis Keys
  • Cleaned Artisan config, cache, views
  • Jobs Completed Ok

Completed
image

Monitoring
image
image

@driesvints
Copy link
Member

cc @therobfonz ^

@therobfonz
Copy link
Contributor Author

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.

@driesvints
Copy link
Member

@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?

@therobfonz
Copy link
Contributor Author

@driesvints i thought I did and had it working but possible I missed something when I moved over to the repo.

@therobfonz
Copy link
Contributor Author

therobfonz commented Aug 20, 2024

@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.

After compiling the JS locally
Screenshot 2024-08-20 at 9 05 08 AM

@driesvints
Copy link
Member

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...

@daniser
Copy link
Contributor

daniser commented Sep 3, 2024

@driesvints I think I found the reason behind this (see PR #1495).

@daniser
Copy link
Contributor

daniser commented Sep 4, 2024

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.

@driesvints
Copy link
Member

Yeah I think so. I've just done a new release so let's see if things work now.

@ariamVille
Copy link

Hi, Updated to v5.27.1 but I can see the jobs from monitored Tags.

Message "There aren't any jobs for this tag"

  • Flush Redis Keys
  • Cleaned Artisan config, cache, views
  • Jobs Completed Ok

Completed image

Monitoring image image

this issue still not fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants