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

Fix curl error #7

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions engine/provider_aws.ml
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,14 @@ module Aws : Provider_template.Provider = struct
process_response resp
in
let%lwt _resp, body =
match%lwt repeat_until_ok send_command 10 with
match%lwt repeat_until_ok send_command 60 with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good!

| Ok (r, b) ->
Lwt.return (r, b)
| Error _ ->
failwith
| Error (`Msg message, note) ->
Lwt.fail_with (Fmt.str

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we leave this as failwith (or even Fmt.failwith)? The lwt docs mention that it might be better to prefer failwith over Lwt.fail_with if we don't attempt to store or catch the rejected promise further up the chain since failwith will result in the runtime recording the backtrace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair question. In theory using the Lwt ppx should give decent backtraces. But that's not happening here so something is missing somewhere.

"Can't talk to an agent, this probably means the agent failed to \
install."
install. Error: %s - %s"
message note)
in
(*TODO cohttp_retry*)
let poll_agent () =
Expand Down