backup -- create: ValueError: No closing quotation #34

Closed
opened 2023-10-11 15:06:11 +00:00 by decentral1se · 4 comments
Owner

🌻 abra app backup create abra-test-recipe.foo.com
Traceback (most recent call last):
File "/usr/bin/backup", line 274, in
cli()
File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/backup", line 70, in create
run_commands(pre_commands)
File "/usr/bin/backup", line 134, in run_commands
result = container.exec_run(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/docker/models/containers.py", line 194, in exec_run
resp = self.client.api.exec_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/docker/api/exec_api.py", line 48, in exec_create
cmd = utils.split_command(cmd)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/docker/utils/utils.py", line 475, in split_command
return shlex.split(command)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/shlex.py", line 315, in split
return list(lex)
^^^^^^^^^
File "/usr/lib/python3.11/shlex.py", line 300, in next
token = self.get_token()
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/shlex.py", line 109, in get_token
raw = self.read_token()
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/shlex.py", line 191, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation

> 🌻 abra app backup create abra-test-recipe.foo.com > Traceback (most recent call last): > File "/usr/bin/backup", line 274, in <module> > cli() > File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ > return self.main(*args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main > rv = self.invoke(ctx) > ^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 1688, in invoke > return _process_result(sub_ctx.command.invoke(sub_ctx)) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke > return ctx.invoke(self.callback, **ctx.params) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke > return __callback(*args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/bin/backup", line 70, in create > run_commands(pre_commands) > File "/usr/bin/backup", line 134, in run_commands > result = container.exec_run(command) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/docker/models/containers.py", line 194, in exec_run > resp = self.client.api.exec_create( > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/docker/utils/decorators.py", line 19, in wrapped > return f(self, resource_id, *args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/docker/api/exec_api.py", line 48, in exec_create > cmd = utils.split_command(cmd) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/site-packages/docker/utils/utils.py", line 475, in split_command > return shlex.split(command) > ^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/shlex.py", line 315, in split > return list(lex) > ^^^^^^^^^ > File "/usr/lib/python3.11/shlex.py", line 300, in __next__ > token = self.get_token() > ^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/shlex.py", line 109, in get_token > raw = self.read_token() > ^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.11/shlex.py", line 191, in read_token > raise ValueError("No closing quotation") > ValueError: No closing quotation
Member

It looks like some problem with the quotation of the pre hook. I pushed a little change in the logging behaviour: a3f27fa6ba
It would be good to know which recipe it affects and the output with DEBUG log level.

It looks like some problem with the quotation of the pre hook. I pushed a little change in the logging behaviour: https://git.coopcloud.tech/coop-cloud/backup-bot-two/commit/a3f27fa6bafbf835dd36aefae26868e7da969b40 It would be good to know which recipe it affects and the output with `DEBUG` log level.
Author
Owner

abra-test-recipe, debug gives nothing from the abra side really 🤔

maybe it would be indeed good to toss back JSON from backupbot side for this kind of stuff. so abra can provide verbose logs? Or else, to pass DEBUG=... to backupbot to produce verbose logs to be outputted?

Will give it another test run shortly!

`abra-test-recipe`, debug gives nothing from the `abra` side really 🤔 maybe it would be indeed good to toss back JSON from `backupbot` side for this kind of stuff. so `abra` can provide verbose logs? Or else, to pass `DEBUG=...` to `backupbot` to produce verbose logs to be outputted? Will give it another test run shortly!
Member

I mean on backupbot side --log=DEBUG.

I mean on backupbot side `--log=DEBUG`.
Member

It was a bug in handling quotes while prepending pre/post hooks with a pipefail: 359140781e

It was a bug in handling quotes while prepending pre/post hooks with a `pipefail`: https://git.coopcloud.tech/coop-cloud/backup-bot-two/commit/359140781ea71ec24bec644734a54d984d6f9677
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/backup-bot-two#34
No description provided.