jupyter-naas / naas

Low-code Python library to safely use notebooks in production: schedule workflows, generate assets, trigger webhooks, send notifications, build pipelines, manage secrets (Cloud-only)
https://app.naas.ai/
GNU Affero General Public License v3.0
282 stars 25 forks source link

fix(naas/runner/jobs.py): Fix job not returning "runs" because of a JSON exception being triggered #120

Closed Dr0p42 closed 3 years ago

Dr0p42 commented 3 years ago

Added a type verification on "runs" property of a Job when listing them. It seems that most of the time they are already loaded into Python objects and we were forcing the use of json.loads() on them which was raising an exception. We are now type checking to see if we need to run json.loads or not. We are also printing the Exception on stdout if we catch any.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication