{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/49724","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/49724/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/49724/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/49724/events","html_url":"https://github.com/saltstack/salt/issues/49724","id":362220885,"node_id":"MDU6SXNzdWUzNjIyMjA4ODU=","number":49724,"title":"Salt 2018.3 wrongly parses \": \", \"[\" and \"]\" symbols","user":{"login":"Martin819","id":24304336,"node_id":"MDQ6VXNlcjI0MzA0MzM2","avatar_url":"https://avatars3.githubusercontent.com/u/24304336?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin819","html_url":"https://github.com/Martin819","followers_url":"https://api.github.com/users/Martin819/followers","following_url":"https://api.github.com/users/Martin819/following{/other_user}","gists_url":"https://api.github.com/users/Martin819/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin819/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin819/subscriptions","organizations_url":"https://api.github.com/users/Martin819/orgs","repos_url":"https://api.github.com/users/Martin819/repos","events_url":"https://api.github.com/users/Martin819/events{/privacy}","received_events_url":"https://api.github.com/users/Martin819/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-20T14:41:33Z","updated_at":"2018-09-20T16:57:34Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description of Issue/Question\r\nRunning Salt 2018.3.2 I'm experiencing an issue with parsing pillar containing these symbols \": \" (colon followed by space), \"[\" and \"]\". This issue only exists in the 2018.3 version of Salt. In the 2017.7 version, it passes just fine.\r\n\r\n\r\n### Setup\r\nRunning **Salt 2018.3.2**\r\n\r\n**Pillar:**\r\n\r\n```\r\nlinux:\r\n  system:\r\n    enabled: true\r\n    repo:\r\n      ubuntu:\r\n        architectures: amd64\r\n        default: true\r\n        key: |\r\n          -----BEGIN PGP PUBLIC KEY BLOCK-----\r\n\r\n          Version: GnuPG v1\r\n\r\n\r\n          mQGiBEFEnz8RBAC7LstGsKD7McXZgd58oN68KquARLBl6rjA2vdhwl77KkPPOr3O\r\n\r\n          ...\r\n\r\n          Twx6DKLF+3rF5nf1F3Q=\r\n\r\n          =PBAe\r\n\r\n        refresh_db: true\r\n        source: \"deb [arch=amd64] http://mirror.domain.com/2018.7.0/ubuntu/ xenial main restricted universe\"\r\n```\r\n\r\n**SLS file:**\r\n```\r\n...\r\n{%- for name, repo in system.repo.items() %}\r\n    {%- if repo.get('default', False) %}\r\n        {%- do default_repos.update({name: repo}) %}\r\n    {%- endif %}\r\n{%- endif %}\r\n\r\n{%- if default_repos|length > 0 and grains.os_family == 'Debian' %}\r\n\r\ndefault_repo_list:\r\n  file.managed:\r\n    - name: /etc/apt/sources.list\r\n    - source: salt://linux/files/sources.list\r\n    - template: jinja\r\n    - user: root\r\n    - group: root\r\n    - mode: 0644\r\n    {%- if system.purge_repos|default(False) %}\r\n    - replace: True\r\n    {%- endif %}\r\n    - defaults:\r\n        default_repos: {{ default_repos }}\r\n\r\n  {%- endif %}\r\n...\r\n```\r\n\r\n**sources.list file**:\r\n\r\n```\r\n{%- for name, repo in default_repos.items() %}\r\n# Repository {{ name }}\r\n{{ repo.source }}\r\n{%- endfor %}\r\n```\r\n\r\n### Steps to Reproduce Issue\r\n\r\nWhen running with the pillar above, I'm getting the following error:\r\n```\r\n       [CRITICAL] Rendering SLS 'base:linux.system.repo' failed: while parsing a flow mapping\r\n         in \"<unicode string>\", line 43, column 36:\r\n            default_repos: {u'ubuntu': {u'architectures': u'amd64', u'd ... \r\n                                       ^\r\n       expected ',' or '}', but got ':'\r\n         in \"<unicode string>\", line 43, column 140:\r\n            ... PUBLIC KEY BLOCK-----\\n\\nVersion: GnuPG v1\\n\\n\\nmQGiBEFEnz8RBAC7 ... \r\n                                         ^\r\n```\r\n\r\nI have tried to wrap the multi-line value with double quotes, but it didn't help.\r\n\r\nAfter removing the colon \":\" symbol, the parsing error moves to the next symbol - see bellow\r\n\r\n```\r\n       [CRITICAL] Rendering SLS 'base:linux.system.repo' failed: while parsing a flow mapping\r\n         in \"<unicode string>\", line 43, column 36:\r\n            default_repos: {u'ubuntu': {u'architectures': u'amd64', u'd ... \r\n                                       ^\r\n       expected ',' or '}', but got '['\r\n         in \"<unicode string>\", line 43, column 302:\r\n            ... esh_db': True, u'source': u'deb [arch=amd64] http://mirror.domai ... \r\n                                         ^\r\n```\r\n\r\nAfter removing the \"[\" symbol, the error moves once more to:\r\n\r\n```\r\n       [CRITICAL] Rendering SLS 'base:linux.system.repo' failed: while parsing a flow mapping\r\n         in \"<unicode string>\", line 43, column 36:\r\n            default_repos: {u'ubuntu': {u'architectures': u'amd64', u'd ... \r\n                                       ^\r\n       expected ',' or '}', but got ']'\r\n         in \"<unicode string>\", line 43, column 312:\r\n            ... rue, u'source': u'deb arch=amd64] http://mirror.domain.com/201 ... \r\n                                         ^\r\n```\r\n\r\nFinally, after removing the \"]\" symbol, the run passes successfully.\r\n\r\n### Versions Report\r\n```\r\n                  Salt Version:\r\n                             Salt: 2018.3.2\r\n                   \r\n                  Dependency Versions:\r\n                             cffi: Not Installed\r\n                         cherrypy: Not Installed\r\n                         dateutil: 2.4.2\r\n                        docker-py: Not Installed\r\n                            gitdb: 0.6.4\r\n                        gitpython: 1.0.1\r\n                            ioflo: Not Installed\r\n                           Jinja2: 2.8\r\n                          libgit2: Not Installed\r\n                          libnacl: Not Installed\r\n                         M2Crypto: Not Installed\r\n                             Mako: 1.0.3\r\n                     msgpack-pure: Not Installed\r\n                   msgpack-python: 0.4.6\r\n                     mysql-python: Not Installed\r\n                        pycparser: Not Installed\r\n                         pycrypto: 2.6.1\r\n                     pycryptodome: Not Installed\r\n                           pygit2: Not Installed\r\n                           Python: 2.7.12 (default, Dec  4 2017, 14:50:18)\r\n                     python-gnupg: 0.3.8\r\n                           PyYAML: 3.11\r\n                            PyZMQ: 15.2.0\r\n                             RAET: Not Installed\r\n                            smmap: 0.9.0\r\n                          timelib: Not Installed\r\n                          Tornado: 4.2.1\r\n                              ZMQ: 4.1.4\r\n                   \r\n                  System Versions:\r\n                             dist: Ubuntu 16.04 xenial\r\n                           locale: ANSI_X3.4-1968\r\n                          machine: x86_64\r\n                          release: 4.13.0-46-generic\r\n                           system: Linux\r\n                          version: Ubuntu 16.04 xenial\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/423257190","html_url":"https://github.com/saltstack/salt/issues/49724#issuecomment-423257190","issue_url":"https://api.github.com/repos/saltstack/salt/issues/49724","id":423257190,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzI1NzE5MA==","user":{"login":"Ch3LL","id":6886822,"node_id":"MDQ6VXNlcjY4ODY4MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/6886822?v=4","gravatar_id":"","url":"https://api.github.com/users/Ch3LL","html_url":"https://github.com/Ch3LL","followers_url":"https://api.github.com/users/Ch3LL/followers","following_url":"https://api.github.com/users/Ch3LL/following{/other_user}","gists_url":"https://api.github.com/users/Ch3LL/gists{/gist_id}","starred_url":"https://api.github.com/users/Ch3LL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ch3LL/subscriptions","organizations_url":"https://api.github.com/users/Ch3LL/orgs","repos_url":"https://api.github.com/users/Ch3LL/repos","events_url":"https://api.github.com/users/Ch3LL/events{/privacy}","received_events_url":"https://api.github.com/users/Ch3LL/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T16:57:34Z","updated_at":"2018-09-20T16:57:34Z","author_association":"CONTRIBUTOR","body":"looks like i'm able to replicate this and i bisected it to 9ee5b417f775ea307f508459b037514cdf67021f\r\n\r\nwhich is this PR https://github.com/saltstack/salt/pull/45406 \r\n\r\nso it seems like this was due to our unicode work in 2018.3\r\n\r\n"}}
{"actor":{"display_login":"Ch3LL"}}