Page MenuHomePhabricator

Puppet catalog compiler fails to diff when change produces non-ascii accented character
Closed, ResolvedPublic

Description

In the console output of https://integration.wikimedia.org/ci/job/operations-puppet-catalog-compiler/25447/

[ 2020-09-25T18:31:30 ] INFO: Starting run in mode change
[ 2020-09-25T18:31:31 ] INFO: Compiling host analytics1030.eqiad.wmnet (prod)
[ 2020-09-25T18:31:41 ] INFO: Compiling host analytics1030.eqiad.wmnet (change)
[ 2020-09-25T18:31:54 ] INFO: Calculating diffs for analytics1030.eqiad.wmnet
[ 2020-09-25T18:31:55 ] ERROR: Diffing the catalogs failed: analytics1030.eqiad.wmnet
[ 2020-09-25T18:31:55 ] INFO: Diffing failed with exception 'ascii' codec can't encode characters in position 12-13: ordinal not in range(128)
[ 2020-09-25T18:31:55 ] INFO: [change] Nodes: 1 FAIL 
[ 2020-09-25T18:31:55 ] INFO: Run finished for mode change; see your results at https://puppet-compiler.wmflabs.org/compiler1001/25447/
Build step 'Execute shell' marked build as failure
Finished: FAILURE

The "change" compilation result has the following, which apparently triggered this error:

{
      "type": "Admin::User",
      "title": "agaduran",
      "tags": [
        "admin::user",
        "admin",
        "user",
        "agaduran",
        "admin::hashuser",
        "hashuser",
        "class",
        "standard",
        "profile::standard",
        "profile",
        "role::analytics_test_cluster::coordinator",
        "role",
        "analytics_test_cluster",
        "coordinator"
      ],
      "file": "/srv/jenkins-workspace/puppet-compiler/25447/change/src/modules/admin/manifests/hashuser.pp",
      "line": 59,
      "exported": false,
      "parameters": {
        "ensure": "present",
        "uid": 25360,
        "gid": 500,
        "groups": [

        ],
        "comment": "Alberto García Durán",
        "shell": "/bin/bash",
        "ssh_keys": [

        ],
        "home_dir": "/home/agaduran"
      }
    },

Perhaps there is something wrong with the encoding, as the comment characters seem mixed up.

In any case, the catalog compiler should not error when given non-ascii input.

Event Timeline

Change 630783 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/puppet@production] admin: test no ascii characters

https://gerrit.wikimedia.org/r/630783

Change 630783 abandoned by Elukey:
[operations/puppet@production] admin: test no ascii characters

Reason:
we can drop this one :)

https://gerrit.wikimedia.org/r/630783

Change 630783 restored by Elukey:
[operations/puppet@production] admin: test no ascii characters

https://gerrit.wikimedia.org/r/630783

Change 630783 abandoned by Jbond:
[operations/puppet@production] admin: test no ascii characters

Reason:
underlining issue fixed with https://gerrit.wikimedia.org/r/c/operations/software/puppet-compiler/ /630850/2

https://gerrit.wikimedia.org/r/630783

jbond claimed this task.
jbond subscribed.

@razzi Thanks for the report, i have applied a fix to this in puppet-compilet 0.8.1, please re open if you still see issues.