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

Allow configuring if schema(s) should be loaded from included offline resources #960

Open
pvgenuchten opened this issue Apr 6, 2022 · 8 comments
Labels

Comments

@pvgenuchten
Copy link

pvgenuchten commented Apr 6, 2022

This issue was mentioned by dries luts around the inspire soil schema.

Jrc recently deployed some bugfixes on various schema's. Our impression is that when we try to load these updated schema's by url, hale studio seems to still use the locally cached previous version of the schema

I wonder if there is guidance available on how to update the locally cached/preset schema's, and/or if software changes could improve this use case (check if the online version is newer then the local one).

I could also imagine we should encourage jrc to not fix issues on previously published schema's but publish changes on a new minor release version (4.0.1)

@stempler
Copy link
Member

stempler commented Apr 6, 2022

The mechanism with the offline resources in hale works in the way that for a given host name, hale first tries to find the resources (e.g. XML Schema) in the offline resource bundles and if it does not find them it will use the online resource.

This assumes that the content at the respective URLs is stable (as they usually contain a version number). Past experience has shown that at least for the INSPIRE schemas, but also for instance for OGC schemas like the GML 3.2.1 schema the online resources have changed.

The approach in the past was to then just update the resource bundles. The latest versions can be found here - you can see those are already over a year old. There is an automated build available in that repository, to create new versions of the bundles by downloading the schemas (it might have to be checked though if these still work as expected).

To force your hale studio to not use the offline resources you could also just delete the respective bundles from the pluginsfolder (e.g. removing files similar to eu.esdihumboldt.util.resource.schemas.inspire_2021.03.09.jar to remove the INSPIRE schemas).

@pvgenuchten
Copy link
Author

Thanx for the hint @stempler
I'll give it a try

@pvgenuchten
Copy link
Author

@stempler, I was not aware of it but it seems JRC also publishes a versioned edition of the INSPIRE xsd's at

https://inspire.ec.europa.eu/schemas/2021.1/so/4.0/Soil.xsd
https://inspire.ec.europa.eu/schemas/2021.2/so/4.0/Soil.xsd

At least, by using this url, it is a better workaround then removing the preset package, but maybe the Hale software should also adopt these versioned xsd url's?

@pvgenuchten pvgenuchten reopened this Apr 12, 2022
@thorsten-reitz thorsten-reitz added this to the 4.2.0 milestone May 23, 2022
@JohannaOtt
Copy link
Contributor

The issue to update the bundled resources is #977

Copy link

github-actions bot commented May 8, 2024

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 8, 2024
@JohannaOtt
Copy link
Contributor

@pvgenuchten As the bundled resources have been updated in the meantime, would you agree that we can close this issue?

@florianesser florianesser removed this from the 5.1.0 milestone May 10, 2024
@github-actions github-actions bot removed the stale label Jun 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 1, 2024
@stempler
Copy link
Member

stempler commented Aug 1, 2024

What has been implemented in the meantime is more frequent update of the offline resources and more frequent releases of hale studio to make the changes available.

The behavior is still that the cached offline resources will be used when the official URLs are used. Plan is to make this more transparent and controllable by the user:

  • make the behavior controllable by the user (other than removing the Jars): Introduce a setting that can be used both in the UI and other environments to disable using the offline resources
  • an extended version of this could also allow specifying a list of URLs that should be ignored; there could also be a setting to only try offline if online fails
  • add a hint to "From URL" and "From preset" if the offline resources or the caching are enabled, that states that resources may be used from offline resources (which could be outdated) or the cache, and that both can be disabled in the settings

@stempler stempler added planned and removed stale labels Aug 1, 2024
@stempler stempler changed the title how are schema's loaded, if they also exist locally? Allow configuring if schema(s) should be loaded from included offline resources Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants