Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Support delete/archive jobs #4453

Closed
scarlett2018 opened this issue Apr 26, 2020 · 5 comments
Closed

Support delete/archive jobs #4453

scarlett2018 opened this issue Apr 26, 2020 · 5 comments

Comments

@scarlett2018
Copy link
Member

This ticket is not for the current release but for a future support.

Scenario
As an OpenPAI user, I could permanent delete (clean up) some of my jobs to get rid of not in use jobs. After deletion, no one can restore this jobs. User need to confirm before the deletion.

As an Administrator, I could able to archive some bad job to clean up the view for all the users. After archive, the jobs are disappeared from job list and search views, but accessible from the job url (as archived read only job). Admin and user may or may not able to restore this jobs (to be decides, comments are welcomed here).

@LiFang-Shaiic
Copy link

We need admin user can delete some testing jobs. On developing some features in our platform based on OpenPAI, we need get the job list. If admin user cannot delete those useless jobs, the list of jobs that we get by API will be so long. And it seems that too many jobs will impact the performance of OpenPAI.

@mydmdm
Copy link
Contributor

mydmdm commented Apr 27, 2020

@LiFang-Shaiic Here are work arounds for admin

@mydmdm
Copy link
Contributor

mydmdm commented Jun 21, 2020

The archive of jobs is planned to be supported in the following releases

@hzy46
Copy link
Contributor

hzy46 commented Aug 4, 2020

Support job archive (only Completed jobs can be archived, cannot unarchive job):

  • Add rest-server interface:
    • PUT /jobs/{user}~{job}/archive
      • Admin can archive any job; non-admin user can only archive his own job.
      • Only completed job can be archived. If job is not a completed job, return 400 Bad Request.
      • If the job cannot be found, return 404 not found.
      • If job is successfully archived, return 202 Accepted.
      • If other error happens, return 500.
  • Add write-merger interface
    • PUT /archiveFramework/:frameworkName
      • Only completed job can be archived. If job is not a completed job, return 400 Bad Request.
      • If the job is not found, return 404 not found.
      • If job is successfully archived, return 200 OK.
      • If other error happens, return 500.
  • Change rest-server list job api:
    • support to include archived jobs or not. Default is not to include archived jobs

@suiguoxin
Copy link
Member

This feature can be realized by using job-tagging. Users can add a tag archived to the jobs.

Please refer to #4853

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

Successfully merging a pull request may close this issue.

5 participants