Skip to content

Conversation

Moumouls
Copy link
Member

@Moumouls Moumouls commented Oct 15, 2025

Pull Request

Issue

Parse Server log a warning on the new option disableIndexFieldValidation

error: Invalid key(s) found in Parse Server configuration: databaseOptions.disableIndexFieldValidation

Closes: FILL_THIS_OUT

Approach

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK

Summary by CodeRabbit

  • New Features

    • Added a configuration option to disable index field validation, allowing creation of indexes on fields that don’t yet exist. Also available via an environment variable.
  • Documentation

    • Updated options documentation to include the new index field validation setting with descriptions and usage guidance.
  • Tests

    • Extended test coverage to reflect the new configuration option.
  • Developer Experience

    • Clarified the requestContextMiddleware type definition without changing runtime behavior.

Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: disable index field validation warning fix: Disable index field validation warning Oct 15, 2025
Copy link

parse-github-assistant bot commented Oct 15, 2025

🚀 Thanks for opening this pull request!

❌ Please fill out all fields with a placeholder FILL_THIS_OUT. If a field does not apply to the pull request, fill in n/a or delete the line.

Copy link

coderabbitai bot commented Oct 15, 2025

📝 Walkthrough

Walkthrough

Adds a new DatabaseOptions flag disableIndexFieldValidation across definitions, docs, and tests; introduces corresponding environment variable and help text. Updates ParseServerOptions type for requestContextMiddleware. No runtime logic changes shown.

Changes

Cohort / File(s) Summary
DatabaseOptions: add disableIndexFieldValidation
src/Options/Definitions.js, src/Options/docs.js, src/Options/index.js, spec/ParseConfigKey.spec.js
Introduces boolean option disableIndexFieldValidation (env: PARSE_SERVER_DATABASE_DISABLE_INDEX_FIELD_VALIDATION) with parser, docs, and test config usage; allows creating indexes on fields not present in schema.
ParseServerOptions: middleware type tweak
src/Options/index.js
Adjusts requestContextMiddleware type from higher-order to direct (req, res, next) => void.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • mtrezza

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description includes the repository template headings but leaves essential sections incomplete, as the Issue field uses a placeholder, the Approach section lacks any description of the changes, and the Tasks checklist has not been tailored to reflect actual progress. Please populate the Issue section with the appropriate issue link or number, add a clear summary of the implemented changes under Approach, and adjust or remove checklist items to accurately represent completed work.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The pull request title "fix: Warning logged when setting option databaseOptions.disableIndexFieldValidation" directly aligns with the stated PR objective to address a warning logged by Parse Server when this option is used. The changes in the raw summary (adding the option to Definitions.js, index.js, docs.js, and test configuration) represent the implementation of this fix by properly registering and defining the option so Parse Server recognizes it as valid. The title is specific, concise, and clearly communicates the primary purpose of the changeset without unnecessary details or vague language.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@parseplatformorg
Copy link
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.02%. Comparing base (abfa94c) to head (5aed452).
⚠️ Report is 3 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9880      +/-   ##
==========================================
+ Coverage   93.00%   93.02%   +0.01%     
==========================================
  Files         187      187              
  Lines       15158    15158              
  Branches      176      176              
==========================================
+ Hits        14098    14100       +2     
+ Misses       1048     1046       -2     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

What bug exactly does this change fix? You mentioned just a warning, but the change also adds a new option.

@Moumouls
Copy link
Member Author

the optio was introduced in the disableIndexValidation PR, i missed to update the docs, here the doc to fix the warning when using the new option disableIndexValidation, introduced here #8137

@mtrezza mtrezza changed the title fix: Disable index field validation warning fix: Warning logged when setting option databaseOptions.disableIndexFieldValidation Oct 16, 2025
@mtrezza mtrezza merged commit 1815b01 into parse-community:alpha Oct 16, 2025
25 of 26 checks passed
parseplatformorg pushed a commit that referenced this pull request Oct 16, 2025
# [8.3.0-alpha.8](8.3.0-alpha.7...8.3.0-alpha.8) (2025-10-16)

### Bug Fixes

* Warning logged when setting option `databaseOptions.disableIndexFieldValidation` ([#9880](#9880)) ([1815b01](1815b01))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.3.0-alpha.8

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants