Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ValidationError when setting maps.proxyOpenSearchMapsServiceInMaps #5122

Closed
tobiasehlert opened this issue Sep 26, 2023 · 3 comments · Fixed by #5170
Closed

[BUG] ValidationError when setting maps.proxyOpenSearchMapsServiceInMaps #5122

tobiasehlert opened this issue Sep 26, 2023 · 3 comments · Fixed by #5170
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@tobiasehlert
Copy link
Contributor

Describe the bug

Looks to me that it doesn't matter weither I set the maps.proxyOpenSearchMapsServiceInMaps to true, "true", false or "false", it's complaining about a proxyElasticMapsServiceInMaps value.

In my eyes that should not be returned, since it should be called differently.

To Reproduce

map:
  opensearchManifestServiceUrl: "http://localhost:8080/manifest.json"
  includeOpenSearchMapsService: true
  proxyOpenSearchMapsServiceInMaps: true

  tilemap:
    url: "http://localhost:8080/tiles/data/{z}/{x}/{y}.png"
    options:
      maxZoom: "8"
  regionmap:
    includeOpenSearchMapsService: true

Errormessage in container:

{"type":"log","@timestamp":"2023-09-26T19:20:50Z","tags":["fatal","root"],"pid":1,"message":"ValidationError: [config validation of [map].proxyElasticMapsServiceInMaps]: definition for this key is missing\n    at ObjectType.validate (/usr/share/opensearch-dashboards/node_modules/@osd/config-schema/target/out/types/type.js:72:19)\n    at ConfigService.validateAtPath (/usr/share/opensearch-dashboards/node_modules/@osd/config/target/config_service.js:157:23)\n    ... 7 lines matching cause stack trace ...\n    at ReplaySubject._subscribe (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/ReplaySubject.js:80:28)\n    at ReplaySubject.Observable._trySubscribe (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Observable.js:44:25)\n    at ReplaySubject.Subject._trySubscribe (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Subject.js:102:51)\n    at ReplaySubject.Observable.subscribe (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Observable.js:30:22)\n    at MapSubscriber.shareReplayOperation (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/operators/shareReplay.js:53:32)\n    at Observable.subscribe (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Observable.js:25:31)\n    at MapOperator.call (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/operators/map.js:32:23) {\n  cause: SchemaTypeError: definition for this key is missing\n      at ObjectType.onError (/usr/share/opensearch-dashboards/node_modules/@osd/config-schema/target/out/types/type.js:97:20)\n      at type.<anonymous> (/usr/share/opensearch-dashboards/node_modules/@osd/config-schema/target/out/types/type.js:62:53)\n      at type._finalizeValue (/usr/share/opensearch-dashboards/node_modules/joi/lib/types/any/index.js:733:46)\n      at type._validate (/usr/share/opensearch-dashboards/node_modules/joi/lib/types/any/index.js:641:29)\n      at type._validateWithOptions (/usr/share/opensearch-dashboards/node_modules/joi/lib/types/any/index.js:763:29)\n      at module.exports.internals.Any.root.validate (/usr/share/opensearch-dashboards/node_modules/joi/lib/index.js:147:23)\n      at ObjectType.validate (/usr/share/opensearch-dashboards/node_modules/@osd/config-schema/target/out/types/type.js:67:72)\n      at ConfigService.validateAtPath (/usr/share/opensearch-dashboards/node_modules/@osd/config/target/config_service.js:157:23)\n      at MapSubscriber.project (/usr/share/opensearch-dashboards/node_modules/@osd/config/target/config_service.js:164:83)\n      at MapSubscriber._next (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/operators/map.js:49:35)\n      at MapSubscriber.Subscriber.next (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Subscriber.js:66:18)\n      at DistinctUntilChangedSubscriber._next (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/operators/distinctUntilChanged.js:69:30)\n      at DistinctUntilChangedSubscriber.Subscriber.next (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Subscriber.js:66:18)\n      at MapSubscriber._next (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/operators/map.js:55:26)\n      at MapSubscriber.Subscriber.next (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/Subscriber.js:66:18)\n      at ReplaySubject._subscribe (/usr/share/opensearch-dashboards/node_modules/rxjs/internal/ReplaySubject.js:80:28) {\n    cause: undefined,\n    path: [ 'proxyElasticMapsServiceInMaps' ]\n  }\n}"}

FATAL  ValidationError: [config validation of [map].proxyElasticMapsServiceInMaps]: definition for this key is missing

Expected behavior
No error I guess.

OpenSearch Version
2.9.0

Dashboards Version
2.9.0

Plugins

usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,share,opensearchUiShared,legacyExport,embeddable,expressions,data,home,apmOss,securityAnalyticsDashboards,savedObjects,dashboard,mlCommonsDashboards,visualizations,visTypeVega,visTypeTimeline,visTypeTable,visAugmenter,anomalyDetectionDashboards,alertingDashboards,visTypeMarkdown,visBuilder,tileMap,regionMap,customImportMapDashboards,inputControlVis,visualize,ganttChartDashboards,searchRelevanceDashboards,reportsDashboards,indexManagementDashboards,management,indexPatternManagement,advancedSettings,console,notificationsDashboards,queryWorkbenchDashboards,charts,visTypeTagcloud,visTypeVislib,visTypeTimeseries,visTypeMetric,discover,savedObjectsManagement,securityDashboards,observabilityDashboards,bfetch

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: macOS Ventura (version 13.6)
  • Google Chrome version 116.0.5845.187 (Official Build) (arm64)

Additional context

I have an air-gapped setup where I want to run the ´opensearch-maps-server´ container for providing offline resources.

@tobiasehlert tobiasehlert added bug Something isn't working untriaged labels Sep 26, 2023
@joshuarrrr
Copy link
Member

Yeah, from a quick look it appears that there was a deprecation rule that was defined in reverse order:

renameFromRoot('map.proxyOpenSearchMapsServiceInMaps', 'map.proxyElasticMapsServiceInMaps'),

Marking as good first issue, as I suspect that flipping the arguments there will fix the issue.

@joshuarrrr joshuarrrr added good first issue Good for newcomers and removed untriaged labels Oct 2, 2023
@ShatilKhan
Copy link
Contributor

Hi @joshuarrrr
I'd like to take on this issue

@ShatilKhan
Copy link
Contributor

I made the suggested changes, this was my first PR on this repo. If there were any mistakes, please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants