daml/ci
Gary Verhaegen 9da40ea426
ci/cron: fix retry policy (#8985)
I think the retry is clobbering the files. Here is my theory:
- The HTTP request is lazy, i.e. it starts producing a byte stream
  before it has finished downloading.
- The connection somehow crashes in the middle of that lazy handling,
  possibly because the Haskell code blocks for too long on something
  else and GCP thus closes the connection. (If this is true, making sure
  we download the entire thing before we start writing may make the
  download more reliable.) This explains why we get a "resource vanished"
  and not a plain 404 to start with.
- The retry policy doesn't know anything about HTTP requests; it just
  sees an IO action throwing an exception and restarts the whole thing.
- Because the IO action opens the file in Append mode, we thus end up
  with a file that is too big and has its "starting bytes" multiple
  times. That obviously fails to sign-check.

If this is what happens then the retry does not help at all, which does
seem to be what we've been observing (though I haven't tracked the exact
error rate too closely). The fix would likely be as simple as changing
`IO.AppendMode to IO.WriteMode (which truncates, per [documentation]).

[documentation]: https://hackage.haskell.org/package/base-4.14.1.0/docs/System-IO.html

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-02 13:51:00 +00:00
..
cron ci/cron: fix retry policy (#8985) 2021-03-02 13:51:00 +00:00
da-ghc-lib update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
docker Daml case and logo (#8433) 2021-01-08 12:50:15 +00:00
patch_bazel_windows Upgrade to Bazel 4.0 (#8798) 2021-02-11 10:08:47 +01:00
bash-lib.yml ci: use setvar to set variables (#8664) 2021-02-09 11:42:34 +01:00
build-unix.yml Merge Maven uploads for different Scala versions (#8943) 2021-02-24 20:33:53 +00:00
build-windows.yml ci: use setvar to set variables (#8664) 2021-02-09 11:42:34 +01:00
build.yml Merge Maven uploads for different Scala versions (#8943) 2021-02-24 20:33:53 +00:00
check-changelog.sh update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
clean-up.yml ci/linux: kill machines if they fail to clean up (#8835) 2021-02-12 19:32:14 +01:00
clear-shared-segments-macos.yml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
compatibility_ts_libs.yml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
compatibility-windows.yml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
compatibility.yml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
configure-bazel.sh update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
daily_tell_slack.yml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
dev-env-install.sh update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
dev-env-push.py update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
postgresql.conf CI: Increase the PostgreSQL connections from 100 to 200. (#6647) 2020-07-08 10:49:11 +00:00
prs.yml skip Oracle test on forks (#8930) 2021-02-24 12:19:57 +00:00
report-end.yml ci: use setvar to set variables (#8664) 2021-02-09 11:42:34 +01:00
report-start.yml ci: use setvar to set variables (#8664) 2021-02-09 11:42:34 +01:00
slack_user_ids stop notifying shayne on pr builds (#7581) 2020-10-06 14:20:43 +02:00
tell-slack-failed.yml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
windows-diagnostics.ps1 windows: CI agent diagnostics (#1146) 2019-05-15 11:59:56 +02:00