release-sdk icon indicating copy to clipboard operation
release-sdk copied to clipboard

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

Open puerco opened this issue 4 years ago • 11 comments

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.

puerco avatar Sep 13 '21 18:09 puerco

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

justaugustus avatar Nov 18 '21 04:11 justaugustus

@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:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

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:

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 18 '21 04:11 k8s-ci-robot

/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)

palnabarun avatar Nov 18 '21 05:11 palnabarun

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:

  • 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:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Feb 16 '22 06:02 k8s-triage-robot

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:

  • 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:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar May 17 '22 08:05 k8s-triage-robot

/remove-lifecycle stale

cpanato avatar May 17 '22 10:05 cpanato

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:

  • 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:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Aug 15 '22 10:08 k8s-triage-robot

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:

  • 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:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

k8s-triage-robot avatar Sep 14 '22 11:09 k8s-triage-robot

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

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

/close not-planned

k8s-triage-robot avatar Oct 14 '22 12:10 k8s-triage-robot

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

In response to this:

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

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

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Oct 14 '22 12:10 k8s-ci-robot

/assign

sbdtu5498 avatar Jun 27 '23 03:06 sbdtu5498