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
Fix GitHub Packages filenames. #11092
Fix GitHub Packages filenames. #11092
Conversation
They don't need escaped like the Bintray ones did. Fixes #11090 (but note this may require the cache entry to be cleared and the package to be redownloaded).
Review period skipped due to |
@@ -281,6 +281,10 @@ def bintray | |||
ERB::Util.url_encode("#{name}-#{version}#{extname}") | |||
end | |||
|
|||
def github_packages | |||
"#{name}--#{version}#{extname}" |
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 uses two dashes, while the bintray
name format only uses one dash. We have been following the bintray
naming pattern in the osrf/simulation tap and upload our bottles with one dash to s3 (all bottles viewable at gazebosim.org/distributions/bottles-simulation).
Since this PR was merged, our bottles are being uploaded with two dashes, since we currently upload them using the bottle.tags.filename
field in the json file (logic in upload script here).
I saw #11097 was made to fix bintray uploads via the upload_bottles
method in bintray.rb
, but the bottle.tags.filename
json field still has two dashes.
So how many dashes are expected in bottle filenames?
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.
So how many dashes are expected in bottle filenames?
This doesn't answer your question (you raise a good quesetion about handling backwards compatbility), but I can at least give some background:
The single dash has mostly been for backwards compatbility - it only applied to the remote filename. When dowloaded, it is actually stored with two dashes. There's no backwards compatibility concern with GitHub Packages, so we do not support single dash on that platform.
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.
Related: #11106
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.
Related: #11106
thanks for pointing that out; that resolves the issue for me
["#{image_name}/blobs/sha256:#{checksum}", filename] | ||
["#{image_name}/blobs/sha256:#{checksum}", filename&.github_packages] | ||
else | ||
# TODO: this can be removed when we no longer use Bintray | ||
filename | ||
filename&.bintray |
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 am using an internal tap and I think because of the change in this PR, I am now getting the following output in brew info --json=v1 <formula>
:
...
"bottle": {
"stable": {
"rebuild": 0,
"root_url": "https://<domain>/homebrew/bottles",
"files": {
"catalina": {
"cellar": "/usr/local/Cellar",
"url": "https://<domain>/homebrew/bottles/",
"sha256": "..."
}
}
}
},
...
Notice the bottle's URL is missing the actual full path and only contains the base URL. Is there a way we can restore this for third-party taps?
They don't need escaped like the Bintray ones did.
Fixes #11090 (but note this may require the cache entry to be cleared and the package to be redownloaded).