Skip to content

Commit

Permalink
Merge branch 'release-v2.5.9' into 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed May 4, 2018
2 parents 6145b03 + 2629d6a commit 43747c1
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bin/travis-install-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi

# Install postgres and solr
sudo apt-get update -qq
sudo apt-get install postgresql-$PGVERSION solr-jetty libcommons-fileupload-java:amd64=1.2.2-1
sudo apt-get install postgresql-$PGVERSION solr-jetty

if [ $PGVERSION == '8.4' ]
then
Expand Down
4 changes: 2 additions & 2 deletions ckan/controllers/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def new(self, data=None, errors=None, error_summary=None):
except NotAuthorized:
abort(401, _('Unauthorized to create a group'))

if context['save'] and not data:
if context['save'] and not data and request.method == 'POST':
return self._save_new(context, group_type)

data = data or {}
Expand Down Expand Up @@ -520,7 +520,7 @@ def edit(self, id, data=None, errors=None, error_summary=None):
}
data_dict = {'id': id, 'include_datasets': False}

if context['save'] and not data:
if context['save'] and not data and request.method == 'POST':
return self._save_edit(id, context)

try:
Expand Down
4 changes: 2 additions & 2 deletions ckan/controllers/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def new(self, data=None, errors=None, error_summary=None):
except NotAuthorized:
abort(401, _('Unauthorized to create a package'))

if context['save'] and not data:
if context['save'] and not data and request.method == 'POST':
return self._save_new(context, package_type=package_type)

data = data or clean_dict(dict_fns.unflatten(tuplize_dict(parse_params(
Expand Down Expand Up @@ -749,7 +749,7 @@ def edit(self, id, data=None, errors=None, error_summary=None):
'user': c.user or c.author, 'auth_user_obj': c.userobj,
'save': 'save' in request.params}

if context['save'] and not data:
if context['save'] and not data and request.method == 'POST':
return self._save_edit(id, context, package_type=package_type)
try:
c.pkg_dict = get_action('package_show')(dict(context,
Expand Down
4 changes: 2 additions & 2 deletions ckan/controllers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def new(self, data=None, errors=None, error_summary=None):
except NotAuthorized:
abort(401, _('Unauthorized to create a user'))

if context['save'] and not data:
if context['save'] and not data and request.method == 'POST':
return self._save_new(context)

if c.user and not data:
Expand Down Expand Up @@ -281,7 +281,7 @@ def edit(self, id=None, data=None, errors=None, error_summary=None):
except NotAuthorized:
abort(401, _('Unauthorized to edit a user.'))

if (context['save']) and not data:
if context['save'] and not data and request.method == 'POST':
return self._save_edit(id, context)

try:
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/app_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def _init(self):
self.ckan_version = ckan.__version__
self.ckan_base_version = re.sub('[^0-9\.]', '', self.ckan_version)
if self.ckan_base_version == self.ckan_version:
self.ckan_doc_version = 'ckan-{0}'.format(self.ckan_version)
self.ckan_doc_version = self.ckan_version[:3]
else:
self.ckan_doc_version = 'latest'

Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def owner_org_validator(key, data, errors, context):
if not group:
raise Invalid(_('Organization does not exist'))
group_id = group.id
if not(user.sysadmin or
if not context.get(u'ignore_auth', False) and not(user.sysadmin or
authz.has_user_permission_for_group_or_org(
group_id, user.name, 'create_dataset')):
raise Invalid(_('You cannot add a dataset to this organization'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ this.ckan.module('resource-view-filters', function (jQuery, _) {
width: 'resolve',
minimumInputLength: 0,
ajax: {
url: '/api/3/action/datastore_search',
url: ckan.url('/api/3/action/datastore_search'),
datatype: 'json',
quietMillis: 200,
cache: true,
Expand Down
4 changes: 2 additions & 2 deletions ckanext/reclineview/theme/public/recline_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ this.ckan.module('recline_view', function (jQuery, _) {
var query = new recline.Model.Query();
query.set({ size: reclineView.limit || 100 });
query.set({ from: reclineView.offset || 0 });

var urlFilters = {};
try {
if (window.parent.ckan.views && window.parent.ckan.views.filters) {
Expand Down Expand Up @@ -120,7 +120,7 @@ this.ckan.module('recline_view', function (jQuery, _) {
state.lonField = reclineView.longitude_field;
}

view = new recline.View.Map({model: dataset, state: state});
view = new recline.View.Map($.extend(this._reclineMapViewOptions(dataset, this.options.map_config), {state:state}));
} else if(reclineView.view_type === "recline_view") {
view = this._newDataExplorer(dataset);
} else {
Expand Down
97 changes: 91 additions & 6 deletions doc/contributing/release-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ become stable releases.

ansible-playbook package.yml -u your_user -s

You will be prompted for the CKAN version to package (eg ``2.4.0``), the iteration (eg ``beta1``)
and whether to package the DataPusher (always do it on release packages).
#. Create the documentation branch from the release branch. This branch should be named
just with the minor version and nothing else (eg ``2.7``, ``2.8``, etc). We will use
this branch to build the documentation in Read the Docs on all patch releases for
this version.

#. Make latest translation strings available on Transifex.

Packages are created by default on the `/build` folder of the publicly accessible directory of
the packaging server.
Expand Down Expand Up @@ -277,11 +281,17 @@ a release.
#. Enable the new version of the docs on Read the Docs (you will need an admin
account):

a. Go to the `Read The Docs`_ versions page
and enable the relevant release (make sure to use the tag, ie ckan-X.Y,
not the branch, ie release-vX.Y).
(You will need an admin account.)

a. Make sure the documentation branch is up to date with the latest changes in the
corresponding ``dev-vX.Y`` branch.

b. If this is the first time a minor version is released, go to the
`Read The Docs versions page <https://readthedocs.org/projects/ckan/versions/>`_
and make the relevant release 'active' (make sure to use the documentation branch, ie X.Y,
not the development branch, ie dev-vX.Y).

b. If it is the latest stable release, set it to be the Default Version and
c. If it is the latest stable release, set it to be the Default Version and
check it is displayed on http://docs.ckan.org.

#. Write a `CKAN Blog post <http://ckan.org/wp-admin>`_ and send an email to
Expand Down Expand Up @@ -309,6 +319,81 @@ a release.
problems. Run CKAN's tests, again just to be safe. Then do ``git push
origin master``.

------------------------
Preparing patch releases
------------------------

#. Announce the release date & time with a week's notice on ckan-announce.

Often this will be part of the announcement of a CKAN major/minor release.
But if patches go out separately then they will need their own announcement.

#. Update ``ckan/__init__.py`` with the incremented patch number e.g. `2.5.1` becomes `2.5.2`.
Commit the change and push the new branch to GitHub::

git commit -am "Update version number"
git push origin release-v2.5.2

#. Cherry-pick PRs marked for back-port.

These are usually marked on Github using the ``Backport Pending`` `labels`_ and the
relevant labels for the versions they should be cherry-picked to (eg ``Backport 2.5.3``).
Remember to look for PRs that are closed i.e. merged. Remove the ``Backport Pending`` label once the
cherry-picking has been done (but leave the version ones).

#. Ask the tech team if there are security fixes or other fixes to include.

#. Update the CHANGELOG.

------------------------
Doing the patch releases
------------------------

#. If there have been any CSS or JS changes, rebuild the front-end.

Rebuild the front-end, add new files and commit with::

paster front-end-build
git add ckan ckanext
git commit -am "Rebuild front-end"

#. Review the CHANGELOG to check it is complete.

#. Tag the repository with the version number.

Make sure to push it to GitHub afterwards::

git tag -a -m '[release]: Release tag' ckan-X.Y.Z
git push --tags

#. Create and deploy the final deb package.

Create using ckan-packaging checkout e.g.::

./ckan-package -v 2.5.2 -i 1

Make sure to rename the deb files so it follows the deb packages name convention::

python-ckan_Major.minor_amd64.deb

Note that we drop the patch version and iteration number from the package name.

Move it to the root of the
`publicly accessible folder <http://packaging.ckan.org/>`_ of
the packaging server from the `/build` folder, replacing the existing file
for this minor version.

#. Upload the release to PyPI::

python setup.py sdist upload

#. Make sure the documentation branch (``X.Y``) is up to date with the latest changes in the
corresponding ``dev-vX.Y`` branch.

#. Write a CKAN blog post and announce it to ckan-announce & ckan-dev & twitter.

Often this will be part of the announcement of a CKAN major/minor release.
But if patches go out separately then they will need their own announcement.

.. _Transifex: https://www.transifex.com/projects/p/ckan
.. _`Read The Docs`: http://readthedocs.org/dashboard/ckan/versions/
Expand Down

0 comments on commit 43747c1

Please sign in to comment.