@@ -41,6 +41,11 @@ def acquire_environment_configuration(self, fqdn: str):
41
41
42
42
def acquire_extensions (self ):
43
43
r = self .requests .get (f"{ self .url_base } /api/v2/extensions" , headers = self .headers )
44
+ # Temporary solution. It can cause too much data usage.
45
+ # Also we can hit a hard backend limit wrg to page size.
46
+ # Which can cause false negatives.
47
+ ext_num_tot = r .json ()["totalCount" ]
48
+ r = self .requests .get (f"{ self .url_base } /api/v2/extensions?pageSize={ ext_num_tot } " , headers = self .headers )
44
49
r .raise_for_status ()
45
50
return r .json ()["extensions" ]
46
51
@@ -113,9 +118,10 @@ def download_schemas(self, target_version: str, download_dir: str):
113
118
114
119
header = self .headers
115
120
header ["accept" ] = "application/octet-stream"
116
- file = self .requests .get (self .url_base + f"/api/v2/extensions/schemas/{ version } " , headers = header , stream = True )
117
- file .raise_for_status ()
118
- zfile = zipfile .ZipFile (io .BytesIO (file .content ))
121
+ schema_file = self .requests .get (self .url_base + f"/api/v2/extensions/schemas/{ version } " ,
122
+ headers = header , stream = True )
123
+ schema_file .raise_for_status ()
124
+ zfile = zipfile .ZipFile (io .BytesIO (schema_file .content ))
119
125
120
126
THRESHOLD_ENTRIES = 10000
121
127
THRESHOLD_SIZE = 1000000000
0 commit comments