-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[IMP][9.0] base_external_dbsource: Refactor & Split by source #642
[IMP][9.0] base_external_dbsource: Refactor & Split by source #642
Conversation
5f76e8f
to
f8781ae
Compare
39a70a6
to
c7d49c8
Compare
Alright I'm done here. Not sure what's up with Runbot - it's acting like it's not installing the FDB from requirements.txt, but the error isn't replicating on Travis. I'll probably have to look more into that, but this can be reviewed with that & the license change #637 in mind. |
a1abeea
to
1ee71c9
Compare
* Add concept of multiple connection strings for one source (multiple nodes) | ||
* Add a ConnectionEnvironment that allows for the reuse of connections | ||
* Message box should be displayed instead of error in ``connection_test`` | ||
* Remove old api compatibility layers (v11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add CRUD interface (use Elasticsearch module additions as template)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented - still needs tests
3f3fbb7
to
db0f84f
Compare
adf373b
to
59f0362
Compare
Alright this is good to review; now including a fancy new CRUD interface if adapters should choose to implement them & rebased on 9.0 to fix requirements conflict. |
59f0362
to
f896764
Compare
* Heavily refactor code for reusability * Split all sources into independent modules * Add more test coverage * Add CRUD methods
f896764
to
06b22d3
Compare
Rebased now that dependency is merged |
@t3ddftw please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
My review items are all just spelling :p
server-tools/issues/new?body=module:%20 | ||
base_external_dbsource%0Aversion:%20 | ||
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/smashing/smash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of the template, and while I do agree the wording needs to be changed, it is out of scope here. Proposing a change to the template for this is something I've been meaning to do, you're welcome to as well - https:/OCA/maintainer-tools/blob/master/template/module/README.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertEqual(res, adapter()) | ||
|
||
def test_remote_browse_asserts_current_table(self): | ||
""" It should raise AssertionError if a table not selected """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/if a table not/if a table is not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(you can save yourself some effort and just tell me to apply X change to all instances)
self.assertEqual(res, adapter()) | ||
|
||
def test_remote_create_asserts_current_table(self): | ||
""" It should raise AssertionError if a table not selected """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/table not/table is not
self.assertEqual(res, adapter()) | ||
|
||
def test_remote_delete_asserts_current_table(self): | ||
""" It should raise AssertionError if a table not selected """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/table not/table is not
self.assertEqual(res, adapter()) | ||
|
||
def test_remote_search_asserts_current_table(self): | ||
""" It should raise AssertionError if a table not selected """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/table not/table is not
self.assertEqual(res, adapter()) | ||
|
||
def test_remote_update_asserts_current_table(self): | ||
""" It should raise AssertionError if a table not selected """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/table not/table is not
import logging | ||
|
||
from openerp import api | ||
from openerp import models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Condense this to a single line, IMO.
|
||
|
||
class BaseExternalDbsource(models.Model): | ||
""" It provides logic for connection to an Firebird data source. """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/an/a
|
||
Bugs are tracked on `GitHub Issues <https:/OCA/server-tools/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/smashing/smash
Thanks for the review @t3ddftw - most points fixed, some responded to. |
* Move libraries that require development headers to travis file to band-aid build
Added build fix for OCA/maintainer-quality-tools#427 |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
This is a refactoring of the
base_external_dbsource
module, hopefully allowing for easier addition and more isolation of the independent data sources.Note that all adapter modules are
auto_install
toTrue
in order to not break existing installations while still allowing for the modules to be split logically. In v11 we can then add the proper Python depends, which are already in the manifests but commented out.Due to the above note, I also had to submit all of the modules in one PR. Separating them will break things horribly. Sorry for the gigantic PR
Depends: