[go: up one dir, main page]

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

detect difference between architectures when determining if driver is already found #33

Open
bandophahita opened this issue May 31, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@bandophahita
Copy link
Contributor

This is likely only really an issue on the new apple silicon macs but it could pertain to folks running docker and downloading the webdriver to a shared volume between the host machine and the container (I'm guessing it's a pretty rare edge case)

When pyderman checks to see if the file_path already exists it doesn't do a check between the file architectures. While it is possible for chromedriver compiled for amd64 to run on an m1/m2 mac, the arm64 version really ought to be used.

In theory, we should determine if the existing file is in the "proper" architecture when deciding to overwrite the file or not.

@bandophahita
Copy link
Contributor Author
bandophahita commented May 31, 2023

Doing some napkin logic -

Assuming user has ARM cpu

  • scenario 1
    • Existing file is x86
    • existing file version is same as newly downloaded
    • we should overwrite existing
  • scenario 2
    • Existing file is ARM
    • existing file version is same as newly downloaded
    • webdriver in question only has x86 version available to download
    • we should not overwrite

In Scenario 2 it's possible to install an ARM version of the driver via the Debian package manager (apt-get) even though the chromedriver group doesn't compile an ARM driver for linux. As I understand it the Debian group compiles their own.

Due to the above situation I'm not sure what the right thing to do here:

  • scenario 3
    • existing file is ARM
    • existing file version is different from newly downloaded
    • webdriver in question only has x86 version available to download

My gut says the right thing to do would be to raise an exception letting the user know we can't help them. They have something pyderman couldn't update for them.

It's also unclear to me if we would also need a way to force the download of the webdriver in a specific architecture (where possible). Say if someone specifically wanted to pull down x86 even though they were on ARM.

@bandophahita
Copy link
Contributor Author
bandophahita commented May 31, 2023

Potential gotchas:

Architecture not always available for all versions?

For the most recent versions of the drivers I've looked at, it would seem the driver groups are consistent with their offerings. That wasn't the case with earlier versions. ARM wasn't really something folks bothered to compile until apple moved to their new silicon.

Architecture not available for all OSes

It seems that most of the webdrivers compile a mac arm version but that's not the case for linux and certainly not the case for windows.

Architecture not available for all webdrivers

Opera does not appear to compile a separate driver for apple silicon.

@shadowmoose
Copy link
Owner

This is interesting, but I worry about the platform-specific solutions that would be necessary to support all the possible situations. I'm not opposed to adding this level of support, but I probably won't have time to dig into this myself.

@shadowmoose shadowmoose added the help wanted Extra attention is needed label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants