Skip to content

Introduce CKAN versions to support CKAN API changes #215

Open
@florianm

Description

@florianm

The CKAN API has deprecated some endpoints which are still active in ckanr, e.g.
packages_activity_list works at demo.ckan.org but is replated in CKAN 2.10 by recently_changed_packages_activity_list.

Run against a local CKAN 2.10: localhost:5000/api/3/action/package_activity_list?id=ckanr_test_dataset returns "Bad request - Action name not known: package_activity_list"

From the CKAN 2.7 release notes:

The activity stream related actions ending with *_list (eg package_activity_list) and *_html (eg package_activity_list_html) will be removed in CKAN 2.8 in favour of more efficient alternatives and are now deprecated.

To support older and newer CKAN versions, ckanr could

  • Add a ckanr_setup variable "CKAN_VERSION" with getters and setters
  • Alternatively, retrieve/confirm the CKAN version somehow (can't find in CKAN docs) from the running CKAN
  • Toggle functions depending on get_ckan_version() between working and warning ("This function has been deprecated/added in CKAN v2.x and is no longer / not yet available in the configured CKAN {CKAN_URL}, version {CKAN_VERSION}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions