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

Fix activity.rerun not working on retried tasks #295

Open
jbbarth opened this issue Sep 1, 2017 · 0 comments
Open

Fix activity.rerun not working on retried tasks #295

jbbarth opened this issue Sep 1, 2017 · 0 comments
Assignees

Comments

@jbbarth
Copy link
Collaborator

jbbarth commented Sep 1, 2017

If task1 fails once, and is retried, you get two activities in the history: one scheduled at event ID "153" for instance, and the retry scheduled at event ID "159". Running simpleflow activity.rerun on the first task doesn't work, you'll get something like:

2017-09-01T14:30:24 INFO [process=MainProcess, pid=10692]: Found execution: workflowId=analysis_131427 runId=22yTLsUqa8MmcCYBUpoRdG3wKHr4lGgJ7Mal/e/FotamU=
Traceback (most recent call last):
  File "/usr/local/bin/simpleflow", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/simpleflow/command.py", line 655, in activity_rerun
    history, scheduled_id=scheduled_id, activity_id=activity_id, input=input_override,
  File "/usr/local/lib/python2.7/dist-packages/simpleflow/swf/helpers.py", line 117, in find_activity
    raise ValueError("Couldn't find activity.")
ValueError: Couldn't find activity.

This is because simpleflow (or swf?) history removes the retries and only leaves the last activity for a given activity ID. This is a rough guess based on 3 mins of digging in the code, the issue might be a bit more subtle.

To be fixed next week!

@jbbarth jbbarth self-assigned this Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant