From 523d7e41b25850231846478869cd1cd01a09ed97 Mon Sep 17 00:00:00 2001 From: Ighomena Odebala Date: Tue, 3 Dec 2024 11:47:06 +0000 Subject: [PATCH 1/2] Update readme --- README.md | 68 +++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 77544c8..cea4f29 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -dp-frontend-homepage-controller -================ +# dp-frontend-homepage-controller -### Getting started +## Getting started To run this service @@ -9,41 +8,42 @@ To run this service 2. Run `make debug` to start the service on ### Dependencies + - sixteens - Serves CSS and JS for the page -- golang 1.23.x +- golang 1.23.x - No further dependencies other than those defined in `go.mod` ### Configuration -| Config | Description | Default | -|-------------------------------------|----------------------------------------------------------------------------------------|-------------------------------------------| -| API_ROUTER_URL | The URL of the [dp-api-router](https://github.com/ONSdigital/dp-api-router) | http://localhost:23200/v1 | -| BIND_ADDR | The Port to run on | :24400 | -| CACHE_CENSUS_TOPICS_UPDATE_INTERVAL | Duration for census topic cache updates | 1 minute | -| CACHE_NAVIGATION_UPDATE_INTERVAL | Duration for navigation cache updates | 1 minute | -| CACHE_UPDATE_INTERVAL | Duration for homepage cache updation | 10 seconds | -| CENSUS_TOPIC_ID | Root census id (for getting census topics) | 4445 | -| DATASET_FINDER_ENABLED | Displays link to dataset finder | false | -| DEBUG | | | -| ENABLE_CENSUS_TOPIC_SUBSECTION | Displays topics subsection | false | -| ENABLE_CUSTOM_DATASET | Displays link to custom dataset builder | false | -| ENABLE_FEEDBACK_API | Enable the feedback API for use in the feedback form (as opposed to the controller) | false | -| ENABLE_GET_DATA_CARD | Displays Get Data Card | false | -| ENABLE_NEW_NAVBAR | Enables Topic API driven Nav bar | false | -| FEEDBACK_API_URL | | | -| GRACEFUL_SHUTDOWN_TIMEOUT | Time to wait during graceful shutdown | 5 seconds | -| HEALTHCHECK_CRITICAL_TIMEOUT | Amount of time to pass since last healthy health check to be deemed a critical failure | 90 seconds | -| HEALTHCHECK_INTERVAL | Interval between health checks | 30 seconds | -| OTEL_BATCH_TIMEOUT | 5s | Interval between pushes to OT Collector | -| OTEL_EXPORTER_OTLP_ENDPOINT | http://localhost:4317 | URL for OpenTelemetry endpoint | -| OTEL_SERVICE_NAME | "dp-frontend-homepage-controller" | Service name to report to telemetry tools | -| OTEL_ENABLED | false | Feature flag to enable OpenTelemetry | -| IS_PUBLISHING_MODE | Mode in which service is running | false | -| PATTERN_LIBRARY_ASSETS_PATH | | | -| SERVICE_AUTH_TOKEN | | | -| SIXTEENS_VERSION | Homepage still uses a Sixteens version for styling | | -| SITE_DOMAIN | | localhost | -| SUPPORTED_LANGUAGES | Languages which are supported separated by comma | en,cy | +| Config | Description | Default | +|-------------------------------------|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------| +| API_ROUTER_URL | The URL of the [dp-api-router](https://github.com/ONSdigital/dp-api-router) | [http://localhost:23200/v1](http://localhost:23200/v1) | +| BIND_ADDR | The Port to run on | :24400 | +| CACHE_CENSUS_TOPICS_UPDATE_INTERVAL | Duration for census topic cache updates | 1 minute | +| CACHE_NAVIGATION_UPDATE_INTERVAL | Duration for navigation cache updates | 1 minute | +| CACHE_UPDATE_INTERVAL | Duration for homepage cache updation | 10 seconds | +| CENSUS_TOPIC_ID | Root census id (for getting census topics) | 4445 | +| DATASET_FINDER_ENABLED | Displays link to dataset finder | false | +| DEBUG | false | Enable debug | +| ENABLE_CENSUS_TOPIC_SUBSECTION | Displays topics subsection | false | +| ENABLE_CUSTOM_DATASET | Displays link to custom dataset builder | false | +| ENABLE_FEEDBACK_API | Enable the feedback API for use in the feedback form (as opposed to the controller) | false | +| ENABLE_GET_DATA_CARD | Displays Get Data Card | false | +| ENABLE_NEW_NAVBAR | Enables Topic API driven Nav bar | false | +| FEEDBACK_API_URL | [http://localhost:23200/v1/feedback](http://localhost:23200/v1/feedback) | The public `dp-api-router` address for feedback, not the internal one | +| GRACEFUL_SHUTDOWN_TIMEOUT | Time to wait during graceful shutdown | 5 seconds | +| HEALTHCHECK_CRITICAL_TIMEOUT | Amount of time to pass since last healthy health check to be deemed a critical failure | 90 seconds | +| HEALTHCHECK_INTERVAL | Interval between health checks | 30 seconds | +| OTEL_BATCH_TIMEOUT | 5s | Interval between pushes to OT Collector | +| OTEL_EXPORTER_OTLP_ENDPOINT | [http://localhost:4317](http://localhost:4317) | URL for OpenTelemetry endpoint | +| OTEL_SERVICE_NAME | "dp-frontend-homepage-controller" | Service name to report to telemetry tools | +| OTEL_ENABLED | false | Feature flag to enable OpenTelemetry | +| IS_PUBLISHING_MODE | Mode in which service is running | false | +| PATTERN_LIBRARY_ASSETS_PATH | | | +| SERVICE_AUTH_TOKEN | | | +| SIXTEENS_VERSION | Homepage still uses a Sixteens version for styling | | +| SITE_DOMAIN | | localhost | +| SUPPORTED_LANGUAGES | Languages which are supported separated by comma | en,cy | ### Contributing @@ -51,6 +51,6 @@ See [CONTRIBUTING](CONTRIBUTING.md) for details. ### License -Copyright © 2021, Office for National Statistics (https://www.ons.gov.uk) +Copyright © 2021, Office for National Statistics [https://www.ons.gov.uk](https://www.ons.gov.uk) Released under MIT license, see [LICENSE](LICENSE.md) for details. From 34bea77b33320649d3e86e4648c8032150c1b6a3 Mon Sep 17 00:00:00 2001 From: Ighomena Odebala Date: Tue, 3 Dec 2024 11:47:30 +0000 Subject: [PATCH 2/2] Update sixteens and design system versions --- config/config.go | 4 ++-- config/config_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index d7ccdd1..577ac3d 100644 --- a/config/config.go +++ b/config/config.go @@ -80,7 +80,7 @@ func get() (*Config, error) { ServiceAuthToken: "", SiteDomain: "localhost", SupportedLanguages: []string{"en", "cy"}, - SixteensVersion: "976e611", + SixteensVersion: "fa4e02c", } err := envconfig.Process("", cfg) @@ -91,7 +91,7 @@ func get() (*Config, error) { if cfg.Debug { cfg.PatternLibraryAssetsPath = "http://localhost:9002/dist/assets" } else { - cfg.PatternLibraryAssetsPath = "//cdn.ons.gov.uk/dp-design-system/e0a75c3" + cfg.PatternLibraryAssetsPath = "//cdn.ons.gov.uk/dp-design-system/2c5185a" } return cfg, nil diff --git a/config/config_test.go b/config/config_test.go index 94ebe69..67d855c 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -30,7 +30,7 @@ func TestSpec(t *testing.T) { So(cfg.HealthCheckCriticalTimeout, ShouldEqual, 90*time.Second) So(cfg.HealthCheckInterval, ShouldEqual, 30*time.Second) So(cfg.IsPublishingMode, ShouldEqual, false) - So(cfg.PatternLibraryAssetsPath, ShouldEqual, "//cdn.ons.gov.uk/dp-design-system/e0a75c3") + So(cfg.PatternLibraryAssetsPath, ShouldEqual, "//cdn.ons.gov.uk/dp-design-system/2c5185a") So(cfg.SiteDomain, ShouldEqual, "localhost") So(cfg.SupportedLanguages, ShouldResemble, []string{"en", "cy"}) })