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

[PROPOSAL] postgresql process-compose is faulty when $PGHOST contains blank space #2399

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

rbardak
Copy link
Contributor

@rbardak rbardak commented Oct 31, 2024

Hello,

Please view this PR as a bug report and proposal for a fix, and not a finished feature implementation.

When we were working with devbox we realised we had errors on some of our machines. After some debugging we found that devbox services start postgresql did not work properly on machines, where the absolute path to the project contained a blank space. This change in the process-compose was what fixed the issue for us.

I did not perform any due dilligence in checking or testing if this proposed change does not introduce a breaking change for other consumers. I am merely proposing a change that has worked for us personally.

Summary

The postgresql process compose is faulty, as it does not properly escape the PGHOST variable. When a blank space is anywhere in the absolute path of the project, pg_ctl will interpret the blank space as a new argument, instead of being part of the path argument.

How was it tested?

WIP, the change was tested locally in an extra process-compose.yml that was not part of the plugin. This PR merely suggests that the change may be applied to the plugin. However I have not done any testing and this PR SHOULD NOT BE MERGED AS IS.
As the change is only trivial I used the PR to notify of the issue, since this makes it much clearer what the problem was.

…ct path

The postgresql process compose is faulty, as it does not properly escape the PGHOST variable. When a blank space is anywhere in the absolute path of the  project, pg_ctl will interpret the blank space as a new argument, instead of being part of the path argument.

Signed-off-by: Robin Bardakcioglu <[email protected]>
Copy link
Contributor

@Lagoja Lagoja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward, and it worked when tested locally

Copy link
Contributor

@mikeland73 mikeland73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikeland73 mikeland73 merged commit 14cfacd into jetify-com:main Nov 4, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants