Skip to content

Implement ipdevinfo UI for ipdevpoll job refreshing#3385

Merged
johannaengland merged 4 commits intoUninett:masterfrom
podliashanyk:refresh-frontend
Aug 15, 2025
Merged

Implement ipdevinfo UI for ipdevpoll job refreshing#3385
johannaengland merged 4 commits intoUninett:masterfrom
podliashanyk:refresh-frontend

Conversation

@podliashanyk
Copy link
Copy Markdown
Contributor

@podliashanyk podliashanyk commented Jun 12, 2025

This PR represents a mob effort of working out an implementation for #3350. Since it reached maturity, its history has been rebased and edited to present cleanly.

All involved in the mob effort are happy with it, we're just waiting for @hmpf to review it, since she wasn't present at the mob meetings.

Follow up issue #3448.

@podliashanyk podliashanyk added the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Jun 12, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 12, 2025

Codecov Report

❌ Patch coverage is 21.62162% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.83%. Comparing base (de9dff6) to head (72fac41).
⚠️ Report is 459 commits behind head on master.

Files with missing lines Patch % Lines
python/nav/web/ipdevinfo/views.py 21.62% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3385      +/-   ##
==========================================
- Coverage   60.89%   60.83%   -0.07%     
==========================================
  Files         608      608              
  Lines       44237    44273      +36     
  Branches       48       48              
==========================================
- Hits        26940    26934       -6     
- Misses      17285    17327      +42     
  Partials       12       12              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lunkwill42
Copy link
Copy Markdown
Member

This can now potentially be based on #3386

@lunkwill42 lunkwill42 changed the title Refresh frontend WIP: Implement ipdevinfo UI for ipdevpoll job refreshing Jun 19, 2025
@podliashanyk podliashanyk linked an issue Jun 19, 2025 that may be closed by this pull request
@lunkwill42 lunkwill42 changed the base branch from master to feature/ipdevpoll-refresh-events June 19, 2025 17:00
@johannaengland johannaengland force-pushed the refresh-frontend branch 2 times, most recently from 81834da to be08c40 Compare June 20, 2025 08:53
@johannaengland
Copy link
Copy Markdown
Contributor

I did some more digging and found the problem that I'm surprised didn't pop up before: After having triggered a job that does not finish last-ipdevinfo-refresh will not be removed from the session and reloading the page does not empty the session, which is what our assumption was. Therefore it will find the last_refreshed timestamp and since that was usually from a while ago the error message is shown.

After deleting the cookie when running it for the first time both the case of ipdevpoll not running and the job running longer than expected are working as expected.

Copy link
Copy Markdown
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

The bits added since our last join session look ok - I only have naming issues. But, I'm also commenting on older changes made while I was on vacation :)

@johannaengland johannaengland marked this pull request as ready for review July 24, 2025 11:36
@johannaengland johannaengland changed the title WIP: Implement ipdevinfo UI for ipdevpoll job refreshing Implement ipdevinfo UI for ipdevpoll job refreshing Jul 24, 2025
@lunkwill42 lunkwill42 force-pushed the feature/ipdevpoll-refresh-events branch from 0db4da4 to f7998c0 Compare July 25, 2025 11:50
@johannaengland johannaengland removed the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Jul 25, 2025
Copy link
Copy Markdown
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

SonarQube is not happy. Is there something amiss with the pre-commit config?

@johannaengland
Copy link
Copy Markdown
Contributor

SonarQube is not happy. Is there something amiss with the pre-commit config?

We do not check for line-too-long violations (E501) while linting, but formatting should take care of this automatically, but it does not. I will look into this, but will fix this manually first.

Copy link
Copy Markdown
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

Still pretty happy with the codebase (it was a team effort, after all). Only nitpick is SonarQube's: Docstrings :)

Copy link
Copy Markdown
Contributor Author

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

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

Looks good to me! I like the solution with query parameter instead of state vis session.
I would suggest that @hmpf also takes a look at this one since she is the only one who didn't participate in mob-programming sessions.

@lunkwill42 lunkwill42 deleted the branch Uninett:master August 14, 2025 13:01
@lunkwill42 lunkwill42 closed this Aug 14, 2025
@lunkwill42 lunkwill42 reopened this Aug 14, 2025
@lunkwill42 lunkwill42 changed the base branch from feature/ipdevpoll-refresh-events to master August 14, 2025 13:07
@lunkwill42
Copy link
Copy Markdown
Member

The back-end feature has been merged to master. I've therefore taken the liberty to squash fixup commits and rebase this entire PR on the latest master.

Copy link
Copy Markdown
Contributor

@hmpf hmpf left a comment

Choose a reason for hiding this comment

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

Code looks fine, seems to work.

We might get away with fewer template files once we're on Django 6.0, see:

https://docs.djangoproject.com/en/dev/ref/templates/language/#template-partials

johannaengland and others added 4 commits August 15, 2025 11:24
Co-authored-by: Ilona Podliashanyk <ilona.podliashanyk@sikt.no>
Co-authored-by: Simon Oliver Tveit <simon.tveit@sikt.no>
Co-authored-by: Jørund Hellebø <jorund.hellebo@sikt.no>
Co-authored-by: Morten Brekkevold <morten.brekkevold@sikt.no>
Co-authored-by: Ilona Podliashanyk <ilona.podliashanyk@sikt.no>
Co-authored-by: Simon Oliver Tveit <simon.tveit@sikt.no>
Co-authored-by: Jørund Hellebø <jorund.hellebo@sikt.no>
Co-authored-by: Morten Brekkevold <morten.brekkevold@sikt.no>
Co-authored-by: Ilona Podliashanyk <ilona.podliashanyk@sikt.no>
Co-authored-by: Simon Oliver Tveit <simon.tveit@sikt.no>
Co-authored-by: Jørund Hellebø <jorund.hellebo@sikt.no>
Co-authored-by: Morten Brekkevold <morten.brekkevold@sikt.no>
Co-authored-by: Ilona Podliashanyk <ilona.podliashanyk@sikt.no>
Co-authored-by: Simon Oliver Tveit <simon.tveit@sikt.no>
Co-authored-by: Jørund Hellebø <jorund.hellebo@sikt.no>
Co-authored-by: Morten Brekkevold <morten.brekkevold@sikt.no>
@sonarqubecloud
Copy link
Copy Markdown

@johannaengland johannaengland merged commit d7ef7c3 into Uninett:master Aug 15, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a job refresh UI in ipdevinfo job listing

4 participants