Task #11284

Upgrade CKAN Google Analytics Extension: update ansible playbook

Added by Francesco Mangiacrapa almost 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:Feb 22, 2018
Priority:HighDue date:
Assignee:_InfraScience Systems Engineer% Done:

100%

Category:-
Sprint:zz - Unsprintable
Milestones:
Duration:

Description

Investigating on #https://support.d4science.org/issues/11206

We have the following problem with the CKAN Google Analytics Extension:

[Thu Feb 22 15:41:31.919660 2018] [:error] [pid 28858:tid 140434899392256] [remote 127.0.0.1:18824]   return self.find_controller(controller)
[Thu Feb 22 15:41:31.919668 2018] [:error] [pid 28858:tid 140434899392256] [remote 127.0.0.1:18824] File '/usr/lib/ckan/default/src/ckan/ckan/config/environment.py', line 56 in find_controller
[Thu Feb 22 15:41:31.919675 2018] [:error] [pid 28858:tid 140434899392256] [remote 127.0.0.1:18824]   mycontroller = ep.resolve()
[Thu Feb 22 15:41:31.919682 2018] [:error] [pid 28858:tid 140434899392256] [remote 127.0.0.1:18824] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py', line 2312 in resolve
[Thu Feb 22 15:41:31.919691 2018] [:error] [pid 28858:tid 140434899392256] [remote 127.0.0.1:18824]   raise ImportError(str(exc))
[Thu Feb 22 15:41:31.919761 2018] [:error] [pid 28858:tid 140434899392256] [remote 127.0.0.1:18824] ImportError: 'module' object has no attribute 'GAResourceController'

The GAResourceController class is invoked by ckanext-googleanalytics/ckanext/googleanalytics/plugin.py which is out-to-date.
New version is available at: https://github.com/ckan/ckanext-googleanalytics/blob/master/ckanext/googleanalytics/plugin.py

We need to upgrade CKAN Google Analytics Extension via playbook and remove the Task to add specific customization to it.

History

#1 Updated by Andrea Dell'Amico almost 2 years ago

  • % Done changed from 0 to 100
  • Status changed from New to In Progress

I already changed the playbook, this way:

  • The download of your modified file is commented out
  • I've added the variable ckan_ga_plugin_state, default to present, that can be used to force an upgrade.

#2 Updated by Andrea Dell'Amico almost 2 years ago

  • Status changed from In Progress to Feedback

You can run the playbook this way:

./run.sh ckan.yml -i inventory/hosts.dev -l ckan_dev -t ckan_google_analytics -e 'ckan_ga_plugin_state=latest'

#3 Updated by Francesco Mangiacrapa almost 2 years ago

  • Status changed from Feedback to Closed

It works, thanks.

Also available in: Atom PDF