svn checkout encoding error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
When trying to checkout or update a svn repository and a filename with utf-8 encoding exists then the salt master fails with the following message:
svn: E000022: Can't convert string from 'UTF-8' to native encoding:
Steps to Reproduce Issue
$> git clone https://github.com/muscraziest/error_svn_server_encoding
$> cd error_svn_server_encoding
$> docker-compose up salt-master
Creating network "errorsvnserverencoding_default" with the default driver
Creating errorsvnserverencoding_svn-server_1 ...
Creating errorsvnserverencoding_svn-server_1 ... done
Creating errorsvnserverencoding_salt-master_1 ...
Creating errorsvnserverencoding_salt-master_1 ... done
Attaching to errorsvnserverencoding_salt-master_1
salt-master_1 | [ERROR ] Command '['svn', '--non-interactive', 'checkout', 'svn://svn-server/testrepo']' failed with return code: 1
salt-master_1 | [ERROR ] stdout: A testrepo/t{U+03B5}st
salt-master_1 | [ERROR ] stderr: svn: E155009: Failed to run the WC DB work queue associated with '/tmp/testrepo', work item 1 (file-install t{U+03B5}st 1 0 1 1)
salt-master_1 | svn: E000022: Can't convert string from 'UTF-8' to native encoding:
salt-master_1 | svn: E000022: /tmp/testrepo/t{U+03B5}st
salt-master_1 | [ERROR ] retcode: 1
salt-master_1 | Exception occurred in runner salt.cmd: Traceback (most recent call last):
salt-master_1 | File "/usr/lib/python3/dist-packages/salt/client/mixins.py", line 387, in _low
salt-master_1 | data['return'] = self.functions[fun](*args, **kwargs)
salt-master_1 | File "/usr/lib/python3/dist-packages/salt/runners/salt.py", line 106, in cmd
salt-master_1 | if fun in functions \
salt-master_1 | File "/usr/lib/python3/dist-packages/salt/modules/svn.py", line 174, in checkout
salt-master_1 | return _run_svn('checkout', cwd, user, username, password, opts)
salt-master_1 | File "/usr/lib/python3/dist-packages/salt/modules/svn.py", line 73, in _run_svn
salt-master_1 | raise CommandExecutionError(result['stderr'] + '\n\n' + ' '.join(cmd))
salt-master_1 | salt.exceptions.CommandExecutionError: svn: E155009: Failed to run the WC DB work queue associated with '/tmp/testrepo', work item 1 (file-install t{U+03B5}st 1 0 1 1)
salt-master_1 | svn: E000022: Can't convert string from 'UTF-8' to native encoding:
salt-master_1 | svn: E000022: /tmp/testrepo/t{U+03B5}st
salt-master_1 |
salt-master_1 | svn --non-interactive checkout svn://svn-server/testrepo
Versions Report
Salt Version:
Salt: 2018.3.4
Dependency Versions:
cffi: 1.12.1
cherrypy: unknown
dateutil: Not Installed
docker-py: 1.10.6
gitdb: 2.0.5
gitpython: 2.1.11
ioflo: 1.7.5
Jinja2: 2.8
libgit2: 0.27.7
libnacl: 1.6.1
M2Crypto: 0.31.0
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 3.7.2
pycryptodome: Not Installed
pygit2: 0.27.2
Python: 3.5.2 (default, Nov 12 2018, 13:43:14)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: 0.6.8
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: ANSI_X3.4-1968
machine: x86_64
release: 5.4.7-100.fc30.x86_64
system: Linux
version: Ubuntu 16.04 xenial
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Docker Compose reproduction in the issue, then inspect salt/modules/svn.py, especially checkout and _run_svn. Investigate the UTF-8 filename failure under the reported ANSI_X3.4-1968 locale; done means SVN checkout or update succeeds when filenames contain UTF-8 characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100