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

Copy link
Copy Markdown

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
Copy Markdown
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