recce-nightly 1.20.0.20250918__py3-none-any.whl → 1.20.0.20250921__py3-none-any.whl

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.

Potentially problematic release.


This version of recce-nightly might be problematic. Click here for more details.

recce/state/cloud.py CHANGED
@@ -75,15 +75,15 @@ class CloudStateLoader(RecceStateLoader):
75
75
  'Please provide a share URL in the command argument with option "--share-url <share-url>"'
76
76
  )
77
77
  return False
78
- elif self.catalog == "snapshot":
78
+ elif self.catalog == "session":
79
79
  if self.cloud_options.get("api_token") is None:
80
80
  self.error_message = RECCE_API_TOKEN_MISSING.error_message
81
81
  self.hint_message = RECCE_API_TOKEN_MISSING.hint_message
82
82
  return False
83
- if self.cloud_options.get("snapshot_id") is None:
84
- self.error_message = "No snapshot ID is provided for the snapshot catalog."
83
+ if self.cloud_options.get("session_id") is None:
84
+ self.error_message = "No session ID is provided for the session catalog."
85
85
  self.hint_message = (
86
- 'Please provide a snapshot ID in the command argument with option "--snapshot-id <snapshot-id>"'
86
+ 'Please provide a session ID in the command argument with option "--session-id <session-id>"'
87
87
  )
88
88
  return False
89
89
  return True
@@ -106,8 +106,8 @@ class CloudStateLoader(RecceStateLoader):
106
106
  return self._load_state_from_github()
107
107
  elif self.catalog == "preview":
108
108
  return self._load_state_from_preview()
109
- elif self.catalog == "snapshot":
110
- return self._load_state_from_snapshot(), None
109
+ elif self.catalog == "session":
110
+ return self._load_state_from_session(), None
111
111
  else:
112
112
  raise RecceException(f"Unsupported catalog type: {self.catalog}")
113
113
 
@@ -196,37 +196,37 @@ class CloudStateLoader(RecceStateLoader):
196
196
 
197
197
  return RecceState.from_file(tmp.name, file_type=file_type)
198
198
 
199
- def _load_state_from_snapshot(self) -> RecceState:
199
+ def _load_state_from_session(self) -> RecceState:
200
200
  """
201
- Load state from snapshot by:
202
- 1. Get snapshot info
203
- 2. Download artifacts for both base and current snapshots
201
+ Load state from session by:
202
+ 1. Get session info
203
+ 2. Download artifacts for both base and current sessions
204
204
  3. Download recce_state if available, otherwise create empty state with artifacts
205
205
  """
206
- if self.snapshot_id is None:
207
- raise RecceException("Cannot load the snapshot state from Recce Cloud. No snapshot ID is provided.")
206
+ if self.session_id is None:
207
+ raise RecceException("Cannot load the session state from Recce Cloud. No session ID is provided.")
208
208
 
209
- # 1. Get snapshot information
210
- logger.debug(f"Getting snapshot {self.snapshot_id}")
211
- snapshot = self.recce_cloud.get_snapshot(self.snapshot_id)
209
+ # 1. Get session information
210
+ logger.debug(f"Getting session {self.session_id}")
211
+ session = self.recce_cloud.get_session(self.session_id)
212
212
 
213
- org_id = snapshot.get("org_id")
214
- project_id = snapshot.get("project_id")
213
+ org_id = session.get("org_id")
214
+ project_id = session.get("project_id")
215
215
 
216
216
  if not org_id or not project_id:
217
- raise RecceException(f"Snapshot {self.snapshot_id} does not belong to a valid organization or project.")
217
+ raise RecceException(f"Session {self.session_id} does not belong to a valid organization or project.")
218
218
 
219
- # 2. Download manifests and catalogs for both snapshots
220
- logger.debug(f"Downloading current snapshot artifacts for {self.snapshot_id}")
221
- current_artifacts = self._download_snapshot_artifacts(self.recce_cloud, org_id, project_id, self.snapshot_id)
219
+ # 2. Download manifests and catalogs for both session
220
+ logger.debug(f"Downloading current session artifacts for {self.session_id}")
221
+ current_artifacts = self._download_session_artifacts(self.recce_cloud, org_id, project_id, self.session_id)
222
222
 
223
- logger.debug(f"Downloading base snapshot artifacts for project {project_id}")
224
- base_artifacts = self._download_base_snapshot_artifacts(self.recce_cloud, org_id, project_id)
223
+ logger.debug(f"Downloading base session artifacts for project {project_id}")
224
+ base_artifacts = self._download_base_session_artifacts(self.recce_cloud, org_id, project_id)
225
225
 
226
226
  # 3. Try to download existing recce_state, otherwise create new state
227
227
  try:
228
- logger.debug(f"Downloading recce_state for snapshot {self.snapshot_id}")
229
- state = self._download_snapshot_recce_state(self.recce_cloud, org_id, project_id, self.snapshot_id)
228
+ logger.debug(f"Downloading recce_state for session {self.session_id}")
229
+ state = self._download_session_recce_state(self.recce_cloud, org_id, project_id, self.session_id)
230
230
  except Exception as e:
231
231
  logger.debug(f"No existing recce_state found, creating new state: {e}")
232
232
  state = RecceState()
@@ -237,12 +237,12 @@ class CloudStateLoader(RecceStateLoader):
237
237
 
238
238
  return state
239
239
 
240
- def _download_snapshot_artifacts(self, recce_cloud, org_id: str, project_id: str, snapshot_id: str) -> dict:
241
- """Download manifest and catalog for a snapshot, return JSON data directly."""
240
+ def _download_session_artifacts(self, recce_cloud, org_id: str, project_id: str, session_id: str) -> dict:
241
+ """Download manifest and catalog for a session, return JSON data directly."""
242
242
  import requests
243
243
 
244
244
  # Get download URLs
245
- presigned_urls = recce_cloud.get_download_urls_by_snapshot_id(org_id, project_id, snapshot_id)
245
+ presigned_urls = recce_cloud.get_download_urls_by_session_id(org_id, project_id, session_id)
246
246
 
247
247
  artifacts = {}
248
248
 
@@ -251,40 +251,40 @@ class CloudStateLoader(RecceStateLoader):
251
251
  if response.status_code == 200:
252
252
  artifacts["manifest"] = response.json()
253
253
  else:
254
- raise RecceException(f"Failed to download manifest for snapshot {snapshot_id}")
254
+ raise RecceException(f"Failed to download manifest for session {session_id}")
255
255
 
256
256
  # Download catalog
257
257
  response = requests.get(presigned_urls["catalog_url"])
258
258
  if response.status_code == 200:
259
259
  artifacts["catalog"] = response.json()
260
260
  else:
261
- raise RecceException(f"Failed to download catalog for snapshot {snapshot_id}")
261
+ raise RecceException(f"Failed to download catalog for session {session_id}")
262
262
 
263
263
  return artifacts
264
264
 
265
- def _download_snapshot_recce_state(self, recce_cloud, org_id: str, project_id: str, snapshot_id: str) -> RecceState:
266
- """Download recce_state for a snapshot."""
265
+ def _download_session_recce_state(self, recce_cloud, org_id: str, project_id: str, session_id: str) -> RecceState:
266
+ """Download recce_state for a session."""
267
267
  # Get download URLs (now includes recce_state_url)
268
- presigned_urls = recce_cloud.get_download_urls_by_snapshot_id(org_id, project_id, snapshot_id)
268
+ presigned_urls = recce_cloud.get_download_urls_by_session_id(org_id, project_id, session_id)
269
269
  recce_state_url = presigned_urls.get("recce_state_url")
270
270
 
271
271
  if not recce_state_url:
272
- raise RecceException(f"No recce_state_url found for snapshot {snapshot_id}")
272
+ raise RecceException(f"No recce_state_url found for session {session_id}")
273
273
 
274
274
  # Reuse the existing download method
275
275
  state = self._download_state_from_url(recce_state_url, SupportedFileTypes.FILE)
276
276
 
277
277
  if state is None:
278
- raise RecceException(f"Failed to download recce_state for snapshot {snapshot_id}")
278
+ raise RecceException(f"Failed to download recce_state for session {session_id}")
279
279
 
280
280
  return state
281
281
 
282
- def _download_base_snapshot_artifacts(self, recce_cloud, org_id: str, project_id: str) -> dict:
283
- """Download manifest and catalog for the base snapshot, return JSON data directly."""
282
+ def _download_base_session_artifacts(self, recce_cloud, org_id: str, project_id: str) -> dict:
283
+ """Download manifest and catalog for the base session, return JSON data directly."""
284
284
  import requests
285
285
 
286
- # Get download URLs for base snapshot
287
- presigned_urls = recce_cloud.get_base_snapshot_download_urls(org_id, project_id)
286
+ # Get download URLs for base session
287
+ presigned_urls = recce_cloud.get_base_session_download_urls(org_id, project_id)
288
288
 
289
289
  artifacts = {}
290
290
 
@@ -293,14 +293,14 @@ class CloudStateLoader(RecceStateLoader):
293
293
  if response.status_code == 200:
294
294
  artifacts["manifest"] = response.json()
295
295
  else:
296
- raise RecceException(f"Failed to download base snapshot manifest for project {project_id}")
296
+ raise RecceException(f"Failed to download base session manifest for project {project_id}")
297
297
 
298
298
  # Download catalog
299
299
  response = requests.get(presigned_urls["catalog_url"])
300
300
  if response.status_code == 200:
301
301
  artifacts["catalog"] = response.json()
302
302
  else:
303
- raise RecceException(f"Failed to download base snapshot catalog for project {project_id}")
303
+ raise RecceException(f"Failed to download base session catalog for project {project_id}")
304
304
 
305
305
  return artifacts
306
306
 
@@ -318,8 +318,8 @@ class CloudStateLoader(RecceStateLoader):
318
318
  return self._export_state_to_github()
319
319
  elif self.catalog == "preview":
320
320
  return self._export_state_to_preview()
321
- elif self.catalog == "snapshot":
322
- return self._export_state_to_snapshot()
321
+ elif self.catalog == "session":
322
+ return self._export_state_to_session()
323
323
  else:
324
324
  raise RecceException(f"Unsupported catalog type: {self.catalog}")
325
325
 
@@ -374,25 +374,25 @@ class CloudStateLoader(RecceStateLoader):
374
374
  logger.warning(message)
375
375
  return message, None
376
376
 
377
- def _export_state_to_snapshot(self) -> Tuple[Union[str, None], None]:
378
- """Export state to snapshot (upload recce_state with empty artifacts)."""
379
- if self.snapshot_id is None:
380
- raise RecceException("Cannot export state to snapshot. No snapshot ID is provided.")
377
+ def _export_state_to_session(self) -> Tuple[Union[str, None], None]:
378
+ """Export state to session (upload recce_state with empty artifacts)."""
379
+ if self.session_id is None:
380
+ raise RecceException("Cannot export state to session. No session ID is provided.")
381
381
 
382
- # Get snapshot information
383
- snapshot = self.recce_cloud.get_snapshot(self.snapshot_id)
384
- org_id = snapshot.get("org_id")
385
- project_id = snapshot.get("project_id")
382
+ # Get session information
383
+ session = self.recce_cloud.get_session(self.session_id)
384
+ org_id = session.get("org_id")
385
+ project_id = session.get("project_id")
386
386
 
387
387
  if not org_id or not project_id:
388
- raise RecceException(f"Snapshot {self.snapshot_id} does not belong to a valid organization or project.")
388
+ raise RecceException(f"Session {self.session_id} does not belong to a valid organization or project.")
389
389
 
390
390
  # Get upload URLs (now includes recce_state_url)
391
- presigned_urls = self.recce_cloud.get_upload_urls_by_snapshot_id(org_id, project_id, self.snapshot_id)
391
+ presigned_urls = self.recce_cloud.get_upload_urls_by_session_id(org_id, project_id, self.session_id)
392
392
  recce_state_url = presigned_urls.get("recce_state_url")
393
393
 
394
394
  if not recce_state_url:
395
- raise RecceException(f"No recce_state_url found for snapshot {self.snapshot_id}")
395
+ raise RecceException(f"No recce_state_url found for session {self.session_id}")
396
396
 
397
397
  # Create a copy of the state with empty artifacts for upload
398
398
  upload_state = RecceState()
@@ -37,7 +37,7 @@ class RecceStateLoader(ABC):
37
37
  self.pr_info = None
38
38
  self.catalog: Literal["github", "preview", "snapshot"] = "github"
39
39
  self.share_id = None
40
- self.snapshot_id = None
40
+ self.session_id = None
41
41
 
42
42
  if self.cloud_mode:
43
43
  if self.cloud_options.get("github_token"):
@@ -48,9 +48,9 @@ class RecceStateLoader(ABC):
48
48
  if self.pr_info.id is None:
49
49
  raise RecceException("Cannot get the pull request information from GitHub.")
50
50
  elif self.cloud_options.get("api_token"):
51
- if self.cloud_options.get("snapshot_id"):
52
- self.catalog = "snapshot"
53
- self.snapshot_id = self.cloud_options.get("snapshot_id")
51
+ if self.cloud_options.get("session_id"):
52
+ self.catalog = "session"
53
+ self.session_id = self.cloud_options.get("session_id")
54
54
  else:
55
55
  self.catalog = "preview"
56
56
  self.share_id = self.cloud_options.get("share_id")
recce/util/recce_cloud.py CHANGED
@@ -244,48 +244,46 @@ class RecceCloud:
244
244
  logger.warning(f"Failed to set Onboarding State in Recce Cloud. Reason: {str(e)}")
245
245
  return
246
246
 
247
- def get_snapshot(self, snapshot_id: str):
248
- api_url = f"{self.base_url_v2}/snapshots/{snapshot_id}"
247
+ def get_session(self, session_id: str):
248
+ api_url = f"{self.base_url_v2}/sessions/{session_id}"
249
249
  response = self._request("GET", api_url)
250
250
  if response.status_code == 403:
251
251
  return {"status": "error", "message": response.json().get("detail")}
252
252
  if response.status_code != 200:
253
253
  raise RecceCloudException(
254
- message="Failed to get snapshot from Recce Cloud.",
254
+ message="Failed to get session from Recce Cloud.",
255
255
  reason=response.text,
256
256
  status_code=response.status_code,
257
257
  )
258
258
  data = response.json()
259
259
  if data["success"] is not True:
260
260
  raise RecceCloudException(
261
- message="Failed to get snapshot from Recce Cloud.",
261
+ message="Failed to get session from Recce Cloud.",
262
262
  reason=data.get("message", "Unknown error"),
263
263
  status_code=response.status_code,
264
264
  )
265
- return data["snapshot"]
265
+ return data["session"]
266
266
 
267
- def update_snapshot(self, org_id: str, project_id: str, snapshot_id: str, adapter_type: str):
268
- api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/snapshots/{snapshot_id}"
267
+ def update_session(self, org_id: str, project_id: str, session_id: str, adapter_type: str):
268
+ api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/sessions/{session_id}"
269
269
  data = {"adapter_type": adapter_type}
270
270
  response = self._request("PATCH", api_url, json=data)
271
271
  if response.status_code == 403:
272
272
  return {"status": "error", "message": response.json().get("detail")}
273
273
  if response.status_code != 200:
274
274
  raise RecceCloudException(
275
- message="Failed to update snapshot in Recce Cloud.",
275
+ message="Failed to update session in Recce Cloud.",
276
276
  reason=response.text,
277
277
  status_code=response.status_code,
278
278
  )
279
279
  return response.json()
280
280
 
281
- def get_download_urls_by_snapshot_id(self, org_id: str, project_id: str, snapshot_id: str) -> dict[str, str]:
282
- api_url = (
283
- f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/snapshots/{snapshot_id}/download-url"
284
- )
281
+ def get_download_urls_by_session_id(self, org_id: str, project_id: str, session_id: str) -> dict[str, str]:
282
+ api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/sessions/{session_id}/download-url"
285
283
  response = self._request("GET", api_url)
286
284
  if response.status_code != 200:
287
285
  raise RecceCloudException(
288
- message="Failed to download snapshot from Recce Cloud.",
286
+ message="Failed to download session from Recce Cloud.",
289
287
  reason=response.text,
290
288
  status_code=response.status_code,
291
289
  )
@@ -302,13 +300,13 @@ class RecceCloud:
302
300
  presigned_urls[key] = self._replace_localhost_with_docker_internal(url)
303
301
  return presigned_urls
304
302
 
305
- def get_base_snapshot_download_urls(self, org_id: str, project_id: str) -> dict[str, str]:
306
- """Get download URLs for the base snapshot of a project."""
307
- api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/base-snapshot/download-url"
303
+ def get_base_session_download_urls(self, org_id: str, project_id: str) -> dict[str, str]:
304
+ """Get download URLs for the base session of a project."""
305
+ api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/base-session/download-url"
308
306
  response = self._request("GET", api_url)
309
307
  if response.status_code != 200:
310
308
  raise RecceCloudException(
311
- message="Failed to download base snapshot from Recce Cloud.",
309
+ message="Failed to download base session from Recce Cloud.",
312
310
  reason=response.text,
313
311
  status_code=response.status_code,
314
312
  )
@@ -325,12 +323,12 @@ class RecceCloud:
325
323
  presigned_urls[key] = self._replace_localhost_with_docker_internal(url)
326
324
  return presigned_urls
327
325
 
328
- def get_upload_urls_by_snapshot_id(self, org_id: str, project_id: str, snapshot_id: str) -> dict[str, str]:
329
- api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/snapshots/{snapshot_id}/upload-url"
326
+ def get_upload_urls_by_session_id(self, org_id: str, project_id: str, session_id: str) -> dict[str, str]:
327
+ api_url = f"{self.base_url_v2}/organizations/{org_id}/projects/{project_id}/sessions/{session_id}/upload-url"
330
328
  response = self._request("GET", api_url)
331
329
  if response.status_code != 200:
332
330
  raise RecceCloudException(
333
- message="Failed to get upload URLs for snapshot from Recce Cloud.",
331
+ message="Failed to get upload URLs for session from Recce Cloud.",
334
332
  reason=response.text,
335
333
  status_code=response.status_code,
336
334
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: recce-nightly
3
- Version: 1.20.0.20250918
3
+ Version: 1.20.0.20250921
4
4
  Summary: Environment diff tool for dbt
5
5
  Home-page: https://github.com/InfuseAI/recce
6
6
  Author: InfuseAI Dev Team
@@ -1,7 +1,7 @@
1
- recce/VERSION,sha256=ROmUJbh-DrHJsAgTturORju_cuPBNgPXukHuvYXiw04,16
1
+ recce/VERSION,sha256=927IbuVVxqKUqOGffZnfB1fLn7HHSPlGOrpZ2KnDc9w,16
2
2
  recce/__init__.py,sha256=yNb0QT-yoStex0VZALNJvUwtPLommoVCStcow31guqo,2392
3
- recce/artifact.py,sha256=Y4qC3ymckCFSBRQ_amvhp1kwE6QrXHFzno4b_mMAfZs,9252
4
- recce/cli.py,sha256=ncHiK7cSkHiVXZ8FiXPAYqEc1zMwxPK-ykue56K5Ots,45170
3
+ recce/artifact.py,sha256=pwI377OgHIbb8HI9k-2h1K7byO2_VXfO63JXs1Ws-24,9229
4
+ recce/cli.py,sha256=Ro3vvno_korHXZwT_putOJJSNLtuvf7fJWfhCbHAfe8,46109
5
5
  recce/config.py,sha256=A4CbKcIdwQ4A9Q2ba4riHUshVQw1D-qDelMOdlt2khU,4661
6
6
  recce/connect_to_cloud.py,sha256=_SkX2pdyXa9FNyaHvItyYVPF2nZxy2JnCyd_o_psh2Y,4750
7
7
  recce/core.py,sha256=MtBWxemvCQDdUITwkU2JyuQYqcjlA0a76M8Kg53ECxQ,10754
@@ -11,7 +11,7 @@ recce/git.py,sha256=8Eg-6NzL-KjA3rT-ibbAyaCwGlzV0JqH3yGikrJNMDA,2344
11
11
  recce/github.py,sha256=PEpM6ZRiinsPbXSWj4aJCKbZrN1jUXzpzAfJq_CGah4,7420
12
12
  recce/pull_request.py,sha256=aW0B1NE2LUKTam1S4TQ7smXB9KLE1DV8GnyBqNXA6j8,3832
13
13
  recce/run.py,sha256=PNafwUUJdIG8b1o0y1QuvjACpA3E-5a3keH45CrWHN0,14044
14
- recce/server.py,sha256=TYkPHaz_XamNhKpL0ldkVJApFq7c6gG89wtn0F1sP34,22733
14
+ recce/server.py,sha256=2xy9AkHJx2c_PNtgmg4QwbbbVLfBP68ZGsskEzHtbRQ,22730
15
15
  recce/summary.py,sha256=Mbxvxr9KazR5o9icqhhjiGHsoAiWxQU4PdN7HytBJ1c,19154
16
16
  recce/adapter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  recce/adapter/base.py,sha256=T_JNeLHgiHSaegw-DbrvHOaYjMyZcjj2Qtg5cWh_fco,3548
@@ -23,13 +23,13 @@ recce/apis/check_api.py,sha256=KMCXSMl1qqzx2jQgRqCrD4j_cY3EHBbM3H2-t-6saAU,6227
23
23
  recce/apis/check_func.py,sha256=gktbCcyk3WGvWRJJ-wDnwv7NrIny2nTHWLl1-kdiVRo,4183
24
24
  recce/apis/run_api.py,sha256=eOaxOxXDkH59uqGCd4blld7edavUx7JU_DCd2WAYrL8,3416
25
25
  recce/apis/run_func.py,sha256=6wC8TDU-h7TLr2VZH7HNsWaUVlQ9HBN5N_dwqfi4lMY,7440
26
- recce/data/404.html,sha256=sjEskTB5D1VSh8FA1rPxcVfmO1TCtvuwHZsWUm6oiig,59087
26
+ recce/data/404.html,sha256=AkLP52yWPUFEj7Bjv8H1-ohLuofIUB7mXlrnACMTgr4,59087
27
27
  recce/data/auth_callback.html,sha256=H-XfdlAFiw5VU2RpKBVQbwh1AIqJrPHrFA0S09nNJZA,94779
28
28
  recce/data/favicon.ico,sha256=B2mBumUOnzvUrXrqNkrc5QfdDXjzEXRcWkWur0fJ6sM,2565
29
- recce/data/index.html,sha256=smcduJBo1hmRT6tDCpAxQxyctexmqCrfexiUJuEw5tA,77450
30
- recce/data/index.txt,sha256=5KPOUDFO6rISVNcj4TYC7Bv7y5DTxDu4ewSNEz0_Rm8,6409
31
- recce/data/_next/static/ZUbzMSlc3CArT7vsmEueJ/_buildManifest.js,sha256=avQsL1oPzYwcdZvar5cABpd9QZyaNp5U46Y9ET0fq24,544
32
- recce/data/_next/static/ZUbzMSlc3CArT7vsmEueJ/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
29
+ recce/data/index.html,sha256=njKsbzX3bAMWX-vSgKzglqI8WYtwh8_Onbkv4_CXHWM,77450
30
+ recce/data/index.txt,sha256=TkkxXfVjA-exikwv1Ly33RO_PDGQNJ8jOsYfb2AzuT4,6409
31
+ recce/data/_next/static/7VDijMrfP7uONDsXVHgCK/_buildManifest.js,sha256=avQsL1oPzYwcdZvar5cABpd9QZyaNp5U46Y9ET0fq24,544
32
+ recce/data/_next/static/7VDijMrfP7uONDsXVHgCK/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
33
33
  recce/data/_next/static/chunks/068b80ea-5225768a06b94b6f.js,sha256=9-CgOMA67KPg0s3LBhBMLS7nl5icw5BMDhs8Zk-TjO4,4628
34
34
  recce/data/_next/static/chunks/0ddaf06c-47655700b71b89f7.js,sha256=ZAiDuPV8ad-3MSwYva4LCOLRFOyaSENn2vBB6ZSU3So,696
35
35
  recce/data/_next/static/chunks/12f8fac4-10d6e05f7330d12b.js,sha256=79b2y12TyKWM49nc8dsZRwojyWcC7Yz-P7-f3wBfy9s,152792
@@ -62,7 +62,7 @@ recce/data/_next/static/chunks/main-bc07477fd7b7c32d.js,sha256=Vn4NGVdiaYAdp8ryF
62
62
  recce/data/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
63
63
  recce/data/_next/static/chunks/webpack-364bf2670cd39ec1.js,sha256=A9nbzHfxYRScJi-DoXyjmjrhk0ZNGZvVESrMt3_2J_E,3580
64
64
  recce/data/_next/static/chunks/app/layout-24244460abfd34dd.js,sha256=2uyuWecojLN2_lZd56j_Cdz0msiHe8CRhNBz4aGccfc,1411
65
- recce/data/_next/static/chunks/app/page-8b1eb61c94f06c1b.js,sha256=2Q7RLMBc5e3VUL_RPCGzobcG5X3iiIn_-Uwy3wY_4xA,168955
65
+ recce/data/_next/static/chunks/app/page-9f7291a41c6274cd.js,sha256=C7qnj2oWooIbiJS5iyLixGYindaui2r2t5gkuwCD-30,168954
66
66
  recce/data/_next/static/chunks/app/_not-found/page-101c1a92b86f368b.js,sha256=s26MwrqBIbf4Vq5yzoKhKoJwQ2Y6ognSlvxf4B4UWFE,2678
67
67
  recce/data/_next/static/chunks/pages/_app-8096e5691e76ad38.js,sha256=tJlgoS3QWhdYC0L12-5KpE3LHgv_K3hYb4YRYMPz6xE,238
68
68
  recce/data/_next/static/chunks/pages/_error-2ce4373ab74aab6b.js,sha256=FXe38dEBW7IgNfpjJ4dg3H5SAEYgKdT5lKVYxbofIBE,221
@@ -95,11 +95,11 @@ recce/models/check.py,sha256=jjR1SGyczjrqyK-0Zas6ikLIGSgVp54lvfcQA19AniI,1588
95
95
  recce/models/run.py,sha256=QK2gvOWvko9YYhd2NLs3BPt5l4MSCZGwpzTAiqx9zJw,1161
96
96
  recce/models/types.py,sha256=9ReOyIv3rUD3_cIQfB9Rplb0L2YQuZr4kS9Zai30nB8,5234
97
97
  recce/state/__init__.py,sha256=V1FRPTQJUz-uwI3Cn8wDa5Z9bueVs86MR_1Ti4RGfPc,650
98
- recce/state/cloud.py,sha256=SLPBQljUS7vKjKxG0UwY4bfey1t5ZI0BCDx4DBIjH8A,25031
98
+ recce/state/cloud.py,sha256=QHdOJjjd4wVTk3m6yhah9FppeZa6DUOBr3SJwECFpOU,24950
99
99
  recce/state/const.py,sha256=Me3uVQHi_uZysl3tfpmghPInuKF236X6LfMKVvJlCgA,827
100
100
  recce/state/local.py,sha256=bZIkl7cAfyYaGgYEr3uD_JLrtwlHBnu8_o1Qz2djQzw,1920
101
101
  recce/state/state.py,sha256=L1cEAl6S9rxTvSIc8ICNwOYoCYK5tR3M0kBo4NTcXK4,3617
102
- recce/state/state_loader.py,sha256=4lJYiOdlAg8h7rVBiBiffnkSyiQSmg9NejIJv4fFHTM,5984
102
+ recce/state/state_loader.py,sha256=_4vzZ3XiIMdC7G2m2WUhGi_IIoJLzsE7KwTVUeebMc0,5979
103
103
  recce/tasks/__init__.py,sha256=b553AtDHjYROgmMePv_Hv_X3fjh4iEn11gzzpUJz6_o,610
104
104
  recce/tasks/core.py,sha256=JFYa1CfgOiRPQ7KVTwMuxJjhMB-pvCwB-xezVt-h3RU,4080
105
105
  recce/tasks/dataframe.py,sha256=03UBWwt0DFTXlaEOtnV5i_mxdRKD7UbRayewEL2Ub48,3650
@@ -122,12 +122,12 @@ recce/util/logger.py,sha256=6UgLFkRiur9jJfu2ZRdo4LUvMw4f75V-l-1HT1-sgKo,747
122
122
  recce/util/onboarding_state.py,sha256=kwFirKlfXdl5WFkR_nmilqGKFyELNcSPMqYq-by35fk,1991
123
123
  recce/util/perf_tracking.py,sha256=FjhrdbbXIgybxS_oPpFsJ9VUDR93d7bUs8VNNqpXNxw,2483
124
124
  recce/util/pydantic_model.py,sha256=KumKuyCjbTzEMsKLE4-b-eZfp0gLhYDdmVtw1-hxiJw,587
125
- recce/util/recce_cloud.py,sha256=YSzdC1GYcoy-BbPgnouocp9qqt1LZ-HDWKcn1ulmoT4,15011
125
+ recce/util/recce_cloud.py,sha256=45-HmG3yW51VLssmwQQRZjoDDM9LwEq2UHTMMykX16Y,14961
126
126
  recce/util/singleton.py,sha256=1cU99I0f9tjuMQLMJyLsK1oK3fZJMsO5-TbRHAMXqds,627
127
127
  recce/yaml/__init__.py,sha256=EgXYlFeJZchatUClRDXbIC5Oqb2_nBvB2NqItYVihio,1292
128
- recce_nightly-1.20.0.20250918.dist-info/licenses/LICENSE,sha256=CQjjMy9aYPhfe8xG_bcpIfKtNkdxLZ5IOb8oPygtUhY,11343
128
+ recce_nightly-1.20.0.20250921.dist-info/licenses/LICENSE,sha256=CQjjMy9aYPhfe8xG_bcpIfKtNkdxLZ5IOb8oPygtUhY,11343
129
129
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
130
- tests/test_cli.py,sha256=4N_F_lg00fGBuK3I9EyaF2Doi7PpKCrjqbuJ5YI1KqE,5467
130
+ tests/test_cli.py,sha256=CFtP4eJrtcHwpzoEgJAyveQcqxAmDQuWXPrLc_Iny7Q,6626
131
131
  tests/test_config.py,sha256=ODDFe_XF6gphmSmmc422dGLBaCCmG-IjDzTkD5SJsJE,1557
132
132
  tests/test_connect_to_cloud.py,sha256=b2fgV8L1iQBdEwh6RumMsIIyYg7GtMOMRz1dvE3WRPg,3059
133
133
  tests/test_core.py,sha256=WgCFm8Au3YQI-V5UbZ6LA8irMNHRc7NWutIq2Mny0LE,6242
@@ -153,8 +153,8 @@ tests/tasks/test_row_count.py,sha256=21PaP2aq-x8-pqwzWHRT1sixhQ8g3CQNRWOZTTmbK0s
153
153
  tests/tasks/test_schema.py,sha256=7ds4Vx8ixaiIWDR49Lvjem4xlPkRP1cXazDRY3roUak,3121
154
154
  tests/tasks/test_top_k.py,sha256=YR_GS__DJsbDlQVaEEdJvNQ3fh1VmV5Nb3G7lb0r6YM,1779
155
155
  tests/tasks/test_valuediff.py,sha256=_xQJGgxsXoy2NYk_Z6Hsw2FlVh6zk2nN_iUueyRN1e8,2046
156
- recce_nightly-1.20.0.20250918.dist-info/METADATA,sha256=BGaD2GcXnlhBXtvF3Sh5vRGsIhcd0-nb2nE4A3WAFh4,9366
157
- recce_nightly-1.20.0.20250918.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
158
- recce_nightly-1.20.0.20250918.dist-info/entry_points.txt,sha256=oqoY_IiwIqXbgrIsPnlqUqao2eiIeP2dprowkOlmeyg,40
159
- recce_nightly-1.20.0.20250918.dist-info/top_level.txt,sha256=6PKGVpf75idP0C6KEaldDzzZUauIxNu1ZDstau1pI4I,12
160
- recce_nightly-1.20.0.20250918.dist-info/RECORD,,
156
+ recce_nightly-1.20.0.20250921.dist-info/METADATA,sha256=C9jUp7DvpC5WQU9voaMdyd0uwduEeSjN9hMQfxGeDHU,9366
157
+ recce_nightly-1.20.0.20250921.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
158
+ recce_nightly-1.20.0.20250921.dist-info/entry_points.txt,sha256=oqoY_IiwIqXbgrIsPnlqUqao2eiIeP2dprowkOlmeyg,40
159
+ recce_nightly-1.20.0.20250921.dist-info/top_level.txt,sha256=6PKGVpf75idP0C6KEaldDzzZUauIxNu1ZDstau1pI4I,12
160
+ recce_nightly-1.20.0.20250921.dist-info/RECORD,,
tests/test_cli.py CHANGED
@@ -5,6 +5,8 @@ from click.testing import CliRunner
5
5
 
6
6
  from recce.cli import run as cli_command_run
7
7
  from recce.cli import server as cli_command_server
8
+ from recce.cli import snapshot as cli_command_snapshot
9
+ from recce.cli import upload_session as cli_command_upload_session
8
10
  from recce.core import RecceContext
9
11
  from recce.state import CloudStateLoader
10
12
 
@@ -131,3 +133,28 @@ class TestCommandRun(TestCase):
131
133
 
132
134
  self.runner.invoke(cli_command_run, [])
133
135
  mock_cli_run.assert_called_once()
136
+
137
+
138
+ class TestCommandUploadSession(TestCase):
139
+ def setUp(self):
140
+ self.runner = CliRunner()
141
+ pass
142
+
143
+ @patch("recce.cli.prepare_api_token", return_value="unittest_token")
144
+ @patch("recce.cli.upload_artifacts_to_session", return_value=0)
145
+ def test_cmd_upload_session(self, mock_upload_artifacts_to_session, mock_prepare_api_token):
146
+ self.runner.invoke(
147
+ cli_command_upload_session,
148
+ ["--session-id", "unittest_session", "--api-token", mock_prepare_api_token.return_value],
149
+ )
150
+ mock_upload_artifacts_to_session.assert_called_once_with(
151
+ "target", session_id="unittest_session", token="unittest_token", debug=False
152
+ )
153
+
154
+ self.runner.invoke(
155
+ cli_command_snapshot,
156
+ ["--snapshot-id", "unittest_session", "--api-token", mock_prepare_api_token.return_value],
157
+ )
158
+ mock_upload_artifacts_to_session.assert_called_once_with(
159
+ "target", session_id="unittest_session", token="unittest_token", debug=False
160
+ )