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

increase Request.prof_file max_length to 300 #203

Merged
merged 1 commit into from
Aug 1, 2017

Conversation

smcoll
Copy link
Contributor

@smcoll smcoll commented Jul 31, 2017

references #201

@smcoll
Copy link
Contributor Author

smcoll commented Jul 31, 2017

i guess that technically, this doesn't fix the underlying issue of #201, but rather kicks the can down the road. It's still possible that a DataError would be raised, and the profiler results not saved to the db, if the path is too long. And it's not immediately apparent from the traceback why that is.

@avelis
Copy link
Collaborator

avelis commented Aug 1, 2017

@smcoll Could you add a small test for this change when you have a moment? I saw the failure and it's fine. It's just a precision error.

@smcoll
Copy link
Contributor Author

smcoll commented Aug 1, 2017

@avelis a test which asserts that the path can be up to a certain length?

@avelis
Copy link
Collaborator

avelis commented Aug 1, 2017

@smcoll A test can assert the length or the failure if going past 300. Nothing to fancy

@smcoll
Copy link
Contributor Author

smcoll commented Aug 1, 2017

@avelis what is the ideal behavior if the path is too long, or if the file can't be saved?

@avelis
Copy link
Collaborator

avelis commented Aug 1, 2017

@smcoll That raises a good question.
A couple options:

  1. Graceful handling when a DatabaseError does occur.
  2. If not able to gracefully handle at least an informative traceback to help users know why the save failed.

However, I feel that introduces new/different scope into this PR. If you prefer, I can merge it in as is without issue.

Thoughts?

@smcoll
Copy link
Contributor Author

smcoll commented Aug 1, 2017

@avelis that seems reasonable to me. The underlying issue about how to handle a file storage failure is not addressed in this PR, so i changed the description to relate to but not fix the issue. A PR which actually changes the behavior of the app to handle storage failures seems like a better candidate for new tests.

@avelis avelis merged commit bdf2cdb into jazzband:master Aug 1, 2017
@avelis
Copy link
Collaborator

avelis commented Aug 1, 2017

@smcoll Thanks for the contribution! I appreciate it.

smcoll added a commit to smcoll/silk that referenced this pull request Aug 1, 2017
smcoll added a commit to smcoll/silk that referenced this pull request Aug 1, 2017
avelis pushed a commit that referenced this pull request Aug 8, 2017
* move ProfilerResultStorage to own module to resolve import

* use SilkyConfig for SILKY_STORAGE_CLASS

* terse storage definition

* didn't mean to reorder imports

* increase Request.prof_file max_length to 300 (#203)

* test default storage class
danielbradburn pushed a commit to crunchr/silk that referenced this pull request Dec 8, 2017
danielbradburn pushed a commit to crunchr/silk that referenced this pull request Dec 8, 2017
* move ProfilerResultStorage to own module to resolve import

* use SilkyConfig for SILKY_STORAGE_CLASS

* terse storage definition

* didn't mean to reorder imports

* increase Request.prof_file max_length to 300 (jazzband#203)

* test default storage class
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