Skip to content

fix: infinite loop with jsonschema>3.2.0 #173

@athith-g

Description

@athith-g

Describe the bug
Starting proTES fails with jsonschema versions > 3.2.0. This is due to the tesNextTes schema in pro_tes/api/additional_logs.yaml referencing itself, causing an infinite loop during validation or reference resolution (I'm not sure which).

To Reproduce
Steps to reproduce the behavior (in local python virtual environment):

  1. pip install -r requirements.txt
  2. pip install jsonschema==4.22.0
  3. cd pro_tes
  4. python3 app.py

Result
Server gets stuck here:
Screenshot 2024-05-17 at 10 31 47 AM

Expected behavior
Server should continue with setup process.

Workarounds

  1. Use jsonschema version 3.2.0 (pip install jsonschema==3.2.0) OR
  2. Comment out forwarded_to property in tesNextTes OR
  3. Use oneOf:
    forwarded_to:
       oneOf:
           - $ref: '#/components/schemas/tesNextTes'

Possible solutions

  1. Specify jsonschema version in requirements.txt
  2. Alter additional_logs.yaml to avoid infinite loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions