Open-EO / openeo-js-client

JavaScript and TypeScript client for the openEO API.
https://open-eo.github.io/openeo-js-client/latest/
Apache License 2.0
15 stars 6 forks source link

Normalize namespace doesn't work for EGI Checkin users #60

Open JanssenBrm opened 2 weeks ago

JanssenBrm commented 2 weeks ago

We noticed a strange behaviour in the openEO Web Editor where a UDP wasn't correctly loaded into the wizard. It mentions Process not found: https://editor.openeo.org/?server=https://openeo.vito.be&namespaces=https://openeo.vito.be/openeo/processes/u:63d26122aec1fc5ae2c16a045570e4d90e89fb3a51081c0d9d6047c270f72940@egi.eu/CORSAcompression&wizard=UDP&wizard~process=CORSAcompression@https://openeo.vito.be/openeo/processes/u:63d26122aec1fc5ae2c16a045570e4d90e89fb3a51081c0d9d6047c270f72940@egi.eu/CORSAcompression

After some debugging of the requests, we noticed that the web editor is loading in the processes of the namespace through the following URL: https://openeo.vito.be/openeo/1.2/processes/u:63d26122aec1fc5ae2c16a045570e4d90e89fb3a51081c0d9d6047c270f72940. However, this URL is missing the @egi.eu part, resulting in an empty array of processes.

A short debug session leads us to the function that is used to normalize the namespace naming: https://github.com/Open-EO/openeo-js-client/blob/3c83cf0a28e5026e413cf5c7fdd37d0e559e5609/src/connection.js#L309. It appears that regex is ignoring the part that is behind @ sign. We believe that this could be causing the issue.

I'm happy to open a PR, but I wanted to create this issue first to check if this could be causing the issue and assess the impact of it.

JanssenBrm commented 2 weeks ago

Tagging @Pratichhya as she was experiencing the initial issue.

JanssenBrm commented 2 weeks ago

Maybe it also has an impact on the changes requested in https://github.com/Open-EO/openeo-api/issues/515

m-mohr commented 2 weeks ago

This is all not yet part of the official API, so the JS client implementation follows the only thing we have - https://github.com/Open-EO/openeo-api/pull/348 - which defines the pattern as implemented here and as such doesn't allow @ in this place. Before I merge any more unofficial extensions to the clients, I'd like to conclude on the API extension first so that we can implement the finally agreed solution.

I don't think this has an impact on https://github.com/Open-EO/openeo-api/issues/515.