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

E2etests Screenshots - invalid path names block git checkout in Windows environment #10836

Open
pappde opened this issue Jun 17, 2024 · 2 comments · May be fixed by cBioPortal/cbioportal-frontend#4927

Comments

@pappde
Copy link
Contributor

pappde commented Jun 17, 2024

REPRO:

  1. clone the repo on a Windows machine
  2. try to checkout
  3. observe it fails due to invalid filenames on Windows (due to ">" and ":") due to 4 screenshots for e2etests:
error: invalid path 'end-to-end-test/local/screenshots/reference/shows_`value_>8.00`_in_figure_legend_and_indicates_sub-threshold_data_points_in_plot_element_chrome_1600x1000.png'
error: invalid path 'end-to-end-test/local/screenshots/reference/when_option_deselected,_hides_`value_>8.00`_in_figure_legend_and_sub-threshold_data_point_indicators_in_waterfall_plot_element_chrome_1600x1000.png'
error: invalid path 'end-to-end-test/local/screenshots/reference/when_option_deselected,_hides_`value_>8.00`_in_figure_legend_and_sub-threshold_data_points_in_plot_element_chrome_1600x1000.png'
error: invalid path 'end-to-end-test/remote/screenshots/reference/download_tab_-_nsclc_tcga_broad_2016_for_query_egfr:_mut=t790m_amp_element_chrome_1600x1000.png'
error: invalid path 'end-to-end-test/remote/screenshots/reference/msk_impact_2017_query_stk11:homdel_mut_element_chrome_1600x1000.png'

EXPECTED:
3. checkout succeeds

NOTES

  1. Not sure if these characters are allowed in Mac filenames either. Also avoiding '>' probably a good idea even in linux systems since it could cause some problems with shell commands.

  2. Would also need some trigger or check on commits to prevent new files being introduced with these characters: , /, :, *, ?, ", <, >, |

  3. I realize that WSL is recommended for development in a Windows environment, but this may be an easy fix to enable that scenario without WSL. However, not sure if these filenames are explicitly referenced in a database for e2etests, or how they are pulled. Aliasing or escaping may be necessary to ensure existing references still work.

@pappde
Copy link
Contributor Author

pappde commented Jun 18, 2024

Fixed in PR #4927.

Possible followup

  1. Could split off a new issue for adding a pre-commit trigger to prevent invalid path characters in filenames.
  2. Review existing e2etests. If there is one that references the renamed file, it would need to be updated to the new filename.

@pappde
Copy link
Contributor Author

pappde commented Jun 25, 2024

Fixed in PR #4927. Modified getScreenshotName() to replace all invalid path characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant