jdbcconfig: Deleting workspaces does not delete styles
AlexGacon opened this issue · 3 comments
Context:
GS Cloud with JDBC config and JDBC resource store
Data are stored in a Postgis Database
Reproduced with:
GS Cloud RC1.28 on Kubernetes deployed with Helm charts
GS Cloud RC1.28 on Docker deployed with docker compose
GS Cloud RC1.29 On Docker deployed with docker compose
GS Cloud master code from GitHub deployed with docker compose
When I ask to delete workspaces, the styles attached to the workspaces are not deleted : they are simply moved outside the workspace and are style available in the style list. I have to manually remove the styles to have a clean GeoServer configuration.
The same operation on a vanilla GeoServer deletes the styles as expected.
@AlexGacon beware the resources remain there anyways. This is jdbcconfig/store
on vanilla geoserver 2.25.0
Run
curl -X DELETE -u admin:geoserver "http://localhost:8080/geoserver/rest/workspaces/ne?recurse=true"
Then on the database the resources remain although the catalog infos were removed from the catalog itself. They're also visible through the resource/
rest api:
select oid,parent,name from resources where parent = (select oid from resources where name = 'ne') order by parent,oid;
oid | parent | name
-----+--------+---------------
141 | 140 | wfs.xml
142 | 140 | namespace.xml
143 | 140 | layergroups
145 | 140 | wmts.xml
146 | 140 | wcs.xml
147 | 140 | settings.xml
148 | 140 | wms.xml
149 | 140 | styles
162 | 140 | NaturalEarth
179 | 140 | workspace.xml
(10 rows)
That said, I think I've a quick fix for the specific issue of the style not being deleted.
I will apply that and not bother with the other issue because the jdbcconfig
support in gscloud is almost officially deprecated in favor of pgconfig
.
@AlexGacon this is fixed in 1.8-SNAPSHOT, look forward for the upcoming 1.8.1 release