Skip to content

Commit 5fac25b

Browse files
committed
docs(athena/spark): drop redundant prose from _classify_failure
Signed-off-by: Daisuke Taniwaki <daisuketaniwaki@gmail.com>
1 parent a6082d8 commit 5fac25b

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

  • dbt-athena/src/dbt/adapters/athena/spark_connect

dbt-athena/src/dbt/adapters/athena/spark_connect/job.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,25 +241,19 @@ def submit(self, compiled_code: str) -> SparkConnectResult:
241241
def _classify_failure(
242242
self, e: BaseException, session_id: str
243243
) -> Tuple[bool, bool, Optional[str]]:
244-
# 403 + dead session = Athena reclaimed capacity; retrying onto a
245-
# fresh session would race the same regional shortage. The reason
246-
# is surfaced in the DbtRuntimeError so dbt's run summary shows it
247-
# instead of a bare 403 that reads like an auth misconfiguration.
248244
if not is_transient_spark_error(e):
249245
return False, False, None
250246

247+
# 403 + dead session: Athena reclaimed capacity; a fresh session
248+
# would race the same regional shortage.
251249
if is_grpc_permission_denied(e) and not self._pool.is_session_alive(
252250
self.athena_client, session_id
253251
):
254252
reason = (
255253
"Athena terminated the session (capacity reclamation); reduce "
256254
"concurrent DPU consumption or wait for regional capacity"
257255
)
258-
LOGGER.warning(
259-
f"Model {self.relation_name} (session {session_id}) - {reason}. "
260-
f"Failing the attempt instead of retrying onto a fresh session "
261-
f"that would race the same regional shortage."
262-
)
256+
LOGGER.warning(f"Model {self.relation_name} (session {session_id}) - {reason}")
263257
return False, False, reason
264258

265259
return True, True, None

0 commit comments

Comments
 (0)