-
Notifications
You must be signed in to change notification settings - Fork 68
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
Remove Houston version check on upgrade #353
Conversation
Codecov Report
@@ Coverage Diff @@
## main #353 +/- ##
==========================================
+ Coverage 43.40% 52.06% +8.65%
==========================================
Files 24 31 +7
Lines 1744 2328 +584
==========================================
+ Hits 757 1212 +455
- Misses 957 1038 +81
- Partials 30 78 +48
Continue to review full report at Codecov.
|
@paolaperaza can you give feedback on the upgrade message changes here? |
looks strange to me. |
@adam2k Thanks for doing this! A few general comments:
In terms of copy, could simplify message to:
|
Thanks @paolaperaza! Yes, we can add in the server version here too. Do you think if we show the server version OR give the warning that they're not authenticated with a server, that would mitigate the last issue that you're describing enough? We might need to think about that experience some more and create a follow up issue because it might increase the scope of this issue a lot. In the short term, do you think having some warning message like |
@paolaperaza so this issue doesn't get lost. We discussed making some of the additional changes outside of the message change inside of this issue: https://github.com/astronomer/issues/issues/1636 |
@adam2k Cool, commit looks good. Yea, I think if we list We can continue convo on the rest in astronomer/issues#1636! |
"io" | ||
|
||
"github.com/pkg/errors" |
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.
pls undo this change, bad formating:
must be
STD lib
3rd party
custom pkgs
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, weird. My editor auto organized those. It looks like it's alphabetical from github. I'll try to revert.
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.
I see what happened. I removed the empty space between "github.com/pkg/errors"
and the astro imports and it grouped them altogether.
version/version.go
Outdated
|
||
return nil | ||
} | ||
|
||
// CheckForUpdate checks current version against latest on github | ||
func CheckForUpdate(client *github.Client, out io.Writer) error { | ||
func CheckForUpdate(client *houston.Client, ghClient *github.Client, out io.Writer) error { |
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.
JFYI for go code styling absolutely normal to rename ghClient
to ghc
.
@@ -91,3 +84,17 @@ func isValidVersion(version string) bool { | |||
} | |||
return true | |||
} | |||
|
|||
// printServerVersion outputs current server version | |||
func printServerVersion(client *houston.Client, out io.Writer) error { |
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.
why do we need to copy this?
DRY? for
Lines 33 to 40 in e7a3f35
appCfg, err := deployment.AppConfig(client) | |
if err != nil { | |
fmt.Fprintf(out, messages.HOUSTON_CURRENT_VERSION+"\n", "Please authenticate to a cluster to see server version") | |
} | |
if appCfg != nil { | |
fmt.Fprintf(out, messages.HOUSTON_CURRENT_VERSION+"\n", appCfg.Version) | |
} |
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.
Yeah, I was trying to keep it DRY. This method is now being invoked twice. Once on line 33
and once on 70
.
Co-authored-by: Andrii Soldatenko <andrii.soldatenko@gmail.com>
bfc4c08
to
8d3c9af
Compare
@andriisoldatenko do these updates look good to you now? |
I validated this on dev. The versions look off because it's expecting 0.19.0 to be the latest tag in GH (right now it's still 0.18.0). As soon as we take 0.19.0 out of prerelease this will all look correct. Testing on dev cluster:
|
* Remove Houston version check on upgrade * Update message copy * Print server version for upgrade * Print the server version during upgrade * Apply suggestions from code review Co-authored-by: Andrii Soldatenko <andrii.soldatenko@gmail.com> Co-authored-by: Andrii Soldatenko <andrii.soldatenko@gmail.com>
Description
astro upgrade
should not require Houston context.馃師 Issue(s)
Resolves astronomer/issues#1606
馃И Functional Testing
Without authentication to a server:
With server authentication:
CurrVersion
:Without server authentication:
With server authentication:
馃搵 Checklist
make test
before taking out of draft