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

[Feature] Reuse weaver.url to define process locations #152

Open
fmigneault opened this issue May 22, 2020 · 0 comments
Open

[Feature] Reuse weaver.url to define process locations #152

fmigneault opened this issue May 22, 2020 · 0 comments
Assignees
Labels
feature/db Related to database or datatype manipulation. triage/bug Something isn't working triage/enhancement New feature or request triage/feature New requested feature.

Comments

@fmigneault
Copy link
Collaborator

Context

Until at least weaver 1.8, processes are stored with the 3 displayed fields below, directly using the weaver.url value. While this is acceptable and works for base use case, it causes problems if the server configuration that uses weaver is modified for any reason as all these locations become invalid.
Processes deployed before the server reconfiguration would all point to invalid locations, meaning they cannot be correctly executed nor report the correct references in the response bodies.

For example, starting two server configurations from scratch that specify different weaver.url setting, the results are are follows after deploying some process. This is not the case of builtin processes which are redeployed on each weaver startup.

image

image

Todo

Since weaver does not require to have the full URL in those fields, corresponding relative 'path' should be stored instead of the full URL. The Process properties should me modified to provide a getter that combines weaver.url with the corresponding 'path' stored in db.

weaver/weaver/datatype.py

Lines 673 to 686 in 5e2aa56

@property
def processDescriptionURL(self): # noqa: N802
# type: () -> Optional[AnyStr]
return self.get("processDescriptionURL")
@property
def processEndpointWPS1(self): # noqa: N802
# type: () -> Optional[AnyStr]
return self.get("processEndpointWPS1")
@property
def executeEndpoint(self): # noqa: N802
# type: () -> Optional[AnyStr]
return self.get("executeEndpoint")

Since these path can also refer to a remote provider locations, the paths must not be assumed to only start with the /processes.

@fmigneault fmigneault added triage/bug Something isn't working triage/enhancement New feature or request triage/feature New requested feature. feature/db Related to database or datatype manipulation. labels May 22, 2020
@fmigneault fmigneault self-assigned this May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/db Related to database or datatype manipulation. triage/bug Something isn't working triage/enhancement New feature or request triage/feature New requested feature.
Projects
None yet
Development

No branches or pull requests

1 participant