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 db engine check in Experiment [Resolves #538] #539

Merged
merged 2 commits into from
Dec 6, 2018

Conversation

thcrock
Copy link
Contributor

@thcrock thcrock commented Dec 4, 2018

The experiment checks whether or not the passed-in engine is a base sqlalchemy engine, and converts it into the serializable triage engine if so.

However, this check was broken. This PR fixes it to actually duck-type,
to see if the engine can be pickled to a memory file

The experiment checks whether or not the passed-in engine is a base sqlalchemy engine, and converts it into the serializable triage engine if so.

However, this check was broken. This PR fixes it to actually duck-type,
as well as moves the check to the MultiCore so we can actually error out
if the wrong engine is passed.
@codecov-io
Copy link

codecov-io commented Dec 5, 2018

Codecov Report

Merging #539 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #539      +/-   ##
==========================================
+ Coverage   82.57%   82.59%   +0.02%     
==========================================
  Files          81       81              
  Lines        4625     4625              
==========================================
+ Hits         3819     3820       +1     
+ Misses        806      805       -1
Impacted Files Coverage Δ
src/triage/experiments/base.py 93.83% <100%> (+0.32%) ⬆️
src/triage/experiments/multicore.py 76.34% <100%> (+1.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24251dc...3c2279b. Read the comment docs.

Copy link
Member

@jesteria jesteria left a comment

Choose a reason for hiding this comment

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

nice

src/tests/test_experiments.py Outdated Show resolved Hide resolved
src/tests/test_experiments.py Outdated Show resolved Hide resolved
src/triage/experiments/multicore.py Outdated Show resolved Hide resolved
src/triage/experiments/multicore.py Outdated Show resolved Hide resolved
src/triage/experiments/multicore.py Outdated Show resolved Hide resolved
src/triage/experiments/multicore.py Outdated Show resolved Hide resolved
src/triage/experiments/multicore.py Outdated Show resolved Hide resolved
@thcrock
Copy link
Contributor Author

thcrock commented Dec 6, 2018

Made the changes from jesse's review. Since the assignee isn't here until the middle of next week, and I think I've addressed all the concerns that they brought up, and the bug this fixes is a rather onerous one for current users of Triage, I'm opting to just merge this.

@thcrock thcrock merged commit d725d2d into master Dec 6, 2018
@thcrock thcrock deleted the serializable_engine_check branch December 6, 2018 17:13
Copy link
Member

@jesteria jesteria left a comment

Choose a reason for hiding this comment

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

great!

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.

3 participants