Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
From Drupal.org's logs:
15:13:08 WD l10n_drupal: Parsing extracted da_vinci-8.x-1.0-alpha1.tar.gz for [notice]
15:13:08 strings.
15:13:25 WD potx: YAML parsing error on file [notice]
15:13:25 /tmp/l10n_drupal_drupalorg_D0inB3_dir/da_vinci/node_modules/bower/node_modules/github/seed.yml:
15:13:25 Unable to parse at line 2 (near " name: node-github").
15:14:17 WD potx: YAML parsing error on file [notice]
15:14:17 /tmp/l10n_drupal_drupalorg_D0inB3_dir/da_vinci/node_modules/grunt-sass/node_modules/node-sass/src/libsass/appveyor.yml:
15:14:17 Unable to parse at line 5 (near " Build: static").
15:14:17 WD cron: Twig_Error_Syntax: Unexpected character "&" in [error]
15:14:17 "da_vinci/templates/comments/comment-wrapper.html.twig" at line 38 in
15:14:17 Twig_Lexer->lexExpression() (line 284 of
15:14:17 /var/www/localize.drupal.org/htdocs/sites/all/modules/potx/vendor/Twig/Lexer.php).
15:14:18 WD cron: Cron run completed. [notice]
15:14:18 Cron run successful. [success]
15:14:18 The first parameter to t() should be a literal string. There should [error]
15:14:18 be no variables, concatenation, constants or other non-literal
15:14:18 strings there. At t('Name for tab '.$i) in
15:14:18 da_vinci/plugins/styles/region_tabs/region_tabs.inc on line 52. Read
15:14:18 more at http://drupal.org/node/322732
15:14:18 Command dispatch complete [notice]
This leaves temporary files not cleaned up. Twig and YAML parse errors should be caught, logged appropriately, and cleanup completed.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2613368-8.patch | 4.59 KB | herom |
#8 | 2613368-8-broken-yaml.test-only.patch | 286 bytes | herom |
#6 | 2613368-6.patch | 4.55 KB | herom |
#6 | 2613368-6-broken-twig.test-only.patch | 218 bytes | herom |
#6 | 2613368-6-broken-yaml.test-only.patch | 213 bytes | herom |
Comments
Comment #2
herom CreditAttribution: herom as a volunteer commentedHere's a patch that catches all parsing errors in Twig and YAML files.
Also filed #2613854: Don't parse third-party code: node_modules/, since that's where the first error is coming from.
Comment #3
Gábor Hojtsypotx already has a mechanism to collect errors in files. I would use that, so we see those on the UI on localize.drupal.org for example and can help people debug problems. Otherwise the potx watchdog messages will just fly by...
Comment #4
herom CreditAttribution: herom as a volunteer commentedReplacing
watchdog()
calls withpotx_error()
.Comment #5
Gábor HojtsyCan we test this? We have assertions for errors reported in some of our tests, so I think we can test it on an invalid YAML / Twig?
Comment #6
herom CreditAttribution: herom as a volunteer commentedLet's try and see.
Comment #8
herom CreditAttribution: herom as a volunteer commentedLet's move the broken yaml into "
config/install
".Comment #9
Gábor Hojtsy#8 looks good. Even if the YAML test only did not fail, I think its worth keeping a case for it :)
Comment #11
herom CreditAttribution: herom as a volunteer commentedGreat. Committed.