Re: ERXMigration skipModelNames problem?
Larry Mills-Gahl <[email protected]> Fri, 23 Jan 2015 17:53:11 -0500
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
--===============6061305119048412524== Content-Type: multipart/signed; boundary="Apple-Mail=_5217DB1A-92C5-42EE-BF47-D8C81CB78FA1"; protocol="application/pgp-signature"; micalg=pgp-sha1 --Apple-Mail=_5217DB1A-92C5-42EE-BF47-D8C81CB78FA1 Content-Type: multipart/alternative; boundary="Apple-Mail=_0D15B9DB-3154-4A01-A8DE-8D41800A6525" --Apple-Mail=_0D15B9DB-3154-4A01-A8DE-8D41800A6525 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks Dennis. I thought I had a clean separation between models, but I=E2=80=99m not = ever certain that I haven=E2=80=99t done something stupid=E2=80=A6 well, = I=E2=80=99m pretty sure if there is an opportunity to do something dumb, = I=E2=80=99ll find it. Still, I have no relationships between the models (where I want one, I = use a cover method in java class) and no entity in model B inherits = anything from model A. I have not yet found where ERXMigrator thinks = that Model A has a dependency on Model B. My EO framework uses the = framework principal to make sure Model B isn=E2=80=99t in the default = model group so that shouldn=E2=80=99t be a problem=E2=80=A6 I put this in as a pull request to try to make the case that if you=E2=80=99= re explicitly saying skip this model, that should be respected and you = should be allowed to shoot yourself in the foot (if that=E2=80=99s what = the result is). It may just be the angle I=E2=80=99m looking at the problem, but the = side-effect of ignoring the skipModelNames property without explanation = is (to me) more problematic than the side effects related to not making = a dependent migration (that you=E2=80=99re explicitly asking the system = not to perform). I did insert an error log message so that this didn=E2=80=99t go by = completely silently and there is a chance to figure out where the = systems' understanding of what should happen and mine are different. Thanks for the comments. I appreciate it. Larry Mills-Gahl [email protected] > On Jan 23, 2015, at 2:52 AM, Dennis Bliefernicht = <[email protected]> wrote: >=20 > Hi, >=20 >> I=E2=80=99m working on some migrations for other models and am = finding that that model ends up in the migration queue even though it is = listed in er.migration.skipModelNames >=20 > Do you happen to have dependencies between the models, i.e. modelB = (which still should be migrated) uses entities from modelA (which is in = skipModelNames)? We noticed that in these cases modelA will still be = migrated as a dependency of modelB. >=20 >> Does anybody with more detailed knowledge of ERXMigrator see a = problem with checking skipModelNames in _buildDependenciesForModel? It = looks like that is the place where models are placed in the migrations = map and it still works after I removed the other skipModelNames checks = that I added in drilling through the stack traces. >=20 > That is actually what we ended up doing as well. On the one hand now = the property works as advertised, on the other hand you are always in = danger of having migrated to the latest version of modelB which still = will not work, because modelA is not up to date. Worse even, if they are = sitting in the same database, migrations of modelB may fail because = constraints cannot be set up properly. This change, while fine in = certain circumstances, is possibly not good enough for a generic = use-case because of these side-effects though? On the other hand, when = you=E2=80=99re using skipModelNames you=E2=80=99re probably already = somewhat aware, that you might run into issues if you=E2=80=99re not = knowing exactly, what the specific migrations do... >=20 > Greetings > Dennis > = --------------------------------------------------------------------------= ---- > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in = Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely = compliant. > = http://p.sf.net/sfu/gigenet_______________________________________________= > Wonder-disc mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wonder-disc --Apple-Mail=_0D15B9DB-3154-4A01-A8DE-8D41800A6525 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">Thanks Dennis. <div class=3D""><br class=3D""></div><div = class=3D"">I thought I had a clean separation between models, but I=E2=80=99= m not ever certain that I haven=E2=80=99t done something stupid=E2=80=A6 = well, I=E2=80=99m pretty sure if there is an opportunity to do something = dumb, I=E2=80=99ll find it. </div><div class=3D""><br = class=3D""></div><div class=3D"">Still, I have no relationships between = the models (where I want one, I use a cover method in java class) and no = entity in model B inherits anything from model A. I have not yet found = where ERXMigrator thinks that Model A has a dependency on Model B. My EO = framework uses the framework principal to make sure Model B isn=E2=80=99t = in the default model group so that shouldn=E2=80=99t be a = problem=E2=80=A6</div><div class=3D""><br class=3D""></div><div = class=3D"">I put this in as a pull request to try to make the case that = if you=E2=80=99re explicitly saying skip this model, that should be = respected and you should be allowed to shoot yourself in the foot (if = that=E2=80=99s what the result is). </div><div class=3D""><br = class=3D""></div><div class=3D"">It may just be the angle I=E2=80=99m = looking at the problem, but the side-effect of ignoring the = skipModelNames property without explanation is (to me) more problematic = than the side effects related to not making a dependent migration (that = you=E2=80=99re explicitly asking the system not to perform).</div><div = class=3D""><br class=3D""></div><div class=3D"">I did insert an error = log message so that this didn=E2=80=99t go by completely silently and = there is a chance to figure out where the systems' understanding of what = should happen and mine are different. </div><div class=3D""><br = class=3D""></div><div class=3D"">Thanks for the comments. I appreciate = it.</div><div class=3D""><br class=3D""></div><div class=3D""><div = apple-content-edited=3D"true" class=3D""> <div style=3D"color: rgb(0, 0, 0); font-family: Helvetica; font-style: = normal; font-variant: normal; font-weight: normal; letter-spacing: = normal; line-height: normal; orphans: 2; text-align: -webkit-auto; = text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = word-spacing: 0px; -webkit-text-size-adjust: auto; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " = class=3D""><div style=3D"color: rgb(0, 0, 0); font-family: Helvetica; = font-style: normal; font-variant: normal; font-weight: normal; = letter-spacing: normal; line-height: normal; orphans: 2; text-align: = -webkit-auto; text-indent: 0px; text-transform: none; white-space: = normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " = class=3D""><div class=3D"">Larry Mills-Gahl</div><div class=3D""><a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a></div><div class=3D""><br = class=3D""></div><div class=3D""><br class=3D""></div></div><br = class=3D"Apple-interchange-newline"></div><br = class=3D"Apple-interchange-newline"><br = class=3D"Apple-interchange-newline"> </div> <br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">On Jan 23, 2015, at 2:52 AM, Dennis Bliefernicht <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><meta = http-equiv=3D"Content-Type" content=3D"text/html charset=3Dutf-8" = class=3D""><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: = space; -webkit-line-break: after-white-space;" class=3D"">Hi,<div = class=3D""><br class=3D""><div class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D"">I=E2=80=99m working on some migrations for = other models and am finding that that model ends up in the migration = queue even though it is listed in <span class=3D"" style=3D"color: = rgb(47, 175, 169); font-family: Monaco; font-size: = 11px;">er.migration.skipModelNames</span></div></blockquote><div = class=3D""><br class=3D""></div><div class=3D"">Do you happen to have = dependencies between the models, i.e. modelB (which still should be = migrated) uses entities from modelA (which is in skipModelNames)? We = noticed that in these cases modelA will still be migrated as a = dependency of modelB.</div><div class=3D""><br class=3D""></div><div = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">Does = anybody with more detailed knowledge of ERXMigrator see a problem with = checking skipModelNames in _buildDependenciesForModel? It looks like = that is the place where models are placed in the migrations map and it = still works after I removed the other skipModelNames checks that I added = in drilling through the stack traces. </div></blockquote><div = class=3D""><div class=3D""><br class=3D""></div></div><div class=3D"">That= is actually what we ended up doing as well. On the one hand now the = property works as advertised, on the other hand you are always in danger = of having migrated to the latest version of modelB which still will not = work, because modelA is not up to date. Worse even, if they are sitting = in the same database, migrations of modelB may fail because constraints = cannot be set up properly. This change, while fine in certain = circumstances, is possibly not good enough for a generic use-case = because of these side-effects though? On the other hand, when you=E2=80=99= re using skipModelNames you=E2=80=99re probably already somewhat aware, = that you might run into issues if you=E2=80=99re not knowing exactly, = what the specific migrations do...</div><div class=3D""><br = class=3D""></div><div class=3D"">Greetings</div><div = class=3D"">Dennis</div></div></div></div></div>---------------------------= ---------------------------------------------------<br class=3D"">New = Year. New Location. New Benefits. New Data Center in Ashburn, VA.<br = class=3D"">GigeNET is offering a free month of service with a new server = in Ashburn.<br class=3D"">Choose from 2 high performing configs, both = with 100TB of bandwidth.<br class=3D"">Higher redundancy.Lower = latency.Increased capacity.Completely compliant.<br class=3D""><a = href=3D"http://p.sf.net/sfu/gigenet_______________________________________= ________" = class=3D"">http://p.sf.net/sfu/gigenet____________________________________= ___________</a><br class=3D"">Wonder-disc mailing list<br = class=3D"">[email protected]<br = class=3D"">https://lists.sourceforge.net/lists/listinfo/wonder-disc<br = class=3D""></div></blockquote></div><br class=3D""></div></body></html>= --Apple-Mail=_0D15B9DB-3154-4A01-A8DE-8D41800A6525-- --Apple-Mail=_5217DB1A-92C5-42EE-BF47-D8C81CB78FA1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJUwtDYAAoJEH6+KDQxPmwvnVEH/08ZOBKO2nIGCDB/soG3v6Ic IlCjBcHM+IsXIvSan7Vi1xHMkpcwdu6/a4ITix8cL++9l1y3gz+5LEk0VDgL695n SwScFEt/nmNfuM017RuBF2AjQA9DPSDjMAr3jWax1xB9p3HSpJGIQobcwD9ylDMl V0vIKxtxwlNpy9ToGD7pzAB0MGs8Oqr34y8ApNy6hAJIvrBuUZMHsC+tF6hU2iVy 0VxcAcnWruCp7UudBt0MJJeEvBksei89EfxysxKG0F+4ISSI5wfqvOKQJ2Fh8WOX cZdccnulKZOsV6V9Glfja/QYej+pLF6dHgV+z8KZE20A5mnHfv328aEzy0PNxn4= =3zyi -----END PGP SIGNATURE----- --Apple-Mail=_5217DB1A-92C5-42EE-BF47-D8C81CB78FA1-- --===============6061305119048412524== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet --===============6061305119048412524== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Wonder-disc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wonder-disc --===============6061305119048412524==--