kubernetes-sigs / release-sdk

Interfaces and implementations for building Kubernetes releases.
Apache License 2.0
16 stars 29 forks source link

Replace calls to git binary in git package with pure go code #4

Open puerco opened 3 years ago

puerco commented 3 years ago

Our git package has several calls to the git package. In order to be able to use our binaries in leaner container images (ie distroless) we need to write alternatives to some of its functions to pure go, and drop the calls to the git binary.

justaugustus commented 2 years ago

From @puerco in https://github.com/kubernetes-sigs/release-sdk/pull/13#issuecomment-972522598 and https://github.com/kubernetes-sigs/release-sdk/pull/13#issuecomment-972523949:

Thinking a little bit about these functions that relate to forking, much of the code relies on github apis, but if you think about it the functions are more git specific. For example, things like github.BranchExists() are in essence GitHub API laziness for looking into the git ls-remote output 🤔 WDYT?

The downside of course is that we would have to implement some of the github code in git which is in practice pointless as we already have the functionality.

Also, ref https://github.com/kubernetes-sigs/release-sdk/pull/3#issuecomment-918468002:

/hold cancel (ref: https://kubernetes.slack.com/archives/CJH2GBF7Y/p1631557597076000?thread_ts=1631554156.074500&cid=CJH2GBF7Y)

@justaugustus

@puerco — actually, I stand by the original assessment (because of github importing git)

@justaugustus

Let’s do the initial migration to release-sdk and then pull out the git stuff in a follow-up

@puerco

ok 👍

@justaugustus

(I’d just prefer not to have any refactors masked by the migration commits)

@puerco

yeah makes sense

@justaugustus

also, it looks like it might be really simple, but I’ve made the mistake of assuming that before 🙃

/help

k8s-ci-robot commented 2 years ago

@justaugustus: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/release-sdk/issues/4): >From @puerco in https://github.com/kubernetes-sigs/release-sdk/pull/13#issuecomment-972522598 and https://github.com/kubernetes-sigs/release-sdk/pull/13#issuecomment-972523949: > >> Thinking a little bit about these functions that relate to forking, much of the code relies on github apis, but if you think about it the functions are more git specific. For example, things like `github.BranchExists()` are in essence GitHub API laziness for looking into the `git ls-remote` output 🤔 WDYT? > >> The downside of course is that we would have to implement some of the github code in git which is in practice pointless as we already have the functionality. > >Also, ref https://github.com/kubernetes-sigs/release-sdk/pull/3#issuecomment-918468002: > >> /hold cancel (ref: https://kubernetes.slack.com/archives/CJH2GBF7Y/p1631557597076000?thread_ts=1631554156.074500&cid=CJH2GBF7Y) >> >> @justaugustus >> >> > @puerco — actually, I stand by the original assessment (because of github importing git) >> >> @justaugustus >> >> > Let’s do the initial migration to release-sdk and then pull out the git stuff in a follow-up >> >> @puerco >> >> > ok 👍 >> >> @justaugustus >> >> > (I’d just prefer not to have any refactors masked by the migration commits) >> >> @puerco >> >> > yeah makes sense >> >> @justaugustus >> >> > also, it looks like it might be really simple, but I’ve made the mistake of assuming that before 🙃 > >/help Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
palnabarun commented 2 years ago

/cc (I am interested in this but not very sure when I would get some time to work on it, maybe the December vacations. This sounds to me like a good weekend hacking project)

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

cpanato commented 2 years ago

/remove-lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 2 years ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/release-sdk/issues/4#issuecomment-1278924386): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sbdtu5498 commented 1 year ago

/assign