-
Notifications
You must be signed in to change notification settings - Fork 754
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
Creating a project from a commit URL fails if the commit is not from the default branch #701
Comments
The issue is cause by https://github.com/daytonaio/daytona/blob/main/pkg/git/service.go#L48 Because we clone only the default branch, the checkout fails because the commit is not present in the current git tree. |
/bounty $100 |
💎 $100 bounty • DaytonaSteps to solve:
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 bounty • Share on socials
|
This appears to be interesting. /attempt #701
|
Running the same command,
I could also generate other errors using github URLs, but not the error mentioned in the issue. Can you folks give me a hand in reproducing this? |
Hi @ologbonowiwi, the URL provided in the issue was just an example. You can test this properly by running This should create the project on a branch and you'll notice that it creates it on |
@Tpuljak @ologbonowiwi Is this happening with gitness or all git providers ? |
Not sure. I've tried multiple github links (including the one provided on the comment above and some of my own repos) but I got a different error complaining about not being a tree (instead of this object not found), so technically I wasn't able to reproduce it. |
@the-johnwick it's happening for all git providers
That's the issue 😄 Git providers might have different error messages but all of that should be solved as part of this issue. |
@Tpuljak Oh, I got it now. I have completed the work for #763 please review it. Till then I will solve this issue.
|
@the-johnwick no need to tag us for reviews. We see everything going on in the repo. |
No problem. I thought you guys will not allow me to work on second issue since I have one pr opened. I will start working on it. |
@Tpuljak I tried suggested approach, but it seems clone functions is not get invoked. |
@the-johnwick this issue is a bit older and we refactored how the repo gets cloned in the meantime. The clone function I mentioned there is now ignored because the project is cloned beforehand. You can check out the creation process here https://github.com/daytonaio/daytona/blob/main/pkg/docker/create.go. In order to test changes made in the docker lib, you can refer to this PR that will add a README into the package directory. If you have any trouble testing this, let me know. |
@Tpuljak Thanks |
💡 @the-johnwick submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
Note: This commit is not from the main branch.
Originally posted by @Tpuljak in #689 (comment)
The text was updated successfully, but these errors were encountered: