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] Path comparison issues causing plugin not able to build on Windows #2669

Closed
peterzhuamazon opened this issue Oct 25, 2022 · 6 comments
Closed
Assignees
Labels
bug Something isn't working windows

Comments

@peterzhuamazon
Copy link
Member

Coming from opensearch-project/reporting#191 (comment).

The issue being that Windows treat Administrator dir and ADMINI~1 dir as the same on Windows.
But the code here in dashboards core is using === to compare:

const isRootPlugin = parentDir === Path.resolve(REPO_ROOT, 'plugins');

  const isRootPlugin = parentDir === Path.resolve(REPO_ROOT, 'plugins');

This cause a diff in comparison between these two paths in .ts, while on windows they point to the same location:

C:\Users\Administrator\AppData\Local\Temp\2\tmpndbrtuhg\OpenSearch-Dashboards\plugins
C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpndbrtuhg\OpenSearch-Dashboards\plugins

This then cause the failure when building dashboards plugin:

+ yarn plugin_helpers build --opensearch-dashboards-version=2.4.0
yarn run v1.22.19
$ node ../../scripts/plugin_helpers build --opensearch-dashboards-version=2.4.0
ERROR Plugin located at [C:\Users\Administrator\AppData\Local\Temp\2\tmpzgwnkv7a\OpenSearch-Dashboards\plugins\dashboards-reports] must be moved to the plugins directory at the root of the OpenSearch Dashboards repo
error Command failed with exit code 1.

Thanks.

@seanneumann
Copy link
Contributor

@manasvinibs can you prioritize this issue?

@peterzhuamazon
Copy link
Member Author

@peterzhuamazon
Copy link
Member Author

I would say the best solution is to find a way to resolve this on typescript side, without pushing windows agent to disable short names.

Since there will be community members using this code to build themselves.

Thanks.

@peterzhuamazon
Copy link
Member Author

@AMoo-Miki AMoo-Miki self-assigned this Oct 26, 2022
@bbarani
Copy link
Member

bbarani commented Oct 27, 2022

@AMoo-Miki Any update on this issue?

@AMoo-Miki AMoo-Miki mentioned this issue Dec 8, 2022
8 tasks
@AMoo-Miki
Copy link
Collaborator

Rolled out with 2.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

4 participants