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

Recipe(s): Help me identify why my /app directory is so large and reduce its size #34

Open
kmasiello opened this issue Apr 25, 2024 · 3 comments

Comments

@kmasiello
Copy link
Collaborator

Help me reduce the size of my /app directory.

  • What content / content bundles are taking the most space?
  • Help me specifically delete old pin bundles (because Applications.BundleRetentionLimit applies to all content types)
@kmasiello
Copy link
Collaborator Author

Customer feedback:

I want to delete bundles that are a certain age and over a certain size.

Example code:

library(connectapi)

con <- connect()

content_guid <- "2e6ac002-7b47-40c6-baee-59b2d5592ea7"

content <- content_item(con, guid = content_guid)

content$get_bundles()


content$bundle_delete("12")

or

from posit import connect
content_guid = "2e6ac002-7b47-40c6-baee-59b2d5592ea7"
client = connect.Client()
content = client.content.get(content_guid)
client.metrics.usage.find(content_guid=content_guid)
bundle = content.bundles.get("13")
bundle.delete()

Additionally, let's use tags to help enforce a retention policy.

  • admin creates retention level tags, e.g., "do not purge old," "keep only latest," "keep 3 versions," "keep 3 month history," "flagged for bundle purge"
  • an audit of the server using the recipe will identify bundles that will be purged and apply a "flagged for bundle purge"
  • the recipe yields a list of users, emails, and content bundle info that can be emailed to users with a warning. User can then remove the "flagged for bundle purge" tag if they need to save the history
  • after X time, the content still flagged has bundles purged

@nealrichardson
Copy link
Contributor

Related: this would be easier if there was a "get all bundles" admin endpoint, rather than having to iterate through each content item: posit-dev/posit-sdk-py#107

@kmasiello
Copy link
Collaborator Author

Additional customer feedback -- an option to archive the bundles before deletion would be nice, just in case we mess up.

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

No branches or pull requests

2 participants