-
Notifications
You must be signed in to change notification settings - Fork 24
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
[Automation] Should we settle on a single language for automation scripts? Which one? #783
Comments
I don't feel strongly about settle on a single language (or not), but I would love to see us stop parsing YAML in bash, especially given the existence of two |
I'm happy with golang, working as closely as we do with openshift/k8s it could be valuable experience. Also, we may want to extend the tooling to also communicate with OCP and thus client-go support could serve useful. But I don't know how suitable Go is for scripts, since it requires compilation, it may add additional overhead. But on the other hand, wrapping these go scripts into one cli/program in the future would become a lot easier. We could, for now, just settle for running these via |
Yeah, I'd like to bring us closer to clis like I think the necessity to compile go binaries actually makes it more portable and it's useful. It's very easy to build go binary for various platforms without any overhead (it's just 2 build flags, that's it). It also means there's zero dependencies - no Python version constraint or pip dependencies required, proper windows support if we want it to, etc. I think an immerse interactive CLI would be an appreciated end result. |
Note: My previous comment was more focused on the "end goal" for our "immerse" CLI. Which is maybe further down the road than this issue... In the end I think we should have a well defined end goal (that I can fork from the previous comment) and all our refactoring should keep that in mind and do small steps towards that direction. So.. if our end goal is an extendable interactive CLI, I'd say it would be for the best to use |
Skimming through the For example the way their environments are declaratively structured. |
Yeah, I've reached the same conclusion @HumairAK 👍 |
further thinking on this, why not just do a single binary right off the bat and separate what would have been different scripts in to different sub commands, e.g:
So like:
Then re-using common code will be a bit clearer/intuitive. I think folks will also stay more consistent in their formatting as they are likely to copy the standards set in the existing code. |
Yeah, that sounds good 🙂 |
@HumairAK @tumido maybe something like https://github.com/larsks/opfcli? |
@larsks yes, this is great! I was thinking cobra/viper as well -- I'll give this a look/test. |
Can we have this moved to the operate-first org? Suggested options:
|
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile.
* Initial import of opfcli command line tool This is my attempt at implementing what we talked about in operate-first/SRE#299. It's an integrated command line tool written in Go that currently provides equivalents for: - onboarding.sh (called create-project) - enable-monitoring.sh - operate-first/apps#626 (called grant-access) This is my first time writing Go, ever, so there may be lots of non-idiomatic code. In your reviews, be kind, but be thorough smile. * Fix problems in pre-commit configuration - Disable remove-tabs in pre-commit hook Standard go style includes using tabs for indentation. This is enforced by gofmt. - Trailing whitespace in Markdown documents is significant We shouldn't be running the trailing-whitespace check on Markdown documents (because that's how you indicate a line break without introducing a new paragraph).
We've settled on a golang cli, see https://github.com/operate-first/opfcli |
From the discussion @HumairAK started in operate-first/apps#635:
The text was updated successfully, but these errors were encountered: