Skip to content

Fix resources being deleted from Firestore on update#30272

Merged
rosstimothy merged 1 commit into
masterfrom
tross/firestore_expiry
Aug 10, 2023
Merged

Fix resources being deleted from Firestore on update#30272
rosstimothy merged 1 commit into
masterfrom
tross/firestore_expiry

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

The change to use Update in #28473 caused a 0 value to be written to the expires field of the document. When using Create or Set a zero expiry value would result in an empty expires field for that document. Now that the expires column was containing a 0 value the purgeExpiredDocuments loop was detecting the document as needing to be removed. To prevent removing resources that have no expiry the purge loop now explicitly ignores any resources that have a 0 expiry value.

Fixes #30236

The change to use `Update` in #28473 caused a 0 value to be written
to the expires field of the document. When using `Create` or `Set`
a zero expiry value would result in an empty expires field for that
document. Now that the expires column was containing a 0 value the
purgeExpiredDocuments loop was detecting the document as needing
to be removed. To prevent removing resources that have no expiry
the purge loop now explicitly ignores any resources that have a 0
expiry value.

Fixes #30236
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from camscale August 10, 2023 15:14
@rosstimothy rosstimothy enabled auto-merge August 10, 2023 15:18
@rosstimothy rosstimothy added this pull request to the merge queue Aug 10, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 10, 2023
@rosstimothy rosstimothy added this pull request to the merge queue Aug 10, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 10, 2023
@rosstimothy rosstimothy added this pull request to the merge queue Aug 10, 2023
Merged via the queue into master with commit 6bdec42 Aug 10, 2023
@rosstimothy rosstimothy deleted the tross/firestore_expiry branch August 10, 2023 17:02
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rosstimothy See the table below for backport results.

Branch Result
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teleport Local Users being removed

4 participants