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

fix(data-package-view): ensure all subfolders with the same name are created #2577

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

vchendrix
Copy link
Collaborator

Previously, the addFilesAndFolders function did not correctly handle the creation of subfolders with the same name. This fix ensures that all subfolders are created properly by constructing the full path for each folder and checking against the pathMap to avoid duplicates.

  • Updated the addFilesAndFolders function to construct the full path for each folder.
  • Ensured that the pathMap is updated with the correct paths for all subfolders.
  • Added detailed comments to the addFilesAndFolders function for better readability and maintenance.

This resolves the issue where subfolders with the same name were not being created correctly.

Closes #2442

@robyngit robyngit changed the base branch from main to develop December 5, 2024 14:44
@vchendrix
Copy link
Collaborator Author

@robyngit @rushirajnenuji let me know if you have any questions. I am happy to work with you to get this resolved. This is a critical fix for us as we will not be able to offer support for hierarchical dataset viewing until this is resolve.

@vchendrix
Copy link
Collaborator Author

@robyngit @rushirajnenuji Happy New Year! Now that I am familiar with the testing framework, I will see if I can get the linting issues fixed.

@vchendrix vchendrix force-pushed the issue-2442-hierarchical-view-missing-folders branch 3 times, most recently from 6df8658 to df6d489 Compare January 7, 2025 17:54
…created

Previously, the `addFilesAndFolders` function did not correctly handle the
creation of subfolders with the same name. This fix ensures that all
subfolders are created properly by constructing the full path for each
folder and checking against the `pathMap` to avoid duplicates.

- Updated the `addFilesAndFolders` function to construct the full path for each folder.
- Ensured that the `pathMap` is updated with the correct paths for all subfolders.
- Added detailed comments to the `addFilesAndFolders` function for better readability and maintenance.
- ran addFilesAndFolders through eslint and made corrections

This resolves the issue where subfolders with the same name were not being created correctly.

Closes NCEAS#2442
@vchendrix vchendrix force-pushed the issue-2442-hierarchical-view-missing-folders branch from df6d489 to 8dc89ae Compare January 7, 2025 17:56
@vchendrix
Copy link
Collaborator Author

@robyngit @rushirajnenuji Happy New Year! Now that I am familiar with the testing framework, I will see if I can get the linting issues fixed.

@robyngit @rushirajnenuji I have fixed all of the formatting and linting errors. Locally the tests pass for me. However, they seem to still be running in the github action. I am not sure if it is stuck or not.

This addresses issue where the tests hang in gh actions with the
following error

   Run npm test
   > [email protected] test
   > node test/server.js --no-sandbox --disable-setuid-sandbox
   Failed to launch the browser process!
   [2445:2445:0107/191124.327300:FATAL:zygote_host_impl_linux.cc(126)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
@vchendrix
Copy link
Collaborator Author

@robyngit @rushirajnenuji I have updated this PR so that all the tests pass. Please note that I had to make a change to the test server configuration for puppeteer to fix an issue in which the tests were hanging on gh actions.

Please let me know if there are any other issues you would like me to address in order to get this PR merged.

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.

Hierarchical view incorrectly handling files in a subdirectory
3 participants