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

hub: cleanup data of deleted projects #7667

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

haraldschilly
Copy link
Contributor

@haraldschilly haraldschilly commented Jul 5, 2024

Description

  • on-prem related
  • updating pg + @types/pg (because I needed a function, and typing inconsistent)
  • generic and robust bulk delete operation
  • lot's of problems with actually running tests. I hope my changes fix this for good. Hard to test for me, because locally so many tests fail.
  • new destructive actions
    • calling db.delete_syncstring for all strings of deleted projects
    • for onprem only, cleaning up various tables, where rows reference a deleted project

TODO

  • central log:
    • check collected data
    • add an entry about each unlinked and deleted project, to have a paper trail

EXTRA

"modernize" visibility and delete controls (popconfirm, switch) … text and so on are the same.

Screenshot from 2024-07-17 16-38-45

Checklist:

  • Testing instructions are provided, if not obvious
  • Release instructions are provided, if not obvious

@williamstein
Copy link
Contributor

huge +1! It'll be a good foundation for doing this better in general.

@haraldschilly haraldschilly force-pushed the delete-project-data branch 2 times, most recently from 0646bf4 to 37d39b0 Compare July 10, 2024 15:24
@haraldschilly haraldschilly force-pushed the delete-project-data branch 3 times, most recently from c725c35 to ff5f370 Compare July 11, 2024 10:10
"file_access_log",
"jupyter_api_log",
"openai_chatgpt_log",
"blobs",
Copy link
Contributor

Choose a reason for hiding this comment

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

Think twice about blobs. I would not delete the blobs.

@williamstein
Copy link
Contributor

I'm working on implementing an exam mode for courses. This must involve creating a new project per student for each exam, because it seems it is VERY important to instructors that students don't have access to the exam when the exam is over (and also temporarily don't have access to their own work). This means that the student should be removed from the exam project and their work collected when the exam ends. It would be natural at that point to delete the exam project.
However... it would also be VERY good for the instructor to have access to the TimeTravel data from the exam, which means not deleting the exam project... or at least the edit history in the database.

I understand a big point of this PR is to make it so when you delete a project, all TimeTravel edit history also gets permanently purged. I'm just trying to figure out what to do here...

No comment is needed, probably -- I just wanted to write this down.

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

Successfully merging this pull request may close these issues.

2 participants