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

Add support for Firestore TTL #5267

Merged
merged 8 commits into from
Dec 6, 2022
Merged

Add support for Firestore TTL #5267

merged 8 commits into from
Dec 6, 2022

Conversation

JU-2094
Copy link
Contributor

@JU-2094 JU-2094 commented Nov 25, 2022

Description

API change to add Firestore TTL support for the CLI.
The implementation of the design change is tracked at b/249528585

Scenarios Tested

User Journeys tested:

  • Set and Unset TTL in an existing Field override.
  • Set and Unset TTL in a new configuration file.
  • Don't affect existing TTL policies created without the CLI for backward compatibility.
  • See other TTL policies not present in the configuration file.
  • Don't affect TTL policies if the ttl property is undefined. Only take effect when is explicitly set.
  • Remove field overrides and TTL policies when the --force flag is used.
  • Verify there's only 1 TTL per collection.
  • Verify that existing behavior remains if not using new property.
  • Verify the order of field overrides in the configuration file do not affect.
  • Verify the type of the ttl property is enforced to be boolean.

src/firestore/indexes.ts Outdated Show resolved Hide resolved
@HansiMou
Copy link
Contributor

HansiMou commented Dec 6, 2022

LGTM from TTL backend.

@codecov-commenter
Copy link

Codecov Report

Base: 56.27% // Head: 56.27% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (b6762f9) compared to base (e984a6c).
Patch coverage: 38.70% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5267   +/-   ##
=======================================
  Coverage   56.27%   56.27%           
=======================================
  Files         309      310    +1     
  Lines       20820    20886   +66     
  Branches     4224     4244   +20     
=======================================
+ Hits        11716    11754   +38     
- Misses       8092     8112   +20     
- Partials     1012     1020    +8     
Impacted Files Coverage Δ
src/firestore/indexes.ts 32.01% <10.52%> (-1.04%) ⬇️
src/firestore/validator.ts 80.95% <33.33%> (-7.94%) ⬇️
src/firestore/indexes-api.ts 100.00% <100.00%> (ø)
src/firestore/indexes-sort.ts 75.38% <100.00%> (+1.19%) ⬆️
src/firestore/util.ts 64.70% <100.00%> (+4.70%) ⬆️
src/emulator/auth/state.ts 84.87% <0.00%> (-0.57%) ⬇️
src/emulator/functionsEmulator.ts 7.06% <0.00%> (-0.03%) ⬇️
src/emulator/eventarcEmulatorUtils.ts 62.06% <0.00%> (ø)
src/utils.ts 67.46% <0.00%> (+0.34%) ⬆️
src/emulator/auth/server.ts 72.54% <0.00%> (+0.66%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bkendall bkendall enabled auto-merge (squash) December 6, 2022 22:43
@bkendall bkendall merged commit 27def0a into firebase:master Dec 6, 2022
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.

4 participants