Skip to content

Commit 8dc0970

Browse files
committed
docs: drop the 'retry almost always succeeds' claim from retry comments
1 parent d32806b commit 8dc0970

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

socketsecurity/core/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@
8484

8585
# Full scan upload retry policy. An upload can fail transiently at the gateway/connection
8686
# 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.)
9291
FULL_SCAN_UPLOAD_MAX_ATTEMPTS = 3
9392
# Wait before retry attempt 2 and attempt 3 respectively (plus a little jitter so a fleet of
9493
# 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:
836835
upload_files, compressed_temp_files = self._compress_facts_files_for_upload(files)
837836
try:
838837
# 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
841839
# reading the request body, so no scan was created and a retry does not duplicate
842840
# one (see the retry-policy comment above FULL_SCAN_UPLOAD_MAX_ATTEMPTS). fullscans.post()
843841
# rebuilds its lazy file loaders from the plain paths in upload_files on every call,

0 commit comments

Comments
 (0)