Skip to content

PYR1-1801 Publish shapefile layers without an auto-published copy - #104

Merged
lambdatronic merged 1 commit into
mainfrom
PYR1-1801-publish-shapefiles-without-auto-publish
Sep 25, 2026
Merged

lambdatronic merged 1 commit into
mainfrom
PYR1-1801-publish-shapefiles-without-auto-publish

Conversation

@danielhvs

@danielhvs danielhvs commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Each shapefile store now publishes exactly one feature type, named after the store. Before this, every fire spread workspace ended up with isochrones1 to isochrones4 next to the intended elmfire_landfire_{30,50,70,90}_isochrones, and every match-drop workspace with 6 isochrones_md-<id>_<ts>_<pct>1 copies.

Env Leaked feature types
dev 44 on geoserver02
prod 44 on geoserver02, 217 on geoserver03 (match-drop)

Cause

  1. The :shapefile branch sent PUT .../external.shp, and GeoServer auto-publishes a feature type named after the shapefile basename.
  2. Requests go out in phases, so all of a workspace's external.shp PUTs run in parallel. Several shapefiles share a basename: 5 × isochrones.shp per fire since PYR1-1579's rename, and ELMFIRE and Pyretechnics ship the same isochrones_md-..._<pct>.shp per match-drop run. GeoServer suffixes all but the first.
  3. The cleanup renamed and deleted by the unsuffixed name, so it removed one copy and returned 404 for the rest. Prod trinity logged 116 404 ...:isochrones on 09-23.

Changes

  1. :shapefile creates the store, then POSTs a single feature type with name = store name and nativeName = shapefile basename (rest/create-feature-type-alias, the same request the rename step already sent). The auto-publishing PUT and the two cleanup DELETEs are gone.
  2. Flat shapefiles, where store name = basename, use the same single POST.
  3. :geopackage is unchanged. Its table names are unique per store, so it has no collision.
  4. shapefile-layer-specs-test covers the nested and flat cases and the style step.

Existing leaked layers are not touched. Fire spread workspaces rotate out on their own; match-drop ones need a one-off cleanup per environment after this ships.

Verified on dev

I pinned the dev GeoSync UberJAR to 9565a00, removed fire-spread-forecast_wa-sisi_20260924_095400, and re-added it with herd trigger sync-fire-spread-forecast:

  1. Each elmfire_landfire_{10..90}_isochrones store holds one feature type. There are no isochronesN copies, and geoserver02's leak count dropped from 44 to 40 (wa-sisi is gone from the list)
  2. The workspace has 30 catalog layers (5 feature types + 25 coverages), down from 34
  3. Trinity log: Workspace updated. with 0 404 ...:isochrones
  4. All 5 layers keep nativeName isochrones and SRS EPSG:32610, get real bboxes that widen from P10 to P90, render WMS GetMap 200 image/png, and have GWC tile layers at [1, 1] with MVT
Layer latLon bbox GetMap
elmfire_landfire_10_isochrones -120.881,48.328,-120.763,48.405 200 png 13.7 KB
elmfire_landfire_30_isochrones -120.894,48.327,-120.757,48.410 200 png 13.1 KB
elmfire_landfire_50_isochrones -120.901,48.324,-120.752,48.414 200 png 13.1 KB
elmfire_landfire_70_isochrones -120.906,48.321,-120.715,48.414 200 png 14.3 KB
elmfire_landfire_90_isochrones -120.927,48.310,-120.684,48.426 200 png 16.4 KB

Related Issues

Closes PYR1-1801
Relates to PYR1-1579, PYR1-1786

Create the shapefile feature type with one POST under the store name, and
drop the PUT to external.shp. That PUT made GeoServer auto-publish a feature
type named after the shapefile; shapefiles sharing a basename (five
isochrones.shp per fire, ELMFIRE and Pyretechnics per match-drop) raced for
it, and the cleanup by name left isochrones1-4 behind in every workspace.
@danielhvs
danielhvs marked this pull request as ready for review September 24, 2026 17:15
@lambdatronic
lambdatronic merged commit 26cb40d into main Sep 25, 2026
1 check passed
@lambdatronic
lambdatronic deleted the PYR1-1801-publish-shapefiles-without-auto-publish branch September 25, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants