forked from ckan/ckanext-xloader
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop to master #35
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThrawnCA
commented
Oct 27, 2021
- Synchronise history with upstream.
- Expand usage of 'six' compatibility module.
The way c.user is autopopulated on the context has changed on 2.9 so these calls started returning a NotAuthorized error: File "/home/adria/dev/pyenvs/ckan/src/ckanext-xloader/ckanext/xloader/jobs.py", line 75, in xloader_data_into_datastore xloader_data_into_datastore_(input, job_dict) File "/home/adria/dev/pyenvs/ckan/src/ckanext-xloader/ckanext/xloader/jobs.py", line 140, in xloader_data_into_datastore_ resource, dataset = get_resource_and_dataset(resource_id) File "/home/adria/dev/pyenvs/ckan/src/ckanext-xloader/ckanext/xloader/jobs.py", line 494, in get_resource_and_dataset res_dict = get_action('resource_show')(None, {'id': resource_id}) File "/home/adria/dev/pyenvs/ckan/src/ckan/ckan/logic/__init__.py", line 475, in wrapped result = _action(context, data_dict, **kw) File "/home/adria/dev/pyenvs/ckan/src/ckan/ckan/logic/action/get.py", line 1085, in resource_show _check_access('resource_show', resource_context, data_dict) File "/home/adria/dev/pyenvs/ckan/src/ckan/ckan/logic/__init__.py", line 315, in check_access raise NotAuthorized(msg) NotAuthorized: User None not authorized to read resource 0447ef5f-014b-436d-b9e9-e29f0b308c40 Pass ignore_auth=True explicitly to avoid having to call the auth functions.
This solves the exact same issue as the one described here for DataPusher: ckan/ckan#5173 Tl;DR: starting a transaction within another one in the `notify` method led to the following error on CKAN 2.9: File "/home/adria/dev/pyenvs/ckan/src/ckan/ckan/views/resource.py", line 248, in post get_action(u'resource_create')(context, data) File "/home/adria/dev/pyenvs/ckan/src/ckan/ckan/logic/__init__.py", line 475, in wrapped result = _action(context, data_dict, **kw) File "/home/adria/dev/pyenvs/ckan/src/ckan/ckan/logic/action/create.py", line 332, in resource_create model.repo.commit() File "/home/adria/dev/pyenvs/ckan/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 162, in do return getattr(self.registry(), name)(*args, **kwargs) File "/home/adria/dev/pyenvs/ckan/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1027, in commit self.transaction.commit() File "/home/adria/dev/pyenvs/ckan/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 494, in commit self._prepare_impl() File "/home/adria/dev/pyenvs/ckan/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 464, in _prepare_impl stx = self.session.transaction AttributeError: 'NoneType' object has no attribute 'transaction'
Add ssl_verify option to callback_xloader_hook
Fix byte - str concat
Stream request needs to be explicited closed
Bring 2.9-fixes branch up to date with master
Fix xloader status timestamps
…next-xloader into TomeCirun-xloader-errors-2.9
… QOL-7596-ckan-2.9
QOL-7596 ckan 2.9
duttonw
approved these changes
Nov 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.