Skip to content

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

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

Git sync APIs #7364

wants to merge 12 commits into from

Conversation

k-anshul
Copy link
Member

@k-anshul k-anshul commented May 24, 2025

closes https://github.com/rilldata/rill-private-issues/issues/1743

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@k-anshul k-anshul self-assigned this May 28, 2025
@k-anshul k-anshul marked this pull request as ready for review May 28, 2025 12:49
@k-anshul k-anshul requested a review from begelundmuller May 28, 2025 12:51
if err != nil {
return err
}
// TODO : handle detached state
Copy link
Contributor

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?

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

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

Comment on lines 14 to 17
// Get authenticated admin client
if !s.app.ch.IsAuthenticated() {
return errors.New("must authenticate before performing this action")
}
Copy link
Contributor

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.

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants