Skip to content
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

Remove pavics-datacatalog from stack #287

Closed
wants to merge 1 commit into from
Closed

Remove pavics-datacatalog from stack #287

wants to merge 1 commit into from

Conversation

huard
Copy link
Collaborator

@huard huard commented Feb 6, 2023

Overview

The Pavics-datacatalog is not used, unmaintained, and not part of future development plans. Catalogs are currently provided by intake static files, and will eventually be accompanied by a STAC catalog.

  • Remove references to pavics-datacatalog in config and docs
  • Remove solr Dockerfile
  • Remove scripts triggering pavicscrawler

This PR has not been tested, and frankly, I don't know what I'm doing.

Changes

Non-breaking changes

  • Removes pavics-datacatalog
  • Removes solr

Breaking changes

  • Services relying on the datacatalog are not offered anymore.

Related Issue / Discussion

Additional Information

Links to other issues or sources.

  • Things to do...

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 6, 2023
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1190/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : fix-206
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL :

NOTEBOOK TEST RESULTS
    
</code>

@matprov
Copy link
Collaborator

matprov commented Feb 8, 2023

run tests

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1211/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : fix-206
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL :

NOTEBOOK TEST RESULTS
    
</code>

@fmigneault
Copy link
Collaborator

Self note, need to align with #284 to remove extra configs not needed anymore.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1213/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : fix-206
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-154.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/944/

NOTEBOOK TEST RESULTS
    
[2023-02-08T17:32:46.646Z] ============================= test session starts ==============================
[2023-02-08T17:32:46.646Z] platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
[2023-02-08T17:32:46.646Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-02-08T17:32:46.646Z] plugins: anyio-3.6.2, dash-2.7.0, nbval-0.9.6, tornasync-0.6.0.post2
[2023-02-08T17:32:46.646Z] collected 263 items
[2023-02-08T17:32:46.646Z] 
[2023-02-08T17:32:54.579Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-02-08T17:33:24.505Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  6%]
[2023-02-08T17:33:34.586Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [  9%]
[2023-02-08T17:33:43.078Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb ........       [ 12%]
[2023-02-08T17:33:45.789Z] pavics-sdi-master/docs/source/notebooks/WPS_example.ipynb ..........     [ 15%]
[2023-02-08T17:42:56.941Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ......F.....        [ 20%]
[2023-02-08T17:43:05.676Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 20%]
[2023-02-08T17:43:28.322Z] ...............                                                          [ 26%]
[2023-02-08T17:43:40.173Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 28%]
[2023-02-08T17:43:52.424Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb F                 [ 28%]
[2023-02-08T17:44:16.469Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 31%]
[2023-02-08T17:44:18.123Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 31%]
[2023-02-08T17:47:49.573Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 34%]
[2023-02-08T17:47:49.573Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 36%]
[2023-02-08T17:51:20.355Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 41%]
[2023-02-08T17:52:40.162Z] .............                                                            [ 46%]
[2023-02-08T17:52:46.289Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 48%]
[2023-02-08T17:52:49.353Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 51%]
[2023-02-08T17:53:17.280Z] .................                                                        [ 57%]
[2023-02-08T17:53:25.998Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb .....           [ 59%]
[2023-02-08T17:53:28.008Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 60%]
[2023-02-08T17:53:41.970Z] .FFF.....                                                                [ 63%]
[2023-02-08T17:53:53.781Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 67%]
[2023-02-08T17:54:04.715Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 69%]
[2023-02-08T17:54:35.766Z] finch-master/docs/source/notebooks/subset.ipynb ....................ss.  [ 78%]
[2023-02-08T17:54:37.670Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 79%]
[2023-02-08T17:54:41.575Z] ......                                                                   [ 81%]
[2023-02-08T17:55:03.569Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 81%]
[2023-02-08T17:55:21.018Z] .............                                                            [ 86%]
[2023-02-08T17:55:33.330Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 87%]
[2023-02-08T17:56:08.851Z] ....s.                                                                   [ 89%]
[2023-02-08T17:56:21.139Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 89%]
[2023-02-08T17:56:26.246Z] ...                                                                      [ 90%]
[2023-02-08T17:56:48.264Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 91%]
[2023-02-08T17:57:18.824Z] ......                                                                   [ 93%]
[2023-02-08T17:57:21.524Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2023-02-08T18:00:57.520Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-02-08T18:00:57.521Z] 
[2023-02-08T18:00:57.521Z] =================================== FAILURES ===================================
    
  

@huard
Copy link
Collaborator Author

huard commented Feb 8, 2023

All the notebooks seem to pass on our prod version, so not clear to me where the nb failures are coming from.

fmigneault added a commit that referenced this pull request Apr 20, 2023
## Overview

Please include a summary of the changes and which issues are fixed. 

Please also include relevant motivation and context. 

List any dependencies that are required for this change.

## Breaking changes

- CanarieAPI: update to `0.7.1`.

  - The Docker running `CanarieAPI` is now using Python 3 (since `0.4.x` tags).
    Configurations need to be updated if any specific Python 2 definitions were used.
    See [2to3](https://docs.python.org/3/library/2to3.html) to help migrate configurations automatically if necessary.
  - Update the [CanarieAPI configuration](birdhouse/config/canarie-api/docker_configuration.py.template) to use
    Python 3.x executable code.

## Changes

- CanarieAPI: update to `0.7.1`.

  - The server node now provides a generic ``server`` configuration for the current ``platform`` definition.
  - Added multiple missing docuementation references for all the services included within `CanarieAPI` configurations.
  - With new `CanarieAPI` version, a slightly improved UI with more service details are provided for the active server:

![image](https://user-images.githubusercontent.com/19194484/232822454-e39c0111-54dc-4f9b-adf6-5ea6e59d67e3.png)

- Add optional variables witht defaults to define reference Docker image version tags.

  Following optional variables are defined by default. These are used as reference in the respective Docker compose
  service definition of these components, as well as in their `CanarieAPI` configuration to retrieve the release time
  of the tag, and refer to relevant URL references as needed.

  - `CATALOG_VERSION`
  - `FINCH_VERSION`
  - `FLYINGPIGEON_VERSION`
  - `GEOSERVER_VERSION`
  - `HUMMINGBIRD_VERSION`
  - `MALLEEFOWL_VERSION`
  - `RAVEN_VERSION`

## Fixes:

- CanarieAPI: update to `0.7.1`.

  - Fixes an `AttributeError` raised due to misconfiguration of the Web Application with Flask 2.x definitions
    (relates to [Ouranosinc/CanarieAPI#10](Ouranosinc/CanarieAPI#10)).
  - Skip over `0.4.x`, `0.5.x`, `0.6.x`  versions to avoid issue related to `cron` job monitoring and log parser
    command failures in order to collect configured service statistics and statuses
    (see also [Ouranosinc/CanarieAPI#14](Ouranosinc/CanarieAPI#14)).

- Weaver: update CanarieAPI monitoring definitions
  - Move monitoring of public endpoint under [optional-components/canarie-api-full-monitoring][canarie-monitor].
  - Add monitoring of private endpoint by default when using Weaver component.

- Cowbird: update CanarieAPI monitoring definitions
  - Add monitoring of public endpoint under [optional-components/canarie-api-full-monitoring][canarie-monitor].
  - Add public Magpie permission on Cowbird entrypoint only to allow its monitoring.

## Additional Information

Resolves the following log error.

```
proxy              | [2023-01-31 19:37:01 +0000] [37] [DEBUG] GET /canarie/
proxy              | [2023-01-31 19:37:01,708] [37] [INFO] app_object : Disconnecting from database
proxy              | [2023-01-31 19:37:01,709] [37] [DEBUG] app_object : Using db filename : /opt/local/src/CanarieAPI/stats.db
proxy              | [2023-01-31 19:37:01 +0000] [37] [DEBUG] Closing connection. 
proxy              | [2023-01-31 19:37:02 +0000] [37] [DEBUG] GET /canarie/background.jpg
proxy              | [2023-01-31 19:37:02,176] [37] [INFO] app_object : Disconnecting from database
proxy              | [2023-01-31 19:37:02,176] [37] [DEBUG] app_object : Using db filename : /opt/local/src/CanarieAPI/stats.db
proxy              | [2023-01-31 19:37:02 +0000] [37] [ERROR] Error handling request /canarie/background.jpg
proxy              | Traceback (most recent call last):
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/async.py", line 56, in handle
proxy              |     self.handle_request(listener_name, req, client, addr)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 152, in handle_request
proxy              |     super(GeventWorker, self).handle_request(*args)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/async.py", line 107, in handle_request
proxy              |     respiter = self.wsgi(environ, resp.start_response)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
proxy              |     return self.wsgi_app(environ, start_response)
proxy              |   File "/opt/local/src/CanarieAPI/canarieapi/reverse_proxied.py", line 33, in __call__
proxy              |     return self.app(environ, start_response)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
proxy              |     response = self.handle_exception(e)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1532, in handle_exception
proxy              |     handler = self._find_error_handler(InternalServerError())
proxy              |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1449, in _find_error_handler
proxy              |     .get(code))
proxy              |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1440, in find_handler
proxy              |     handler = handler_map.get(cls)
proxy              | AttributeError: 'function' object has no attribute 'get'
```

The above problem lead to unresponsive CanarieAPI, which in turn caused the platform to fail responding with successful monitoring statuses for requests toward the configured services, which in turn, caused the stack to never completely boot. When the stack failed to boot, the *End2End Test Results* (example: #283 (comment)) could not run due to the unresponsive instance, which is the cause of the incomplete output:

`````
Tests URL :

NOTEBOOK TEST RESULTS
   
````
</code>
``
`````

# To Do (in follow-up PRs)

- remove deprecated configs deleted in #287 
- remove deprecated configs deleted in #291 
- remove deprecated configs deleted in #292
@huard
Copy link
Collaborator Author

huard commented Apr 25, 2023

Can this be closed ?

@fmigneault
Copy link
Collaborator

@huard
For sure, the conflicts need to be resolved first, so we can get a CI "success" with the catalog service removed.
The CI has been succeeding for a few PRs in a row since last week (something we didn't have for a while).
I'd like to keep it this way for following PRs.

I wonder if we should wait until STAC is included (#297), before we transition everything?
At the very least, documentation such as https://birdhouse-deploy.readthedocs.io/en/latest/data_catalog.html# should be adjusted.
Is there any other documentation references in birdhouse/pavics/... about accessing catalogues with intake as the official approach from now on (or until STAC is there)?

@tlvu
Copy link
Collaborator

tlvu commented Apr 26, 2023

I think @mishaschwartz has a plan to handle all the components that will be removed or disabled.

@mishaschwartz
Copy link
Collaborator

@huard yes I'm working on a PR that will re-organize all the components and part of that will involve deprecating this. I was going to wait until that PR was in place to remove these ones (#287, #291, #292) but there's no reason why we can't close these first.

@huard
Copy link
Collaborator Author

huard commented Apr 26, 2023

Ok, I'll close the PRs. Once the big reorg is done, I can go through the docs and remove the obsolete material.

@huard huard closed this Apr 26, 2023
mishaschwartz added a commit that referenced this pull request Jul 6, 2023
## Overview

Move unused and unmaintained components to a separate
`deprecated-components/` subdirectory and remove
them from the DEFAULT_CONF_DIRS list if required.

## Changes

**Non-breaking changes**

**Breaking changes**
- The following components are no longer present by default:
  - catalog
  - frontend
  - malleefowl
  - ncops
  - ncwms2
  - project-api
  - solr
  - phoenix

## Related Issue / Discussion

- Resolves #214
- Closes #287 
- Resolves #206
- Closes #291 
- Resolves #9
- Closes #292 
- Resolves #290 

## Additional Information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💡 [Feature] Remove PAVICS-Datacatalog
6 participants