indygreg / apple-platform-rs

Rust crates supporting Apple platform development
589 stars 49 forks source link

Notary poll interval #74

Open hneiva opened 1 year ago

hneiva commented 1 year ago

https://github.com/indygreg/apple-platform-rs/blob/d5e608a0391a4b453b904f8aa5862b2b5925afef/apple-codesign/src/notarization.rs#L152

I'm seeing a lot of "Connection reset by peer" errors, and wanted to extend the poll interval, but it looks like it's hard coded.

Some options here are:

  1. Ability to pass it in from cli
  2. Env variable (although I don't think rcodesign uses any env variables for config)
  3. Dynamic regulate timeout (increase every call by X seconds, up to ~30 seconds per call)
indygreg commented 1 year ago

We should automatically retry for TCP level errors.

In addition, I support making the polling interval configurable.