os-autoinst / openQA

openQA web-frontend, scheduler and tools.
http://openqa.opensuse.org/
GNU General Public License v2.0
314 stars 206 forks source link

Use common time comparison logic to enable better logging #5782

Closed nicksinger closed 1 month ago

nicksinger commented 1 month ago

check() was previously using the current time. _key_auth() however used the time provided in a header (which is attached right as the transaction starts on the server side). This change makes use of the already existing subroutine _is_timestamp_valid for both places and uses the current time instead of one attached in some hook earlier. It also adds a debug log output to print both plain timestamps in case of mismatches.

Related ticket: https://progress.opensuse.org/issues/162038

kalikiana commented 1 month ago
[09:36:29] t/full-stack.t ......... Prototype mismatch: sub main::any: none vs (&@) at /usr/lib/perl5/5.26.1/Exporter.pm line 66.
 at t/full-stack.t line 25.

I guess this was run before the last change, but somehow not updated afterwards. Hence re-triggering.

perlpunk commented 1 month ago

https://app.circleci.com/pipelines/github/os-autoinst/openQA/14067/workflows/d939f2da-77c9-4edc-a2ec-b9d545fefea7/jobs/132486?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link&utm_content=summary

[09:36:29] t/full-stack.t ......... 36/? executeScript: unknown error: session deleted because of page crash at /home/squamata/project/t/lib/OpenQA/SeleniumTest.pm:78 at /home/squamata/project/t/lib/OpenQA/SeleniumTest.pm line 81.
        OpenQA::SeleniumTest::__ANON__(Test::Selenium::Chrome=HASH(0x561f4ca50838), "Error while executing command: executeScript: unknown error: "..., HASH(0x561f4d1d0fc8), HASH(0x561f4d1d7e48)) called at /usr/lib/perl5/vendor_perl/5.26.1/Selenium/Remote/Driver.pm line 356

There is a ticket: https://progress.opensuse.org/issues/164239 - we can force merge

perlpunk commented 1 month ago

The Prototype mismatch is fixed meanwhile, just needs to be rebased

nicksinger commented 1 month ago

rebased now, thanks. Wasn't there some fancy bot to rebase on my behalf? :)

perlpunk commented 1 month ago

@mergifyio rebase

mergify[bot] commented 1 month ago

rebase

✅ Branch has been successfully rebased

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.49%. Comparing base (09ba4d8) to head (ff7be61).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5782 +/- ## ======================================= Coverage 98.49% 98.49% ======================================= Files 394 394 Lines 38668 38671 +3 ======================================= + Hits 38085 38088 +3 Misses 583 583 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

okurz commented 1 month ago

s/comparision/comparison/

okurz commented 1 month ago

All checks had been green except for docker-compose failing due to zypper repo refresh errors. nicksinger only fixed the typo in the git commit message subject line. Merging manually.