lanl / BEE

Other
13 stars 3 forks source link

Issue700/remove archive workflows #774

Closed pagrubel closed 4 months ago

pagrubel commented 5 months ago

Add beeflow remove command to remove Archived or Cancelled workflows.

This PR addresses #700

kchilleri commented 4 months ago

This remove command works for me. However, I have two things to note:

  1. An archived workflow is successfully removed from /.beeflow/workflows but its wf_id.tgz remains in /.beeflow/archives. Should this file be permanently removed as well?
  2. After successfully removing an archived workflow and running a beeflow query already_removed_wf_id outputs an error with the WFM and produces an error log. Should we print a "workflow with already_removed_wf_id does not exist" error instead?
pagrubel commented 4 months ago

@kchilleri I'll check out your comments and see if changes should be done! Thanks for looking at it.

pagrubel commented 4 months ago

@kchilleri I could not duplicate the error you got. This is what I did:

Name    ID  Status
clamr-example   e81af8  Archived
clamr-example   efbca7  Archived
(hpc-beeflow-py3.11) pagrubel@darwin-fe2 BEE$ beeflow remove ef
Workflow Status is Archived
All stored information for workflow efbca7 will be removed.
Continue to remove? yes(y)/no(n): y
Workflow removed!
(hpc-beeflow-py3.11) pagrubel@darwin-fe2 BEE$ beeflow query ef
Match_short_id: Provided workflow ID does not match any submitted workflows
(hpc-beeflow-py3.11) pagrubel@darwin-fe2 BEE$ 

Could you paste what you get?

kchilleri commented 4 months ago

@pagrubel This is what I got the first time I tried it.

(hpc-beeflow-py3.9) (base) [kchilleri@darwin-fe3 BEE]$ beeflow list
Name    ID  Status
example1    e8d046  Archived
(hpc-beeflow-py3.9) (base) [kchilleri@darwin-fe3 BEE]$ beeflow remove e8d046
Workflow Status is Archived
All stored information for workflow e8d046 will be removed.
Continue to remove? yes(y)/no(n): y
Workflow removed!
(hpc-beeflow-py3.9) (base) [kchilleri@darwin-fe3 BEE]$ beeflow list
There are currently no workflows.
(hpc-beeflow-py3.9) (base) [kchilleri@darwin-fe3 BEE]$ beeflow query e8d046
There are currently no workflows.
An error occurred with the WFM. Please save your workflow and the
error log "bee-error-1708463635.log". If possible, please report this
to the BEE development team.

I'll try again!

pagrubel commented 4 months ago

@kchilleri Okay I get the error now when there are no more workflows.

pagrubel commented 4 months ago

@kchilleri Great catch that error occurred for any of several methods in bee_client. Both issues should be fixed now.