Skip to content

feat: add limit to the number of retained snapshots and versions#1906

Merged
maidul98 merged 18 commits intomainfrom
feat/add-version-limits
Jun 12, 2024
Merged

feat: add limit to the number of retained snapshots and versions#1906
maidul98 merged 18 commits intomainfrom
feat/add-version-limits

Conversation

@sheensantoscapadngan
Copy link
Member

@sheensantoscapadngan sheensantoscapadngan commented May 31, 2024

Description 📣

  • Added a configurable limit to the number of snapshots, secret versions, and folder versions that the platform retains at a point in time
  • Created resource cleanup job to remove excess versions once a day (based on project-specific version limit configuration)
image

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@sheensantoscapadngan sheensantoscapadngan marked this pull request as ready for review May 31, 2024 17:05
@sheensantoscapadngan sheensantoscapadngan changed the title Feat/add version limits feat: add limit to the number of retained snapshots and versions May 31, 2024
Copy link
Member

@akhilmhdh akhilmhdh left a comment

Choose a reason for hiding this comment

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

Some minor changes need but working as expected on my side.

Good job @sheensantoscapadngan

akhilmhdh
akhilmhdh previously approved these changes Jun 5, 2024
Copy link
Member

@akhilmhdh akhilmhdh left a comment

Choose a reason for hiding this comment

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

@maidul98 All good for me.

But i think before merge, this needs to test with a dummy prod level dataset to ensure db lock doesn't happen

@sheensantoscapadngan
Copy link
Member Author

sheensantoscapadngan commented Jun 10, 2024

Edge case:

  • We're still storing snapshots even for deleted folders

Reason for additional scripts/handling:
image

Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

lgtm, just made some small changes

},
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
const workspace = await server.services.project.updateVersionLimit({
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: when we make this end point public, we will have to update it to return project and not workspace

@maidul98
Copy link
Collaborator

failing because not rebased, should be solved when merged

@maidul98 maidul98 merged commit d48e7ec into main Jun 12, 2024
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