Skip to content

Add versioning for accidental modification control#1944

Open
ValentaTomas wants to merge 10 commits intomainfrom
storage-versioning
Open

Add versioning for accidental modification control#1944
ValentaTomas wants to merge 10 commits intomainfrom
storage-versioning

Conversation

@ValentaTomas
Copy link
Member

@ValentaTomas ValentaTomas commented Feb 19, 2026

Note

Medium Risk
Changes GCS bucket versioning and lifecycle policies, which can affect retention, costs, and recoverability if misconfigured. Scope is limited to the fc_template_bucket resource but impacts production storage behavior.

Overview
Enables object versioning on the fc_template_bucket and adds a lifecycle rule to delete non-current (archived) object versions immediately, relying on the existing 10-day soft_delete_policy to provide a recovery window (with send_age_if_zero = false as a provider workaround). Review that the immediate noncurrent-version deletion plus versioning doesn’t unintentionally shorten retention expectations or increase storage/operations costs due to additional versions being created.

Written by Cursor Bugbot for commit e59d228. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

condition {
# Delete non-current versions immediatelly.
# This triggers the soft-delete policy, so objects are then deleted after another 10 days.
days_since_noncurrent_time = 0
Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is better to immediately delete the noncurrent (modified/deleted objects when versioning is enabled), because then we can see all the modified/deleted in one place as opposed to having it split between noncurrent+live and soft deleted views, which could get confusing if we are trying to restore things.

@ValentaTomas
Copy link
Member Author

I'm waiting to check if the noncurrent object gets soft deleted after some unspecified time as even with 0 the deletion does not seem to be instant.

@jakubno
Copy link
Member

jakubno commented Feb 22, 2026

I'm waiting to check if the noncurrent object gets soft deleted after some unspecified time as even with 0 the deletion does not seem to be instant.

Any update here?

@ValentaTomas
Copy link
Member Author

After cca day and something it correctly moved all noncurrent to the soft delete.

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.

3 participants