Skip to content

SchemaOptions definition not properly added #7805

@mtrezza

Description

@mtrezza
Member

New Issue Checklist

  • I am not disclosing a vulnerability.
    I am not just asking a question.
    I have searched through existing issues.
    I can reproduce the issue with the latest version of Parse Server.

Issue Description

The Parse Server options SchemaOptions which were added in #7418 were not properly added to the definition file.

The SchemaOptions are defined in /src/Options/Definitions.js, but when re-building the options with npm run definitions, the options are removed.

Steps to reproduce

  1. Run npm run definitions

Actual Outcome

Schema options are removed from /src/Options/Definitions.js.

Expected Outcome

Schema options should be properly re-built.

Environment

Server

  • Parse Server version: 5.0.0-alpha.24

Activity

parse-github-assistant

parse-github-assistant commented on Feb 12, 2022

@parse-github-assistant

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
pinned this issue on Feb 12, 2022
mtrezza

mtrezza commented on Feb 12, 2022

@mtrezza
MemberAuthor

@sadortun @Moumouls could you take a look?

unpinned this issue on Feb 12, 2022
changed the title [-]Schema server option definition not properly added[/-] [+]`SchemaOptions` definition not properly added[/+] on Feb 12, 2022
added
type:docsOnly change in the docs or README
and removed
type:ciCI related issue
on Mar 18, 2022
dblythy

dblythy commented on Mar 19, 2022

@dblythy
Member

What do you think about having npm run definitions ran / checked by the CI?

mtrezza

mtrezza commented on Mar 19, 2022

@mtrezza
MemberAuthor

What do you mean by "checked by the CI"?

dblythy

dblythy commented on Mar 19, 2022

@dblythy
Member

Well I’m assuming here that a contributor thought that they had to manually edit the Definitions.js file (even though it says “ Do not manually), instead of adding to index.js. I think it would be good to possibly have a CI check to make sure npm run definitions matches the committed Definitions.js file, so we can be sure no manual editing has been applied.

mtrezza

mtrezza commented on Mar 19, 2022

@mtrezza
MemberAuthor

Got it, I think we could simply generate the definitions file again and compare the result with what's been committed. Or do you have a different idea?

Moumouls

Moumouls commented on Apr 3, 2022

@Moumouls
Member

The source of the problem is simply related to the fact that the definitions were added manually to the auto-generated file

mtrezza

mtrezza commented on Apr 3, 2022

@mtrezza
MemberAuthor

Thanks for fixing this, the discussion was about how to prevent that in the future. Generating the definitions file and comparing it to the current definitions seems an easy check for the CI. I opened #7918 so we close this issue with your fix.

linked a pull request that will close this issuerefactor: add missing schema definitions #7917on Apr 3, 2022
mtrezza

mtrezza commented on Apr 3, 2022

@mtrezza
MemberAuthor

Closed via #7917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:docsOnly change in the docs or README

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @dblythy@mtrezza@Moumouls

      Issue actions

        `SchemaOptions` definition not properly added · Issue #7805 · parse-community/parse-server