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

jdbcconfig: Deleting workspaces does not delete styles #303

Closed
AlexGacon opened this issue Feb 23, 2023 · 3 comments
Closed

jdbcconfig: Deleting workspaces does not delete styles #303

AlexGacon opened this issue Feb 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@AlexGacon
Copy link
Contributor

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.

@groldan groldan added the bug Something isn't working label Feb 26, 2024
@groldan
Copy link
Member

groldan commented May 2, 2024

@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)

@groldan
Copy link
Member

groldan commented May 2, 2024

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.

@groldan groldan changed the title Deleting workspaces does not delete styles jdbcconfig: Deleting workspaces does not delete styles May 2, 2024
@groldan
Copy link
Member

groldan commented May 2, 2024

@AlexGacon this is fixed in 1.8-SNAPSHOT, look forward for the upcoming 1.8.1 release

@groldan groldan closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants