GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
616 stars 98 forks source link

CKAN 2.10 `license_list` not working #4293

Closed nickumia-reisys closed 1 year ago

nickumia-reisys commented 1 year ago

ckan @ 2.10 ckanext-spatial @ main geodatagov @ ckan-210

How to reproduce

  1. Run tests and look at output from ckanext/geodatagov/tests/test_waf.py::TestWafHarvester::test_datasets_from_waf_fgdc_sample

Expected behavior

Test passes..

Actual behavior

KeyError: 'as_dict'

/srv/app/ckanext/geodatagov/tests/test_waf.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/srv/app/ckanext/geodatagov/tests/test_waf.py:81: in run_import
    result = self.harvester.import_stage(harvest_object)
/srv/app/src/ckanext-spatial/ckanext/spatial/harvesters/base.py:625: in import_stage
    package_dict = self.get_package_dict(iso_values, harvest_object)
/srv/app/ckanext/geodatagov/harvesters/base.py:88: in get_package_dict
    package_dict = super(GeoDataGovHarvester, self).get_package_dict(iso_values, harvest_object)
/srv/app/src/ckanext-spatial/ckanext/spatial/harvesters/base.py:361: in get_package_dict
    license_list = p.toolkit.get_action('license_list')(context, {})
/srv/app/src/ckan/ckan/logic/__init__.py:551: in wrapped
    result = _action(context, data_dict, **kw)
/srv/app/src/ckan/ckan/logic/action/get.py:762: in license_list
    licenses = [l.as_dict() for l in licenses]
/srv/app/src/ckan/ckan/logic/action/get.py:762: in <listcomp>
    licenses = [l.as_dict() for l in licenses]

Important references:

Sketch

Uhhh.. wait for upstream to fix?

jbrown-xentity commented 1 year ago

Blocking completion of #4209

nickumia-reisys commented 1 year ago

CKAN core implemented a fix for this, but we won't have access until they make a new release...

Thoughts anyone? @GSA/data-gov-team

jbrown-xentity commented 1 year ago

CKAN core implemented a fix for this, but we won't have access until they make a new release...

We could pin ckan version to a commit, the commit in the PR above. This might have ramifications, because that branch might have other changes/development at that point from base 2.10. However, it seems like they already found a lot of bugs that have been addressed, so we could try reaching out to CKAN core to see when they think a 2.10.1 will be released...

jbrown-xentity commented 1 year ago

2.10.1 was released with the necessary patch, closing this.