Skip to content

Traceback histories - #130

Merged
sylvinus merged 9 commits into
masterfrom
traceback_histories
Sep 30, 2016
Merged

Traceback histories#130
sylvinus merged 9 commits into
masterfrom
traceback_histories

Conversation

@Pauleuh

@Pauleuh Pauleuh commented Sep 21, 2016

Copy link
Copy Markdown
Contributor
  • Saving successive errors to a job in an array under the key "traceback_histories".
  • This is useful in order to debug retrying jobs.
  • Feature + tests included.

@sylvinus sylvinus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cool PR! Minor comments

Comment thread mrq/config.py Outdated
# If we were given another config file, use it
print "hello"
print file_path
print from_args.get("config")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

print

Comment thread mrq/config.py Outdated
config_file = file_path
elif from_args.get("config"):
config_file = from_args.get("config")
print config_file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

print

Comment thread mrq/job.py Outdated
import encodings
import copy_reg
from . import context
from mrq.context import get_current_config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

context is imported right before, could you use context. get_current_config instead to avoid the double import?

Comment thread tests/tasks/general.py Outdated

def run(self, params):

print get_config()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

print

Comment thread tests/tasks/general.py Outdated
import json
import time
import copy
from mrq.config import get_config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to be removed?

Comment thread mrq/job.py
new_history = {
"date": failure_date,
"status": status,
"exceptiontype": job_exc.__name__

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

saving the worker ID would be great too. (get_current_worker(), which may return None)

Comment thread tests/test_retry.py
"path": "tests.tasks.general.RetryOnFailed"})[0]

print job["traceback_history"]
assert len(job["traceback_history"]) == 2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would be great here to test the order of the tracebacks too

@sylvinus

Copy link
Copy Markdown
Contributor

Should we patch the dashboard in the same PR to display all the tracebacks?

@Pauleuh

Pauleuh commented Sep 22, 2016

Copy link
Copy Markdown
Contributor Author

@sylvinus I fixed the small problems + added the front part.

@sylvinus
sylvinus merged commit 073fc41 into master Sep 30, 2016
@sylvinus

Copy link
Copy Markdown
Contributor

Good job!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants