datopian / ckanext-versioning

Deprecated. See https://github.com/datopian/ckanext-versions. ⏰ CKAN extension providing data versioning (metadata and files) based on git and github.
https://tech.datopian.com/versioning/
GNU Affero General Public License v3.0
7 stars 4 forks source link

dataset_version_list is always returning empty list #17

Closed zelima closed 4 years ago

zelima commented 4 years ago

I've created dataset, update and expecting that dataset_version_list will have 2 elements in it but I'm always getting empty list. Eg https://dataexchange-pock.gatesfoundation.org/api/3/action/dataset_version_list?dataset=9281ccaf-89a4-464a-88d9-efb41f080237

I might misunderstanding how versions are created, but my expectations are that they should be created on every change I make to the dataset.

Acceptance Criteria

tasks

Analysis

Looking at the code dataset_version_list queries DB filtering the package_version table by package_id. https://github.com/datopian/ckanext-versioning/blob/master/ckanext/versioning/logic/action.py#L196-L214

Looking at the DB package_version table is empty

 SELECT * FROM  package_version;
 id | package_id | package_revision_id | name | description | creator_user_id | created 
----+------------+---------------------+------+-------------+-----------------+---------
(0 rows)
rufuspollock commented 4 years ago

WONTFIX / INVALID. @zelima as clarified versions are really "revision tags" they are not "revisions" so you won't see anything in that API unless you explicit create a revision tag (version). I also think you may be testing without the final code being merged.