|
84 | 84 |
|
85 | 85 | # Full scan upload retry policy. An upload can fail transiently at the gateway/connection |
86 | 86 | # level (an HTTP 502/503/504/408, a dropped or reset connection, or a client-side timeout) |
87 | | -# without the server having created the scan; a retried upload almost always succeeds. |
88 | | -# In these failure modes no scan was created, so a retry does not duplicate one. (A |
89 | | -# duplicate is possible only if a gateway timeout races a request the server later |
90 | | -# completes; that is benign - the retried scan supersedes the orphaned one, same as |
91 | | -# running the CLI twice.) |
| 87 | +# without the server having created the scan. In these failure modes no scan was created, |
| 88 | +# so a retry does not duplicate one. (A duplicate is possible only if a gateway timeout |
| 89 | +# races a request the server later completes; that is benign - the retried scan supersedes |
| 90 | +# the orphaned one, same as running the CLI twice.) |
92 | 91 | FULL_SCAN_UPLOAD_MAX_ATTEMPTS = 3 |
93 | 92 | # Wait before retry attempt 2 and attempt 3 respectively (plus a little jitter so a fleet of |
94 | 93 | # CI jobs hitting the same failure doesn't retry in lock-step). |
@@ -836,8 +835,7 @@ def create_full_scan(self, files: List[str], params: FullScanParams, base_paths: |
836 | 835 | upload_files, compressed_temp_files = self._compress_facts_files_for_upload(files) |
837 | 836 | try: |
838 | 837 | # Retry transient gateway/timeout failures (502/503/504/408, dropped connections, |
839 | | - # timeouts) with increasing waits; such failures are intermittent and a retried |
840 | | - # upload almost always succeeds. In these failure modes the server never finished |
| 838 | + # timeouts) with increasing waits. In these failure modes the server never finished |
841 | 839 | # reading the request body, so no scan was created and a retry does not duplicate |
842 | 840 | # one (see the retry-policy comment above FULL_SCAN_UPLOAD_MAX_ATTEMPTS). fullscans.post() |
843 | 841 | # rebuilds its lazy file loaders from the plain paths in upload_files on every call, |
|
0 commit comments