Skip to content

chore(hasura): explicit timeout on every action + supersede #54#56

Merged
acmeguy merged 1 commit into
mainfrom
chore/hasura-action-timeouts-audit
May 10, 2026
Merged

chore(hasura): explicit timeout on every action + supersede #54#56
acmeguy merged 1 commit into
mainfrom
chore/hasura-action-timeouts-audit

Conversation

@acmeguy
Copy link
Copy Markdown

@acmeguy acmeguy commented May 10, 2026

Summary

Every action in `metadata/actions.yaml` now has an explicit `timeout`. Replaces the implicit Hasura default (30s) which was both too short for compile/profile paths (causing the recent "save cube times out" symptom) and too generous for trivial mutations.

Bands

```
10s — local-only sync mutations
30s — DB-bound mutations / lookups against well-warmed tables
60s — read paths that may touch ClickHouse system tables or generate
SQL across the whole cube graph
120s — Cube.js compile-bound queries (cold cache hits 14-30s p99)
180s — first-time table introspection / multi-step gen flows
300s — long-running profiling, LLM-driven generation, big query runs
```

Changes

Action Before After Reason
fetch_meta 30 (implicit) 120 Cube.js cold compile (was the original "save timeout" symptom)
run_query 30 (implicit) 300 Analytical queries on cold caches
profile_table 180 300 LC probe alone takes minutes on big tables
fetch_dataset 30 (implicit) 60 May touch ClickHouse system tables
gen_sql 30 (implicit) 60 Generates SQL across cube graph
pre_aggregation_preview 30 (implicit) 60 Same
pre_aggregations 30 (implicit) 60 Same
copy_datasource 30 (implicit) 60 Schema fan-out
export_data_models 30 (implicit) 60 Could be a big download
check_connection, create_team, invite_team_member, list_all_teams, manage_query_rewrite_rule, update_member_properties, update_team_properties, send_test_alert 30 (implicit) 30 (explicit) Trivial; just made the value visible
create_events 10 10 unchanged
smart_gen_dataschemas 300 300 unchanged
provision_default_datasources 120 120 unchanged
fetch_tables, gen_dataschemas 180 180 unchanged
update_team_settings 30 30 unchanged

Supersedes

Closes #54 — that PR raised `fetch_meta` 30 → 120 in isolation. This PR rolls that fix in alongside the rest of the audit. Either merge this and close #54, or merge #54 first and rebase this.

Test plan

  • Apply: Hasura migrations container picks up the new metadata on next deploy
  • `gh api` `/v1/metadata` shows every action with a non-null timeout
  • Save a cube on dbx.fraios.dev — `fetch_meta` no longer times out at 30s

🤖 Generated with Claude Code

Every action in metadata/actions.yaml now has an explicit timeout. Bands
documented in a comment at the top of the file:

  10s   — local-only sync mutations
  30s   — DB-bound mutations / lookups against well-warmed tables
  60s   — read paths that may touch ClickHouse system tables or generate
          SQL across the whole cube graph
  120s  — Cube.js compile-bound queries (cold cache hits 14-30s p99)
  180s  — first-time table introspection / multi-step gen flows
  300s  — long-running profiling, LLM-driven generation, big query runs

Notable bumps from the previously-implicit 30s default:
  fetch_meta             30 → 120 (supersedes #54 — Cube.js compile)
  run_query              30 → 300 (analytical queries on cold caches)
  profile_table         180 → 300 (LC probe alone takes minutes on big tables)
  fetch_dataset, gen_sql, pre_aggregation_preview, pre_aggregations,
  copy_datasource, export_data_models    30 → 60

Hard-tightened where the action is actually trivial:
  list_all_teams, manage_query_rewrite_rule, update_member_properties,
  update_team_properties, invite_team_member, check_connection,
  send_test_alert, create_team   stays at 30s but now explicit
  create_events stays at 10s

Closes #54 (fetch_meta timeout) — that PR can be closed in favor of
this one which lands the same fix plus the rest of the audit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@acmeguy acmeguy merged commit 42932cc into main May 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants