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

feat: Add Cloud Code triggers Parse.Cloud.beforeSave and Parse.Cloud.afterSave for Parse Config #9232

Merged
merged 3 commits into from
Jul 20, 2024

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jul 19, 2024

Pull Request

Issue

When changing any value in Remote Config, the previous value is lost without any possibility to undo the change. That means that any user mistake can lead to information irreversibly lost.

Closes: #8267

Approach

Add a Cloud Code trigger beforeSave and afterSave that is invoked when the remove config is changed. This allows a developer to catch any changes to the Remote Config parameters and log them, or store a history of changed.

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

Copy link

Thanks for opening this pull request!

Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.76%. Comparing base (4d86ace) to head (c50401a).
Report is 24 commits behind head on alpha.

Files with missing lines Patch % Lines
src/cloud-code/Parse.Cloud.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9232      +/-   ##
==========================================
+ Coverage   93.75%   93.76%   +0.01%     
==========================================
  Files         184      184              
  Lines       14675    14715      +40     
==========================================
+ Hits        13758    13797      +39     
- Misses        917      918       +1     

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

@dplewis dplewis requested a review from a team July 19, 2024 19:12
@mtrezza mtrezza changed the title feat: Add Cloud Config triggers feat: Add Cloud Code triggers for Parse Config Jul 20, 2024
@mtrezza mtrezza changed the title feat: Add Cloud Code triggers for Parse Config feat: Add Cloud Code triggers Parse.Cloud.beforeSave and Parse.Cloud.afterSave for Parse Config Jul 20, 2024
@mtrezza
Copy link
Member

mtrezza commented Jul 20, 2024

Nice!

@mtrezza mtrezza merged commit 90a1e4a into parse-community:alpha Jul 20, 2024
27 checks passed
parseplatformorg pushed a commit that referenced this pull request Jul 20, 2024
# [7.3.0-alpha.6](7.3.0-alpha.5...7.3.0-alpha.6) (2024-07-20)

### Features

* Add Cloud Code triggers `Parse.Cloud.beforeSave` and `Parse.Cloud.afterSave` for Parse Config ([#9232](#9232)) ([90a1e4a](90a1e4a))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.3.0-alpha.6

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jul 20, 2024
@dplewis dplewis deleted the global-config-triggers branch July 20, 2024 18:44
parseplatformorg pushed a commit that referenced this pull request Oct 3, 2024
# [7.3.0-beta.1](7.2.0...7.3.0-beta.1) (2024-10-03)

### Bug Fixes

* Custom object ID allows to acquire role privileges ([GHSA-8xq9-g7ch-35hg](GHSA-8xq9-g7ch-35hg)) ([#9317](#9317)) ([13ee52f](13ee52f))
* Parse Server `databaseOptions` nested keys incorrectly identified as invalid ([#9213](#9213)) ([77206d8](77206d8))
* Parse Server installation fails due to post install script incorrectly parsing required min. Node version ([#9216](#9216)) ([0fa82a5](0fa82a5))
* Parse Server option `maxLogFiles` doesn't recognize day duration literals such as `1d` to mean 1 day ([#9215](#9215)) ([0319cee](0319cee))
* Security upgrade path-to-regexp from 6.2.1 to 6.3.0 ([#9314](#9314)) ([8b7fe69](8b7fe69))

### Features

* Add atomic operations for Cloud Config parameters ([#9219](#9219)) ([35cadf9](35cadf9))
* Add Cloud Code triggers `Parse.Cloud.beforeSave` and `Parse.Cloud.afterSave` for Parse Config ([#9232](#9232)) ([90a1e4a](90a1e4a))
* Add Node 22 support ([#9187](#9187)) ([7778471](7778471))
* Add support for asynchronous invocation of `FilesAdapter.getFileLocation` ([#9271](#9271)) ([1a2da40](1a2da40))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.3.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Oct 3, 2024
parseplatformorg pushed a commit that referenced this pull request Oct 3, 2024
# [7.3.0](7.2.0...7.3.0) (2024-10-03)

### Bug Fixes

* Custom object ID allows to acquire role privileges ([GHSA-8xq9-g7ch-35hg](GHSA-8xq9-g7ch-35hg)) ([#9317](#9317)) ([13ee52f](13ee52f))
* Parse Server `databaseOptions` nested keys incorrectly identified as invalid ([#9213](#9213)) ([77206d8](77206d8))
* Parse Server installation fails due to post install script incorrectly parsing required min. Node version ([#9216](#9216)) ([0fa82a5](0fa82a5))
* Parse Server option `maxLogFiles` doesn't recognize day duration literals such as `1d` to mean 1 day ([#9215](#9215)) ([0319cee](0319cee))
* Security upgrade path-to-regexp from 6.2.1 to 6.3.0 ([#9314](#9314)) ([8b7fe69](8b7fe69))

### Features

* Add atomic operations for Cloud Config parameters ([#9219](#9219)) ([35cadf9](35cadf9))
* Add Cloud Code triggers `Parse.Cloud.beforeSave` and `Parse.Cloud.afterSave` for Parse Config ([#9232](#9232)) ([90a1e4a](90a1e4a))
* Add Node 22 support ([#9187](#9187)) ([7778471](7778471))
* Add support for asynchronous invocation of `FilesAdapter.getFileLocation` ([#9271](#9271)) ([1a2da40](1a2da40))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.3.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add trigger before Remote Config change
3 participants