Skip to content

V0.5.9 RC#84

Merged
jsaarimaa merged 38 commits into
testfrom
dev
Jun 4, 2026
Merged

V0.5.9 RC#84
jsaarimaa merged 38 commits into
testfrom
dev

Conversation

@jsaarimaa

Copy link
Copy Markdown
Collaborator

No description provided.

jsaarimaa and others added 30 commits April 29, 2026 10:57
Set "FeatureManagement:SearchController" to false in the base test config. Tests that require it now explicitly enable the flag by merging it into their config, making feature usage explicit and improving test clarity.
Co-authored-by: Copilot <copilot@github.com>
Refactor SearchController feature flag in Health tests
* Refactor table-related models and tests to replace ContentValues with Metrics
…-origins

[Feature] Implement CORS configuration with allowed origins support
Bumps the npm_and_yarn group with 1 update in the /.github/skills/openapi-validation directory: [fast-uri](https://github.com/fastify/fast-uri).


Updates `fast-uri` from 3.1.0 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
…te search logic (#77)

* [Feature] Add query fields support for Elasticsearch service and update search logic

* [Feature] Refactor ElasticSearchService to use BoostedField records for query fields and update related tests

* Update ElasticSearchServiceTests to use AllFieldGroupSample for assertions and improve code coverage justification

* [Version] Update project version to 0.5.5
…lisation

[Bug] Code filter deserialisation
…/dot-github/skills/openapi-validation/npm_and_yarn-053c9c4054

Bump fast-uri from 3.1.0 to 3.1.2 in /.github/skills/openapi-validation in the npm_and_yarn group across 1 directory
…-tablesummary

Revert geo field from table summary
Copilot AI review requested due to automatic review settings June 4, 2026 10:18
@jsaarimaa jsaarimaa merged commit 961b387 into test Jun 4, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to prepare the 0.5.9 release candidate by updating the public table summary model (content values → metrics), removing legacy code-sanitization utilities, and adding operational/config improvements (CORS + optional Elasticsearch proxy) along with Elasticsearch query-time boosting.

Changes:

  • Rename/reshape table summary “content values” into “metrics” (TableSummary, builder, tests, and related docs).
  • Improve URL/filter handling by removing MetaCodeTools.Convert() and using proper URL encoding for default filter URL generation.
  • Enhance runtime behavior/config: optional CORS policy via config, optional Elasticsearch proxy, and ES multi_match boosting fields + unit tests.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
PxApi/Utilities/TableSummaryBuilder.cs Builds TableSummary using Metrics and includes all non-metric/non-time dimensions.
PxApi/Utilities/MetaCodeTools.cs Removed legacy URL-safe “code conversion” helper.
PxApi/Services/Search/ElasticSearchService.cs Adds boosted ES query fields, refactors field constants, and exposes helper methods for tests.
PxApi/PxApi.csproj Bumps app version to 0.5.9 and updates package versions.
PxApi/Program.cs Adds optional CORS setup and optional Elasticsearch proxy configuration.
PxApi/Models/TableSummary.cs Renames ContentValuesMetrics and updates documentation.
PxApi/Models/QueryFilters/MetaFiltering.cs Stops using code conversion; URL-encodes default filter query string.
PxApi/Models/QueryFilters/FilterJsonConverter.cs Tightens deserialization behavior/errors; expands allowed characters; uses JsonException.
PxApi/Models/MetricInfo.cs Renames model class from ContentValueInfo to MetricInfo.
PxApi/ModelBuilders/JsonStat2Builder.cs Uses raw dimension codes (no conversion) for JSON-stat IDs/keys/roles.
PxApi/Controllers/TablesController.cs Adds informational logging for returned table summaries.
PxApi/Controllers/MetadataController.cs Adds informational logging after building metadata response.
PxApi/Controllers/DataController.cs Centralizes media-type strings into constants; logs response format + cell count.
PxApi/Controllers/DatabasesController.cs Adds ILogger and logs database listing result count.
PxApi/Configuration/SearchConfig.cs Adds optional ProxyAddress for Elasticsearch connectivity.
PxApi/Configuration/CorsConfig.cs New config type validating allowed CORS origins.
PxApi/Configuration/AppSettings.cs Wires up new Cors configuration section.
PxApi/appsettings.Template.json Adds Search:ProxyAddress and Cors:AllowedOrigins template entries.
PxApi.UnitTests/Utils/TestConfigFactory.cs Disables SearchController by default in base test config.
PxApi.UnitTests/UtilitiesTests/TableSummaryBuilderTests.cs Updates tests for Metrics and adds geo-dimension coverage.
PxApi.UnitTests/Services/ElasticSearchServiceTests.cs Adds unit tests for GetFields/GetQueryFields and boosting behavior.
PxApi.UnitTests/PxApi.UnitTests.csproj Updates test package versions and Px.Utils version.
PxApi.UnitTests/Models/Search/SearchResultItemTests.cs Updates summary construction to use Metrics/MetricInfo.
PxApi.UnitTests/Models/QueryFilters/MetaFilteringTests.cs Updates expectations for URL encoding + adds non-ASCII encoding tests.
PxApi.UnitTests/Models/QueryFilters/FilterJsonConverterTests.cs Updates exception expectations; adds allowed-char + unknown-type coverage.
PxApi.UnitTests/ControllerTests/TablesControllerTests.cs Updates assertions to use Metrics.
PxApi.UnitTests/ControllerTests/SearchControllerTests.cs Updates assertions to use Metrics.
PxApi.UnitTests/ControllerTests/HealthControllerTests.cs Ensures SearchController feature is enabled explicitly for relevant tests.
PxApi.UnitTests/ControllerTests/DataControllerStreamTests.cs Updates expected dimension keys/filters to use raw (non-converted) dimension codes.
PxApi.UnitTests/ControllerTests/DatabasesControllerTests.cs Updates controller construction to include ILogger.
PxApi.UnitTests/ConfigurationTests/CorsConfigTests.cs Adds coverage for CORS origin parsing/validation behavior.
docs/architecture/services-and-utilities.md Updates TableSummaryBuilder description (geo dims included).
docs/architecture/models-and-builders.md Updates TableSummary bullet but still needs alignment for MetricInfo (see comment).
.github/skills/openapi-validation/package-lock.json Bumps fast-uri dependency version.
Files not reviewed (1)
  • .github/skills/openapi-validation/package-lock.json: Language not supported

Comment on lines +19 to 20
- **`TableSummary`** (`TableSummary.cs`): Rich table metadata summary including dimensions (including any geographical dimensions), content values, time ranges, and links. Built by `TableSummaryBuilder`.
- **`ContentValueInfo`** (`ContentValueInfo.cs`): Information about a content/measure value in a table.
Comment on lines +30 to 31
[ExcludeFromCodeCoverage(Justification = "SDK-dependent members are tested indirectly; pure helpers are covered by unit tests.")]
public class ElasticSearchService(ElasticsearchClient client, SearchConfig searchConfig, ILogger<ElasticSearchService> logger) : ISearchService
Comment thread PxApi/Program.cs
Comment on lines +280 to +283
if (!string.IsNullOrWhiteSpace(searchConfig.ProxyAddress))
{
esSettings = esSettings.Proxy(new Uri(searchConfig.ProxyAddress));
}
Comment on lines 23 to 28
/// <summary>
/// Content dimension value names and their units of measurement.
/// Metric names and their units of measurement.
/// </summary>
[Required]
public required List<ContentValueInfo> ContentValues { get; set; }
public required List<MetricInfo> Metrics { get; set; }

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.

4 participants