8000 Use ThreadPoolExecutor to parallelize RPM uploads to Pulp. by dkliban · Pull Request #3716 · fedora-copr/copr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use ThreadPoolExecutor to parallelize RPM uploads to Pulp. #3716

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

Merged
merged 1 commit into from
May 12, 2025

Conversation

dkliban
Copy link
Contributor
@dkliban dkliban commented May 1, 2025

No description provided.

@dkliban dkliban marked this pull request as draft May 1, 2025 19:32
Copy link
github-actions bot commented May 1, 2025

Pull Request validation

Failed

🔴 Failed or pending checks - python-lint-job[failure]

Success

🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved

@dkliban dkliban marked this pull request as ready for review May 1, 2025 20:38
def upload_build_results(self, chroot, results_dir, target_dir_name):
max_workers = min(32, (os.cpu_count() or 1) * 5) # This could probably be hardcoded
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be min(32, 80) in our case, and we can expect ~100+ processes uploading stuff to Pulp, i.e. 3200 parallel threads.

@praiskup
Copy link
Member
praiskup commented May 6, 2025

Thank you, @dkliban, awesome contribution! I just think we should limit the concurrency "by default" (parallelize just the migration script). Otherwise looks good.

@dkliban dkliban force-pushed the parallel-upload branch from 3fe197b to 0073aa7 Compare May 6, 2025 15:04
@dkliban
Copy link
Contributor Author
dkliban commented May 6, 2025

@praiskup I updated the PR with your suggestions.

@praiskup
Copy link
Member
praiskup commented May 6, 2025

Ideally please provide the docstrings (our preferred style), or prefix "internal" methods with _. One of those makes linter happy.

@dkliban dkliban force-pushed the parallel-upload branch from 0073aa7 to 3b4ac72 Compare May 6, 2025 15:47
@dkliban dkliban force-pushed the parallel-upload branch 2 times, most recently from e6a34e8 to 94f558f Compare May 7, 2025 12:51
@dkliban dkliban force-pushed the parallel-upload branch from 94f558f to dfea672 Compare May 7, 2025 13:03
@praiskup
Copy link
Member
praiskup commented May 7, 2025

LGTM

@nikromen nikromen merged commit bafb54f into fedora-copr:main May 12, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0