-
Notifications
You must be signed in to change notification settings - Fork 933
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] AWS paths should not be hardcoded. #362
Comments
Hey @JacobBrandt, thanks for creating this issue. However, the reason why I hardcoded these values was because these are specific code blocks for handling errors while using AWS for maps in replacement of using EMS. For the default experience we use a service provided by AWS since we could no longer use EMS, however replacing the maps service used can be replaceable from
Do we foresee us requiring access to the code blocks that are handling specific errors? |
Yep, I understand why the values were changed and I understand that these were only used in this way to handle some edge cases. However, no section of code (even edge cases) should only be accessible when using AWS. That's why I suggested to make this configurable. Usually settings that affect the UI go in ui_settings.ts like I mentioned. This way they can be changed from Advanced Settings and don't require a redeploy. |
You raise a great point! Will remove the untriaged label as this is something we should do. |
Hi team,
As for options 3, I have some concerns. First of all, I personally feel that map service end point change is more lean to a service configuration and we only control the error handling (no UI difference involved). Second, if we take the value just based on user input from UI setting, there might be a chance leading to a inconsistent situation. (e.g. the user disables the error handling for aws map service setting from UI when the service points to aws end points, vice versa) It would be appreciated if anyone can provide some input for directions. |
Adding an Advanced Setting that mentions another company by name is also wrong for an "Open Source" repository. Why does it have to say AWS? Why can't it just say Enable Maps Service Error Logging. |
I agree with @JacobBrandt, shouldn't make explicit reference to the company of the mapping service even if the mapping service is owned by it since it can be changed. Technically, it is named MaRS (Maps Rendering Service). I think if anything we should evaluate why we are attempting to catch it. If we enable the community to customize this to allow them to configure it to use their own maps service and they know it will not be on parity as OpenStreet Maps then they might desire to capture that the region's maps were blocked and have a clean error message to the user. So potentially we can re-use this as a Also just note, in the UI settings, that gets saved into the default index for OpenSearch Dashboards as a doc type |
Totally agree with the suggestion that we shouldn't make explicit reference to the company of the mapping service. The proposal:
|
Yeah if you add it here would enable people to configure this file from the
Meaning you are setting it in the config instead of inserting into the system index? Also, do not seeing where we make the AWS path not hardcoded. Will that exist as a service setting as well? |
Yes, I am planing to set a boolean flag in
Then in the error handling code, should something similar like this:
|
Describe the bug
Hard coded paths like these make it impossible to reach sections of the code without using AWS.
OpenSearch-Dashboards/src/plugins/region_map/public/choropleth_layer.js
Line 196 in fb2f793
OpenSearch-Dashboards/src/plugins/maps_legacy/public/map/opensearch_dashboards_map.js
Line 614 in fb2f793
Solution
Remove hard coded URLs that point to AWS. Retrieve these values from https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data/server/ui_settings.ts
The text was updated successfully, but these errors were encountered: