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
activity view: Request events ordered by event ID #3470
Conversation
602f1ab
to
9c0050f
Compare
test failures:
after you fixed this I would appreciate if you can run more tests, e.g. 100 local test runs to confirm that the test s stable. |
And here as well: Please start the git commit message subject line with a capital letter after the optional component marker. |
I heard from you that you can't reproduce the problem locally. I ran the test module 20 times locally and it never failed. I think you need to write in t/ui/16-activity-view.t:73 - }) for keys %fake_events;
+ }) for sort keys %fake_events; |
Indeed. And by adding |
9c0050f
to
f23c086
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh, please change the commit message to use a capital letter after the optional component marker. Rest is fine. See your PR conditionally approved depending on this tiny change only :)
f23c086
to
e65e46a
Compare
e65e46a
to
1ec21b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks fine but something still seems to be overlooked:
[15:56:58] t/ui/16-activity-view.t ................ 1/?
# Failed test 'first job'
# at t/ui/16-activity-view.t line 86.
# got: 'about 10 hours ago'
# expected: 'about 12 hours ago'
# Looks like you failed 1 test of 7.
# Failed test 'Current jobs'
# at t/ui/16-activity-view.t line 89.
# Looks like you failed 1 test of 3.
Unfortunately tests still don't pass on CircleCI... I changed the unit test to sort the hash keys of the fake job events, and also made sure the intentional "duplicate" event (since in real if you get multiple events for each job) but there is one remaining difference. So I'm still pondering what else could be "undefined"... @kraih Perhaps you have some ideas on what other "undefined" factors to look for? Or maybe there is a better way to write this test to avoid it |
@kalikiana Could it be that the JSON data in the frontend is simply not sorted and in random order? |
1ec21b7
to
2afa73b
Compare
Your question made me double-check the JSON once more. And I found out that our DataTables implementation hard-codes the columns which means the answer is No, but by the wrong column 🤦 Fingers crossed this is indeed the last piece I was missing! |
uncross your fingers and please check again :) -> https://app.circleci.com/pipelines/github/os-autoinst/openQA/4566/workflows/ebd6688d-5993-486c-8464-407fa0405415/jobs/43615
|
- Give timeago a proper class name - Specify ordering in the audit log ajax call - Tests check that the ordering is stable See: https://progress.opensuse.org/issues/58304
2afa73b
to
c629e98
Compare
I don't work often on the frontend, but i'll take a look. Should be interesting. |
Looked at the results in an SSH session and luckily it fails consistently. The results are actually in the correct order, but there seems to be a timezone issue now. Where local results would show |
If you set |
This is one possible solution. |
See: https://progress.opensuse.org/issues/58304