-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow aborting of on-going harvesting tasks #8176
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
Allow aborting of on-going harvesting tasks #8176
Conversation
Merge from upsteram
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/1.26.3/CHANGES.rst) - [Commits](urllib3/urllib3@1.26.2...1.26.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Toni <toni.schoenbuchner@csgis.de>
…6881) * [Fixes GeoNode#6880] Circle CI upload tests fail irregulary * CircleCI test fix: sometimes expires due to upload timeout in the test environment * - Avoid infinite loop on upload testing * Revert "CircleCI test fix: sometimes expires due to upload timeout in the test environment" This reverts commit 66139fd. Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it> Co-authored-by: afabiani <alessio.fabiani@gmail.com>
…de#6911) * get meaningful document filenames on download * - Strip extension from document title before slugify it (e.g.: image.jpg instead of imagejpg.jpg) Co-authored-by: afabiani <alessio.fabiani@gmail.com> Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
…loop on "wait_for_progress"
…ng slash at the end of GEOSERVER_LOCATION (GeoNode#6913) * [Fixes GeoNode#6916] gsimporter.api.NotFound caused by missing trailing slash at the end of GEOSERVER_LOCATION * [Fixes GeoNode#6916] unit test for GEOSERVER_LOCATION
Bumps [django-cors-headers](https://github.com/adamchainz/django-cors-headers) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/adamchainz/django-cors-headers/releases) - [Changelog](https://github.com/adamchainz/django-cors-headers/blob/master/HISTORY.rst) - [Commits](adamchainz/django-cors-headers@3.6.0...3.7.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [amqp](https://github.com/celery/py-amqp) from 5.0.3 to 5.0.5. - [Release notes](https://github.com/celery/py-amqp/releases) - [Changelog](https://github.com/celery/py-amqp/blob/master/Changelog) - [Commits](celery/py-amqp@v5.0.3...v5.0.5) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pip](https://github.com/pypa/pip) from 21.0 to 21.0.1. - [Release notes](https://github.com/pypa/pip/releases) - [Changelog](https://github.com/pypa/pip/blob/master/NEWS.rst) - [Commits](pypa/pip@21.0...21.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.3.1 to 5.4. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](coveragepy/coveragepy@coverage-5.3.1...coverage-5.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](pytest-dev/pytest@6.2.1...6.2.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [djangorestframework-gis](https://github.com/openwisp/django-rest-framework-gis) from 0.16 to 0.17. - [Release notes](https://github.com/openwisp/django-rest-framework-gis/releases) - [Changelog](https://github.com/openwisp/django-rest-framework-gis/blob/master/CHANGES.rst) - [Commits](openwisp/django-rest-framework-gis@v0.16.0...v0.17.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… it has… (GeoNode#6923) * [Fixes GeoNode#6922][REST API v2] Expose the curated thumbnail URL if it has been uploaded * - Add REST APIs test suite to CircleCI
* [Cleanup and Refactor] Remove QGIS server backend dependencies * [Cleanup and Refactor] Remove QGIS server backend dependencies * - Fix LGTM issues
…iddleware Feature#650 basic auth middleware
Upstream master
…olutions_master
8f6b489 to
d9f3a3d
Compare
|
This pull request introduces 1 alert when merging d9f3a3d into 2164b02 - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging da9a933 into 2164b02 - view on LGTM.com new alerts:
|
|
@afabiani the drop in coverage seems to be unrelated to this PR. Perhaps due to other parts of the codebase changing? Or maybe I am reading things wrong? |
|
This pull request introduces 1 alert when merging 795c90c into 2164b02 - view on LGTM.com new alerts:
|
|
@ricardogsilva no worries, I really don't think it is depending by this PR |
|
@ricardogsilva should we worried about that |
|
@afabiani yeah let me fix that before you move on |
Add the `AsynchronousHarvestingSession` model, which is used to implement sessions for both refreshing of a harvester's harvestable resources and for the harvesting of remote resources. Refactor the `admin`, `api` and `tasks` to use this new model. Moved some functions out of `harvesting.utils` module in order to avoid circular imports
c007191 to
e091f05
Compare
|
@afabiani should be fixed now |
|
@afabiani I accidentally left a commented line in |
…as the one to be used
|
done! |
This PR implements aborting of on-going harvesting-related asynchronous tasks.
It improves the existing concept of a harvesting session by implementing the
AsynchronousHarvestingSessionmodel. This model is now used for the two types of async operations supported by a harvester:Each session also stores some useful properties and can be used to get a sense of progress. For now, some of these properties are also being reflected on the
Harvestermodel. In the future we may remove them from the harvester and use the session exclusively, as it seems like a more natural place to store them.Despite introducing better support for harvesting-related sessions, the
HarvesterAdmincontinues to be the main place to kickoff/abort new sessions. As such, the admin section forharvesting.harvestersgains new actions for aborting on-going sessions. An aborted session is signaled asabortedby means of itsstatusfield. On the API side this means that the harvesting sessions continue to be read-only and that theharvesters/{harvester-id}continues to be the endpoint to reach for whenever starting/aborting a new session - this is done via sending HTTP PATCH requests that modify the harvester'sstatusfield and was not changed.Another notable change introduced by this PR is that when a harvester is created via the django admin it no longer automatically updates its underlying harvestable resources list. The user must now explicitly ask for a refresh of the harvestable resources. This change was introduced to both a) make the code cleaner and b) give the user one more chance to review the harvester parameters after creation, without forcing him to wait for a potentially long time before the harvester becomes ready again.
fixes #7955