Skip to content
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

Improve astro-cli UX when user trying to work locally without access houston #347

Merged
merged 3 commits into from
Jul 21, 2020

Conversation

andriisoldatenko
Copy link
Contributor

@andriisoldatenko andriisoldatenko commented Jul 17, 2020

fix https://github.com/astronomer/issues/issues/1516

should work without access to houston server:

  • astro dev init
  • astro dev start
  • astro dev kill
  • astro dev logs
  • astro dev stop
  • astro dev ps
  • astro dev run

and astro version should print correct message instead of crashing:

astro version
Astro CLI Version: 0.16.0
Git Commit:
Astro Server Version: Please authenticate to a cluster to see server version

cc @schnie @paolaperaza

@codecov
Copy link

codecov bot commented Jul 17, 2020

Codecov Report

Merging #347 into master will increase coverage by 0.42%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   51.03%   51.46%   +0.42%     
==========================================
  Files          31       31              
  Lines        2312     2322      +10     
==========================================
+ Hits         1180     1195      +15     
+ Misses       1054     1050       -4     
+ Partials       78       77       -1     
Impacted Files Coverage Δ
cmd/airflow.go 59.70% <100.00%> (+1.41%) ⬆️
cmd/version.go 67.64% <100.00%> (+3.13%) ⬆️
version/version.go 61.36% <100.00%> (+11.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e622cf...6573e67. Read the comment docs.

Copy link
Contributor

@adam2k adam2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🛳

@andriisoldatenko
Copy link
Contributor Author

@schnie @ashb PTAL

@schnie
Copy link
Member

schnie commented Jul 20, 2020

LGTM, I assume the git commit only shows when running a local build right? Could that come first? Just seems out of order to have the git version sandwiched between the two different Astro-versions.

@andriisoldatenko
Copy link
Contributor Author

@schnie wdyt? (inspired by kubectl)

go run -ldflags '-X github.com/astronomer/astro-cli/version.CurrVersion=0.16.0 -X github.com/astronomer/astro-cli/version.CurrCommit=b56f8fd' main.go version
Astro CLI Version: 0.16.0, Git Commit: b56f8fd
Astro Server Version: Please authenticate to a cluster to see server version
kubectl version
Client Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:26:26Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.11", GitCommit:"d94a81c724ea8e1ccc9002d89b7fe81d58f89ede", GitTreeState:"clean", BuildDate:"2020-05-01T02:31:02Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

@adam2k adam2k added this to the 0.17 milestone Jul 21, 2020
@adam2k
Copy link
Contributor

adam2k commented Jul 21, 2020

Confirming the changes here:

🚀  astro-cli git:(fix-astro-dev-init) go run -ldflags '-X github.com/astronomer/astro-cli/version.CurrVersion=0.16.0 -X github.com/astronomer/astro-cli/version.CurrCommit=b56f8fd' main.go version

Astro CLI Version: 0.16.0, Git Commit: b56f8fd
Astro Server Version: Please authenticate to a cluster to see server version

After authenticating:

...
🚀  astro-cli git:(fix-astro-dev-init) go run -ldflags '-X github.com/astronomer/astro-cli/version.CurrVersion=0.16.0 -X github.com/astronomer/astro-cli/version.CurrCommit=b56f8fd' main.go version

Astro CLI Version: 0.16.0, Git Commit: b56f8fd
Astro Server Version: 0.16.2

Note: We're not warning when the patch versions do not match.

@schnie schnie merged commit e7a3f35 into master Jul 21, 2020
@schnie schnie deleted the fix-astro-dev-init branch July 21, 2020 22:05
adam2k pushed a commit that referenced this pull request Jul 28, 2020
…houston (#347)

* Improve astro-cli UX when user trying to work locally without access to houston

* join astro cli version and hash commit

* fix unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants