You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The productivity consensus is to deprecate the hacks repository and shift away from using shell scripts in Knative. Instead, the well-defined functionality should be re-implemented using Go-native tools. This will make it easier for Knative contributors to maintain, allow for testing with ease, and ultimately improve the overall solution's quality.
The default target for this rewrite is the knative/toolbox repository. Some code, which is reusable and might be used by direct code import, might be rewritten to specific sub-package withing the knative.dev/pkg.
It has gotten to a point where hack scripts are more than what they should be doing in bash.
We should minimize the amount of bash to simple easy to understand shellchecked bash scripts and offload any more complicated logic to golang which the community has more familiarity with.
I think we should stop development of shell hacks. Recent code signing issues (see: #272, #240) clearly shows writing such tools in shell is short-sighted - the code is cryptic, hard to maintain, and often contains bugs. Although we have now a unit test framework, still testing isn't easy.
I think we should freeze this repo, and try to rewrite scripts one by one as Golang native tools. Those tools could be executed in Make files or simple scripts, as CLI, like:
Or you could embed such innovations directly in Go-native build tools like Mage or goyek.
A good starting point for such rewrite is https://github.com/wavesoftware/go-magetasks/ which I would like to donate to Knative tools, and disconnect it from Mage, so it would be a general tooling.
Activity
cardil commentedon Feb 17, 2023
I think we should stop development of shell hacks. Recent code signing issues (see: #272, #240) clearly shows writing such tools in shell is short-sighted - the code is cryptic, hard to maintain, and often contains bugs. Although we have now a unit test framework, still testing isn't easy.
I think we should freeze this repo, and try to rewrite scripts one by one as Golang native tools. Those tools could be executed in Make files or simple scripts, as CLI, like:
Or you could embed such innovations directly in Go-native build tools like Mage or goyek.
A good starting point for such rewrite is https://github.com/wavesoftware/go-magetasks/ which I would like to donate to Knative tools, and disconnect it from Mage, so it would be a general tooling.
It misses some things like:
cardil commentedon Mar 24, 2023
This might help: https://github.com/bitfield/script
sbdtu5498 commentedon Jun 27, 2023
/assign
[-]Revisit hack scripts[/-][+]Rewrite hacks into Go native tools[/+]cardil commentedon Oct 10, 2023
/assign
I'll assign myself to foster this epic.
[-]Rewrite hacks into Go native tools[/-][+]Hackless Go-native tools for Knative[/+]cardil commentedon Apr 5, 2024
/triage accepted