-
Notifications
You must be signed in to change notification settings - Fork 132
Git sync APIs #7364
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
base: main
Are you sure you want to change the base?
Git sync APIs #7364
Conversation
cli/pkg/gitutil/gitcmdwrapper.go
Outdated
if err != nil { | ||
return err | ||
} | ||
// TODO : handle detached state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that need to be handled now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally not. Unless the user makes some git operations externally. I will throw an error.
// To execute git operations we use the go-git library. | ||
// However the library does not support all git operations and in those cases we directly run git commands. | ||
// The utility functions in this file directly run git commands. | ||
package gitutil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great with some tests in this package. Maybe there's a testcontainer
that launches a Git server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I added an issue to handle this later : https://github.com/rilldata/rill-private-issues/issues/1825
cli/pkg/local/git.go
Outdated
// Get authenticated admin client | ||
if !s.app.ch.IsAuthenticated() { | ||
return errors.New("must authenticate before performing this action") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I think the expectation is that we can still check status, push and pull if you run rill start
in a self-managed Git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't be able to fetch the git credentials from the admin service right ? Or am I missing something.
closes https://github.com/rilldata/rill-private-issues/issues/1743
Checklist: