cassis-cli 1.4.0__tar.gz → 1.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cassis-cli
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: Cassis CLI — run Cassis actions (ontology validation, upload and publish) from your CI pipelines
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,3 +1,3 @@
1
1
  """Cassis CLI — run Cassis actions from your CI pipelines."""
2
2
 
3
- __version__ = "1.4.0"
3
+ __version__ = "1.4.1"
@@ -11,6 +11,14 @@ from cassis_cli import __version__
11
11
  DEFAULT_API_URL = "https://app.getcassis.com"
12
12
  TIMEOUT_SECONDS = 60.0
13
13
 
14
+ # Whole-tree endpoints (check, fmt, import) parse and re-serialize every file
15
+ # server-side, so their duration scales with the ontology: a few hundred files
16
+ # is tens of seconds of pure CPU, and the 60s default cut real runs off. The
17
+ # ceiling is deliberately far above what the edge allows (CloudFront's
18
+ # origin_read_timeout, see infra) — a client-side timeout should never be the
19
+ # thing that reports a slow server as "unreachable".
20
+ ONTOLOGY_TREE_TIMEOUT_SECONDS = 300.0
21
+
14
22
  USER_AGENT = f"cassis-cli/{__version__}"
15
23
 
16
24
  # Response header the CI endpoints set to the newest cassis-cli on PyPI.
@@ -149,7 +157,7 @@ def post_ontology_check(
149
157
  else:
150
158
  url = api_url.rstrip("/") + "/api/ci/ontology-check"
151
159
  try:
152
- with _client(transport=transport) as client:
160
+ with _client(timeout=ONTOLOGY_TREE_TIMEOUT_SECONDS, transport=transport) as client:
153
161
  response = client.post(
154
162
  url,
155
163
  json={"files": files},
@@ -190,7 +198,7 @@ def post_ontology_import(
190
198
  if label is not None:
191
199
  body["label"] = label
192
200
  try:
193
- with _client(transport=transport) as client:
201
+ with _client(timeout=ONTOLOGY_TREE_TIMEOUT_SECONDS, transport=transport) as client:
194
202
  response = client.post(
195
203
  url,
196
204
  json=body,
@@ -620,7 +628,7 @@ def post_ontology_fmt(
620
628
  """POST the ontology tree to /api/ci/ontology-fmt and return the response body."""
621
629
  url = api_url.rstrip("/") + "/api/ci/ontology-fmt"
622
630
  try:
623
- with _client(transport=transport) as client:
631
+ with _client(timeout=ONTOLOGY_TREE_TIMEOUT_SECONDS, transport=transport) as client:
624
632
  response = client.post(
625
633
  url,
626
634
  json={"files": files},
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cassis-cli"
3
- version = "1.4.0"
3
+ version = "1.4.1"
4
4
  description = "Cassis CLI — run Cassis actions (ontology validation, upload and publish) from your CI pipelines"
5
5
  readme = "README.md"
6
6
  license = { text = "Apache-2.0" }
File without changes
File without changes
File without changes