The first statement of __init__.py called pkg_resources.declare_namespace, and
setuptools 83 no longer ships pkg_resources, so importing datastore_orm raises
ModuleNotFoundError before any of its own modules load. Every consumer dies on
`import datastore_orm`; in Insights that is Django app startup, which takes the
image build down with it.
The declaration was for the `infi` namespace this distribution used to live
under — buildout.cfg still names that as the namespace package. The code now
ships one plain top-level package, src/datastore_orm, so there is no namespace
left to declare and the call could only ever fail. Removing it is what makes the
package importable again, not a workaround for the missing module.
github.com has no runner for hanzo-build-linux-amd64, so a caller under
.github/workflows is a gate that can never be scheduled. This is the ~7-line
caller on the plane that can (git.hanzo.ai git-runner fleet), pinned @v1.
Co-authored-by: Hanzo Dev <[email protected]>
27 docstrings still said ClickHouse. The store is the datastore everywhere else
in the tree — the package, the module, the env vars, the table — so the prose
was the last place a reader met the old name.
Kept three kinds of reference, deliberately:
- clickhouse.tech/... links — citations to the upstream engine's own docs.
They explain what an engine argument MEANS; deleting them would remove the
only pointer to the semantics and make the code harder, not cleaner.
- "clickhouse-server generated" in the error parser — that string names the
process that literally emits the message being parsed.
- the one line in migrations.py recording what the table used to be called,
which is the point of that comment.
A name we brand is ours to change. A name that identifies someone else's
software is a fact.
Co-authored-by: Hanzo Dev <[email protected]>
The package is datastore_orm; two modules asked logging for 'clickhouse_orm',
so every line this library emitted was filed under a name that no longer exists
in the tree. Left the clickhouse.tech doc links and the 'clickhouse-server
generated' error prose alone — those name the actual upstream server and are
still true.
Co-authored-by: Hanzo Dev <[email protected]>
Three models — MigrationHistory, MigrationHistoryReplicated,
MigrationHistoryDistributed — held the same three fields for the same purpose,
and the first two returned the SAME table name, so at most one of them could
ever be the table anyone read. The Replicated/Distributed pair existed for a
sharded, ZooKeeper-coordinated cluster; the store is a single node with no
ZooKeeper, so `if replicated:` was a decision with one answer. Deleted both,
and the branch with them.
The table is `migrations`. It was `infi_clickhouse_orm_migrations`, which
restated three things the reader already has: the vendor of the library this is
forked from, an engine we no longer name, and a layer the database qualifier
already supplies. `insights.migrations` says all of it and nothing twice.
`replicated` stays in the two private signatures so callers need not change —
it simply selects nothing now. Dropped the then-unused Distributed import and
the docstring reference to the deleted class.
Co-authored-by: Hanzo Dev <[email protected]>
This is our fork, so it should read like it. `import datastore_orm` instead of
`from infi.clickhouse_orm import ...`: `infi` was the original vendor's org
namespace, and carrying someone else's org name through every import in the
consuming codebase is not a fork, it is a vendored copy that never got renamed.
The `infi` namespace package is gone entirely (src/infi/__init__.py with it),
the distribution is `datastore-orm`, and the metadata points at Hanzo rather
than at the upstream repo and author.
NOT renamed, deliberately: the migration history tables are still
`infi_clickhouse_orm_migrations`. That name is persisted state — 448 rows in
production key off it — so changing it is a data migration, not a rename. Doing
it carelessly reproduces the exact failure this fork just hit, where a package
rename orphaned the history and silently blocked every migration.