Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresql: fix encoding of pgctl path #119

Merged
merged 1 commit into from
Jan 7, 2019
Merged

postgresql: fix encoding of pgctl path #119

merged 1 commit into from
Jan 7, 2019

Conversation

jd
Copy link
Owner

@jd jd commented Jan 2, 2019

This should be a regular string and not bytes. Otherwise in case of error
(pg_ctl not found), this happens:
ERROR [pifpaf] sequence item 0: expected str instance, bytes found

Closes #118

This should be a regular string and not bytes. Otherwise in case of error
(pg_ctl not found), this happens:
  ERROR [pifpaf] sequence item 0: expected str instance, bytes found

Closes #118
@progval
Copy link

progval commented Jan 2, 2019

errors with:

ERROR [pifpaf] Can't mix strings and bytes in path components

@ardumont
Copy link

ardumont commented Jan 7, 2019

Hello,

That fixes it for me indeed:

$ pifpaf run postgresql -- pytest
WARNING [pifpaf.drivers] `psutil.Popen(pid=10779, status='terminated')` is already gone, sending SIGKILL to its process group
ERROR [pifpaf] Unable to run command `/usr/lib/postgresql/10/bin/pg_ctl -o '-A trust' initdb': [Errno 2] No such file or directory: '/usr/lib/postgresql/10/bin/pg_ctl': '/usr/lib/postgresql/10/bin/pg_ctl'

Thanks both for investigating/fixing this.


@progval Didn't you forget to remove the b"pg_ctl"?

I reproduce your error if i miss that ;)

$ pifpaf run postgresql -- pytest
WARNING [pifpaf.drivers] `psutil.Popen(pid=10525, status='terminated')` is already gone, sending SIGKILL to its process group
ERROR [pifpaf] Can't mix strings and bytes in path components

Note:

  • system: debian testing
  • pifpaf installed in a venv (2.2.1) then patched with this.

Cheers,

@progval
Copy link

progval commented Jan 7, 2019

@progval Didn't you forget to remove the b"pg_ctl"?

I did, sorry.

swhmirror pushed a commit to SoftwareHeritage/swh-docs that referenced this pull request Jan 7, 2019
Without this dependency, the pifpaf tests won't execute. They will
fail with a cryptic error.

That cryptic error message is currently fixed by pifpaf's author. It's
pending in a PR and should soon land.

Related P341
Related jd/pifpaf#108
Related jd/pifpaf#119
@jd jd merged commit 19420b3 into master Jan 7, 2019
@tobias-urdin tobias-urdin deleted the fix-118 branch October 9, 2024 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants