eduhub-org / eduhub

A comprehensive education platform focusing on course applications, event registrations, learning communities, and more.
https://edu.opencampus.sh
GNU Affero General Public License v3.0
11 stars 7 forks source link

[BUG] Plain Window 11 - successfully cloned repo but failed checkout due to invalid path #817

Closed hpk0304 closed 1 month ago

hpk0304 commented 9 months ago

Describe the bug The clone process succeeded but failed checkout due to invalid path in backend.

It might be an issue of operating system: A filename uuid/down.sql might work well on Linux instead of Window.

Expected behavior Shall you rename the file, with suggestion from Stackoverflow here https://stackoverflow.com/questions/61614004/cloning-succeded-but-checkout-failed-due-to-invalid-path-what-is-the-path-probl

Screenshots bug

Environment (please complete the following information):

Additional context Add any other context about the problem here.

mattinannt commented 9 months ago
Screenshot 2023-11-17 at 14 41 11

It seems the filename containing spaces and or special characters like > leads to these errors. Is it possible to rename the folder without killing the migrations? @ericstumper

steffen74 commented 9 months ago

@mattinannt Yes, it is possible. However, it is not straightforward since renaming changes the status of the migration indicating that Hasura should execute it again. Therefore it is important to mark it as executed again right after renaming it. The steps are the following ones:

  1. Stop Hasura if it's running.
  2. Navigate to the migrations directory in your Hasura project.
  3. Find the migration folder you want to rename. Migration folders are named with a timestamp followed by the migration name.
  4. Rename the folder. Make sure to keep the timestamp the same and only change the name part! This is important because Hasura applies migrations in the order of the timestamp, and the timestamp is also the version number of the migration.
  5. Execute the following command: hasura migrate apply --version <version> --skip-execution Replace <version> with the version number (i.e., the timestamp) of the migration.
  6. Start Hasura and apply the migrations.

Generally I would follow what you said @mattinannt, that it makes more sense to only support Codespaces and Gitpod since particularly with Windows there are a lot of issues.