Skip to content

Use the Docker API instead of shelling out to podman; fix schema-appl…#11

Merged
aersam merged 1 commit into
mainfrom
drop-sqlglot-c-extra
Jul 17, 2026
Merged

Use the Docker API instead of shelling out to podman; fix schema-appl…#11
aersam merged 1 commit into
mainfrom
drop-sqlglot-c-extra

Conversation

@aersam

@aersam aersam commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

…y retry and dependency parsing

  • container.py: replace subprocess calls to the podman CLI with the docker package's client (docker.from_env(), falling back to Podman's rootful/rootless socket). Works against a real Docker daemon or Podman transparently, and needs no CLI binary or CI setup step - ubuntu-latest's preinstalled Docker daemon just works.
  • schema.py apply_schema(): loop the failed-file retry until a full pass makes no more progress, instead of a single extra pass in original order - a multi-level dependency chain (e.g. view -> view -> table) could still raise on an item whose dependency hadn't had its own retry yet.
  • schema.py _get_sql_deps(): pass error_level=IGNORE to sqlglot.parse() so one statement it can't fully parse (e.g. a schema-qualified DROP TRIGGER ... ON schema.table) doesn't lose every other statement's dependency info in the same file: fall back further to a regex scan if sqlglot still raises. This only feeds ordering, not execution, so an approximation is an acceptable fallback.

…y retry and dependency parsing

- container.py: replace subprocess calls to the podman CLI with the
  docker package's client (docker.from_env(), falling back to Podman's
  rootful/rootless socket). Works against a real Docker daemon or Podman
  transparently, and needs no CLI binary or CI setup step - ubuntu-latest's
  preinstalled Docker daemon just works.
- schema.py apply_schema(): loop the failed-file retry until a full pass
  makes no more progress, instead of a single extra pass in original
  order - a multi-level dependency chain (e.g. view -> view -> table)
  could still raise on an item whose dependency hadn't had its own retry
  yet.
- schema.py _get_sql_deps(): pass error_level=IGNORE to sqlglot.parse() so
  one statement it can't fully parse (e.g. a schema-qualified DROP TRIGGER
  ... ON schema.table) doesn't lose every other statement's dependency
  info in the same file: fall back further to a regex scan if sqlglot
  still raises. This only feeds ordering, not execution, so an
  approximation is an acceptable fallback.
@aersam
aersam merged commit 52ba509 into main Jul 17, 2026
1 check 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.

1 participant