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
Add GCSDownloadStrategy #5070
Add GCSDownloadStrategy #5070
Conversation
Okay so I'm getting an install error when trying to
My config looks like this:
I'm guessing this is something I did wrong in the download strat? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming that this is meant to be used with private formulae.
What does the GCS gem provide that accessing a URL cannot? There is the precedent of the S3 gem being installed…
@@ -218,6 +218,24 @@ def setup_git_repo | |||
end | |||
end | |||
|
|||
describe GCSDownloadStrategy do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs more substantial tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point me to some examples so I can get a better sense of what to include...
I'm a noob with rspec and ruby 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look at some of the other download strategies, e.g. GitHubGitDownloadStrategy
and see what state you can inspect.
@@ -1200,6 +1200,43 @@ def update | |||
end | |||
end | |||
|
|||
# GCSDownloadStrategy downloads files from Google Cloud Storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation will have to be elsewhere, as well…
I'm not sure where but wait to do so until some project members take a look at this.
Regarding the gem, I based this on the S3DownloadStrategy and noticed that it went through some iterations where it went from accessing the url to using the aws gem ... so I thought that was preferred Yes you're correct in your assumption, the idea is to be able to download private resources; I'm reading the documentation (Google's) now again to see how to do this without the gem. I looked at Google's documentation and their gem it should be doable to do it without the gem, there're straight forward instructions here: https://cloud.google.com/storage/docs/access-control/create-signed-urls-program and it looks like the ☝️ is this preferred w/o gem ? |
c23e352
to
b3e270b
Compare
I do not want to include any more download strategies that will not be used by Homebrew/homebrew-core. Instead I'm interested in allowing taps/private taps formulae to have ways to specify download strategies within their formulae. |
I've opened #5074 with the proposed new approach. |
brew style
with your changes locally?brew tests
with your changes locally?Hello, I based this off of the S3DownloadStrategy as it most closely matched the steps that needed to be done.
I'm still running tests on a dummy formula to make sure the google cloud gem get's installed and all that as I was having issues on my other laptop but I want to make sure it's not my ruby setup before filing a bug.
This being the case, I don't know if I should label this PR or do something more since I didn't see anything in the contributing guide in terms of adding new download strategies.
Thanks in advance and thanks for this tool... life saver 🙏