Skip to content

Commit e6a6fe3

Browse files
add tiemout
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
1 parent 832f87d commit e6a6fe3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sigstore/_internal/rekor/client_v2.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
DEFAULT_REKOR_URL = "https://rekor.sigstore.dev"
4040
STAGING_REKOR_URL = "https://rekor.sigstage.dev"
4141

42+
# TODO: Link to merged documenation.
43+
# See https://github.com/sigstore/rekor-tiles/pull/255/files#diff-eb568acf84d583e4d3734b07773e96912277776bad39c560392aa33ea2cf2210R196
44+
CREATE_ENTRIES_TIMEOUT_SECONDS = 10
45+
4246
DEFAULT_KEY_DETAILS = common_v1.PublicKeyDetails.PKIX_ECDSA_P384_SHA_256
4347

4448

@@ -82,7 +86,11 @@ def create_entry(self, request: v2.CreateEntryRequest) -> LogEntry:
8286
if "dsseRequestV002" in payload:
8387
payload["dsseRequestV0_0_2"] = payload.pop("dsseRequestV002")
8488
_logger.debug(f"request: {json.dumps(payload)}")
85-
resp = self.session.post(f"{self.url}/log/entries", json=payload)
89+
resp = self.session.post(
90+
f"{self.url}/log/entries",
91+
json=payload,
92+
timeout=CREATE_ENTRIES_TIMEOUT_SECONDS,
93+
)
8694

8795
try:
8896
resp.raise_for_status()

0 commit comments

Comments
 (0)