Merge lp://staging/~fabien-morin/unifield-server/fm_whitelist_model into lp://staging/unifield-server

Proposed by Fabien MORIN
Status: Rejected
Rejected by: jftempo
Proposed branch: lp://staging/~fabien-morin/unifield-server/fm_whitelist_model
Merge into: lp://staging/unifield-server
Diff against target: 320 lines (+133/-102)
4 files modified
bin/addons/sync_client/ir_model_data.py (+3/-5)
bin/addons/sync_client/orm.py (+4/-4)
bin/addons/sync_common/common.py (+125/-92)
bin/addons/sync_server/rules.py (+1/-1)
To merge this branch: bzr merge lp://staging/~fabien-morin/unifield-server/fm_whitelist_model
Reviewer Review Type Date Requested Status
Jeff Allen (community) Needs Fixing
jftempo Pending
Review via email: mp+306210@code.staging.launchpad.net

Description of the change

I reversed the way of managing synchronization models lists :
now only the model related to synchronization are listed, the other (not listed
are ignored).

This imply that you need to add in this list the new models you want to
synchronize.

To post a comment you must log in.
Revision history for this message
Jeff Allen (jr.allen) wrote :

I get nervous seeing tables of code that need to stay in sync with tables in CSV files.

Can one be derived from the other? Can there be a test that confirms that they have not diverged? The DRY Principle applies here...

review: Needs Fixing
Revision history for this message
Jeff Allen (jr.allen) wrote :

Sorry, I didn't mean to put the "needs fixing" thing, but I can't figure out how to remove it.

Revision history for this message
Fabien MORIN (fabien-morin) wrote :

There is no CSV file involed just a dict. Before this branch, all models that don't need to use sync where listed here. But many times some models were created and there where not added in this list (done through forgetfulness, I supposed). This result in creation of sdref for objects that don't need it, making the creation of this objects themselves much slower for nothing. I discover this problem during the performance improvement process.

The idea beside this change is to reverse the list by listing only the models that need a sdref.

The new hardcoded list has not been written by hand but generated by script I written for that purpose. So it should ends up with exactly the same result. To be sure, I already launch all our unit tests with this branch without any problems. Once testfield is woking again, I can also launch all the testfield tests to check that nothing is broken. But as this list has been generated, there should not be any surprise.

Revision history for this message
Jeff Allen (jr.allen) wrote :

According to the comment in the code, your script takes the sync rules (in the form of a CSV) as input, then creates this dict as output.

When the sync rules change to include some new model, this dict will become out of date. There will be no automatic way for the next developer to (1) know that's happening, and (2) find the script in your home directory and run it.

This is why I think that derived data needs to have the generating script checked in with it, and should be tested that it is not out of date. It need not be generated automatically, but there should be something that says, "hey, this is wrong, come look at it!"

3909. By Fabien MORIN

[MERGE] with latest trunk

3910. By Fabien MORIN

[FIX] remove all other changes and keep only r3907 and r3908

3911. By Fabien MORIN

[REVERT] previous commit (due to a bad merge)

Unmerged revisions

3911. By Fabien MORIN

[REVERT] previous commit (due to a bad merge)

3910. By Fabien MORIN

[FIX] remove all other changes and keep only r3907 and r3908

3909. By Fabien MORIN

[MERGE] with latest trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches