webdriverio-community/node-geckodriver

Please don't check Cargo.toml on mozilla-central

whimboo opened this issue · 8 comments

The code at

export const MOZ_CENTRAL_CARGO_TOML = 'https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/geckodriver/Cargo.toml'
checks for some reason the Cargo.toml file on mozilla-central. We are not releasing geckodriver from this repository and that file contains information that hasn't been released yet.

Is there a reason why this check is done, and not GitHub is used where we actually release geckodriver from? The URL would be: https://github.com/mozilla/geckodriver/blob/release/Cargo.toml.

I'm asking because we are seeing a huge amount of requests for that file since yesterday, which negatively impacts our performance for tooling.

Thanks.

CC @christian-bromann

@whimboo there isn't any particular reason why we pull it from moz central instead of GitHub, this can surely be changed.

Oh right. I didn't copy the raw version of the file. Thanks for correcting.

@whimboo there isn't any particular reason why we pull it from moz central instead of GitHub, this can surely be changed.

That would be great. Thanks.

For now we will put a redirect in place on our side to lower the high rate of incoming requests.

Please note that even with the newer version on mozilla-central it doesn't mean that it is released yet. That means installations of geckodriver for the latest release will fail because the compiled assets and sources are not available yet.

A better API to use here is the following, which returns a JSON payload including links to the assets:
https://api.github.com/repos/mozilla/geckodriver/releases/latest

@whimboo @cgsheeh the problem we now discover with the GitHub endpoint is that we get rate limited, can you suggest an alternative?

Looks like this was fixed in 08a5ecf? We set up a redirect to that file on our end in the same fashion, using the githubusercontent.com URL.

Yeah it seems like these endpoints are static content and not under rate limitation.