-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
base: develop
Are you sure you want to change the base?
fix(data-package-view): ensure all subfolders with the same name are created #2577
Conversation
@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. |
@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. |
6df8658
to
df6d489
Compare
…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
df6d489
to
8dc89ae
Compare
@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.
@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. |
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 thepathMap
to avoid duplicates.addFilesAndFolders
function to construct the full path for each folder.pathMap
is updated with the correct paths for all subfolders.addFilesAndFolders
function for better readability and maintenance.This resolves the issue where subfolders with the same name were not being created correctly.
Closes #2442