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

workflow_run_manager: fix workflow stop #250

Merged
merged 3 commits into from
Sep 3, 2019

Conversation

diegodelemos
Copy link
Member

@diegodelemos diegodelemos commented Sep 2, 2019

No description provided.

@diegodelemos diegodelemos added this to In progress in Physics-Examples-Summer-2019 via automation Sep 2, 2019
@diegodelemos diegodelemos force-pushed the 314-stop-workflow-fix branch 3 times, most recently from 6a6a731 to d1f81e1 Compare September 2, 2019 13:56
@diegodelemos diegodelemos moved this from In progress to Review in progress in Physics-Examples-Summer-2019 Sep 2, 2019
* We were trying to delete Job IDs which didn't exist in Kubernetes.
  To fix this a new method has been added to resolve the REANA IDs
  to backend IDs, which will be helpful once we implement stop
  for HTCondor jobs (closes reanahub/reana-client#314).
Physics-Examples-Summer-2019 automation moved this from Review in progress to Reviewer approved Sep 2, 2019
Copy link

@dprelipcean dprelipcean left a comment

Choose a reason for hiding this comment

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

LGTM:

(reana) dprelipc@daniel-main:~/project/reana/reana-demo-helloworld$ reana-client status -w workflow.1
/home/dprelipc/.virtualenvs/reana/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
NAME       RUN_NUMBER   CREATED               STATUS    PROGRESS
workflow   1            2019-09-02T16:48:37   running   0/1     
(reana) dprelipc@daniel-main:~/project/reana/reana-demo-helloworld$ reana-client stop -w workflow.1
Graceful stop not implement yet. If you really want to stop your workflow without waiting for jobs to finish use: --force option
Aborted!
(reana) dprelipc@daniel-main:~/project/reana/reana-demo-helloworld$ reana-client stop --force -w workflow.1
/home/dprelipc/.virtualenvs/reana/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
workflow.1 has been stopped
(reana) dprelipc@daniel-main:~/project/reana/reana-demo-helloworld$ reana-client status -w workflow.1
/home/dprelipc/.virtualenvs/reana/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
NAME       RUN_NUMBER   CREATED               STATUS    PROGRESS
workflow   1            2019-09-02T16:48:37   stopped   0/1 
`

@@ -293,15 +303,15 @@ def stop_interactive_session(self):
current_db_sessions.add(self.workflow)
current_db_sessions.commit()

def stop_batch_workflow_run(self, workflow_run_jobs=None):
def stop_batch_workflow_run(self):
"""Stop a batch workflow run along with all its dependent jobs.

:param workflow_run_jobs: List of active job id's spawned by the
workflow run.
"""

Choose a reason for hiding this comment

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

docs: remove workflow_run_jobs as it's not needed anymore

Diego Rodriguez added 2 commits September 3, 2019 11:42
* WorkflowRunManger can determine which jobs to delete by itself.
* pytest-reana declares as dependency `mock>=2` and Travis installs
  2.0 instead of lasted one (3.x). To be removed once we upgrade the
  `mock` version in pytest-reana.
@diegodelemos diegodelemos merged commit 4031516 into reanahub:master Sep 3, 2019
Physics-Examples-Summer-2019 automation moved this from Reviewer approved to Done Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants