Skip to content

Commit 2d3f095

Browse files
mikemcdougallclaudeMike McDougall
authored
feat: ogc tiles + cite conformance (#197) (#208)
* feat: implement Redis metadata cache with in-memory fallback (#37) - Add ICacheService and ICacheHealthChecker abstractions in Honua.Core - Add CacheOptions configuration with TTL settings - Implement RedisCacheService using IDistributedCache from Aspire - Support automatic fallback to in-memory cache when Redis unavailable - Create CachingLayerCatalog decorator for transparent caching - Integrate cache health status into ReadinessCheckService - Add cache metrics (hits/misses/evictions) using PerformanceMetrics - Add configuration documentation in appsettings.json - Add comprehensive unit tests for caching functionality Configuration options: - Cache:Enabled - enable/disable caching (default: true) - Cache:DefaultTtlSeconds - default TTL (default: 300) - Cache:LayerTtlSeconds - layer metadata TTL (default: 300) - Cache:ServiceTtlSeconds - service metadata TTL (default: 300) - Cache:EnableFallback - use in-memory when Redis unavailable (default: true) - Cache:FallbackMaxEntries - max in-memory entries (default: 1000) - Cache:RetryIntervalSeconds - retry Redis connection interval (default: 30) - Cache:KeyPrefix - key prefix for Redis (default: "honua:") * fix: complete issue 193 requirements (#193) * feat: ogc tiles + cite conformance (#197) * chore: bump docker deps (#39) * test: align ogc openapi expectations (#199) * fix: resolve architecture gate feedback (#197) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Mike McDougall <mike@honua.io>
1 parent 2a01ced commit 2d3f095

29 files changed

+3226
-166
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ RUN addgroup -g 1001 -S builduser && \
1212

1313
# Install native AOT build dependencies with version pinning for security
1414
RUN apk add --no-cache \
15-
clang=18.1.8-r0 \
15+
clang=20.1.8-r0 \
1616
build-base=0.5-r3 \
17-
zlib-dev=1.3.1-r1 \
17+
zlib-dev=1.3.1-r2 \
1818
&& rm -rf /var/cache/apk/*
1919

2020
# Copy solution and project files first for better layer caching
@@ -47,10 +47,10 @@ FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-alpine AS runtime
4747
# Security: Update packages and remove package manager
4848
RUN apk upgrade --no-cache && \
4949
apk add --no-cache \
50-
icu-libs=74.2-r0 \
51-
tzdata=2024b-r0 \
52-
curl=8.11.0-r0 \
53-
ca-certificates=20240705-r0 && \
50+
icu-libs=76.1-r1 \
51+
tzdata=2025c-r0 \
52+
curl=8.14.1-r2 \
53+
ca-certificates=20250911-r0 && \
5454
rm -rf /var/cache/apk/* && \
5555
rm -rf /tmp/*
5656

@@ -103,4 +103,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
103103
EXPOSE 8080/tcp
104104

105105
# Security: Use exec form and explicit binary path
106-
ENTRYPOINT ["/app/Honua.Server"]
106+
ENTRYPOINT ["/app/Honua.Server"]

docker/cite-compose.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: '3.8'
22

33
services:
44
honua-server:
5+
image: honua-server:latest
56
build:
67
context: ..
78
dockerfile: Dockerfile
@@ -11,6 +12,7 @@ services:
1112
- ASPNETCORE_ENVIRONMENT=Production
1213
- ASPNETCORE_URLS=http://+:8080
1314
- ConnectionStrings__DefaultConnection=Server=postgres;Port=5432;Database=honua_cite;User Id=postgres;Password=cite_password;
15+
- ConnectionStrings__honua=Server=postgres;Port=5432;Database=honua_cite;User Id=postgres;Password=cite_password;
1416
depends_on:
1517
postgres:
1618
condition: service_healthy
@@ -41,11 +43,11 @@ services:
4143
retries: 5
4244

4345
cite-engine:
44-
image: ogccite/ets-ogcapi-features10:latest
46+
image: ogccite/ets-ogcapi-features10:1.9-teamengine-6.0.0-RC2
4547
ports:
4648
- "8081:8080"
4749
environment:
48-
- JAVA_OPTS=-Xmx2g
50+
- JAVA_OPTS=-Xmx2g -DTE_BASE=/root/te_base
4951
- TEAMENGINE_BASE_URL=http://cite-engine:8080/teamengine
5052
volumes:
5153
- cite-logs:/root/te_base/users/cite/logs
@@ -63,22 +65,28 @@ services:
6365
start_period: 60s
6466

6567
cite-runner:
66-
image: ogccite/ets-ogcapi-features10:latest
67-
command: >
68-
bash -c "
69-
echo 'Waiting for services to be ready...' &&
70-
sleep 30 &&
71-
echo 'Starting CITE conformance tests...' &&
72-
java -jar /opt/te-install/lib/teamengine-console-*.jar \
73-
-source=/opt/te-install/scripts/ets-ogcapi-features10.ctl \
74-
-form=/cite-config/test-params.xml \
75-
-logdir=/cite-results \
76-
-session=cite-session-$(date +%Y%m%d-%H%M%S) &&
77-
echo 'CITE tests completed. Check results in /cite-results' &&
78-
tail -f /dev/null
79-
"
68+
image: ogccite/ets-ogcapi-features10:1.9-teamengine-6.0.0-RC2
69+
command:
70+
- bash
71+
- -lc
72+
- |
73+
set -euo pipefail
74+
echo 'Waiting for services to be ready...'
75+
sleep 30
76+
echo 'Preparing TeamEngine console...'
77+
curl -sSL -o /tmp/teamengine-console-6.0.0-RC2-bin.zip https://repo1.maven.org/maven2/org/opengis/cite/teamengine/teamengine-console/6.0.0-RC2/teamengine-console-6.0.0-RC2-bin.zip
78+
unzip -q /tmp/teamengine-console-6.0.0-RC2-bin.zip -d /tmp/te-console
79+
mkdir -p /root/te_base/resources/lib /root/te_base/scripts
80+
mkdir -p /root/te_base/users/cite/logs
81+
rm -rf /root/te_base/scripts/ogcapi-features-1.0
82+
unzip -qo -j /root/ets-ogcapi-features10-1.9-deps.zip -d /root/te_base/resources/lib
83+
unzip -qo /root/ets-ogcapi-features10-1.9-ctl.zip -d /root/te_base/scripts
84+
export TE_BASE=/root/te_base
85+
echo 'Starting CITE conformance tests...'
86+
/tmp/te-console/bin/unix/test.sh -source=/root/te_base/scripts/ogcapi-features-1.0/1.0/ctl/ogcapi-features-1.0-suite.ctl -form=/cite-config/test-params.xml -logdir=users/cite/logs -session=cite-session-$(date +%Y%m%d-%H%M%S)
87+
echo 'CITE tests completed. Check results in logdir.'
8088
volumes:
81-
- cite-results:/cite-results
89+
- cite-results:/root/te_base/users/cite/logs
8290
- ./cite-config:/cite-config:ro
8391
networks:
8492
- cite-network
@@ -96,4 +104,4 @@ volumes:
96104

97105
networks:
98106
cite-network:
99-
driver: bridge
107+
driver: bridge

docker/cite-config/test-params.xml

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<form xmlns="http://www.occamlab.com/te/parsers">
3-
<parsers:session xmlns:parsers="http://www.occamlab.com/te/parsers">
2+
<values xmlns:parsers="http://www.occamlab.com/te/parsers">
3+
<parsers:session>
44
<parsers:test>ets-ogcapi-features10</parsers:test>
5-
<parsers:profile>default</parsers:profile>
5+
<parsers:profile>full</parsers:profile>
66
</parsers:session>
7-
8-
<!-- OGC API Features endpoint configuration -->
9-
<entry key="landing-page-uri">http://honua-server:8080/ogc/features</entry>
10-
<entry key="iut-uri">http://honua-server:8080/ogc/features</entry>
11-
<entry key="conformance-uri">http://honua-server:8080/ogc/features/conformance</entry>
12-
<entry key="collections-uri">http://honua-server:8080/ogc/features/collections</entry>
13-
14-
<!-- Authentication (if required) -->
15-
<!-- <entry key="auth-username">testuser</entry> -->
16-
<!-- <entry key="auth-password">testpass</entry> -->
17-
18-
<!-- Collection specific tests -->
19-
<entry key="collection-id">test-collection</entry>
20-
21-
<!-- Coordinate reference system tests -->
22-
<entry key="bbox">-180,-90,180,90</entry>
23-
<entry key="crs">http://www.opengis.net/def/crs/OGC/1.3/CRS84</entry>
24-
25-
<!-- Features query parameters -->
26-
<entry key="limit">100</entry>
27-
<entry key="offset">0</entry>
28-
29-
<!-- Feature specific tests (if features exist) -->
30-
<!-- <entry key="feature-id">feature-001</entry> -->
31-
32-
<!-- Content negotiation -->
33-
<entry key="media-types">application/geo+json,application/json</entry>
34-
35-
<!-- Conformance classes to test -->
36-
<entry key="conf-classes">
37-
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core,
38-
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30,
39-
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html,
40-
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson
41-
</entry>
42-
43-
<!-- Optional conformance classes -->
44-
<!-- <entry key="optional-conf-classes">
45-
http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs
46-
</entry> -->
47-
</form>
7+
<value key="ogc-api-features-uri">http://honua-server:8080/ogc/features</value>
8+
<value key="collectionsLimit">limited</value>
9+
<value key="noOfCollections">1</value>
10+
</values>

docker/cite-seed.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ SELECT layer.layer_id,
5656
jsonb_build_object('name', 'Dateline Post', 'category', 'reference', 'active', true)
5757
FROM layer
5858
UNION ALL
59+
SELECT layer.layer_id,
60+
ST_SetSRID(ST_MakePoint(179.0, 67.0), 4326),
61+
jsonb_build_object('name', 'Arctic Dateline Station', 'category', 'reference', 'active', true)
62+
FROM layer
63+
UNION ALL
5964
SELECT layer.layer_id,
6065
ST_SetSRID(ST_MakePoint(0.0, 86.0), 4326),
6166
jsonb_build_object('name', 'North Polar Outpost', 'category', 'reference', 'active', true)

docs/IMPLEMENTATION_PLAN.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Implementation Plan
2+
3+
This plan orders the remaining open tickets by dependency and risk. It is intentionally rough and should be adjusted as priorities shift.
4+
5+
## Phase 1: Protocol completeness + conformance
6+
- #197 OGC API Tiles endpoints (vector tiles)
7+
- #198 OGC API Tiles CITE conformance suite
8+
- #199 OGC API Features CITE full pass (remove skips)
9+
- #20 TileJSON metadata endpoint (MVT clients)
10+
11+
## Phase 2: Admin metadata + import versioning (MVP)
12+
- #192 Epic: Admin Metadata API v1
13+
- #191 Admin Metadata API v1 (services/layers/styles)
14+
- #190 Move import endpoints to /api/v1/admin/import
15+
- #189 Docs: Admin Metadata API v1 + import versioning
16+
- #36 Admin endpoint protection
17+
- #58 Service management (enable/disable layers)
18+
19+
## Phase 3: Security, auth, docs (MVP)
20+
- #39 Security hardening and input validation
21+
- #38 Documentation and API docs
22+
- #35 OIDC authentication (Azure AD, Google, generic)
23+
24+
## Phase 4: Deployment & runtime ops
25+
- #31 Helm chart for Kubernetes
26+
- #32 AWS Terraform module
27+
- #33 Azure Terraform module
28+
- #34 GCP Terraform module
29+
- #196 Environment-first configuration
30+
- #194 OpenTelemetry tracing
31+
32+
## Phase 5: Admin UI & UX
33+
- #25 Blazor WASM admin project setup
34+
- #26 PostGIS connection management UI
35+
- #27 Layer publishing from PostGIS tables
36+
- #43 Map preview with MapLibre
37+
- #42 Health dashboard in admin UI
38+
- #30 Embedded Maputnik style editor
39+
- #59 Admin UI wireframes and UX design
40+
- #60 Admin UI Playwright integration tests
41+
- #188 Backend: Esri Service Import + Progress Notifications
42+
- #187 Esri Service Import Wizard UI
43+
44+
## Phase 6: Compatibility + performance (Beta)
45+
- #200 OData client compatibility (Excel/PowerBI)
46+
- #102 Esri Leaflet client compatibility testing
47+
- #201 Performance regression baselines + CI gating
48+
- #202 Load/soak testing for core APIs
49+
- #98 Geometry Server operations (buffer/simplify/project)
50+
- #44 Error handling audit and consistency

docs/cite-conformance-testing.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,42 +42,42 @@ CITE tests run automatically:
4242

4343
## Test Profiles
4444

45-
### Default Profile
46-
Tests core OGC API Features 1.0 conformance classes:
47-
- Core
48-
- OpenAPI 3.0
49-
- GeoJSON
50-
- HTML
51-
52-
### Minimal Profile
53-
Basic conformance testing for quick validation:
54-
- Core only
55-
56-
### Full Profile
45+
### Full Profile (default)
5746
Comprehensive testing including optional features:
5847
- All default classes
5948
- CRS (Coordinate Reference Systems)
6049
- Query parameters
6150
- Advanced features
6251

52+
Use `--profile default` to run the core conformance classes only.
53+
54+
### Minimal Profile
55+
Basic conformance testing for quick validation:
56+
- Core only
57+
58+
### Core Profile (`--profile default`)
59+
Tests core OGC API Features 1.0 conformance classes:
60+
- Core
61+
- OpenAPI 3.0
62+
- GeoJSON
63+
- HTML
64+
6365
## Configuration
6466

6567
### Test Parameters
6668

6769
The CITE test suite is configured via `docker/cite-config/test-params.xml`:
6870

6971
```xml
70-
<!-- Core endpoint configuration -->
71-
<entry key="landing-page-uri">http://honua-server:8080</entry>
72-
<entry key="conformance-uri">http://honua-server:8080/conformance</entry>
73-
<entry key="collections-uri">http://honua-server:8080/collections</entry>
74-
75-
<!-- Collection-specific tests -->
76-
<entry key="collection-id">test-collection</entry>
77-
78-
<!-- Coordinate reference system tests -->
79-
<entry key="bbox">-180,-90,180,90</entry>
80-
<entry key="crs">http://www.opengis.net/def/crs/OGC/1.3/CRS84</entry>
72+
<values xmlns:parsers="http://www.occamlab.com/te/parsers">
73+
<parsers:session>
74+
<parsers:test>ets-ogcapi-features10</parsers:test>
75+
<parsers:profile>full</parsers:profile>
76+
</parsers:session>
77+
<value key="ogc-api-features-uri">http://honua-server:8080/ogc/features</value>
78+
<value key="collectionsLimit">limited</value>
79+
<value key="noOfCollections">1</value>
80+
</values>
8181
```
8282

8383
### Docker Compose Services
@@ -351,4 +351,4 @@ For CITE testing issues:
351351
2. Review workflow logs and artifacts
352352
3. Test locally with `--verbose` and `--interactive` flags
353353
4. Check OGC CITE community resources
354-
5. Create GitHub issue with test results and logs
354+
5. Create GitHub issue with test results and logs

0 commit comments

Comments
 (0)