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

Failed initial process produce invalid state #27

Closed
sebsgr opened this issue Sep 16, 2024 · 3 comments
Closed

Failed initial process produce invalid state #27

sebsgr opened this issue Sep 16, 2024 · 3 comments
Labels
invalid This doesn't seem right

Comments

@sebsgr
Copy link
Contributor

sebsgr commented Sep 16, 2024

If the initial process fails (e.g., due to an invalid repository URL or token), the status command does not list the code machine. I believe this is the correct behavior, but when I try to rerun the init command, Codchi encounters an error (Code machine '...' already exists).

Environment:

codchi v0.2.1
d397ca96519512b1d117ca0c373b380006b3fc4b

Steps to reproduce

$ codchi.exe init java-ide https://oauth2:XXXXXXX@XXXXXXXX
Code forge: Gitlab
Error: Couldn't access repository. If the repository is private you need to provide the correct credentials. If it's a local repository, make sure it is checked out locally in the machine at the provided path. See <https://codchi.dev/docs/start/usage.html#creating-a-machine> on how to access private repositories.
$ codchi.exe status
┌─────────┬────────────┬──────────┐
│ Machine ┆ Status     ┆ Running? │
╞═════════╪════════════╪══════════╡
│ demo    ┆ Up to date ┆ ❌       │
├╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ test    ┆ Up to date ┆ ❌       │
└─────────┴────────────┴──────────┘

java-ide is not listed

$ codchi.exe init java-ide https://oauth2:XXXXXXX@XXXXXXXX
Error: Code machine 'java-ide' already exists.
@sebsgr sebsgr added the invalid This doesn't seem right label Sep 16, 2024
@htngr htngr closed this as completed in d8a0acf Sep 16, 2024
@htngr
Copy link
Contributor

htngr commented Sep 16, 2024

$ codchi.exe init java-ide https://oauth2:XXXXXXX@XXXXXXXX

Btw: Please use --token oauth2:xxx for private repos

@sebsgr
Copy link
Contributor Author

sebsgr commented Sep 16, 2024

Thanks, but the main issue is still unsolved.

If I use invalid URLs or tokens, the process stalls while retrieving available modules. After stopping the process with CTRL+C, the same problem still occurs.

@sebsgr sebsgr reopened this Sep 16, 2024
@htngr
Copy link
Contributor

htngr commented Sep 16, 2024

Should be fixed in d8a0acf (v0.2.3). Until then you can manually codchi delete and then init again. If that fails wsl --unregister, delete %APPDATA%\codchi\machine\java-ide and then init again.

@htngr htngr closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants