-
Notifications
You must be signed in to change notification settings - Fork 1.1k
tools: Download ARM deb package, disable fedora ARM test #6110
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,14 +66,15 @@ def collect_download_urls() -> list[Package]: | |
| def download_packages(root: str, packages: list[Package]): | ||
| # The debian repository building tool, reprepo, only supports a single package per version by default. | ||
| # The ability to support multiple versions has been added but is not present in ubuntu-latest on | ||
| # github action runners yet. So we only download one package, the latest, for ubuntu. | ||
| # github action runners yet. So we only download one package per architecture, the latest, for ubuntu. | ||
| # The rest of the scripts work on a set of packages, so that when the Limit parameter is supported, | ||
| # we can remove this flag and start hosting more than the latest versions. | ||
| # Another alternative would be to use the components feature of reprepo, but it would involve updating | ||
| # the repository definition itself for each release, which is a bad experience for end users. | ||
| deb_done = False | ||
| deb_done = 0 | ||
| for package in packages: | ||
| if package.kind == AssetKind.DEB and deb_done: | ||
| # Download the latest arm and amd64 package for .deb format | ||
| if package.kind == AssetKind.DEB and deb_done == 2: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic assumes exactly two DEB architectures and relies on asset ordering; it may download two of the same arch across releases and miss the other. Tracking unique architectures downloaded would ensure one per arch regardless of order (also applies to the increment below). 🤖 Was this useful? React with 👍 or 👎
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a valid suggestion but kind of overkill as we have a specific schema and order for packages on the release page. It might be something to apply in a follow up PR
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need |
||
| continue | ||
|
|
||
| print(f"Downloading {package.download_url}") | ||
|
|
@@ -89,7 +90,7 @@ def download_packages(root: str, packages: list[Package]): | |
| print(f"Downloaded {package.download_url}") | ||
| time.sleep(0.5) | ||
| if package.kind == AssetKind.DEB: | ||
| deb_done = True | ||
| deb_done += 1 | ||
|
|
||
|
|
||
| def main(root: str): | ||
|
|
||
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.
platform.processor() can return an empty string on some Linux environments, which could cause this test to be skipped even on x86_64; platform.machine() tends to be more reliable for architecture checks.
🤖 Was this useful? React with 👍 or 👎
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.
@abhijat +1
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.
Consider this
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.
Because this analyzes the output of the file command, it will also return true on 64 bit ARM which we have to skip, eg from an arm machine
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 did not apply the bot's suggestion because
machine()can also return empty string on some environments, it doesn't appear to be any better thanprocessor()which we already use in some other places in code.