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

[KED-2319] Check None on loading params #326

Merged
merged 4 commits into from
Dec 8, 2020
Merged

Conversation

limdauto
Copy link
Collaborator

@limdauto limdauto commented Dec 7, 2020

Description

Sometimes the /node endpoint returns 500 due to the node object being None. Will chat to @bru5 to see why it is the case. In the mean time, I have added some defensive None checking to the endpoint.

Development notes

QA notes

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Legal notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

  • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

  • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

  • I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

@limdauto limdauto changed the title Check None on loading params [KED-2319] Check None on loading params Dec 7, 2020
@limdauto limdauto removed the request for review from 921kiyo December 8, 2020 00:37
"""Get parameter values from a stored node."""
if node["obj"] is not None:
parameter_values = node["obj"].load()
else: # pragma: no cover
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding no cover for now because it's very complicated to setup this test branch. I will check with @bru5 tomorrow to see if I can replicate his use case and maybe setup a better test.

@limdauto limdauto requested review from lorenabalan and bru5 December 8, 2020 10:09
@limdauto limdauto merged commit a68ba25 into main Dec 8, 2020
@limdauto limdauto deleted the KED-2316/params-500 branch December 8, 2020 12:48
@richardwestenra richardwestenra mentioned this pull request Dec 16, 2020
1 task
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