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

feat: publication for blueprint upgrade status SOFIE-2258 #1049

Merged
merged 4 commits into from
Oct 13, 2023

Conversation

Julusian
Copy link
Member

@Julusian Julusian commented Oct 9, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

feature

  • What is the current behavior? (You can also link to an open issue here)

When viewing the upgrades/migrations page in the ui, it calls a method to fetch the status, with a button to refresh the data.
When the /health endpoint is called, it will perform the same calculations with no caching between calls.

  • What is the new behavior (if this is a feature change)?

This status calculation has been moved into a custom publication. This helps simplify the frontend code, avoiding the need for the method call and refresh button handling, and also makes the data much more reactive as it is changed.
The systemStatus (/health) endpoint uses this same publication, adding a handle to the publication on first call of the endpoint, and keeping the handle until sofie exits.

This was motivated by wanting to add the upgrade buttons to the blueprint config pages, to make it easier to run the upgrades (which you should be doing after making any config changes) and to see that they need running when editing the config. (this likely needs some thought on styling)
image

  • Other information:

Status

  • Code documentation for the relevant parts in the code have been added/updated by the PR author
  • The functionality has been tested by the PR author
  • Automated tests to cover the new functionality and/or guard against regressions have been added
  • The functionality has been tested by NRK

@Julusian Julusian requested a review from a team October 9, 2023 10:57
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 429 lines in your changes are missing coverage. Please review.

Comparison is base (bcfeb99) 58.05% compared to head (ccdf14b) 57.71%.
Report is 82 commits behind head on release51.

Additional details and impacted files
@@              Coverage Diff              @@
##           release51    #1049      +/-   ##
=============================================
- Coverage      58.05%   57.71%   -0.34%     
=============================================
  Files            485      498      +13     
  Lines          78987    79382     +395     
  Branches        4130     4165      +35     
=============================================
- Hits           45855    45815      -40     
- Misses         33077    33511     +434     
- Partials          55       56       +1     
Files Coverage Δ
meteor/client/lib/data/util/object-to-xml.ts 82.35% <100.00%> (-11.77%) ⬇️
meteor/lib/api/client.ts 100.00% <100.00%> (ø)
meteor/lib/api/methods.ts 87.85% <100.00%> (ø)
meteor/lib/api/migration.ts 100.00% <ø> (ø)
meteor/lib/api/pubsub.ts 95.85% <100.00%> (+0.06%) ⬆️
meteor/lib/lib.ts 77.04% <100.00%> (-0.98%) ⬇️
meteor/lib/logging.ts 84.90% <100.00%> (ø)
meteor/server/api/blueprints/cache.ts 81.57% <100.00%> (-0.48%) ⬇️
meteor/server/api/blueprints/migrationContext.ts 100.00% <100.00%> (ø)
meteor/server/api/cleanup.ts 100.00% <100.00%> (ø)
... and 55 more

... and 4 files with indirect coverage changes

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

@Julusian Julusian force-pushed the feat/blueprint-config-status-publication branch from fcc4836 to ccdf14b Compare October 10, 2023 09:55
@Julusian Julusian merged commit 48dbda2 into release51 Oct 13, 2023
63 of 66 checks passed
@Julusian Julusian deleted the feat/blueprint-config-status-publication branch October 13, 2023 09:27
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.

2 participants