-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for tasks #7
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
base: main
Are you sure you want to change the base?
Conversation
2b5f981 to
e408ebb
Compare
|
recheck |
3 similar comments
|
recheck |
|
recheck |
|
recheck |
257cfe2 to
aa9026b
Compare
In DCI we can create tasks attached to a jobstate. This patch add the support for the tasks endpoints. Depends-On: distributedci/dci-control-server#19
fcharlier
left a comment
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.
one detail inline.
lgtm else.
| r = requests.get(location, stream=True) | ||
| r.raise_for_status() | ||
| with open(file_path + ".part", "wb") as f: | ||
| for chunk in r.iter_content(chunk_size=1024): |
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.
Chunk size 1KB seems too small to me, no need to loop 1000 times to get 1MB of data with modern network bandwidth.
We can very safely fetch/write at least 64KB chunks (even up to 1MB would be find), it should allow to download 99% of the task files we have in DCI in one iteration and still limit the # of iterations to something not too crazy for the larger files.
File size stats in bytes for tasks since 2026-01-01:
min | max | avg | 75 pct | 90 pct | 95 pct | 99 pct | 99.5 pct | 99.9 pct
-----+----------+-----------------------+--------+--------+--------+--------+----------+----------
1 | 27897896 | 6158.9794323289321501 | 564 | 2346 | 7903 | 62466 | 166466 | 836602
In DCI we can create tasks attached to a jobstate. This patch add the support for the tasks endpoints.
Depends-On: distributedci/dci-control-server#19