daytonaio / daytona

The Open Source Dev Environment Manager.
https://daytona.io
Apache License 2.0
7.99k stars 767 forks source link

`daytona create https://github.com/SvenDowideit/nix_config` fails #767

Closed SvenDowideit closed 1 month ago

SvenDowideit commented 1 month ago

Describe the bug

there's some checking that doesn't like repository urls with _ or . in them?

sven@xeon:~$ daytona create https://github.com/SvenDowideit/nix_config
 WORKSPACE  | ✓ Request submitted
FATA[0002] failed to create workspace: name is not a valid alphanumeric string 

sven@xeon:~$ daytona create https://github.com/SvenDowideit/docker.github.io
 WORKSPACE        | ✓ Request submitted
FATA[0002] failed to create workspace: name is not a valid alphanumeric string 

Expected behavior

this is a private repo I have on github, so it should work :)

Desktop (please complete the following information):

Tpuljak commented 1 month ago

Ah yes, nice catch.

Because of https://github.com/daytonaio/daytona/blob/main/pkg/server/workspaces/create.go#L27, the request fails. We should update the regex to allow _ and . as well or, more broadly, we should support any characters that are valid in a hosted repository name.

SvenDowideit commented 1 month ago

GitHub says this: image

Sorry, more info added later

but if i remember correctly, essentially anything is "legal" for git itself - while it might be inconvenient, unicode urls are going to be valid :/

That said, I note that

$ ./main create --name nixconfig https://github.com/SvenDowideit/nix_config
 WORKSPACE  | ✓ Request submitted

succeeds - so the fix may be to confirm to the user that the repository URL is good, but they should specify a --name <something> or to use the TUI to ask them for one

Tpuljak commented 1 month ago

but if i remember correctly, essentially anything is "legal" for git itself - while it might be inconvenient, unicode domain names are going to be valid :/

I believe it would be enough to stick to what Github supports.

lbrecic commented 1 month ago

/bounty $20

algora-pbc[bot] commented 1 month ago

💎 $20 bounty • Daytona

Steps to solve:

  1. Start working: Comment /attempt #767 with your implementation plan
  2. Submit work: Create a pull request including /claim #767 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

If no one is assigned to the issue, feel free to tackle it, without confirmation from us, after registering your attempt. In the event that multiple PRs are made from different people, we will generally accept those with the cleanest code.

Please respect others by working on PRs that you are allowed to submit attempts to.

e.g. If you reached the limit of active attempts, please wait for the ability to do so before submitting a new PR.

If you can not submit an attempt, you will not receive your payout.

Thank you for contributing to daytonaio/daytona!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @abhishek818 Jul 25, 2024, 11:02:55 AM #775
Apoorv012 commented 1 month ago

@lbrecic does this issue still exist?

lbrecic commented 1 month ago

@Apoorv012 , sorry for the late response, @abhishek818 already made attempt at this and brought it to the end. Thank you for your interest and, please, feel free to find other open issues and contribute to Daytona by solving them!

abhishek818 commented 1 month ago

/attempt #767

Algora profile Completed bounties Tech Active attempts Options
@abhishek818    5 daytonaio bounties
+ 8 bounties from 5 projects
JavaScript, TypeScript
Cancel attempt
algora-pbc[bot] commented 1 month ago

💡 @abhishek818 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 1 month ago

🎉🎈 @abhishek818 has been awarded $20! 🎈🎊