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

Feat: Display Apollo Router version on startup. #543

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

o0Ignition0o
Copy link
Contributor

This commit displays the Apollo Router version as an INFO when the router starts.

@o0Ignition0o o0Ignition0o force-pushed the igni/display_router_version branch from f1df3e8 to 384273f Compare February 23, 2022 16:36
@o0Ignition0o o0Ignition0o marked this pull request as ready for review February 23, 2022 16:37
@o0Ignition0o o0Ignition0o requested review from abernix, garypen, BrynCooke, bnjjj and Geal and removed request for abernix, garypen and BrynCooke February 23, 2022 16:37
Comment on lines 117 to 122
tracing::info!("Apollo Router version {}", env!("CARGO_PKG_VERSION"));

Copy link
Contributor

Choose a reason for hiding this comment

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

We are using this kind of format in the spaceport (which was inspired by the TS naming convention):

        format!("{}@{}",
            std::env!("CARGO_PKG_NAME"),
            std::env!("CARGO_PKG_VERSION")
        );

It would just become:

tracing::info!("{}@{}", std::env!("CARGO_PKG_NAME"), std::env!("CARGO_PKG_VERSION"));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh that's neat, I thought this would be an issue because our product names must start with a capital letter ?

Happy to change it if @prasek and @abernix dont mind!
Also ++ for consistency across our apps

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with apollo-router@x.y.z, though it's worth noting that the usage in spaceport is meant to be serialized into a protobuf file and be machine readable:

header.agent_version = format!(

This user story is very different. It's, instead: As a user, I want to be able to quickly see the version I'm running at startup.

I don't think that calls for consistency in that case and I think Apollo Router vX.Y.Z would look nice for a human to read.

But again, I'm fine with apollo-router@x.y.z.

Comment on lines +31 to +36
- **Display Apollo Router version on startup** ([PR #543](https://github.com/apollographql/router/pull/543))
The Apollo Router displays its version on startup from now on, which will come in handy when debugging/observing how your application behaves.
Copy link
Member

Choose a reason for hiding this comment

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

❤️

Comment on lines 117 to 122
tracing::info!("Apollo Router version {}", env!("CARGO_PKG_VERSION"));

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with apollo-router@x.y.z, though it's worth noting that the usage in spaceport is meant to be serialized into a protobuf file and be machine readable:

header.agent_version = format!(

This user story is very different. It's, instead: As a user, I want to be able to quickly see the version I'm running at startup.

I don't think that calls for consistency in that case and I think Apollo Router vX.Y.Z would look nice for a human to read.

But again, I'm fine with apollo-router@x.y.z.

@prasek
Copy link
Contributor

prasek commented Feb 23, 2022

But again, I'm fine with apollo-router@x.y.z.

👍

This commit displays the Apollo Router version as an INFO when the router starts.
@o0Ignition0o o0Ignition0o force-pushed the igni/display_router_version branch from af64292 to 071520d Compare February 24, 2022 07:48
@o0Ignition0o o0Ignition0o merged commit 319e789 into main Feb 24, 2022
@o0Ignition0o o0Ignition0o deleted the igni/display_router_version branch February 24, 2022 07:51
@abernix abernix mentioned this pull request Feb 25, 2022
@abernix abernix linked an issue Feb 25, 2022 that may be closed by this pull request
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.

print router version on startup
4 participants