Changelog¶
0.0.2¶
Breaking: the modules are reorganised by layer. Old import paths are removed; update imports as follows.
client/is the LaminHub REST client and query language. It does not depend on the Airflow task SDK.hooks.models→client.models.utils.filters→client.filters,utils.enums→client.enums,utils.dbwrite→client.dbwrite.utils.lamindbis split: branch statuses →client.branches, artifact helpers (artifact_filter,storage_ongoing,is_internal_artifact) →client.artifacts,normalize_str_list→client.enums,parse_json_value→client.dbwrite, andresolve_branch_id/resolve_space_id→triggers.cursors.- From
hooks.lamindb:LaminDBInstance,parse_instance_slug,chunk_ids,MAX_PAGE_SIZEandDEFAULT_HUB_API_URL→client.client;Registry,DBWRITE_REGISTRY,resolve_registryandnormalize_registry_name→client.registries. - New
LaminHubClientandLaminHubConfiginclient.client. LaminDBHookdelegates to aLaminHubClient(get_client()/aget_client()); its public query and write methods are unchanged.get_conn()now returns theLaminHubClient, not anhttpx.Client;get_async_conn()is removed.execution/is what runs tasks in virtualenvs and pods. It replacesutils.remote,utils.runtime,utils.modelsandutils.dag_run:utils.remoteis split intoexecution.setup(LaminDBSetup; update[lamindb] setup_classsubclasses),execution.source,execution.requirements,execution.environmentandexecution.parameters.utils.runtime→execution.runtime,utils.models→execution.config,utils.dag_run→execution.dag_run.RemoteLaminDBStepMixin,task_setting,check_same_setup,check_flow_instanceandreject_auto_flow→operators.step.triggers.models→triggers.events.
Breaking: filters and responses are typed.
- Filters are
FilterExpressions only. Hook, client, sensor and triggerfilterarguments,&/|,And/Or,combine_filtersandartifact_filter(extra=...)raise aTypeErrorfor dicts; parse JSON filters withFilterExpression.from_dict.FilterandFilterLikeare removed. combine_filters,artifact_filterandbranch_scope_filterreturn aFilterExpression(callto_dict()for the JSON form);normalize_filter,filter_field_paths,is_local_filterandmatches_filtertake one.order_bytakes field names orRecordOrder, not dicts.get_schema()returns anInstanceSchemaResponse(resolve_registrytakes one),get_branch()aBranchRecordResponseandget_users(){id: UserRecordResponse}, also in the async variants.branch_summary()returns aBranchSummary. Records ofquery_records,get_records_by_idsandquery_dbwritesstay dicts, because their columns depend on the registry andselect.registryarguments are annotated asLaminDBRegistry | Registry | str(sensors and triggers:LaminDBRegistry | str).
Breaking: virtualenvs install lamindb instead of lamindb-core plus a hand-maintained list of
numpy, pandas and pandera (LAMINDB_CORE_COMPANIONS/LAMINDB_CORE_COMPANIONS_PANDAS_2, now
removed). lamindb's own metadata sets the pandas bound for each version. A listed lamindb-core is no
longer completed with these packages. execution.requirements.lamindb_requirements() is now
lamindb_requirement() and returns one requirement.
Breaking: facts that lamindb and the instance schema already provide are no longer copied.
execution.runtimetakes run status codes fromlamindb.base.types.RUN_STATUS_TO_CODE; itsSTATUS_*constants are removed.lamindb_version_at_leastis removed; uselamindb_version_supported.execution.dag_run.MAX_REFERENCE_LENGTHis now the one inexecution.runtime.client.dbwrite.DBWRITE_SUMMARY_FIELDSis removed: event payloads include the declaredDbWriteResponsefields exceptdata, as before.triggers.branches.BRANCH_TABLEandBRANCH_BLOCK_TABLEare removed: the branch triggers take the table names from the instance schema, like the record triggers.client.dbwrite.is_branch_moveis removed; it was unused.classify_record_writereports branch moves ascreatedordeletedevents.- Requirements are recognised as lamindb with
packaging, so pip's name normalisation applies, for example tolamindb.core. - Tests check the branch status codes and field enums that the worker keeps without lamindb against lamindb itself.
Fixes:
- The package requires Python
>=3.10,<3.15.!=3.15excluded only 3.15.0, not later 3.15 releases. - The code generated for virtualenvs and pods is composed from
astnodes. A callable name that is not a Python identifier, or a step setting that is not a Python literal, now fails on the worker instead of in the virtualenv or pod. - An artifact write with a malformed
_auxorkindno longer stops the artifact event trigger.storage_ongoingandis_internal_artifactreturnFalsefor it. ArtifactRecordResponse.is_internalandis_internal_artifactuse the same kinds as the server-sideartifact_filter(INTERNAL_ARTIFACT_KINDS, now inclient.enums), not any__lamindbprefix.
0.0.1¶
Initial release.
- Supports lamindb 2.8.1 and newer only. The hook, sensors and lineage tasks reject instances on older
lamindb with
LaminDBVersionError, and event triggers don't poll them. An olderlamindb_versionfails when the DAG is parsed, and a lineage task whose virtualenv or pod has an older lamindb fails when it starts. - Lineage: the
@task.lamindb_virtualenvand@task.lamindb_kubernetesdecorators record task runs, optionally grouped under a parent flow withLaminDBFlow.LaminDBFlowInitOperatorandLaminDBFlowFinishOperatorprovide the low-level lifecycle operations. LaminDB runs in a virtualenv or a Kubernetes pod, never on the worker. The virtualenvs installlamindb-corein the instance's version (with pandas below 3 for lamindb before 2.10) and get their credentials from thelamindbconnection. - Lineage scoping:
@task.lamindb_virtualenvand@task.lamindb_kubernetestasks are tracked standalone by default, with no parent flow run.LaminDBFlow(from airflow.providers.lamindb import LaminDBFlow) is an optional context manager that groups the tasks created inside it, mapped ones included, under a flow run per DAG run. Migration:auto_flowis removed and now fails with an error; tracked tasks are no longer parented implicitly bywith LaminDBFlowInitOperator() >> LaminDBFlowFinishOperator():or by flow operators elsewhere in the DAG, which now warn withLaminDBFlowWarning. Wrap the tasks inwith LaminDBFlow(...):instead; note that plain Airflow tasks created in the block become members too and wait for the flow init.auto_flowandlamindb_scopeindefault_argsfail instead of being dropped. The flow operators remain exported as low-level building blocks. See Migrating to LaminDBFlow. - The Kubernetes extra is
[k8s]; the former[cncf.kubernetes]still installs the same provider. LaminDBHookand thelamindbconnection type for the LaminHub REST API, shared by all operators, triggers and sensors. It queries and writes records (insert_records,update_record).- Event triggers for event-driven scheduling based on the LaminHub database write log, with
cursors in the asset state store:
LaminDBRecordEventTrigger,LaminDBArtifactEventTrigger,LaminDBBranchStatusEventTriggerandLaminDBBranchBlockEventTrigger. Withcursor_store=RecordCursorStore(), the cursors are kept in records of the watched instance instead. - Deferrable sensors:
LaminDBBranchStatusSensor,LaminDBRecordSensorandLaminDBArtifactSensor. They keep waiting through network errors, rate limiting and LaminHub server errors. - Filters built in Python with
Fand enums for registries (LaminDBRegistry), registry fields (ArtifactField,RunField, ...), operators (FilterOperator) and values (ArtifactKind,TransformKind,RunStatus). Filters are validated when a sensor, trigger or hook receives them.