-
Notifications
You must be signed in to change notification settings - Fork 6
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
Incorrect URL endpoints on birds #14
Comments
https://pywps.readthedocs.io/en/latest/configuration.html We can try
|
@fmigneault Oh you already started working on this in commit fc00111 Will you eventually PR it? Something still elude me is how does the WPS knows about |
@tlvu |
My guess is that it takes the incoming request URL. |
If found that the following patches "work" where the diff --git a/birdhouse/config/raven/docker-compose-extra.yml b/birdhouse/config/raven/docker-compose-extra.yml
index 920f1b6d..0e35da07 100644
--- a/birdhouse/config/raven/docker-compose-extra.yml
+++ b/birdhouse/config/raven/docker-compose-extra.yml
@@ -15,7 +15,10 @@ services:
PYWPS_CFG: /wps.cfg
GEO_URL: "${RAVEN_GEO_URL}"
volumes:
+ # override all paths such that whichever one the code resolves leads to our config!
- ./config/raven/wps.cfg:/wps.cfg
+ - ./config/raven/wps.cfg:/opt/wps/.custom.wps
+ - ./config/raven/wps.cfg:/opt/wps/raven/default.cfg
- /tmp
restart: always
logging: *default-logging
diff --git a/birdhouse/config/raven/wps.cfg.template b/birdhouse/config/raven/wps.cfg.template
index 3ee21076..9249fd7f 100644
--- a/birdhouse/config/raven/wps.cfg.template
+++ b/birdhouse/config/raven/wps.cfg.template
@@ -1,4 +1,5 @@
[server]
+url = https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/raven
outputurl = https://${PAVICS_FQDN_PUBLIC}/wpsoutputs/raven
outputpath = /data/wpsoutputs/raven
@@ -13,3 +14,27 @@ level = INFO
database=postgresql://${POSTGRES_PAVICS_USERNAME}:${POSTGRES_PAVICS_PASSWORD}@postgres/raven
${EXTRA_PYWPS_CONFIG}
+
+[metadata:main]
+identification_title = Raven
+identification_abstract = Raven offers processes related to hydrological model building, and in particular, the handling of geospatial data and processing.
+identification_keywords = PyWPS, WPS, OGC, processing, birdhouse, raven, demo
+identification_keywords_type = theme
+# identification_fees =
+identification_accessconstraints = https://github.com/bird-house/raven/blob/master/LICENSE.txt
+provider_name = Ouranos
+provider_url = https://github.com/Ouranosic/raven
+contact_name = Ouranos
+contact_position = developer
+# contact_address = NONE
+# contact_city =
+# contact_stateorprovince =
+# contact_postalcode =
+# contact_country =
+# contact_phone =
+# contact_fax =
+# contact_email =
+contact_url = https://github.com/Ouranosic/raven/issues
+# contact_hours =
+contact_instructions = Submit an new issue
+contact_role = originator However, this part of the code I have tried overriding the https://github.com/Ouranosinc/raven/blob/main/raven/cli.py and https://github.com/Ouranosinc/raven/blob/main/raven/templates/pywps.cfg files to enforce some value combinations, but even then, somewhere in the startup procedure, the werkzeug app process and the pywps server end up using the same URL. There would be a need to have 2 separate options, but I'm not sure how to set them up properly among all the config shuffling going on in there (and there is a lot with all the .cfg overrides/dynamic rewrites ! 🤯) Probably @Zeitsperre could have a better chance looking at it. I know however it should be possible because Weaver only loads PyWPS configs here: The result is correctly obtained here: [...]
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://hirondelle.crim.ca/weaver/wps" />
</ows:HTTP>
</ows:DCP>
</ows:Operation>
[...] |
I can't say for sure I know where all the server URL overrides occur. For Raven/RavenPy in particular, I know that there are a handful of hard-coded addresses to our GeoServer instance within the code itself (not good practice; I was learning/I'm sorry). There are probably some instances within the Makefile and within the notebooks themselves that can be blamed too. What I can do is try to convert some of those configurations so that they can be set via environment variables. There's no gurantee that this would fix it but at least it would remove a few potential sources of the problem ? Let me give it a look. |
def get_host():
url = configuration.get_config_value("server", "url")
url = url or "http://localhost:9099/wps" If config def _run(application, bind_host=None, daemon=False):
from werkzeug.serving import run_simple
# call this *after* app is initialized ... needs pywps config.
host, port = get_host()
bind_host = bind_host or host
So maybe the problem is somewhere else? Does the same work-around also do not work for Finch? If Finch works and not Raven them something is fishy with Raven. If both Finch and Raven do not work, then maybe we are looking at the wrong piece code? |
I don't think it's a matter of precedence, but that it should be distinct values. (note: |
Migrated from old PAVICS https://github.com/Ouranosinc/PAVICS/issues/98, lots of discussions, too much to summarize. Just action items.
Most (if not all?) GetCapabilities indicate URL endpoints that are invalid on any bird-server (
pluvier
,colibri
, etc.) for multiple bird-services (flyingpigeon
,catalog
, etc). Seems like the twitcher-url wasn't properly setup when they where deployed.Ex:
returns:
but the real URL is: (see twitcher)
https://pluvier.crim.ca/twitcher/ows/proxy/flyingpigeon
Action item:
Yes.
MagpieAdapter
would need to addpurl
here:https://github.com/Ouranosinc/Magpie/blob/master/magpie/adapter/magpieservice.py#L76-L78
Then function
replace_caps_url
in Twitcher should handle the rest further down the processing chain.The text was updated successfully, but these errors were encountered: