-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview environment CLI #10076
Preview environment CLI #10076
Conversation
Pinging @gitpod-io/platform just for awareness and in case you want to provide early feedback |
0a34f68
to
4674a75
Compare
Looks good, I just have a few nits about the file names in the |
Ah yes, thanks for pointing that out. Just renamed the files :) |
/* | ||
Copyright 漏 2022 NAME HERE <EMAIL ADDRESS> | ||
|
||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in a few places and is unnecessary :) Unless there's actually a requirement to fill it with something relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh whoops, that was auto-generated and I forgot to clean it up 馃槄. Thanks!
It is required indeed, but not like that :P
/hold Looks like some changes made to main have broken this build :/, I'll try rebasing |
Following our [internal RFC](https://www.notion.so/gitpod/A-Go-based-CLI-for-interacting-with-Preview-Environments-1834aa90bc104a0b836dd523e22f9e93), the work done in this CLI was to make sure it is easily extendable with new commands and that the architecture makes it easy to test. It also introduces the first command asked in Milestone 1 of that same RFC. Which makes it possible to install the kube-context of different preview environments. Signed-off-by: ArthurSens <arthursens2005@gmail.com>
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
|
It did the trick :) |
Description
Following our internal RFC, the work done in this CLI was to make sure it is easily extendable with new commands and that the architecture makes it easy to test.
It also introduces the first command asked in Milestone 1(see important notes) of that same RFC. Which makes it possible to install the kube-context of different preview environments.
Important notes
install-k3s-context.sh
was not re-implemented in Go yet.The implementation is not easy and I think it would delay this PR too much. Our current implementation in bash uses SSH tunneling and I'm not sure how to implement/replace that in Go. I'm also not sure how to write a good test for such implementation 馃槵.
If possible, I'd like to convert this into a separate issue and tackle the re-implementation and testing into a separate PR.
install-k3s-context.sh
was modified to install context from custom branches.Since one of the requirements was the ability to install context from different branches, I extended our bash script to install context from custom branches 馃檪
install-k3s-context.sh
doesn't exit with code != 0 when preview doesn't exist.And as a consequence,
previewctl install-context <unexisting-branch>
succeeds even with a broken context. I'm on the fence if this bug should be a blocker for this PR or not, but I've already spent a good time trying to solve this one without success 馃槄. The options that I see are:Or
Code walkthrough
https://www.loom.com/share/6da6cf3b6b61457e8c0f17736e716434
How to test
A couple of options to try
previewctl install-context --branch <branch-name>
Release Notes