-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixing path handling by normalizing paths in 'options.py' #1652
base: main
Are you sure you want to change the base?
Fixing path handling by normalizing paths in 'options.py' #1652
Conversation
…erverOptions class in 'options.py'
Please provide instructions for how to duplicate the issue:
|
Dear Administrator, Thank you for your inquiry regarding pull request #1652, which addresses the issue of incorrectly concatenated paths in the Supervisor configuration file. I appreciate the opportunity to provide further clarification on how to reproduce the issue and the rationale behind the proposed changes. Instructions to Duplicate the Issue:Example
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the hundreds of lines of unrelated style changes so it's possible to see the code changes in the diff.
@@ -55,19 +76,25 @@ | |||
from supervisor import xmlrpc | |||
from supervisor import poller | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this and all other unrelated style changes.
@@ -1,3 +1,24 @@ | |||
# Changes made by user 'alexeinazarov' to ensure proper path normalization and other improvements: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these comments listing the changes. The diff will show the changes.
This change addresses an issue where paths specified for various settings in the Supervisor configuration file were concatenated incorrectly, resulting in errors such as "couldn't chdir to /path/to/project/path/to/project/build: ENOENT."
The problem stemmed from inconsistent handling of relative paths within the
options.py
file. The changes involve ensuring the existingnormalize_path
function is applied to critical areas such asself.here
in theprocess_config_file
method,self.logfile
,self.pidfile
, and server URLs in therealize
method. By ensuring all paths are converted to absolute, normalized paths, Supervisor can correctly resolve and manage the paths specified in the configuration file.These changes improve path handling robustness and prevent path-related errors during process management.
Update:
I identified this bug while testing my C++ application that contains both server and client components. The issue with path handling prompted me to bring it to light. I made the necessary adjustments to ensure the paths are forming correctly. However, handling compatibility issues across different Python versions may take more time, so the fixes are not yet fully integrated into Supervisor.
This is my first pull request, and I am eager to contribute to the project. I understand there are failing tests, and I am committed to resolving these issues with your guidance. I hope this contribution will not only fix the issue but also motivate the community to participate in improving this aspect of Supervisor.
Any guidance or feedback you can provide would be greatly appreciated. Thank you for your understanding and support.
Best regards,
A.