Skip to content

Fix saving object with invalid iso date #7087

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

Draft
wants to merge 9 commits into
base: alpha
Choose a base branch
from

Conversation

mtrezza
Copy link
Member

@mtrezza mtrezza commented Dec 19, 2020

New Pull Request Checklist

Issue Description

Saving an object with a date field set to an invalid ISO date object does not fail. The object is saved with field date value 1970-01-01T00:00:00.000Z.

Related issue: closes #7054

Approach

Add date validation and reject invalid ISO date. This should most likely be part of the schema validation.

TODOs before merging

  • Add test cases
  • Add bug fix
  • Add entry to changelog

Sorry, something went wrong.

* commit 'ccb045b68c5b4d983a90fa125513fc476e4e2387':
  fix: upgrade @graphql-tools/links from 6.2.4 to 6.2.5 (parse-community#7007)
  fix: upgrade pg-promise from 10.7.0 to 10.7.1 (parse-community#7009)
  fix: upgrade jwks-rsa from 1.10.1 to 1.11.0 (parse-community#7008)
  fix: upgrade graphql from 15.3.0 to 15.4.0 (parse-community#7011)
  update stale bot (parse-community#6998)
  fix(beforeSave/afterSave): Return value instead of Parse.Op for nested fields (parse-community#7005)
  fix(beforeSave): Skip Sanitizing Database results (parse-community#7003)
  Fix includeAll for querying a Pointer and Pointer array (parse-community#7002)
  Init (parse-community#6999)
@mtrezza mtrezza marked this pull request as draft December 19, 2020 22:56
@mtrezza
Copy link
Member Author

mtrezza commented Dec 20, 2020

Contains only the failing test case so far to verify the issue.

@dplewis
Copy link
Member

dplewis commented Feb 19, 2021

Can you rebase from master?

@mtrezza
Copy link
Member Author

mtrezza commented Feb 20, 2021

@dplewis done

@dplewis
Copy link
Member

dplewis commented Feb 20, 2021

Can you look at your test?

@mtrezza
Copy link
Member Author

mtrezza commented Feb 21, 2021

The test is failing correctly. This PR does not yet contain a fix, it was just to verify that this is actually a bug.

@sunshineo
Copy link
Contributor

@dplewis @mtrezza Any progress on this?

@mtrezza
Copy link
Member Author

mtrezza commented Jul 3, 2021

@sunshineo This PR is still only containing a failing test to demo the issue. Feel free to investigate, I think I can give you PR access if you want to work on it.

@mtrezza
Copy link
Member Author

mtrezza commented Sep 3, 2021

⚠️ Important change for merging PRs from Parse Server 5.0 onwards!

We are planning to release the first beta version of Parse Server 5.0 in October 2021.

If a PR contains a breaking change and is not merged before the beta release of Parse Server 5.0, it cannot be merged until the end of 2022. Instead it has to follow the Deprecation Policy and phase-in breaking changes to be merged during the course of 2022.

One of the most voiced community feedbacks was the demand for predictability in breaking changes to make it easy to upgrade Parse Server. We have made a first step towards this by introducing the Deprecation Policy in February 2021 that assists to phase-in breaking changes, giving developers time to adapt. We will follow-up with the introduction of Release Automation and a branch model that will allow breaking changes only with a new major release, scheduled for the beginning of each calendar year.

We understand that some PRs are a long time in the making and we very much appreciate your contribution. We want to make it easy for PRs that contain a breaking change and were created before the introduction of the Deprecation Policy. These PRs can be merged with a breaking change without being phased-in before the beta release of Parse Server 5.0. We are making this exception because we appreciate that this is a time of transition that requires additional effort from contributors to adapt. We encourage everyone to prepare their PRs until the end of September and account for review time and possible adaptions.

If a PR contains a breaking change and should be merged before the beta release, please mention @parse-community/server-maintenance and we will coordinate with you to merge the PR.

Thanks for your contribution and support during this transition to Parse Server release automation!

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.

Post invalid iso date string success instead of return 400 with error message
3 participants