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

Expand --version command #1196

Closed
do4gr opened this issue Dec 20, 2019 · 6 comments
Closed

Expand --version command #1196

do4gr opened this issue Dec 20, 2019 · 6 comments
Assignees
Labels
kind/improvement An improvement to existing feature and code. team/client Issue for team Client. topic: binary topic: cli
Milestone

Comments

@do4gr
Copy link
Member

do4gr commented Dec 20, 2019

Currently the version command just returns the CLI version and one commit hash for the binary which is hardcoded in the package.json - not the actual hash that the binary returns when asked for it.

Ideally the CLI would request the version from all the binaries version endpoints and output something like this:

prisma2@2.0.0-alpha.473
All binaries are on the same commit : 9sfhshfjdhfjsdhfs....` 

Or in the case they differ (due to the usage of env vars to point to local binaries)

prisma2@2.0.0-alpha.473
The binaries are on different commits: 
 Introspection-Engine : 9fadsfsdfsdf...
 Query-Engine : 5j245h45kk2hhgfsfsdf...
 Migration-Engine : 92047254hsfs7s8fs02f...
@janpio janpio added kind/improvement An improvement to existing feature and code. topic: cli topic: binary labels Dec 20, 2019
@timsuchanek
Copy link
Contributor

In addition, we should adjust the --version command, to take into account, if an engine override env var is present.
If you e.g. provide PRISMA_QUERY_ENGINE_BINARY, the --version command should print information about the binary that is targeted by that env var, instead of just printing the shipped binary.

@timsuchanek
Copy link
Contributor

Relevant prisma/prisma-engines#521

@timsuchanek
Copy link
Contributor

The new output will look as follows:

Prisma CLI Version   : prisma2@2.0.0-alpha.473
Current platform     : darwin
Query Engine         : version (at /.../.../, resolved by PRISMA_QUERY_ENGINE_BINARY)
Migration Engine     : version (at /.../.../)
Introspection Engine : version (at /.../.../)

@timsuchanek
Copy link
Contributor

Thanks a lot for reporting 🙏
This issue is fixed in the latest alpha version of prisma2.
You can try it out with npm i -g prisma2@alpha.

In case it’s not fixed for you - please let us know and we’ll reopen this issue!

@timsuchanek timsuchanek removed this from the Preview 25 milestone Dec 2, 2020
@timsuchanek timsuchanek added process/candidate team/client Issue for team Client. labels Dec 2, 2020
@timsuchanek
Copy link
Contributor

There is a corresponding PR #4458

@Jolg42 Jolg42 reopened this Dec 2, 2020
@timsuchanek
Copy link
Contributor

Fixed by #4458

@Jolg42 Jolg42 added this to the 2.13.0 milestone Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/client Issue for team Client. topic: binary topic: cli
Projects
None yet
Development

No branches or pull requests

5 participants