-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
HOMEBREW_ARTIFACT_DOMAIN behaviour differs from documentation #13222
Comments
Observed behaviour is correct and documentation is incomplete. Thanks! |
And not sure what technology you are using for a Cache, but based on that linked issue JFrog confirmed that Cask was out of scope for their support because they can't act as a simple forward proxy and updated their docs to note that. I believe the https://docs.brew.sh/Manpage#environment doc is still accurate though on what that envvar does to a download URL. Users may not understand though that Casks are sourced from any internet destination vs the Bottles by default sourcing from Github Packages. So you can swap out the source domain for Packages easily while the Cask payload requires a forward proxy that handles arbitrary destinations. I still have not found a great combination of envvars that allows brew to leverage a cache for formulae and bottles while falling back to Internet access channels (forward proxy) for the payload of a cask. Didn't get much traction on a discussion of alternatives to the existing flow either so just been having users manually unset to install/update casks which is far from ideal. |
I'd suggest this behaviour could be adjusted so it just doesn't take affect for Casks. I'd review a PR for that. |
Yeah that was the plan and just wanted to get some community feedback via the Discussion on what type of mechanism would be the best path. There is a bit of history in those existing variables and flows and wanted to try and reflect that. Ruby is also not my wheelhouse so that was a personal headwind that I know I could get by for a simple NO_CASKS flag, but the FORMULAE env vars it gets a bit more involved. JFrog hadn't considered Casks in their initial implementation of the caching logic, but once I showed them how the flows were different than the Formulae/Bottle type interactions they knew they couldn't offer that while maintaining the controls in Artifactory. I might take a swing at a simple PR on a to see how it goes. Couple internal hurdles, but nothing crazy. |
brew config
outputbrew doctor
outputVerification
brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
we use
brew
in our CI system and want to avoid hitting upstream servers with too many requests. therefor we want to utilize a cache.What happened (include all command output)?
installing casks/formulae with
HOMEBREW_ARTIFACT_DOMAIN
configuredresults in URLs being rewritten in two different ways.
What did you expect to happen?
asset URLs hosted under
ghcr.io
get transformed into a format understood by container registry mirrors such as harbor and artifactory. this is also the documented behaviour.all other URLs get simply prefixed with the configured artifact domain, resulting in a protocol scheme to appear twice in the URL (
https://cache.my.corp/docker-github/https://example.com/foo.tar.gz
). i am not sure, which software is supposed to handle URLs formatted like this.in another issue it is explained, that HOMEBREW_ARTIFACT_DOMAIN is inteded to be used with proxies, which i do not understand, given that http_proxy et al. are the environment variables to be used with HTTP proxies.
given the lack of unit tests for this feature, i do not know if the observed behaviour is correct and the documentation is incomplete or vice-versa.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: