Add download timeouts for PDSC entries#242
Conversation
|
+1! With this issue being present, it breaks some workflows like building containers that do a |
|
+1 |
|
Who has the access to merge this pr? |
I have. Having feedback about the fact people are encountering the same problem is useful. What is more useful is feedback about testing the pull request. I can only assume that emojis, I have two concerns with the PR:
|
Hey- these are both fair concerns. The choice of a 5 second timeout was arbitrary, and essentially made so that the pack update would not hang for a long period when a timeout was going to occur. If you'd like a longer timeout I'm ok with that. The reason I changed the download failure to an error was that I did not see a log emitted (in the default configuration) when using a warning. IMO users should be aware some packs are failing to download- if for nothing else than so that they can ping the vendors maintaining those packs. |
The timeout method you use includes both the connection time and the time it takes to transfer of the content: It seems this would be very problematic as it would impact all users that don't have an Internet connection that allows them to download a It seems that the TCP connection timeout is 127 seconds, based on https://man7.org/linux/man-pages/man7/tcp.7.html: I would be interested to see if
There are always failing downloads. Your view of users does not align with our experience. If we display error messages we are assured to confuse users (in particular the existing ones who have not seen those messages in the past) and are more likely to open an issue here than report to the vendor. If you want to see the warnings use |
ae8a88e to
48ffc04
Compare
I've updated the PR to use With this,
Using |
Add a connection timeout of 15 seconds and deadline timeout on downloads of PDSC entries. This way broken PSDC entries do not hang the `pyocd pack update` command Signed-off-by: Daniel DeGrasse <[email protected]>
Deadline timeout is likely to impact .pack file downloads
48ffc04 to
3019a43
Compare
Using I was wrong about the |
Just checked- the currently pushed version with |
Yes. What we are concerned about is that connections or communications are progressing, not capping the time for the whole transfer to an arbitrary value. The |
|
Regarding this. Can we have the new code release with this fix? Justification: |
|
@gbarkadiusz, @danieldegrasse, @maxgerhardt-phy, @orlra, @dhommerOXOS. |
Verified the fix work on Mac OS Sequoia (15.5), using wheel from here: https://github.com/pyocd/cmsis-pack-manager/actions/runs/15828200318/artifacts/3384328826 |
Verified on Ubuntu 25.04 x86_64 |
|
The new version was released (https://github.com/pyocd/cmsis-pack-manager/releases/tag/v0.6.0) and published on PyPI (https://pypi.org/project/cmsis-pack-manager/0.6.0/). |

Add a timeout of 5 seconds on downloads of PDSC entries, and log an error to stdout. This way broken PDSC entries do not hang the
pyocd pack updatecommandWithout this change:
With this change:
Command completes and I can use the packs that downloaded correctly