As per the lengthy discussion in #1216094: We call too many things 'language', clean that up calling language objects and language codes as well as other things language in the API/schema is very misleading. The process we choose there is to convert all language code APIs and schema elements to langcode for consistency. So this issue would involve changing the language.language column to be language.langcode. Should be implemented as a followup to #1301040: Move language listing functionality from locale.module to a new language.module. Marking as postponed for that.

Other objects like nodes, fields and path aliases are converted in related issues. See a full issue list for this conversion at http://drupal.org/project/issues/search/drupal?issue_tags=langcode

CommentFileSizeAuthor
#84 1357918-82.patch226.4 KBno_commit_credit
#84 interdiff.txt2.04 KBno_commit_credit
#78 1357918-78.patch226.81 KBGábor Hojtsy
#75 1357918-75.patch226.82 KBGábor Hojtsy
#72 1357918-72.patch226.22 KBGábor Hojtsy
#69 1357918-69.patch8.02 KBswentel
#66 drupal8.language-langcode-update.66.patch48.96 KBswentel
#62 drupal8.language-langcode-update.62.patch48.29 KBswentel
#60 drupal8.language-langcode-update.55.pass_.patch48.58 KBGábor Hojtsy
#55 drupal8.language-langcode-update.55.pass_.patch48.59 KBGábor Hojtsy
#55 drupal8.language-langcode-update.55.fail_.patch45.43 KBGábor Hojtsy
#52 drupal8.language-langcode-update.52.fail_.patch44.32 KBGábor Hojtsy
#52 drupal8.language-langcode-update.52.pass_.patch47.48 KBGábor Hojtsy
#50 drupal8.language-langcode-update.50.fail_.patch44.32 KBGábor Hojtsy
#50 drupal8.language-langcode-update.50.pass_.patch47.48 KBGábor Hojtsy
#48 drupal8.language-langcode-update.46.pass_.patch47.48 KBGábor Hojtsy
#48 drupal8.language-langcode-update.46.fail_.patch44.33 KBGábor Hojtsy
#46 drupal8.language-langcode-update.46.pass_.patch47.48 KBGábor Hojtsy
#46 drupal8.language-langcode-update.46.fail_.patch44.32 KBGábor Hojtsy
#46 filled-diff.txt699 bytesGábor Hojtsy
#42 drupal8.language-langcode-update.42.patch3.16 KBGábor Hojtsy
#40 drupal8.language-langcode-update.40.patch3.05 KBGábor Hojtsy
#37 drupal8.language-langcode-update.36.patch2.98 KBsun
#35 drupal8.language-langcode-update.35.patch2.86 KBsun
#30 language-to-langcode-30.patch89.32 KBGábor Hojtsy
#24 language-to-langcode-24.patch87.05 KBGábor Hojtsy
#21 language-to-langcode-21.patch87.05 KBGábor Hojtsy
#18 language-to-langcode-18.patch87.65 KBGábor Hojtsy
#16 language-to-langcode-16.patch88.22 KBGábor Hojtsy
#14 language-to-langcode-14.patch87.3 KBGábor Hojtsy
#12 language-to-langcode-12.patch83.16 KBGábor Hojtsy
#10 language-to-langcode-10.patch49.39 KBGábor Hojtsy
#8 language-to-langcode-7.patch46.69 KBGábor Hojtsy
#7 path-language-to-langcode-8.patch28.13 KBGábor Hojtsy
#5 language-to-langcode-5.patch28.68 KBGábor Hojtsy
#3 language-to-langcode.patch19.21 KBGábor Hojtsy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Issue tags: +API clean-up

Cleaning up bogus/duplicate "API cleanup" term.

Gábor Hojtsy’s picture

Status: Postponed » Active
Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
19.21 KB

Here is a quick initial patch. Will probably come with massive fails but its a start. Its pretty delicate to avoid changing user, node and comment related code while we do this to constrain the scope of this patch

Status: Needs review » Needs work

The last submitted patch, language-to-langcode.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
28.68 KB

Fixing several other ->language instances. Will no doubt turn up more through the tests.

Status: Needs review » Needs work

The last submitted patch, language-to-langcode-5.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
28.13 KB

Even more places converted.

Gábor Hojtsy’s picture

FileSize
46.69 KB

Above patch was for #1357912: Convert path language code schema to langcode, please disregard. Here is the right one.

Status: Needs review » Needs work

The last submitted patch, language-to-langcode-7.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
49.39 KB

Found some code to be affected in user.module, filter.module, etc.

Status: Needs review » Needs work

The last submitted patch, language-to-langcode-10.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
83.16 KB

Even more places where langcode was missed. This is turning to be a huge megapatch. Hope to have it landed soon since managing it will be a nightmare :/ The language negotiation related fixes now included should fix many of the notices around not finding $langcode on objects not properly returned before by the negotiation system.

Status: Needs review » Needs work

The last submitted patch, language-to-langcode-12.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
87.3 KB

Drupal web test case had language initialization which in fact broke most of the tests. Changing that leads to much better results.

Status: Needs review » Needs work

The last submitted patch, language-to-langcode-14.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
88.22 KB

Comment token and node.module still had lingering language key based code.

Status: Needs review » Needs work

The last submitted patch, language-to-langcode-16.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
87.65 KB

Found two places where I was going over converting node related ->language properties which should be left alone for the scope of this patch. That resulted in many node language related fails. (This actually reduces the patch size a bit).

Gábor Hojtsy’s picture

Issue tags: +langcode

Tagging up so we can find the langcode API changes later.

sun’s picture

Status: Needs review » Needs work
+++ b/core/modules/field/modules/text/text.test
@@ -490,6 +490,8 @@ class TextTranslationTestCase extends DrupalWebTestCase {
+    $node = $this->drupalGetNodeByTitle($title);
+    debug(var_export($node, TRUE));

Stale debugging code.

btw, debug() automatically performs a var_export() already, no need to do that manually.

+++ b/core/modules/language/language.install
@@ -33,7 +33,7 @@ function language_schema() {
     'fields' => array(
-      'language' => array(
+      'langcode' => array(

We need a update function for this schema change, no?

Lastly, could we enhance the issue summary to clarify what is going to happen with the other language schema columns, such as node.language and field data tables?

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
87.05 KB

Thanks for the review!

- Great find on that debug hunk, removed.
- No, an update function is not needed since languages are needed in the early bootstrap for update, so the patch includes changes in the update.inc code to do the update in this hunk:

diff --git a/core/includes/update.inc b/core/includes/update.inc
index a2cfd0c..1de14f0 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -141,6 +141,17 @@ function update_prepare_d8_language() {
     db_drop_field('languages', 'domain');
     db_drop_field('languages', 'native');
 
+    // Rename language column to langcode and set it again as the primary key.
+    db_drop_primary_key('languages');
+    $langcode_spec = array(
+      'type' => 'varchar',
+      'length' => 12,
+      'not null' => TRUE,
+      'default' => '',
+      'description' => "Language code, e.g. 'de' or 'en-US'.",
+    );
+    db_change_field('languages', 'language', 'langcode', $langcode_spec, array('primary key' => array('langcode')));
+
     // Rename the languages table to language.
     db_rename_table('languages', 'language');

- Finally, added this sentence to the issue summary: "Other objects like nodes, fields and path aliases are converted in related issues. See a full issue list for this conversion at http://drupal.org/project/issues/search/drupal?issue_tags=langcode"

Gábor Hojtsy’s picture

Issue summary: View changes

Add issue list link for related issues.

Gábor Hojtsy’s picture

Issue tags: -DrupalWTF, -API clean-up, -D8MI, -langcode

#21: language-to-langcode-21.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +DrupalWTF, +API clean-up, +D8MI, +langcode

The last submitted patch, language-to-langcode-21.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
87.05 KB

Rerolled patch to fix the apply problems.

Gábor Hojtsy’s picture

#24: language-to-langcode-24.patch queued for re-testing.

sun’s picture

Status: Needs review » Reviewed & tested by the community

I guess this is RTBC then.

Gábor Hojtsy’s picture

Issue tags: -DrupalWTF, -API clean-up, -D8MI, -langcode

#24: language-to-langcode-24.patch queued for re-testing.

Gábor Hojtsy’s picture

Issue tags: +DrupalWTF, +API clean-up, +D8MI, +langcode

#24: language-to-langcode-24.patch queued for re-testing.

catch’s picture

Status: Reviewed & tested by the community » Needs work

OK this looks fine in general but there's at least one occurrence missed:

From node.install:

   'language' => array(
        'description' => 'The {language}.language of this node.',
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
      ),

Also from system.install

   'language' => array(
        'description' => 'A {language}.language for this format to be used with.',
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
      ),

I'm fine if we don't change these schemas in this patch, that could happen in separate follow-ups, but the docs should be updated at least.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
89.32 KB

@catch: its pretty impossible to change all schemas to use langcode instead of language. There is at least one more patch queued up already at #1357912: Convert path language code schema to langcode and the langcode tag is used to track future issues that are going to change all those. (http://drupal.org/project/issues/search/drupal?issue_tags=langcode).

You are right though that the comments for the schema are not properly updated. I found four occurrences (comment.install and locale.install were also affected on top of your two finds above) and all are fixed in the attached patch. Otherwise unchanged.

catch’s picture

Priority: Normal » Critical
Status: Needs review » Active

Thanks for the quick follow-up. Committed/pushed to 8.x.

This will need a change notification.

catch’s picture

Title: Change language schema to refer to langcode » Change notification for: language schema to refer to langcode
Gábor Hojtsy’s picture

Title: Change notification for: language schema to refer to langcode » Change language schema to refer to langcode
Priority: Critical » Normal
Status: Active » Fixed

http://drupal.org/node/1399806 added with both a developer example and a themer example (with possible D8 theme changes in the future in mind).

Gábor Hojtsy’s picture

BTW next one up in this conversion is #1357912: Convert path language code schema to langcode which has a patch that was previously passing tests (but was made not possible to apply by this patch, so just updated there). Reviews welcome there! Thanks a lot!

sun’s picture

Status: Fixed » Needs review
FileSize
2.86 KB

A proper D8->D8 update would have revealed a critical upgrade path bug.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

The primary key change is definitely not going to work this way in the D7-> D8 upgrade path as far as I see since there is no language table in D7.

sun’s picture

Status: Needs work » Needs review
FileSize
2.98 KB

Well, then rename it first. ;)

I don't really see why this should not work. Let's see what the testbot thinks.

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.36.patch, failed testing.

Gábor Hojtsy’s picture

Looks like you are now not actually calling language_update_8000() vs. the previous patch, so it breaks differently now. You let the bootstrap through before the update with the wrong schema, so there you get those test fails AFAIS.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
3.05 KB

@sun: so here is the patch that reflects your intentions (AFAIS).

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.40.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
3.16 KB

With that the problem is that the language update will run in itself and by that time the language column is no more. By adding appropriate conditions in the update function, we can avoid running parts of it as needed. Adding a db_field_exists('language', 'language') to the DB change and an isset($language_default->language) to the variable update. Should pass now.

I still don't agree that this is any more elegant compared to having it all in the bootstrap prepare code. And we could easily make it work for D8 -> D8 updates in the bootstrap prepare code too by using the current conditionals there. Anyway, I hope this should pass tests now and if this is deemed better, then so be it. The real point is fixing the remaining issue with not updating language_default in the original patch and it is done either way.

Gábor Hojtsy’s picture

Title: Change language schema to refer to langcode » Missing update for language_default in language langcode update
Category: task » bug
Priority: Normal » Major

Also elevating. This is at least a major upgrade path bug.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, thanks!

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

There's no tests added here, and the existing ones didn't catch this, so can we add some?

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
699 bytes
44.32 KB
47.48 KB

Here is a suggested text expansion to add language_count and language_default to the filled database. English and Catalan were already present in the DB, so I decided to make Catalan the default here. I think this should cover the data requirement we need. I've also added test coverage to test language_default() and language_list() output on the D8 end, so that Catalan is returned to be the default and that is the only one returned to be the default.

Posting a diff including the above patch and without so that we can see if it properly fails / passes.

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.46.fail_.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
44.33 KB
47.48 KB

Ups, fixing PHP error in the test. Same patches otherwise.

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.46.fail_.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
47.48 KB
44.32 KB

Ok, well, the serialization of language_default was not proper either (due to UTF8 byte differences). Fixing that. Let's see if this correctly passes and fails now :)

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.50.pass_.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
47.48 KB
44.32 KB

All right, one more curly brace was missing in the serialized language_default. I did run this test now locally as well. It looks like the test system *itself* will produce notices until the update.php code actually runs that updates the language_default variable early in the first bootstrap. I reproduced those notices on my machine. Not sure how could we fix that.

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.52.pass_.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review

All right, so as can be seen the "pass" patch actually passes with notices, the fail patch produced the two test failures expected. However, since all those notices are added, it is obviously not feasible to commit these to core. Now because the notices come from the test system running on a not yet updated D7 database, how could we make sure that the test system is not affected? We could extend the setUp() in UpgradePathTestCase to run update_prepare_d8_bootstrap() let's say, not sure how pristine the update testing would be at that point. Any good ideas? @sun? @catch?

Gábor Hojtsy’s picture

Ok, well up on more testing it turns out that the bootstrap prepare code does run in time BUT the test system has outdated cached values in place. like $conf['language_default'], the internal cache of language_list() and the global $language values. If we clear / reinitialize those from the database / backend data, the test system becomes perfectly happy. Putting this right before it causes a problem. Now this needs serious feedback :)

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.55.fail_.patch, failed testing.

Gábor Hojtsy’s picture

All right, I must have had a test glitch where it actually passed on my machine. I cannot reproduce it passing anymore. Doh. My best patch is in #52 and I request that someone please take this over from me because I wasted way too much time on trying to work around this and apparently failed. Please help.

Gábor Hojtsy’s picture

Issue tags: +language-base
Gábor Hojtsy’s picture

Issue tags: -DrupalWTF +sprint

Marking needs focus.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
48.58 KB

Uploading 'pass' test with fixed PHP syntax. It will still not pass. Still needs serious help to figure out clearing the test environment properly to be able to pass through this. Please!

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.55.pass_.patch, failed testing.

swentel’s picture

Wow, this is indeed a hard one to crack. Attaching a patch which reduces the notices to 46, also letting the 'Bare upgrade tests' pass. I've removed drupal_language_initialize() in the test method and did the reset in language_update_8000() as it's (imo) a much cleaner solution to fix notices outside the testing system.

However, still not fully passing, I'll check this further out tonight.

swentel’s picture

Status: Needs work » Needs review

Setting to review to make sure the testbot also has reduced notices compared to my local install.

Status: Needs review » Needs work

The last submitted patch, drupal8.language-langcode-update.62.patch, failed testing.

swentel’s picture

Actually, the reset in language_update_8000() is not even needed, Removing the resets in performUpgrade() makes the notices drop already. Digging further.

swentel’s picture

Status: Needs work » Needs review
FileSize
48.96 KB

Ok, turns out this was easy in the end, but it took me a couple of iterations to find out what went wrong. Turns out that when language_update_8000(); is called in update.inc the variables weren't loaded yet and thus variable_get('language_default'); returns zero and doesn't set the language_default with the new langcode key. Simply changing the boostrap constant in update_prepare_d8_bootstrap to DRUPAL_BOOTSTRAP_VARIABLES fixes all notices without any ugly hacks.

plach’s picture

Brilliant! However there is this critical issue that is messing with more or less the same portion of code and also adding the variable bootstrap: #1331370: [Upgrade path broken] Stored include paths need to be updated to /core before running the upgrade path. Perhaps it would be wiser to get that in before, and then reroll the patch here, because the bootstrap preparation code is being refactored quite a bit over there. Moreover also that one just needs a RTBC sign off and I have the feeling that the code here would be simpler if the other patch were committed before.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

#1331370: [Upgrade path broken] Stored include paths need to be updated to /core before running the upgrade path is now committed so this will not apply anymore I guess. Also that does the bootstrap already, so this patch can be simpler. @swentel: can you help move this forward?

swentel’s picture

Status: Needs work » Needs review
FileSize
8.02 KB

Rerolled, language_default wasn't in the gz file, so I hope I did it ok. Patch locally passes, so fingers crossed :)

Gábor Hojtsy’s picture

@swentel: thanks!

In general we are having issues with keeping the dump up to date and looks like it would be better to move to a componentized model for the upgrare test. Would you be interested in looking into that with this patch? That would allow us to move forward much quicker in other patches! I've looked into how D7 componentized the update tests, summarized my findings a bit in http://drupal.org/node/1410096#comment-5558268

clemens.tolboom’s picture

I just added a comment to #1182296: Add tests for 7.0->7.x upgrade path (random test failures) as I don't understand the gz dumps for db files.

Gábor Hojtsy’s picture

FileSize
226.22 KB

Here is a rework of the above patch that would not make @chx cry (I'd imagine :). The updgrade test system is built with componentization in mind (at least where possible), and now that we start to add language asserts in the test, we ought to set up our own .test file for it. We can/should also introduce a db-addon file for this which contains the language data. We can take advantage of the system's support for non-gz dump files, so since the language add-on would be simple, we can keep it diffable and make people's work and patch rerolls in related issues *way* easier. Rerolling patches against the gz dumps is a huge pain.

So the attached patch takes the cues from the componentized D7 dumps/tests (http://drupalcode.org/project/drupal.git/tree/refs/heads/7.x:/modules/si...) not yet introduced in D8 yet. The language related dump data is moved out to a drupal-7.language.database.php (not locale, because we want to work with node, comment, field language, etc. type of data here too). It also introduces an upgrade.language.test file which builds on the core filled test file and adds on this dump. Then runs its own asserts.

So we leave the generic filled dump and test pristine and can work in our own addon dump/test to prove language updates are good. The filled dump got all the data removed that you can see added in the drupal-7.language.database.php, all others are left intact.

This passes on my local machine, hope it passes on the testbot.

@swentel, all, please review, because this blocks changes like #1410096: Convert comment language code schema to langcode and friends, basically any language related schema change, of which we are working on / planning a lot.

Gábor Hojtsy’s picture

BTW wrote some upgrade test docs based on all this work at http://drupal.org/node/1429136. IMHO let's get this refactoring/fix in, then we can move on with a simpler workflow for writing the language update tests.

Reviews please!

clemens.tolboom’s picture

Status: Needs review » Needs work

Great Upgrade tests ... tnx Gabor. I could not have written that. Componentization is a great improvement. Some remarks as I'm still not able to generate the full patch (sorry)

+++ b/core/modules/simpletest/tests/upgrade/drupal-7.language.database.php
@@ -0,0 +1,512 @@
+/**
+ * Database additions for language tests.
+ */

Why are these records inserted and table created? There is a relation to the tests. So this imho could use some more comments. Maybe just something like
"
Inserting blocks for 'reason'

Installing table locale_source, locale_target, language for 'reason'
"

The use of block ids is probably a little brittle as adding new blocks to the global db set would collide with these. Block schema uses a serial so we can drop these values all together right?

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
226.82 KB

@clemens: thanks for the review. Here is an updated patch with plenty more comments in the dump.

Keep the reviews coming!

clemens.tolboom’s picture

Status: Needs review » Needs work
+++ b/core/modules/simpletest/tests/upgrade/drupal-7.language.database.php
@@ -0,0 +1,522 @@
+// Add blocks respective for language functionality.

I expected 'the why' add two rows.

This probably help people in the future not to add too much rows?!?

I am now puzzled about for what test part we need these blocks. Or are these just the defaults of local.install?

+++ b/core/modules/simpletest/tests/upgrade/drupal-7.language.database.php
@@ -0,0 +1,522 @@
+  'bid',

The bid is removed from values but not from field list. So test should fail.

+++ b/core/modules/simpletest/tests/upgrade/drupal-7.language.database.php
@@ -0,0 +1,522 @@
+// Add language table from locale.install schema and prefill with some default
+// languages for testing.

Same for documenting languages. Why these data?

Maybe it is just enough to just add @see 'unit test a' (allowing IDEs to jump to tests)?

I try to chew on this for http://drupal.org/node/1429136 too.

One last question: Is there an issue about 'making chx happy' concerning test data sets?

clemens.tolboom’s picture

Test failed as expected.

catch answered 'make chx happy' referring to #1364798: Impossible to generate meaningful diffs of upgrade db dumps

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
226.81 KB

Updated patch with only the missing bid fixedextra bid removed. I don't think we should document the test data in the detail you are looking for. That would require us to update the comments in the dataset every time we update the tests, which is likely going to fall unmaintained. Also, this dump already has plenty more comments compared to the dumps in Drupal 7.

On the blocks, well, we don't currently need them. We can remove them, but they were in the filled dump, so then we'd lose those blocks and would require extra work when we come to moving those blocks from locale module to language modul and I don't want to inflict that extra work on anybody.

swentel’s picture

Status: Needs review » Reviewed & tested by the community

Did a really quick review on the new stuff, and I like this idea a lot. Besides finally becoming readable, It gives us a more flexible way to test different Drupal 7 situations. I haven't found any practical use cases yet, but I can imagine an upgrade could maybe fail depending on configuration of your site (n* languages, n* node types where a couple are translatable, some not etc).

Marking RTBC, let's get Catch's opinion. Great work Gabor!

xjm’s picture

Issue tags: -Needs tests

Awesome!

Couple points on the doxygen:

+++ b/core/modules/simpletest/tests/upgrade/upgrade.language.testundefined
@@ -0,0 +1,40 @@
+ * Upgrade test for a filled database with language data.
...
+   * Test a successful upgrade.

+++ b/core/modules/simpletest/tests/upgrade/upgrade_filled.testundefined
@@ -1,7 +1,7 @@
+ * Upgrade test for the filled database.

These should all start with third-person verbs.

Also, several of the new files are missing @file docblocks.

catch’s picture

Issue tags: +Needs tests

Adding the extra data in a separate file uncompressed is fine with me, I thought we were doing that elsewhere already.

If we end up doing sun's idea, we'll still need to get the data into the db, so there's a chance we'll still need these partial dumps anyway for the actual data.

Didn't do a full review or anything yet.

Gábor Hojtsy’s picture

Issue tags: -Needs tests, -sprint

@catch: thanks for the quick feedback! We don't do the componentized db dumps in D8 yet, it is only done in D7 (and D7 does not even gz the base filled database either). I think going this way will make writing upgrade path tests much easier for language stuff (of which we need to do a lot these days).

catch’s picture

Ahh, in this case I think it's a case of the D8 upgrade tests lagging behind the D7 ones (largely because we had zero upgrade path coverage for 7-8 for about 3-4 months last year when the 7.x upgrade and tests were removed) - but either way we should definitely do that. For several 6-7 upgrade path tests I manually added lines to insert queries for dumps to get the right data in, it's much easier to do that with an approach like this.

no_commit_credit’s picture

FileSize
2.04 KB
226.4 KB

Attached adds @file docblocs to the two new files (which in the case of the dump is just a matter of adding @file) and adds verbs. Note that I also reverted an out-of-scope cleanup in the main upgrade path test file (that removed a double period in a summary); that might collide with other cleanups.

Gábor Hojtsy’s picture

Looks good, I think this is still RTBC if it passes tests, which is more than likely :)

Gábor Hojtsy’s picture

Issue tags: +sprint

Fix tags :)

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks!

Gábor Hojtsy’s picture

Yay, thanks. This just unblocked #540294: Move node language settings from Locale to Node module and #1410096: Convert comment language code schema to langcode which are going to extend the tests/dumps added here :)

Gábor Hojtsy’s picture

Issue tags: -sprint

Also remove sprint tag.

Gábor Hojtsy’s picture

Status: Fixed » Reviewed & tested by the community
Issue tags: +sprint

Ok, @Dries, you forgot to commit the new files from the patch. (http://drupalcode.org/project/drupal.git/commit/fdca0419a524917d0d8b9126...)

xjm’s picture

Status: Reviewed & tested by the community » Fixed
Gábor Hojtsy’s picture

Issue tags: -sprint

Off-sprint then :)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Update related issue text slightly.