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

feat(remote): support include git remote #1652

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vmaerten
Copy link
Collaborator

@vmaerten vmaerten commented May 11, 2024

I've work on add the support of Git in the remote experimentation.
I've used the go-git package, which is Git implementation in pure go.
I've also used git-urls to help me to parse all URLs.

Some informations :

  • I did not handle the custom timeout for now
  • We support SCP / SSH / HTTPS URL
  • It seems that SSH takes more time than HTTPS
  • Git remote entrypoint (--taskfile) works
  • include local -> remote -> remote:local works

I'll work next on perf optimisation. I've in mind to mutualise git clone to avoid cloning multiple times the same repo.

I've added tests. I'll add test of node_http in another PR.

EDIT : The link with to the preview

@vmaerten vmaerten marked this pull request as ready for review May 11, 2024 13:22
@vmaerten
Copy link
Collaborator Author

I've tested it and a friend also tested it. I am open to gather feedback on it :)

@pd93 pd93 mentioned this pull request May 11, 2024
15 tasks
@pd93
Copy link
Member

pd93 commented May 11, 2024

@vmaerten Thanks for working on this! This is a very popular request. I will definitely give this a go in the next couple of days. Finally some nice weather in the UK, so I'll be out enjoying the sun as much as possible this weekend! 🌞

It might be worth putting a message on the remote experiment issue so that people who are subscribed over there can try it too. I have updated the OP there to link back here.

@vmaerten
Copy link
Collaborator Author

I really enjoy working on Task. Let me know if you have questions regarding my implementation
Sure, enjoy the sun, I did the same this weekend in France! 🙂

Good idea! I've just done it 🙂

@vmaerten
Copy link
Collaborator Author

@blackjid 's comment :

That is awesome @vmaerten thank for the work...

Why did you choose to set the filename and the git reference in the same querystring in the url? Why not just having a
different querystring for the filename? https://github.com/foo/bar.git?ref=main&filename=directory/Taskfile.yml

Or if you don't want the extra query string, a more readable form I think could be to add the path to the file just after the .git https://github.com/foo/bar.git/directory/Taskfile.yml?ref=main maybe with a double slash // like terraform and others does.. https://github.com/foo/bar.git//directory/Taskfile.yml?ref=main

Sorry if this is not the place or time to give feedback. Maybe discord?

First of all, thanks for the feedback.
To be honest, I did not find a consensus for this kind of URL in the community, so I took the example URL in the issue (here)

Following your propostions, I like the one with the query param representing the filename. In the other hand, if the community already knows the "terraform" format, it could be good to adopt it.

Let's discuss with @pd93 and @andreynering

@andreynering andreynering added the area: remote Changes related to remote taskfiles. label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: remote Changes related to remote taskfiles.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants