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 console appearing on daemon in Windows #6450

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

skshetry
Copy link
Member

Trying to fix #6449.

Would be great to have confirmation from someone using Windows.

@skshetry skshetry requested a review from a team as a code owner August 17, 2021 04:50
_popen(
cmd, env=env, creationflags=creationflags, startupinfo=startupinfo
).communicate()
_popen(cmd, env=env, creationflags=creationflags, startupinfo=startupinfo)
Copy link
Member Author

Choose a reason for hiding this comment

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

We just need to spawn it, I don't think we need to wait for it.

@shcheklein
Copy link
Member

cc @mattseddon

dvc/daemon.py Outdated Show resolved Hide resolved
@skshetry skshetry reopened this Aug 18, 2021
@skshetry skshetry force-pushed the fix-windows-console branch 2 times, most recently from 97fd9a5 to bfb26e6 Compare August 19, 2021 07:42
@karajan1001
Copy link
Contributor

Sorry, could not see the console on my computer. Maybe because it is too fast?
I'm using an AMD 3600 CPU and 32GB memory.

@skshetry
Copy link
Member Author

Did you check on master branch?

@karajan1001
Copy link
Contributor

Did you check on master branch?

Yes. I'm on 2.6.0+a285d2

@skshetry
Copy link
Member Author

Do you have analytics enabled?

@karajan1001
Copy link
Contributor

analytics

dvc config core.analytics true? I tried both true and false

@iterative iterative deleted a comment from mergify bot Aug 25, 2021
Comment on lines +21 to +24
main_entrypoint = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "__main__.py"
)
prefix += [main_entrypoint]
Copy link
Member Author

@skshetry skshetry Aug 25, 2021

Choose a reason for hiding this comment

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

@iterative/dvc, do you know a better way to get the executable? In Windows, the sys.argv[0] is .env/Scripts/dvc which is just a link to .env/Scripts/dvc.exe built from the console_scripts. So, we were calling it as /path/to/python .env/Scripts/dvc which is not a python file and the daemon was failing on Windows.

In Linux/MacOS, based on how you invoke, it's either __main__.py or the .env/bin/dvc.
I think invoking __main__.py directly is the best approach here, but I'd like to hear the alternatives.

Copy link
Member

Choose a reason for hiding this comment

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

@skshetry It is also important to not forget about our exe binary built by pyinstaller, IIRC __main__.py is not present there, but I might be mistaken.

Copy link
Member Author

@skshetry skshetry Aug 25, 2021

Choose a reason for hiding this comment

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

@efiop, It's inside the if not is_binary(): block as before. ;)

Copy link
Member

Choose a reason for hiding this comment

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

@skshetry Ah, sorry, totally blinded that one. 🤦

Copy link
Member

@efiop efiop left a comment

Choose a reason for hiding this comment

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

LGTM

@efiop efiop merged commit 73811f6 into iterative:master Aug 25, 2021
@skshetry skshetry deleted the fix-windows-console branch August 26, 2021 04:54
@efiop efiop added bugfix fixes bug P: windows Related to the Platform: Windows labels Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes bug P: windows Related to the Platform: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

console briefly opens on Windows
4 participants