HTM-1960: Custom extract functionality for layer attributes#1672
Conversation
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issuespom.xml
OpenSSF Scorecard
Scanned Files
|
3d68eef to
4a7dc05
Compare
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Test Results486 tests +7 483 ✅ +6 10m 30s ⏱️ + 5m 24s For more details on these failures, see this check. Results for commit 8f5ec0a. ± Comparison against base commit cd7dd9f. This pull request removes 12 and adds 19 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
4a7dc05 to
4fd0fc0
Compare
8c7e56f to
faf5c2f
Compare
b9bbb48 to
e1cb81b
Compare
c35d02a to
17ff46d
Compare
|
|
||
| @GetMapping("/formats") | ||
| public ResponseEntity<?> formats( | ||
| @Valid @ModelAttribute GeoServiceLayer layer, |
| @GetMapping("/formats") | ||
| public ResponseEntity<?> formats( | ||
| @Valid @ModelAttribute GeoServiceLayer layer, | ||
| @ModelAttribute GeoService service, |
| public ResponseEntity<?> formats( | ||
| @Valid @ModelAttribute GeoServiceLayer layer, | ||
| @ModelAttribute GeoService service, | ||
| @ModelAttribute Application application, |
| @Valid @ModelAttribute GeoServiceLayer layer, | ||
| @ModelAttribute GeoService service, | ||
| @ModelAttribute Application application, | ||
| @ModelAttribute AppTreeLayerNode appTreeLayerNode) { |
| @GetMapping(path = "/download/{downloadId}") | ||
| @Counted(value = "tailormap_api_extract_download", description = "Count of layer extract downloads") | ||
| public ResponseEntity<?> download( | ||
| @ModelAttribute GeoService service, |
| @Counted(value = "tailormap_api_extract_download", description = "Count of layer extract downloads") | ||
| public ResponseEntity<?> download( | ||
| @ModelAttribute GeoService service, | ||
| @ModelAttribute GeoServiceLayer layer, |
| public ResponseEntity<?> download( | ||
| @ModelAttribute GeoService service, | ||
| @ModelAttribute GeoServiceLayer layer, | ||
| @ModelAttribute Application application, |
| @ModelAttribute GeoService service, | ||
| @ModelAttribute GeoServiceLayer layer, | ||
| @ModelAttribute Application application, | ||
| @ModelAttribute AppTreeLayerNode appTreeLayerNode, |
3e74069 to
3ab9dea
Compare
3ef963f to
8ded6a3
Compare
d9c823f to
ee0c726
Compare
There was a problem hiding this comment.
Pull request overview
This PR continues the migration from the legacy layer /export workflow to the new /extract workflow for exporting layer attributes, introducing viewer SSE support, server-side extract generation (CSV/GeoJSON/XLSX/Shapefile/GeoPackage), and updated OpenAPI/configuration plus extensive integration tests.
Changes:
- Add viewer SSE endpoint (
/events/{clientId}) and a dedicatedviewerSseEventBusto isolate viewer SSE traffic from admin broadcasts. - Implement server-side extract creation pipeline with progress reporting and download endpoint, including new utilities (UUIDv7) and GeoTools-backed writers.
- Remove legacy
/exportAPI + tests, update OpenAPI schemas/specs, configuration properties, build/deps, and add new unit/integration tests for/extract.
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/application.properties | Updates test configuration to new tailormap-api.extract.* settings. |
| src/test/java/org/tailormap/api/util/UUIDv7Test.java | Adds unit tests for UUIDv7 generation/parsing/ordering. |
| src/test/java/org/tailormap/api/geotools/collection/ProgressReportingFeatureIteratorTest.java | Adds unit test for iterator input validation. |
| src/test/java/org/tailormap/api/geotools/collection/ProgressReportingFeatureCollectionTest.java | Adds tests validating progress callbacks for decorated feature collections. |
| src/test/java/org/tailormap/api/controller/TestUrls.java | Removes URL constant no longer needed after export removal. |
| src/test/java/org/tailormap/api/controller/SseParsingUtils.java | Adds test utility helpers for parsing/counting SSE messages. |
| src/test/java/org/tailormap/api/controller/ServerSentEventsControllerInvalidInputIntegrationTest.java | Adds integration test for SSE clientId validation. |
| src/test/java/org/tailormap/api/controller/ServerSentEventsControllerIntegrationTest.java | Adds integration tests for viewer/admin SSE separation + keep-alive behavior. |
| src/test/java/org/tailormap/api/controller/LayerExtractControllerRestrictedFormatsIntegrationTest.java | Adds integration tests for allowed/disallowed extract formats and input validation. |
| src/test/java/org/tailormap/api/controller/LayerExtractControllerLargeExcelIntegrationTest.java | Adds large XLSX extract integration test and validates output. |
| src/test/java/org/tailormap/api/controller/LayerExtractControllerIntegrationTest.java | Adds end-to-end integration tests for multiple extract formats and error paths. |
| src/test/java/org/tailormap/api/controller/LayerExportControllerIntegrationTest.java | Removes legacy /export endpoint tests. |
| src/main/resources/openapi/viewer-schemas.yaml | Cleans up schema refs and removes legacy export schema. |
| src/main/resources/openapi/viewer-api.yaml | Removes /export paths and adds /events + /extract endpoints to the spec. |
| src/main/resources/openapi/status-responses.yaml | Adds ServerSentEventResponse schema for SSE payloads. |
| src/main/resources/application.properties | Switches from tailormap-api.export.* to tailormap-api.extract.* defaults and documentation. |
| src/main/java/org/tailormap/api/util/UUIDv7.java | Adds UUIDv7 utility for time-sortable event IDs. |
| src/main/java/org/tailormap/api/service/CreateLayerExtractService.java | Implements extract generation, progress/error SSE emission, and cleanup scheduling. |
| src/main/java/org/tailormap/api/geotools/collection/ProgressReportingFeatureIterator.java | Adds iterator wrapper to emit progress callbacks. |
| src/main/java/org/tailormap/api/geotools/collection/ProgressReportingFeatureCollection.java | Adds feature collection wrapper that produces progress-reporting iterators. |
| src/main/java/org/tailormap/api/controller/ServerSentEventsController.java | Adds viewer SSE controller and keep-alive broadcaster using UUIDv7. |
| src/main/java/org/tailormap/api/controller/LayerExtractController.java | Adds /extract controller (formats, extract start, download). |
| src/main/java/org/tailormap/api/controller/LayerExportController.java | Removes legacy /export controller implementation. |
| src/main/java/org/tailormap/api/controller/admin/ServerSentEventsAdminController.java | Ensures admin SSE JSON is single-line (consistent SSE framing). |
| src/main/java/org/tailormap/api/configuration/TailormapConfig.java | Adds viewerSseEventBus bean with defaults matching eventbus auto-config. |
| src/main/java/org/tailormap/api/configuration/base/WebMvcConfig.java | Registers enum converter for ExtractOutputFormat. |
| src/main/java/org/tailormap/api/configuration/AsyncConfig.java | Adds async executor for extract tasks. |
| README.md | Documents having separate admin vs viewer SSE buses/streams. |
| pom.xml | Updates GeoTools version/deps/repos and buildpack JVM options for native access. |
| build/qa/PMD-ruleset_for_TM.xml | Updates PMD config to recognize Awaitility untilAsserted as an assertion. |
| build/ci/docker-compose.yml | Minor formatting change. |
| .mvn/jvm.config | Enables native access for the build JVM. |
…t endpoint we still need some, now obsoleted, generated code to keep the compiler happy so that is moved to a temporary schema file
…ith CSV output format
For now use GeoTools 35-SNAPSHOT to make geojson export work, see https://osgeo-org.atlassian.net/browse/GEOT-7894
…s don't get aministrative braodcasts
…s more robust Add --enable-native-access=ALL-UNNAMED for the native sqlite/geopackage driver
99397c7 to
e46618e
Compare
e46618e to
8b3efdc
Compare
hopefully around 2026-06-01
|
test failure |
This is the feature branch / PR to collect all subtasks for the new
/extractAPI/exportendpoint and define/extractendpoint #1671/eventsand/extractendpoints with CSV output format #1677/exportendpoint #1721org.geotools:gt-excel-writerblocks:
/extractAPI, cleanup old/exportAPI tailormap-viewer#1312