Skip to content
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

Allow to set timeout when destination not reachable #22

Closed
OneCyrus opened this issue Jan 31, 2024 · 6 comments · Fixed by Hakky54/sslcontext-kickstart#451 or #23
Closed

Allow to set timeout when destination not reachable #22

OneCyrus opened this issue Jan 31, 2024 · 6 comments · Fixed by Hakky54/sslcontext-kickstart#451 or #23

Comments

@OneCyrus
Copy link

Is your feature request related to a problem? Please describe.
We are using crip in dockerfiles for devcontainers and fetch some certs to trust them. Unfortunately some urls are not always accessible and this leads to crip hanging for minutes when it doesn't reach its destination.

Describe the solution you'd like
use a sensible default (couple seconds) or allow to specify a timeout which is much shorter than minutes.

Describe alternatives you've considered
build logic around crip which checks if the destination is reachable before calling crip.

@Hakky54
Copy link
Owner

Hakky54 commented Jan 31, 2024

Thank you for raising this issue, I was not aware that it could get stuck for so long. With the current implementation it will wait till the server responds, it will just wait infinity. However that can be easily adjusted. I have configured it with a default value of 1000 milliseconds which is equal to 1 second. Next to that I will add a command line argument where it will be possible to override the default timeout

@Hakky54 Hakky54 reopened this Feb 1, 2024
@Hakky54 Hakky54 linked a pull request Feb 3, 2024 that will close this issue
@Hakky54
Copy link
Owner

Hakky54 commented Feb 3, 2024

@OneCyrus I have made the changes to have this option. It has an additional option -t and an alias --timeout. The provided value will be amount of milliseconds till it wait for the server to respond or else it will skip it. You can have a look at the PR #23 and check if something is missing or fine for your use case. Looking forward to your reply.

@OneCyrus
Copy link
Author

OneCyrus commented Feb 5, 2024

@Hakky54 thanks! as far as I can tell it looks good 👍 if you have a build artifact (couldn't find one attached to the pipeline) i can give this a try.

@Hakky54
Copy link
Owner

Hakky54 commented Feb 5, 2024

Awesome, thank you! I don't have a build artifact as it is not part of the ci/cd. However I have added couple of tests like the one below to cover your use case:

https://github.com/Hakky54/certificate-ripper/pull/23/files#diff-971a20eb3bdc0e749c44f9bc0c0552c7ecc115a814ed5479f7a25ba870923072R117

When I create an artifact I can you ping you so you can try it out on your side. I expect that it will be available this week.

@Hakky54
Copy link
Owner

Hakky54 commented Feb 12, 2024

@OneCyrus I have published the new artifacts in the releases section. The latest changes are now in version 2.3.0

@OneCyrus
Copy link
Author

@Hakky54 works great! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants