Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Aug 2010 at 15:50 UTC
Updated:
3 Jan 2014 at 02:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damien tournoud commentedCritical because of the use of API functions which result depend on the list of modules being enabled.
Comment #2
damien tournoud commentedFirst shot at this, with the critical part only (calling API functions that rely on the list of enabled modules).
This depends on #898520: Clean-up the upgrade path: comment and as a consequence will not pass the test bot.
Comment #3
damien tournoud commentedNo, we actually need to set the widget too.
Comment #4
webchickMarking "needs review" for testbot.
I'm not sure I agree that these are critical unless they're known to cause an actual bug in the wild.
Comment #6
damien tournoud commentedLatest version of this patch.
Comment #7
damien tournoud commentedAnd fixing a bug in the etid allocation.
Comment #8
dboulet commentedComment #10
int commented#7: 898558-upgrade-cleanup-node.patch queued for re-testing.
Comment #12
damien tournoud commentedReroll now (that part of) the comment patch is in.
Adopt versioning in the same manner as the other.
Comment #13
aspilicious commentedComment #14
David_Rothstein commentedI don't think this is critical (see @webchick's comment above). Mostly looks like a good cleanup, though.
The above gives me pause, though. The existing code was already something of an update-specific hack, and now we are replacing it with a whole duplicate function that is also update-specific? As far as I know, there is no core code that would break if field_sql_storage_field_storage_write() is called during the update - is that correct? And our UPGRADE.txt instructions already tell people to disable all contrib modules on their site before running the D6->D7 upgrade.... so contrib modules shouldn't have a chance to respond to these hooks anyway, and thus, nothing will break there either.
I think we should tread carefully before adding too many of these update-specific duplicate functions to core. They are sometimes necessary, but perhaps we should make sure that each one definitely is necessary before adding it.
Comment #15
damien tournoud commentedUpgrade path clean-up issues have to happen *before* beta, as a consequence it's critical to discuss about them right now.
Comment #16
damien tournoud commentedReroll after the latest patches in #898520: Clean-up the upgrade path: comment.
Not marking at needs review, because it depends on the other patch.
Comment #17
sunWhat does this mean? Can we clarify that comment?
Powered by Dreditor.
Comment #18
int commentedthe #898520: Clean-up the upgrade path: comment goes in.
Comment #19
chx commented@17, yes
Comment #20
sunSorry, but I'm still uncertain about what these comments are effectively trying to teach me.
- It looks like the functions can be "invalid" (probably rather their usage, not the function itself), but it's not entirely clear when it's valid and when it's invalid.
- I guess I get that I should not be using those helpers prior to reaching the stated schema version. Does my code have to implement hook_update_dependencies() to actually enforce and ensure this?
- It's not clear to me whether the helper functions are still valid after the stated schema versions. The current commment makes it sound as if they would be only valid for 7000 and only valid for exactly that schema version, not more, not less. I guess that isn't the intended meaning, but honestly, I don't know, because I didn't work on these issues and didn't come to the conclusion that we require those helpers.
Powered by Dreditor.
Comment #21
damien tournoud commentedThis fixes important issues in the upgrade path, and as a consequence is a beta-blocker.
Comment #22
int commentedthis is the last beta blocker..
Comment #23
juan_g commentedint wrote:
> this is the last beta blocker..
Not yet. I was also following the beta blocker tag, but I think the beta blocker list at Drupal core improvements has precedence over the tag, and some critical upgrade issues were added to the list a few days ago.
Even more beta blockers would be added according to a strict interpretation of the criteria mentioned on the list. Details could be discussed at Criteria for Drupal 7 beta?
Comment #24
ksenzeeThe update function changes and the new helpers look good. My only comments are about the comments. I'm quite convinced we need these new helpers, but they're a totally new idea, and they need as clear an explanation as we can come up with.
I agree with sun this could be clearer. Maybe something like "This function can be used for databases whose schema matches field module version 7000."
Another possibility is ..."is at field module version 7000 or higher." The "or higher" part is a bit dangerous, because we'd have to revisit it if we change the schema before we dump the update system in D8. But I bet that doesn't happen.
Instead of the sentence starting "So this function needs to exist..." I might say "This function exists solely to set the schema version to 7000." But if anyone disagrees I won't insist - it's probably fine as is.
At any rate, these are small nitpicks, and I'll RTBC a reroll.
Powered by Dreditor.
Comment #25
ksenzeeOh, and yes, ideally you would implement hook_update_dependencies to make sure field_sql_storage is at 7000 before using these helpers. But since the field system is new, and will be in place before your updates run, it doesn't really matter.
Comment #26
catch"7000 or higher" works for me. It's like saying Windows 3.1 or later, you know eventually it's going to be invalid.
Comment #27
ksenzeeOkay, I rerolled it myself, with changes only to the comments (which you can see in the attached interdiff). Hopefully they clarify what's going on with the update helpers.
Comment #28
ksenzeeI'm going to be a pain in the rear and RTBC this even though I did the last reroll. I didn't touch the code, which is the important part here, and it is ready to go.
Comment #29
dries commentedCommitted to CVS HEAD. Thanks.