hack icon indicating copy to clipboard operation
hack copied to clipboard

working on making knative/hack shell-free

Open sbdtu5498 opened this issue 2 years ago • 8 comments

Changes

/kind enhancement

Fixes #254

First of all, it is a hassle to maintain lots of shell scripts. Keeping them DRY is already difficult enough and they can't be used in the most efficient manner to automate the things up. Ultimately knative/hack by becoming shell free can be easily integrated with the CI/CD pipeline. It will make hack across knative and knative-sandbox org shell-free and will further increase developer productivity as the release can be automated easily via github-actions. Portability will be enhanced. Also, once the migration is complete, using a distroless image with few additional stuff such as Kubectl and git would be possible.

WARNING:- This is a WIP. Please do not review or merge. Would be asking for review after few more iterations and it is quite a big task so would be taking some time and would be force pushing the changes from time to time. Thanks!

Release Note

NONE

Docs

NONE

sbdtu5498 avatar Jul 10 '23 03:07 sbdtu5498

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sbdtu5498 Once this PR has been reviewed and has the lgtm label, please assign vishal-chdhry for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

knative-prow[bot] avatar Jul 10 '23 03:07 knative-prow[bot]

Welcome @sbdtu5498! It looks like this is your first PR to knative/hack 🎉

knative-prow[bot] avatar Jul 10 '23 03:07 knative-prow[bot]

Hi @sbdtu5498. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

knative-prow[bot] avatar Jul 10 '23 03:07 knative-prow[bot]

Hi @sbdtu5498. It's wonderful you are doing this!

However, this PR is already far too large to ever be reviewed and approved. We need to work in smaller chunks.

Our current idea on #254 is to write specific, go-native tools in the https://github.com/knative/toolbox repository, and use them in current shell scripts. This allows to move the logic from scripts to proper tools in a gradual way.

I think you could partition the job you have already done here, into some tools, by creating PRs in toolbox repo.

WDYT?

/hold

cardil avatar Sep 01 '23 17:09 cardil

Awesome work! Yea i agree this needs to be refactored into smaller pieces.

krsna-m avatar Sep 01 '23 17:09 krsna-m

@cardil @kvmware sorry for the delayed response. I will refactor this one and will put it in the listed repo. Thanks for letting me know.

sbdtu5498 avatar Sep 06 '23 18:09 sbdtu5498

@sbdtu5498 Thanks! Once you open the PR in toolbox please go ahead and let us know and close this PR.

krsna-m avatar Sep 19 '23 14:09 krsna-m

Hey @sbdtu5498. I've updated the description of https://github.com/knative/hack/issues/254 with the approach we want to take. It also now tracks a number of tasks that are smaller in scope. The idea is to focus on a specific tool, write it in Go, and deploy it through the Knative repos. Hopefully, this will allow for a more incremental approach to this effort.

cardil avatar Oct 10 '23 11:10 cardil