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

Can't submit a new benchmark without JSON schema #7

Open
vykozlov opened this issue Oct 13, 2021 · 2 comments
Open

Can't submit a new benchmark without JSON schema #7

vykozlov opened this issue Oct 13, 2021 · 2 comments
Assignees
Labels
backend help wanted Extra attention is needed

Comments

@vykozlov
Copy link
Collaborator

Describe the bug
Trying to submit a new benchmark without JSON schema (which should be optional)

To Reproduce
Steps to reproduce the behavior:

  1. https://perf.test.fedcloud.eu/benchmark-submission
  2. fill the fields, in the "JSON template" put nothing, as this field should be optional
  3. See error
    { "code": 422, "errors": { "json": { "json_schema": [ "Missing data for required field." ] } }, "status": "Unprocessable Entity" }

Expected behavior
A new Benchmark is added

@TheChristophe TheChristophe added backend help wanted Extra attention is needed labels Oct 15, 2021
@TheChristophe TheChristophe self-assigned this Oct 15, 2021
@TheChristophe
Copy link
Collaborator

The frontend submits no json_schema field if the text box is left empty, but backend always expects something. There are 2 possible solutions:

  • Allow nullable json_schema to represent "no schema submitted"
  • Instead, use the empty schema "{}" and default to that in frontend or backend and have "{}" also mean "no schema submitted"

@BorjaEst
Copy link
Collaborator

BorjaEst commented Nov 8, 2021

From our last internal meeting:

  • Requires to have a schema, introduces less errors and less "bad" data.
  • {} should be also forbiden (from backend)

TheChristophe referenced this issue in EOSC-synergy/eosc-perf Jan 16, 2022
@TheChristophe TheChristophe removed their assignment Feb 6, 2022
BorjaEst referenced this issue in BorjaEst/eosc-perf Mar 21, 2022
@TheChristophe TheChristophe transferred this issue from EOSC-synergy/eosc-perf Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants