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

Fix wrong run title shown #188

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Fix wrong run title shown #188

merged 4 commits into from
Sep 30, 2024

Conversation

rosswhitfield
Copy link
Member

@rosswhitfield rosswhitfield commented Sep 30, 2024

Description of the changes

Ref: 6258: [WebMon] Wrong run title shown for HB2C

Everywhere that StatusCache is accessed it is done with .latest("timestamp") except in get_cached_variables. This is why initially the page is correct but gets updated with incorrect information. Really this issue should not happen but I guess it must be possible.

I have changed get_cached_variables to sort by name first then newest timestamp, after which we only use the first appearance of that parameter.

You can check that this works by starting webmon with docker and add in additional run_title StatusCache (http://localhost/database/dasmon/statuscache/) and check that the newest is always used.

Check all that apply:

  • updated documentation
  • Source added/refactored
  • Added unit tests
  • Added integration tests
  • (If applicable) Verified that manual tests requiring the /SNS and /HFIR filesystems pass without fail

References:

  • Links to IBM EWM items:
  • Links to related issues or pull requests:

Manual test for the reviewer

(Instructions for testing here)

Check list for the reviewer

  • best software practices
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.35%. Comparing base (1adc1a6) to head (7f2dafb).

Additional details and impacted files
@@            Coverage Diff             @@
##             next     #188      +/-   ##
==========================================
+ Coverage   77.33%   77.35%   +0.01%     
==========================================
  Files          51       51              
  Lines        4611     4615       +4     
==========================================
+ Hits         3566     3570       +4     
  Misses       1045     1045              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@backmari backmari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally that adding an additional run title in http://localhost/database/dasmon/statuscache/ then the latest run title is the one that is displayed both initially and when the page is automatically updated.

@rosswhitfield rosswhitfield merged commit b1c5715 into next Sep 30, 2024
4 checks passed
@rosswhitfield rosswhitfield deleted the fix_get_cached_variable branch September 30, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants