Skip to content

Conversation

@rh-gvincent
Copy link
Contributor

@rh-gvincent rh-gvincent commented Dec 18, 2025

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

@rh-gvincent rh-gvincent force-pushed the add_tasks branch 4 times, most recently from 2b5f981 to e408ebb Compare December 18, 2025 15:00
@rh-gvincent
Copy link
Contributor Author

recheck

3 similar comments
@rh-gvincent
Copy link
Contributor Author

recheck

@rh-gvincent
Copy link
Contributor Author

recheck

@rh-gvincent
Copy link
Contributor Author

recheck

@rh-gvincent rh-gvincent force-pushed the add_tasks branch 9 times, most recently from 257cfe2 to aa9026b Compare January 6, 2026 14:01
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
Copy link
Contributor

@fcharlier fcharlier left a 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):
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants