Skip to content

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Dec 12, 2025

Summary by CodeRabbit

  • Breaking Changes

    • The encodeParseObjectInCloudFunction option has been removed; Cloud Function parameters now always receive encoded Parse Objects. Update configurations and handlers accordingly.
  • Deprecations Removed

    • Related deprecation entry has been finalized and removed.
  • Tests

    • Cloud function tests consolidated and updated to reflect encoded Parse Object behavior.
  • Documentation

    • Option documentation and references were removed from the public options docs.

✏️ Tip: You can customize this high-level summary in your review settings.

@parse-github-assistant
Copy link

parse-github-assistant bot commented Dec 12, 2025

🚀 Thanks for opening this pull request!

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

📝 Walkthrough

Walkthrough

Removed the encodeParseObjectInCloudFunction option and all related artifacts: option definitions, types, docs, deprecation entry, test flags, and the conditional in FunctionsRouter so Pointers are always decoded into Parse.Objects.

Changes

Cohort / File(s) Change Summary
Option definitions & types
src/Options/Definitions.js, src/Options/index.js, types/Options/index.d.ts
Deleted encodeParseObjectInCloudFunction option, its env var binding, parser/help text, default value, and type declaration from ParseServerOptions
Runtime behavior
src/Routers/FunctionsRouter.js
Removed conditional gating; __type === 'Pointer' is always parsed into a Parse.Object (unconditional decoding of pointers)
Deprecation & changelog
DEPRECATIONS.md, src/Deprecator/Deprecations.js
Marked DEPPS10 as removed (replacing deprecated) and removed the deprecation entry for encodeParseObjectInCloudFunction from exported deprecations
Tests & test helpers
spec/helper.js, spec/CloudCode.spec.js, spec/ParseAPI.spec.js
Removed default test flag encodeParseObjectInCloudFunction: true; consolidated/tests updated to expect encoded Parse.Objects in cloud function params and removed server reconfigure that disabled encoding
Docs
src/Options/docs.js
Removed JSDoc entry describing encodeParseObjectInCloudFunction option

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Attention areas:
    • src/Routers/FunctionsRouter.js — ensure unconditional pointer decoding doesn't break backward-compatibility scenarios or edge cases (arrays, nested structures).
    • spec/CloudCode.spec.js and spec/ParseAPI.spec.js — confirm tests cover previous non-encoded paths or note that those behaviors are intentionally removed.
    • Cross-file sweep — verify no remaining references to encodeParseObjectInCloudFunction in docs, tests, or comments.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely missing. The repository template requires at least an Issue section with a link and an Approach section describing the changes. Add a pull request description following the template: include the Issue link (e.g., Closes: #XXXX), an Approach section explaining the DEPPS10 deprecation implementation, and mark completed tasks.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: implementing Deprecation DEPPS10 by encoding Parse.Object in Cloud Functions and removing the encodeParseObjectInCloudFunction option.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9577730 and 1d83aba.

📒 Files selected for processing (4)
  • spec/ParseAPI.spec.js (1 hunks)
  • src/Options/Definitions.js (0 hunks)
  • src/Options/docs.js (0 hunks)
  • src/Options/index.js (0 hunks)
💤 Files with no reviewable changes (3)
  • src/Options/docs.js
  • src/Options/Definitions.js
  • src/Options/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • spec/ParseAPI.spec.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Benchmarks
  • GitHub Check: Node 20
  • GitHub Check: PostgreSQL 17, PostGIS 3.5
  • GitHub Check: MongoDB 8, ReplicaSet
  • GitHub Check: PostgreSQL 18, PostGIS 3.6
  • GitHub Check: PostgreSQL 16, PostGIS 3.5
  • GitHub Check: Code Analysis (javascript)
  • GitHub Check: Docker Build

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

parseplatformorg commented Dec 12, 2025

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.

@mtrezza mtrezza changed the title feat: Remove deprecation DEPPS10 feat: Deprecation DEPPS10: Encode Parse.Object in Cloud Function and remove option encodeParseObjectInCloudFunction Dec 12, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
spec/CloudCode.spec.js (1)

1705-1724: LGTM! End-to-end test validates encoding behavior.

The test effectively validates that Parse Objects are always encoded in cloud functions by:

  1. Passing a pointer via user.toPointer()
  2. Asserting the cloud function receives a full Parse.Object instance (line 1714)
  3. Demonstrating the encoded object can be modified and persisted

The test uses async/await properly and follows the codebase patterns.

Consider adding explicit verification of the final state to make the test more assertive:

     await Parse.Cloud.run('deleteAccount', { object: user.toPointer() }, { useMasterKey: true });
+    await user.fetch({ useMasterKey: true });
+    expect(user.get('deleted')).toBeTrue();

This would explicitly confirm the mutation was persisted, though the current pattern (relying on operation completion) is consistent with other tests in this file.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa98357 and 9577730.

📒 Files selected for processing (10)
  • DEPRECATIONS.md (1 hunks)
  • spec/CloudCode.spec.js (1 hunks)
  • spec/ParseAPI.spec.js (0 hunks)
  • spec/helper.js (0 hunks)
  • src/Deprecator/Deprecations.js (0 hunks)
  • src/Options/Definitions.js (0 hunks)
  • src/Options/docs.js (0 hunks)
  • src/Options/index.js (0 hunks)
  • src/Routers/FunctionsRouter.js (1 hunks)
  • types/Options/index.d.ts (0 hunks)
💤 Files with no reviewable changes (7)
  • types/Options/index.d.ts
  • spec/helper.js
  • src/Options/Definitions.js
  • src/Options/docs.js
  • src/Deprecator/Deprecations.js
  • src/Options/index.js
  • spec/ParseAPI.spec.js
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-12-02T08:00:20.138Z
Learning: For Parse Server 9 release (PR #9938 and related), the parse/push-adapter dependency must be upgraded to version >= 8.0.0, not 7.0.0. Version 8.x drops support for Node 18.
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-12-02T08:00:08.440Z
Learning: For Parse Server 9 release preparation, the parse/push-adapter dependency should be upgraded to version >= 8.0.0, not 7.x, as version 8.x is required despite dropping Node 18 support (which aligns with Parse Server 9's removal of EOL Node versions).
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-17T15:02:48.786Z
Learning: For Parse Server PRs, always suggest an Angular commit convention PR title that would make a meaningful changelog entry for developers. Update the PR title suggestion on every commit. The format should be: type(scope): description. Common types include feat, fix, perf, refactor, docs, test, chore. The scope should identify the subsystem (e.g., graphql, rest, push, security). The description should be action-oriented and clearly convey the change's impact to developers.
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-08T13:46:04.940Z
Learning: When reviewing Parse Server PRs that add new features, always check whether the feature is documented in the README.md file, though for new Parse Server options this is optional rather than required.
📚 Learning: 2025-08-27T09:08:34.252Z
Learnt from: EmpiDev
Repo: parse-community/parse-server PR: 9770
File: src/triggers.js:446-454
Timestamp: 2025-08-27T09:08:34.252Z
Learning: When analyzing function signature changes in Parse Server codebase, verify that call sites are actually incorrect before flagging them. Passing tests are a strong indicator that function calls are already properly aligned with new signatures.

Applied to files:

  • spec/CloudCode.spec.js
  • src/Routers/FunctionsRouter.js
  • DEPRECATIONS.md
📚 Learning: 2025-10-16T19:27:05.311Z
Learnt from: Moumouls
Repo: parse-community/parse-server PR: 9883
File: spec/CloudCodeLogger.spec.js:410-412
Timestamp: 2025-10-16T19:27:05.311Z
Learning: In spec/CloudCodeLogger.spec.js, the test "should log cloud function triggers using the silent log level" (around lines 383-420) is known to be flaky and requires the extra `await new Promise(resolve => setTimeout(resolve, 100))` timeout after awaiting `afterSavePromise` for reliability, even though it may appear redundant.

Applied to files:

  • spec/CloudCode.spec.js
📚 Learning: 2025-04-30T19:31:35.344Z
Learnt from: RahulLanjewar93
Repo: parse-community/parse-server PR: 9744
File: spec/ParseLiveQuery.spec.js:0-0
Timestamp: 2025-04-30T19:31:35.344Z
Learning: In the Parse Server codebase, the functions in QueryTools.js are typically tested through end-to-end behavior tests rather than direct unit tests, even though the functions are exported from the module.

Applied to files:

  • spec/CloudCode.spec.js
📚 Learning: 2025-05-04T20:41:05.147Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 9445
File: spec/ParseLiveQuery.spec.js:1312-1338
Timestamp: 2025-05-04T20:41:05.147Z
Learning: New tests in the parse-server repository should use async/await with promise-based patterns rather than callback patterns with `done()`.

Applied to files:

  • spec/CloudCode.spec.js
📚 Learning: 2025-05-09T09:59:06.289Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 9445
File: spec/ParseLiveQuery.spec.js:1340-1375
Timestamp: 2025-05-09T09:59:06.289Z
Learning: Tests in the parse-server repository should use promise-based approaches rather than callback patterns with `done()`. Use a pattern where a Promise is created that resolves when the event occurs, then await that promise.

Applied to files:

  • spec/CloudCode.spec.js
📚 Learning: 2025-05-09T09:59:06.289Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 9445
File: spec/ParseLiveQuery.spec.js:1340-1375
Timestamp: 2025-05-09T09:59:06.289Z
Learning: New tests in the parse-server repository should use async/await with promise-based patterns rather than callback patterns with `done()`. The preferred pattern is to create a Promise that resolves when an expected event occurs, then await that Promise.

Applied to files:

  • spec/CloudCode.spec.js
📚 Learning: 2025-11-17T15:02:48.786Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-17T15:02:48.786Z
Learning: For Parse Server PRs, always suggest an Angular commit convention PR title that would make a meaningful changelog entry for developers. Update the PR title suggestion on every commit. The format should be: type(scope): description. Common types include feat, fix, perf, refactor, docs, test, chore. The scope should identify the subsystem (e.g., graphql, rest, push, security). The description should be action-oriented and clearly convey the change's impact to developers.

Applied to files:

  • spec/CloudCode.spec.js
  • DEPRECATIONS.md
📚 Learning: 2025-12-02T06:55:53.808Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-12-02T06:55:53.808Z
Learning: When reviewing Parse Server PRs that add or modify Parse Server options, always verify that changes are properly reflected in three files: src/Options/index.js (where changes originate), src/Options/Definitions.js, and src/Options/docs.js. The correct workflow is: make changes in index.js first, then run `npm run definitions` to automatically replicate the changes to Definitions.js and docs.js.

Applied to files:

  • spec/CloudCode.spec.js
  • DEPRECATIONS.md
📚 Learning: 2025-08-27T12:33:06.237Z
Learnt from: EmpiDev
Repo: parse-community/parse-server PR: 9770
File: src/triggers.js:467-477
Timestamp: 2025-08-27T12:33:06.237Z
Learning: In the Parse Server codebase, maybeRunAfterFindTrigger is called in production with Parse.Query objects constructed via withJSON(), so the plain object query handling bug only affects tests, not production code paths.

Applied to files:

  • spec/CloudCode.spec.js
📚 Learning: 2025-12-02T08:00:20.138Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-12-02T08:00:20.138Z
Learning: For Parse Server 9 release (PR #9938 and related), the parse/push-adapter dependency must be upgraded to version >= 8.0.0, not 7.0.0. Version 8.x drops support for Node 18.

Applied to files:

  • DEPRECATIONS.md
📚 Learning: 2025-12-02T08:00:08.440Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-12-02T08:00:08.440Z
Learning: For Parse Server 9 release preparation, the parse/push-adapter dependency should be upgraded to version >= 8.0.0, not 7.x, as version 8.x is required despite dropping Node 18 support (which aligns with Parse Server 9's removal of EOL Node versions).

Applied to files:

  • DEPRECATIONS.md
📚 Learning: 2025-11-08T13:46:04.940Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-08T13:46:04.940Z
Learning: When reviewing Parse Server PRs that add new features, always check whether the feature is documented in the README.md file, though for new Parse Server options this is optional rather than required.

Applied to files:

  • DEPRECATIONS.md
📚 Learning: 2025-11-08T13:46:04.940Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-08T13:46:04.940Z
Learning: For new Parse Server options, verify that the option is documented in src/Options/index.js and that npm run definitions has been executed to reflect changes in src/Options/docs.js and src/Options/Definitions.js. README.md documentation is a bonus but not required for new options.

Applied to files:

  • DEPRECATIONS.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Node 18
  • GitHub Check: Redis Cache
  • GitHub Check: MongoDB 7, ReplicaSet
  • GitHub Check: Node 22
  • GitHub Check: MongoDB 8, ReplicaSet
  • GitHub Check: PostgreSQL 18, PostGIS 3.6
  • GitHub Check: MongoDB 6, ReplicaSet
  • GitHub Check: Node 20
  • GitHub Check: PostgreSQL 15, PostGIS 3.5
  • GitHub Check: PostgreSQL 16, PostGIS 3.5
  • GitHub Check: PostgreSQL 15, PostGIS 3.3
  • GitHub Check: PostgreSQL 17, PostGIS 3.5
  • GitHub Check: Docker Build
  • GitHub Check: Code Analysis (javascript)
  • GitHub Check: Benchmarks
🔇 Additional comments (2)
src/Routers/FunctionsRouter.js (1)

21-26: LGTM! Pointer encoding now always active.

The removal of the conditional check for config.encodeParseObjectInCloudFunction correctly implements the deprecation finalization. Parse Objects with __type === 'Pointer' are now always encoded as Parse.Object instances in cloud function parameters.

DEPRECATIONS.md (1)

16-16: LGTM! Deprecation status correctly updated.

The status change from "deprecated" to "removed" accurately reflects the finalization of DEPPS10 in version 9.0.0.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 12, 2025
@mtrezza mtrezza mentioned this pull request Dec 12, 2025
25 tasks
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.56%. Comparing base (7483add) to head (63bf1e1).
⚠️ Report is 12 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9973      +/-   ##
==========================================
- Coverage   92.57%   92.56%   -0.02%     
==========================================
  Files         191      191              
  Lines       15560    15560              
  Branches      177      177              
==========================================
- Hits        14405    14403       -2     
- Misses       1143     1145       +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.

@mtrezza mtrezza added the state:breaking Breaking change requires major version increment and `BREAKING CHANGE` commit message label Dec 12, 2025
@mtrezza
Copy link
Member Author

mtrezza commented Dec 12, 2025

BREAKING CHANGE: This release encodes Parse.Object in Cloud Function and removes option encodeParseObjectInCloudFunction (Deprecation DEPPS10).

@mtrezza mtrezza merged commit a2d3dbe into parse-community:alpha Dec 12, 2025
22 of 23 checks passed
parseplatformorg pushed a commit that referenced this pull request Dec 12, 2025
# [9.0.0-alpha.7](9.0.0-alpha.6...9.0.0-alpha.7) (2025-12-12)

### Features

* Deprecation DEPPS10: Encode `Parse.Object` in Cloud Function and remove option `encodeParseObjectInCloudFunction` ([#9973](#9973)) ([a2d3dbe](a2d3dbe))

### BREAKING CHANGES

* This release encodes `Parse.Object` in Cloud Function and removes option `encodeParseObjectInCloudFunction` (Deprecation DEPPS10). ([a2d3dbe](a2d3dbe))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 9.0.0-alpha.7

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Dec 12, 2025
parseplatformorg pushed a commit that referenced this pull request Dec 14, 2025
# [9.0.0](8.6.0...9.0.0) (2025-12-14)

### Bug Fixes

* Upgrade to GraphQL Apollo Server 5 and restrict GraphQL introspection ([#9888](#9888)) ([87c7f07](87c7f07))

### Features

* Deprecation DEPPS10: Encode `Parse.Object` in Cloud Function and remove option `encodeParseObjectInCloudFunction` ([#9973](#9973)) ([a2d3dbe](a2d3dbe))
* Deprecation DEPPS11: Replace `PublicAPIRouter` with `PagesRouter` ([#9974](#9974)) ([8f877d4](8f877d4))
* Deprecation DEPPS113: Config option `enableInsecureAuthAdapters` defaults to `false` ([#9982](#9982)) ([22d4622](22d4622))
* Deprecation DEPPS12: Database option `allowPublicExplain` defaults to `false` ([#9975](#9975)) ([c1c7e69](c1c7e69))
* Increase required minimum MongoDB version to `7.0.16` ([#9971](#9971)) ([7bb548b](7bb548b))
* Increase required minimum Node version to `20.19.0` ([#9970](#9970)) ([633964d](633964d))
* Increase required minimum version to Postgres `16`, PostGIS `3.5` ([#9972](#9972)) ([7483add](7483add))
* Update route patterns to use path-to-regexp v8 syntax ([#9942](#9942)) ([fa8723b](fa8723b))
* Upgrade to @parse/push-adapter 8.1.0 ([#9938](#9938)) ([d5e76b0](d5e76b0))
* Upgrade to parse 8.0.0 ([#9976](#9976)) ([f9970d4](f9970d4))

### BREAKING CHANGES

* This release changes the config option `enableInsecureAuthAdapters` default to `false` (Deprecation DEPPS13). ([22d4622](22d4622))
* This release changes the MongoDB database option `allowPublicExplain` default to `false` (Deprecation DEPPS12). ([c1c7e69](c1c7e69))
* This release replaces `PublicAPIRouter` with `PagesRouter` (Deprecation DEPPS11). ([8f877d4](8f877d4))
* This release encodes `Parse.Object` in Cloud Function and removes option `encodeParseObjectInCloudFunction` (Deprecation DEPPS10). ([a2d3dbe](a2d3dbe))
* This releases increases the required minimum version to Postgres `16`, PostGIS `3.5`. ([7483add](7483add))
* Route pattern syntax across cloud routes and rate-limiting now use the new path-to-regexp v8 syntax; see the [migration guide](https://github.com/parse-community/parse-server/blob/alpha/9.0.0.md) for more details. ([fa8723b](fa8723b))
* This releases increases the required minimum MongoDB version to `7.0.16`. ([7bb548b](7bb548b))
* Upgrade to Apollo Server 5 and GraphQL express 5 integration; GraphQL introspection now requires using `masterKey` or setting `graphQLPublicIntrospection: true`. ([87c7f07](87c7f07))
* This releases increases the required minimum Node version to `20.19.0`. ([633964d](633964d))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 9.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Dec 14, 2025
@mtrezza mtrezza deleted the feat/DEPPS10 branch December 14, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:breaking Breaking change requires major version increment and `BREAKING CHANGE` commit message state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants