run-cache 2.0.2__tar.gz → 2.1.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.
Files changed (45) hide show
  1. {run_cache-2.0.2 → run_cache-2.1.1}/PKG-INFO +2 -2
  2. run_cache-2.1.1/src/dbt_run_cache/_version.py +1 -0
  3. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/auth/sso.py +11 -4
  4. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/config.py +1 -0
  5. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/run_cache.py +6 -2
  6. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/runner.py +13 -2
  7. run_cache-2.0.2/src/dbt_run_cache/_version.py +0 -1
  8. {run_cache-2.0.2 → run_cache-2.1.1}/.gitignore +0 -0
  9. {run_cache-2.0.2 → run_cache-2.1.1}/pyproject.toml +0 -0
  10. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/__init__.py +0 -0
  11. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/_typing.py +0 -0
  12. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/__init__.py +0 -0
  13. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/base.py +0 -0
  14. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/bigquery.py +0 -0
  15. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/clock.py +0 -0
  16. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/common.py +0 -0
  17. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/databricks.py +0 -0
  18. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/postgres.py +0 -0
  19. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/adapters/snowflake.py +0 -0
  20. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/auth/__init__.py +0 -0
  21. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/auth/grpc.py +0 -0
  22. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/auth/oauth_clients.py +0 -0
  23. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/auth/sso_server.py +0 -0
  24. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/auth/utils.py +0 -0
  25. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/cli/__init__.py +0 -0
  26. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/cli/auth.py +0 -0
  27. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/cli/explainer.py +0 -0
  28. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/cli/main.py +0 -0
  29. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/decision_logger.py +0 -0
  30. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/dev_cloner.py +0 -0
  31. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/dispatcher.py +0 -0
  32. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/errors.py +0 -0
  33. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/events.py +0 -0
  34. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/git.py +0 -0
  35. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/grpc/__init__.py +0 -0
  36. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/grpc/client.py +0 -0
  37. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/grpc/interceptors.py +0 -0
  38. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/plugin.py +0 -0
  39. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/profiles.py +0 -0
  40. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/relation.py +0 -0
  41. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/selector.py +0 -0
  42. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/session.py +0 -0
  43. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/system_info.py +0 -0
  44. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/utils.py +0 -0
  45. {run_cache-2.0.2 → run_cache-2.1.1}/src/dbt_run_cache/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: run-cache
3
- Version: 2.0.2
3
+ Version: 2.1.1
4
4
  Summary: dbt plugin that skips redundant model executions by caching results from previous runs
5
5
  Project-URL: Homepage, https://runcache.com
6
6
  License: Copyright (c) 2026 Fivetran, Inc.
@@ -46,7 +46,7 @@ Requires-Dist: humanize
46
46
  Requires-Dist: protobuf>=4.0.0
47
47
  Requires-Dist: pyperclip
48
48
  Requires-Dist: pytimeparse2
49
- Requires-Dist: query-cache-common==1.2.1
49
+ Requires-Dist: query-cache-common==1.3.0
50
50
  Requires-Dist: query-cache-protobuf==1.2.0
51
51
  Requires-Dist: rich
52
52
  Requires-Dist: ruamel-yaml
@@ -0,0 +1 @@
1
+ __version__ = "2.1.1"
@@ -268,9 +268,6 @@ class SsoAuth:
268
268
  "Please try again and complete the login in your browser."
269
269
  )
270
270
 
271
- self._console.print("[success]Success![/success] :white_check_mark:")
272
- self._console.print()
273
-
274
271
  self._session.fetch_token(
275
272
  self._token_url,
276
273
  authorization_response=callback_url,
@@ -278,7 +275,12 @@ class SsoAuth:
278
275
  include_client_id=True,
279
276
  )
280
277
 
281
- return self._update_token_info(self._session.token)
278
+ token_info = self._update_token_info(self._session.token)
279
+
280
+ self._console.print("[success]Success![/success] :white_check_mark:")
281
+ self._console.print()
282
+
283
+ return token_info
282
284
 
283
285
  except KeyboardInterrupt:
284
286
  from rich.control import Control
@@ -401,6 +403,11 @@ class SsoAuth:
401
403
  raise AuthenticationError(f"Error determining organization ID: {e}") from e
402
404
 
403
405
  if not token_scope.is_org_id_in_scope(org_id):
406
+ if token_scope.is_org_id_disabled(org_id):
407
+ raise AuthenticationError(
408
+ f"User access to the requested organization (org_id: {org_id}) has been disabled."
409
+ )
410
+
404
411
  raise AuthenticationError(
405
412
  f"User does not have access to the requested organization (org_id: {org_id}). Please make sure your user account has access to this organization or specify a different organization that you have access to in the project configuration."
406
413
  )
@@ -107,6 +107,7 @@ class RunCacheConfig:
107
107
  default=FRESHNESS_TOLERANCE_DEFAULT, metadata={"parser": _parse_time}
108
108
  )
109
109
  tolerate_nondeterminism: bool = True
110
+ enable_lenient_dependencies: bool = True
110
111
  clone_incremental_in_dev: CloneIncrementalInDev = field(
111
112
  default=CloneIncrementalInDev.IF_TABLE_MISSING,
112
113
  metadata={"parser": _parse_clone_incremental_in_dev},
@@ -1005,7 +1005,11 @@ class RunCache:
1005
1005
  for name, v in traversal_result.view_definitions.items()
1006
1006
  ]
1007
1007
 
1008
- all_seen_fqns = traversal_result.seen_tables | set(traversal_result.view_definitions)
1008
+ if self._run_cache_config.enable_lenient_dependencies:
1009
+ all_seen_fqns = traversal_result.seen_tables | set(traversal_result.view_definitions)
1010
+ lenient_dependencies: t.Set[str] = self._deferred_fqns & all_seen_fqns
1011
+ else:
1012
+ lenient_dependencies = set()
1009
1013
 
1010
1014
  semantic_extras = {
1011
1015
  key: json.dumps(value) if (value := node_config.get(key)) is not None else ""
@@ -1024,7 +1028,7 @@ class RunCache:
1024
1028
  freshness_tolerance_seconds=self._run_cache_config.resolve_freshness_tolerance(
1025
1029
  node_config
1026
1030
  ),
1027
- lenient_dependencies=self._deferred_fqns & all_seen_fqns,
1031
+ lenient_dependencies=lenient_dependencies,
1028
1032
  tolerate_nondeterminism=self._run_cache_config.resolve_tolerate_nondeterminism(
1029
1033
  node_config
1030
1034
  ),
@@ -19,13 +19,19 @@ from dbt.contracts.graph.nodes import (
19
19
  SnapshotNode,
20
20
  )
21
21
  from dbt.events.types import EndOfRunSummary, LogTestResult as DbtLogTestResult, green, red, yellow
22
- from dbt_run_cache.errors import UnsupportedClientVersionError
22
+ from dbt_run_cache.errors import AuthenticationError, UnsupportedClientVersionError
23
23
 
24
24
  try:
25
25
  from dbt_common.events.format import format_fancy_output_line
26
26
  except ImportError:
27
27
  from dbt.events.format import format_fancy_output_line # type: ignore
28
28
 
29
+ try:
30
+ from dbt_common.exceptions import DbtRuntimeError
31
+ except ImportError:
32
+ # dbt 1.7
33
+ from dbt.exceptions import DbtRuntimeError
34
+
29
35
  from dbt_run_cache import events
30
36
  from dbt_run_cache.auth import sso_auth
31
37
  from dbt_run_cache.config import RunCacheConfig, DBT_RUN_CACHE_PATH
@@ -313,7 +319,12 @@ class RunnerOverride:
313
319
  self._disabled = True
314
320
  return None
315
321
 
316
- client = self._get_or_create_client(run_cache_config)
322
+ try:
323
+ client = self._get_or_create_client(run_cache_config)
324
+ except AuthenticationError as e:
325
+ # Don't print a stack trace to console for AuthenticationError
326
+ # Raising it as a DbtRuntimeError prints just the message and halts execution
327
+ raise DbtRuntimeError(str(e)) from e
317
328
 
318
329
  try:
319
330
  client_version_is_supported = client.is_client_version_supported()
@@ -1 +0,0 @@
1
- __version__ = "2.0.2"
File without changes
File without changes