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

Fix Prefect Orion fails to start on Windows when there is a space in Prefect package's path #6880

Closed
wants to merge 3 commits into from

Conversation

bansalkanav
Copy link

Issue - #6821

Summary

Bug Fix

  • str(prefect.__module_path__.parent) represents the absolute path. Prefect Orion fails to start in Windows OS if the directory path contains spaces.
Error: Got unexpected extra argument (prefect.orion.api.server:create_app)
Orion stopped!
  • "../.." represents relative path. This solves the problem.

Prefect Orion fails to start on Windows when there is a space in Prefect package's path.

PrefectHQ#6821
@netlify
Copy link

netlify bot commented Sep 19, 2022

Deploy Preview for prefect-orion ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit acaf7fb
🔍 Latest deploy log https://app.netlify.com/sites/prefect-orion/deploys/632e96ef79dc7d0009613112
😎 Deploy Preview https://deploy-preview-6880--prefect-orion.netlify.app/api-ref/prefect/cli/orion
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@zanieb
Copy link
Contributor

zanieb commented Sep 22, 2022

Hi @bansalkanav! Unfortunately the relative path won't work once the code is packaged, just during development. I think we need to look into "escaping" the spaces in the path instead or include ' around the path in the subprocess call.

@bansalkanav
Copy link
Author

Thanks for the feedback @madkinsz. Working on it.

@discdiver discdiver added the fix A fix for a bug in an existing feature label Sep 23, 2022
@discdiver discdiver changed the title Bug Fix - Issue #6821 Fix Prefect Orion fails to start on Windows when there is a space in Prefect package's path Sep 23, 2022
As suggested, wrapping the absolute path with `\"`
@bansalkanav
Copy link
Author

@madkinsz Requesting a review. As per your suggestion, updated the code.

@peytonrunyan peytonrunyan self-assigned this Sep 28, 2022
@peytonrunyan
Copy link
Contributor

peytonrunyan commented Sep 28, 2022

Hi @bansalkanav! It looks like you're a first-time contributor, so first, thanks for taking the time to contribute to Prefect!

Before digging into the PR itself, I want to make sure that you've got your local development environment setup so that we're able to see the same thing when looking at proposed solutions. Our guide is located here: https://docs.prefect.io/contributing/overview/

Do you have a windows development environment that you are able to run the Prefect tests on, and are they running successfully?

One other thing that is typically helpful is including a test for the bug that you are fixing. This helps us confirm that the root cause of the bug is understood, and that that the proposed code addresses it.

@bansalkanav
Copy link
Author

Hi @peytonrunyan. Thanks for reverting back.

Noted.

I will set up the environment and let you know. Thanks for the guidance.

@discdiver
Copy link
Contributor

Hi all! 👋 How are things looking for the PR?

@zanieb
Copy link
Contributor

zanieb commented Oct 18, 2022

@discdiver replaced by #7224@peytonrunyan make sure to note superseded pull requests when opening.

@zanieb zanieb closed this Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants