pages-core icon indicating copy to clipboard operation
pages-core copied to clipboard

Add ability to delete a specific published branch from S3

Open jseppi opened this issue 7 years ago • 8 comments

Description of feature or bug

User should be able to use the Federalist site to delete files (off of S3) from a specific published branch.

We store lots of old published branch previews, especially for older or very active Federalist sites like doi-extractives-data/18f.gsa.gov/etc.

I envision this would go in the Actions column of the table on the the "Uploaded files" view.

Perhaps the live branch and demo branch should disallow this action, for user safety.

Definition of done

  • API route to delete published files for specific branch
  • UI to delete files for specific branch
  • Prevent deletions from live and demo branches (maybe?)

After evaluating, edit this part:

Level of effort - <low/medium/high>

Implementation outline (if higher than "low" effort):

jseppi avatar Feb 15 '18 17:02 jseppi

Maybe the action would just delete all old S3 files from all branches no longer in GitHub?

wslack avatar Feb 16 '18 23:02 wslack

That's maybe a little more complex (since we'd have to first check GitHub), but also doable. Hatchet vs scalpel situation, I guess. I'm not sure which would be better/more useful to be honest.

jseppi avatar Feb 20 '18 14:02 jseppi

@el-mapache welcome your opinion here!

I think we should add the option in the S3 page - not in the Github pages. Later, we can add on a "mass cleanup" feature.

wslack avatar Mar 08 '18 18:03 wslack

Although it is more work I think a bulk delete would be pretty useful — it feels a little nicer that making users comb through each branch on Federalist and delete them.

One area where I think it might be super helpful is a site with a lot of shared users. By only exposing a button that deletes branches no longer on GitHub, it ensures that users aren't accidentally deleting preview branches they shouldn't be.

el-mapache avatar Mar 08 '18 20:03 el-mapache

True. My use case was more about if a branch was pushed with some files that shouldn't be public. Should we have the feature include both?

wslack avatar Mar 08 '18 22:03 wslack

It seems like we all have different use cases in mind, in mind be worth enumerating all of them and then writing a couple of different tickets to encapsulate smaller pieces of the work. I can see this feature getting out of hand fast.

el-mapache avatar Mar 09 '18 14:03 el-mapache

👍 let me see if I can list them:

  1. As a user who just published something I shouldn't have on GitHub, I need to remove records of it from Federalist.

  2. As a site owner with a lot of old content from my site build in S3, I want to do a mass clean up. (but not touch any recent builds or my live/demo sites)

  3. As a site owner with some old content from my site in S3, I want to do a targeted clean up.

  4. As a site owner with only a few active branches, I want to be able to clean up all of the data in S3 from branches I've deleted.

This sound right?

wslack avatar Mar 09 '18 23:03 wslack

Rework to create documentation for requesting support to scrub a site's branch.

apburnes avatar Sep 29 '22 19:09 apburnes