Skip to content

feat: Add acknowledgeFutureDefaults option to suppress future default deprecation warnings#10599

Open
anaghroy wants to merge 1 commit into
parse-community:alphafrom
anaghroy:feat/acknowledge-future-defaults
Open

feat: Add acknowledgeFutureDefaults option to suppress future default deprecation warnings#10599
anaghroy wants to merge 1 commit into
parse-community:alphafrom
anaghroy:feat/acknowledge-future-defaults

Conversation

@anaghroy

@anaghroy anaghroy commented Jul 21, 2026

Copy link
Copy Markdown

Pull Request

Issue

Closes #10584

Approach

Developers requested a clean way to suppress DeprecationWarnings that only relate to future default changes without completely silencing all deprecation warnings globally.

This PR introduces a new boolean server option: acknowledgeFutureDefaults.

  • When set to true, Deprecator.js suppresses warnings thrown specifically for changeNewDefault.
  • The configuration was formally added and documented in src/Options/index.js and regenerated in Definitions.js.
  • Added a new unit test in spec/Deprecator.spec.js to ensure warnings are completely suppressed when the flag is enabled.

Tasks

Screenshot 2026-07-21 235611 Screenshot 2026-07-21 235624
  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

Summary by CodeRabbit

  • New Features

    • Added an acknowledgeFutureDefaults configuration option to suppress warnings about options with upcoming default-value changes.
    • The setting can be enabled through server configuration or the PARSE_SERVER_ACKNOWLEDGE_FUTURE_DEFAULTS environment variable.
  • Bug Fixes

    • Future-default deprecation warnings are no longer logged when the new acknowledgement setting is enabled.
  • Documentation

    • Documented the new configuration option and its default value.

@parse-github-assistant

Copy link
Copy Markdown

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

@parse-github-assistant parse-github-assistant Bot changed the title feat: add acknowledgeFutureDefaults option to suppress future default deprecation warnings feat: Add acknowledgeFutureDefaults option to suppress future default deprecation warnings Jul 21, 2026
@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca43a2b4-b3e6-425b-9bd0-e054ce4d7a5a

📥 Commits

Reviewing files that changed from the base of the PR and between 5838c07 and 4753a72.

📒 Files selected for processing (5)
  • spec/Deprecator.spec.js
  • src/Deprecator/Deprecator.js
  • src/Options/Definitions.js
  • src/Options/docs.js
  • src/Options/index.js

📝 Walkthrough

Walkthrough

Adds the acknowledgeFutureDefaults Parse Server option, maps it to an environment variable, documents and types it, and suppresses future-default deprecation warnings when enabled. A Jasmine test verifies that no warning is logged.

Changes

Future default acknowledgement

Layer / File(s) Summary
Acknowledgement option contract
src/Options/Definitions.js, src/Options/index.js, src/Options/docs.js
Defines the boolean acknowledgeFutureDefaults option with a false default, environment variable mapping, Flow type, and JSDoc documentation.
Deprecation warning suppression
src/Deprecator/Deprecator.js, spec/Deprecator.spec.js
Suppresses future-default warnings when acknowledgement is enabled and tests that _logOption is not called.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: mtrezza, dblythy


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Engage In Review Feedback ❓ Inconclusive The repo shows only implementation/test changes; no review-thread or discussion history is available here to prove feedback was engaged before resolution. Provide linked review comments or conversation history showing the feedback was discussed before any resolve/commit, or that the reviewer retracted it.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the new acknowledgeFutureDefaults option and its effect on future-default deprecation warnings.
Description check ✅ Passed The description follows the template with Issue, Approach, and Tasks sections and includes the linked issue and implemented work.
Linked Issues check ✅ Passed The code changes implement the requested option and suppress the targeted future-default warnings as described in issue #10584.
Out of Scope Changes check ✅ Passed All changes are directly related to the new option, its docs, and its test coverage; no unrelated edits are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Security Check ✅ Passed Only deprecation-warning suppression and option docs/tests changed; the new flag defaults false and no auth, input, or request-handling code was touched.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.3)
src/Options/index.js

File contains syntax errors that prevent linting: Line 18: Expected a type but instead found '?'.; Line 18: Expected a property, or a signature but instead found ';'.; Line 21: Expected a statement but instead found '?'.; Line 24: Expected a statement but instead found '?'.; Line 27: Expected a statement but instead found '?'.; Line 30: Expected a statement but instead found '?'.; Line 32: Expected a statement but instead found '?'.; Line 34: Expected a statement but instead found '?'.; Line 35: Expected a statement but instead found '}'.; Line 37: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 38: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 39: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 40: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Li

... [truncated 16813 characters] ...

found '?'.; Line 916: Expected a statement but instead found '?'.; Line 918: Expected a statement but instead found '?'.; Line 919: Expected a statement but instead found '}'.; Line 933: Expected a type but instead found '?'.; Line 933: Expected a property, or a signature but instead found ';'.; Line 934: Expected a statement but instead found '}'.; Line 940: Expected a type but instead found '?'.; Line 940: Expected a property, or a signature but instead found ';'.; Line 944: Expected a statement but instead found '?'.; Line 948: Expected a statement but instead found '?'.; Line 952: Expected a statement but instead found '?'.; Line 956: Expected a statement but instead found '?'.; Line 960: Expected a statement but instead found '?'.; Line 961: Expected a statement but instead found '}'.


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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to acknowledge or suppress warnings for upcoming default option changes

1 participant