gitlab-letsencrypt icon indicating copy to clipboard operation
gitlab-letsencrypt copied to clipboard

Add option --initial-wait

Open tmaier opened this issue 7 years ago • 2 comments

Could not find challenge file. Retrying in 30s...
Could not find challenge file. Retrying in 1m...
Could not find challenge file. Retrying in 2m...
Could not find challenge file. Retrying in 4m...
Could not find challenge file. Retrying in 8m...

I know that the CD pipeline for one of my pages needs 1:37 minutes, the other one 4:30 minutes.

The tool tries already after 30 seconds. It would be great if I could define an initial wait period, like --initial-wait 90, which means that the tool tries after 90 secs and increases the wait time slowly from there.

tmaier avatar Jan 16 '18 14:01 tmaier

I think a better solution would be to wait until the pipeline is done:

  • https://docs.gitlab.com/ee/api/pipelines.html

But on an another note: Why slow down the initial wait? You have to wait the 4.5 min anyway, and gitlab-le is not spamming gitlab that hard...

leipert avatar Jan 16 '18 15:01 leipert

I agree with @leipert - the better solution would be to poll the pipeline until it's done. I can think of these benefits:

  • If the pipeline finishes and we still can't find the challenge file, we can show a friendlier error message telling the user to check their arguments and/or pipeline settings. I have not tested this, but it would depend on GitLab's pipeline API being accurate (i.e. files are published to GitLab pages exactly when the pipeline finishes, and not later).
  • We would be able to detect if the pipeline failed for whatever reason, and not have to time out which takes a really long time with the current settings.
  • We would be able to detect if there is no pipeline running at all after the challenge file has been uploaded, in which case we can fail fast and show a friendly error message as well. This would be possible if there is not a significant delay between files being uploaded and the pipeline API showing the corresponding pending build.

rolodato avatar Jan 16 '18 19:01 rolodato