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: NRCS returns empty objects #97

Merged
merged 6 commits into from
Mar 14, 2024

Conversation

olzzon
Copy link
Contributor

@olzzon olzzon commented Mar 13, 2024

About the Contributor

This pull request is posted on behalf of BBC

Type of Contribution

This is a:

Bug fix

Current Behavior

If the NRCS has empty or missing objects in the MachineInfo, the mos-connection will return an error, also in non strict mode.

New Behavior

When in non strict mode, mos-connection will fill out empty empty objects, and handle xmlSupportedProfiles as optional if it's undefined.

Testing Instructions

Run the MOS gateway with OpenMedia, and it will crash with the old version of mos-connection.

Other Information

Status

  • [ x] PR is ready to be reviewed.
  • [ x] The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

Copy link
Member

@jstarpl jstarpl left a comment

Choose a reason for hiding this comment

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

Generally approving as okay, but I have a code style comment.

packages/model/src/mosTypes/mosTime.ts Outdated Show resolved Hide resolved
@jstarpl jstarpl changed the title Fix/nrcs returns empty objects fix: NRCS returns empty objects Mar 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.43%. Comparing base (f996003) to head (9bb6825).

Files Patch % Lines
...ages/helper/src/mosModel/profile0/xmlConversion.ts 0.00% 0 Missing and 1 partial ⚠️
packages/model/src/mosTypes/mosTime.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   77.39%   77.43%   +0.04%     
==========================================
  Files          65       65              
  Lines        3570     3572       +2     
  Branches      804      823      +19     
==========================================
+ Hits         2763     2766       +3     
+ Misses        783      747      -36     
- Partials       24       59      +35     

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

@jstarpl jstarpl merged commit 8d6e3ee into nrkno:master Mar 14, 2024
7 of 8 checks passed
@jstarpl jstarpl deleted the fix/nrcs-returns-empty-time-object branch March 14, 2024 10:18
@olzzon olzzon restored the fix/nrcs-returns-empty-time-object branch March 18, 2024 08:03
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