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

Start Windows CRC executable path with upper case drive-letter #178

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

odockal
Copy link
Collaborator

@odockal odockal commented Sep 19, 2023

Due to a strict check of a hidden_daemon.ps1 file content during crc setup on crc side there is an error when initializing the CRC in podman desktop. This PR should align the default windows crc executable location with this strict check.

Fixes #175

@gbraad
Copy link
Contributor

gbraad commented Sep 19, 2023

Does this affect functionality?

@cfergeau
Copy link

I think I saw some mentions of lower case/upper case drive letters causing issues in relation with crc-org/crc#3837 and similar issues we had recently.
No idea if this PR is related to these ^^

@odockal

This comment was marked as outdated.

@odockal
Copy link
Collaborator Author

odockal commented Sep 19, 2023

right now it seems to work with Podman Desktop 1.4.0 and CRC 2.26.0. (Just testing locally)

@gbraad gbraad changed the title fix: make Windows CRC default executable path starting with upper cas… Start Windows CRC executable path with upper case drive-letter Sep 19, 2023
@gbraad
Copy link
Contributor

gbraad commented Sep 19, 2023

Please change format, as we do not make use of fix and chore.
I would propose: Start Windows CRC executable path with upper case drive-letter

Make sure to provide a description as e letter is merely a continuation and does not help much to understand the issue you try to resolve.

@odockal
Copy link
Collaborator Author

odockal commented Sep 19, 2023

@gbraad Fixed. I also pushed better commit message.

@anjannath
Copy link
Member

@gbraad
Copy link
Contributor

gbraad commented Sep 20, 2023

@odockal

there is no description to explain what is being solved here:
98f9650

The issue looks so trivial that it might not be understood why the case matters.

@odockal
Copy link
Collaborator Author

odockal commented Sep 20, 2023

@odockal

there is no description to explain what is being solved here: 98f9650

The issue looks so trivial that it might not be understood why the case matters.

Added fixes #175 into commit message, so it is now clear, right?

@gbraad
Copy link
Contributor

gbraad commented Sep 20, 2023

We never refer to just a github issue, as that means a developer would ALSO have to open a browser to understand what the change is about. On the command line that does not work well, like during a bisect.

@gbraad
Copy link
Contributor

gbraad commented Sep 20, 2023

Simple example when it concerns a fixed bug: crc-org/crc@45831b0 or more detailed: crc-org/crc@f76e4b9

We haven't been doing this in the repo when it concerns features, but since this is an obscure issue some details are appreciated.

 - Due to a strict check of a `hidden_daemon.ps1` file content during `crc setup` on `crc` side there is an error when initializing the CRC in podman desktop. This change should align the default windows `crc` executable location with this strict check
 - fixes crc-org#175

Signed-off-by: Ondrej Dockal <[email protected]>
@odockal
Copy link
Collaborator Author

odockal commented Sep 20, 2023

Simple example when it concerns a fixed bug: crc-org/crc@45831b0 or more detailed: crc-org/crc@f76e4b9

We haven't been doing this in the repo when it concerns features, but since this is an obscure issue some details are appreciated.

Ok, getting closer now?

@gbraad
Copy link
Contributor

gbraad commented Sep 20, 2023

Due to a strict check of a hidden_daemon.ps1 file content during crc setup

So, wouldn't it be smarter to prevent the strict check in hidden_daemon.ps1 instead? The casing should not have to matter. @anjannath WDYT?

@anjannath
Copy link
Member

anjannath commented Sep 20, 2023

Due to a strict check of a hidden_daemon.ps1 file content during crc setup

So, wouldn't it be smarter to prevent the strict check in hidden_daemon.ps1 instead? The casing should not have to matter. @anjannath WDYT?

I don't think the strict check should be relaxed, (mostly because its using a generic FileContentMatches function which does byte to byte comparison that is used for checking other files that are created in pre-flight checks)

I tested this and it fixes the issue #175, it seems golang os.Executable output is affected by the PATH env variable, and since we add this file path to the beginning of the existing PATH we are getting the small letter drive name

@odockal
Copy link
Collaborator Author

odockal commented Sep 21, 2023

Due to a strict check of a hidden_daemon.ps1 file content during crc setup

So, wouldn't it be smarter to prevent the strict check in hidden_daemon.ps1 instead? The casing should not have to matter. @anjannath WDYT?

Even though I strongly agree with this. We would have to wait until next CRC version release to get this fixed. Right now any CRC extension cannot be used on Windows at all with crc 2.26.0, if I am not mistaken, so it would be nice to have this fixed by latest crc extension (if released with this patch) and have all working together - podman desktop, extension and crc.

@anjannath
Copy link
Member

I have started working on a fix on CRC's side, anjannath/crc@fda052d

@anjannath
Copy link
Member

we had a discussion about this on slack, and we decided since, this is going to fix the issue for current release of CRC as well as newer releases of CRC, to merge this PR and discuss further improvements to the preflight check on CRC side (to make it independent of whether the path starts with a lower case or upper case drive letter)

@anjannath anjannath merged commit c9f46e1 into crc-org:main Sep 25, 2023
@odockal
Copy link
Collaborator Author

odockal commented Sep 25, 2023

@anjannath Absolutely! thank you.

@anjannath
Copy link
Member

@odockal welcome, fyi, we are not yet able to publish the extension image with this change to the official redhat-developer/openshift-local-extension due to some permission issue, hope to get it published there by EOD, thanks!

@odockal
Copy link
Collaborator Author

odockal commented Sep 25, 2023

@anjannath no problem. Let me know once it is out so I can test it.

@odockal
Copy link
Collaborator Author

odockal commented Sep 25, 2023

@anjannath If I tried to install latest from ghcr.io it seems to work fine with the patch. I can initialize microshift preset atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants