Fortio output: add missing fields & correct some of the output fields#226
Fortio output: add missing fields & correct some of the output fields#226mum4k merged 50 commits intoenvoyproxy:masterfrom
Conversation
- Define NH version in the code in a canonical place. - Update the fortio output formatter - add missing version field - Add RELEASE_PROCEDURE.md - Consume the new version information in various places to make --version output of executables sensible. Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
RELEASE_PROCEDURE.md
Outdated
| - Update [version_history.md](docs/root/version_history.md). | ||
| - Make sure breaking changes are explicitly called out. | ||
| - Ensure the release notes are complete. | ||
| - Tag the release in git using the current version number |
There was a problem hiding this comment.
Would it help if we include example commands for some of these steps?
There was a problem hiding this comment.
Yes I think so; I added some placeholder commands for @htuch to review (he has been doing the actual releases).
RELEASE_PROCEDURE.md
Outdated
| @@ -0,0 +1,7 @@ | |||
| # Release procedure | |||
|
|
|||
| - Update [version_history.md](docs/root/version_history.md). | |||
There was a problem hiding this comment.
(optional) Not sure if worth it (depends on how often this happens). Would it make sense to add a script that will automate the version update and the version "Bump" noted below?
include/nighthawk/common/version.h
Outdated
| const int MAJOR_VERSION{0}; | ||
| const int MINOR_VERSION{3}; | ||
|
|
||
| class Globals { |
There was a problem hiding this comment.
Curious - why wrap it in a class?
Considering its generic name - won't this attract more possibly unrelated methods?
There was a problem hiding this comment.
Bad naming indeed; I renamed the class to VersionUtils. WDYT?
|
|
||
| // TODO(#182): Not needed but nice to have, displays in the UI | ||
| fortio_output.set_labels(""); | ||
| fortio_output.set_version("0.0"); |
There was a problem hiding this comment.
Don't we want to set this to the actual version?
There was a problem hiding this comment.
In this particular test, IMHO I think "0.0" is fine as we target testing the output formatting; and not the versioning mechanics; But having said that I feel an end-to-end test would contribute value - especially at release time.
So I punted this to #228
Does that sound good?
There was a problem hiding this comment.
Don't we want to set this to the actual version?
I'm sorry, I had another look at this, and I somehow misunderstood your comment here.
That is correct, and this is fixed now.
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
RELEASE_PROCEDURE.md
Outdated
| - Update [version_history.md](docs/root/version_history.md). | ||
| - Make sure breaking changes are explicitly called out. | ||
| - Ensure the release notes are complete. | ||
| - Tag the release in git using the current version number |
There was a problem hiding this comment.
Yes I think so; I added some placeholder commands for @htuch to review (he has been doing the actual releases).
RELEASE_PROCEDURE.md
Outdated
| @@ -0,0 +1,7 @@ | |||
| # Release procedure | |||
|
|
|||
| - Update [version_history.md](docs/root/version_history.md). | |||
include/nighthawk/common/version.h
Outdated
| const int MAJOR_VERSION{0}; | ||
| const int MINOR_VERSION{3}; | ||
|
|
||
| class Globals { |
There was a problem hiding this comment.
Bad naming indeed; I renamed the class to VersionUtils. WDYT?
|
|
||
| // TODO(#182): Not needed but nice to have, displays in the UI | ||
| fortio_output.set_labels(""); | ||
| fortio_output.set_version("0.0"); |
There was a problem hiding this comment.
In this particular test, IMHO I think "0.0" is fine as we target testing the output formatting; and not the versioning mechanics; But having said that I feel an end-to-end test would contribute value - especially at release time.
So I punted this to #228
Does that sound good?
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
RELEASE_PROCEDURE.md
Outdated
| # Release procedure | ||
|
|
||
| - Update [version_history.md](docs/root/version_history.md). | ||
| - Make sure breaking changes are explicitly called out. |
There was a problem hiding this comment.
Ideally we do these as we go, rather than a major effort at release time. The experience form Envoy has been that this scales better.
There was a problem hiding this comment.
I'll make sure we mention that here - though maybe we could also have a pre-merge reviewer checklist that captures this; when someone about to perform a release read it here it's probably too late?
There was a problem hiding this comment.
Sure. Could be useful for new maintainers, +1
There was a problem hiding this comment.
Sure. Could be useful for new maintainers, +1
Filed #230, let me know if you have any more things that should go in there.
RELEASE_PROCEDURE.md
Outdated
| - Tag the release in git using the current version number: | ||
| ```bash | ||
| git tag -a "v0.3" -m "Release v0.3" | ||
| git push origin v0.3 |
There was a problem hiding this comment.
Do we need to do the tagging? If we do a GitHub tagged release, does it generate these for us?
There was a problem hiding this comment.
Those currently exist, so if that is what you did earlier, then yes :-) I'll amend
include/nighthawk/common/version.h
Outdated
| namespace Nighthawk { | ||
|
|
||
| const int MAJOR_VERSION{0}; | ||
| const int MINOR_VERSION{3}; |
There was a problem hiding this comment.
Do you want full semantic major.minor.patch style versions?
There was a problem hiding this comment.
Lets go for that, I'll amend
|
|
||
| string URL = 12; | ||
|
|
||
| string Version = 13; |
There was a problem hiding this comment.
You could make this a structured type, @yanavlasov is introducing this in envoyproxy/envoy#9301
There was a problem hiding this comment.
The structured versions have been merged BTW
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
|
@mum4k @htuch I addressed feedback and iterated on the release procedure; |
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
|
This is now in flux for a bit, because I noticed a couple of issues as wel as some fields missing in the output. As this is blocked on waiting for Envoy to land the structured versioning proto definition I may as well go for getting the output sorted completely while I'm at it. |
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
|
/cc @nareddyt there's some changes going on with respect to the Fortio output generation here, looping you in, in case you'd like to have a look at this. |
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
|
Note fore reviewers: It's better to land #261 first, as I merged that into this one so I could take support for structured versioning onwards. |
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Update Envoy to 29b30911dbfb3f9760efeb28238ceac36e1a1a23 It is worth noting this upgrades Envoy proto api usage to v3alpha Brings in the structured versioning API, which we need in #226 Signed-off-by: Otto van der Schaaf oschaaf@we-amp.com
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
|
|
||
| string URL = 12; | ||
|
|
||
| string Version = 13; |
There was a problem hiding this comment.
The structured versions have been merged BTW
| fortio_output.set_jitter(output.options().has_jitter_uniform()); | ||
| fortio_output.set_runtype("HTTP"); | ||
|
|
||
| // The h2 pool doesn't offer supper for multiple connections here. So we must ignore the |
| for (int i = 0; i < nh_stat.percentiles().size(); i++) { | ||
|
|
||
| const int percentiles_size = nh_stat.percentiles().size(); | ||
| for (int i = 0; i < percentiles_size; i++) { |
There was a problem hiding this comment.
You can use a range-based for loop here.
source/common/version_info.cc
Outdated
| } | ||
|
|
||
| const envoy::config::core::v3alpha::BuildVersion& VersionInfo::buildVersion() { | ||
| static const auto* result = new envoy::config::core::v3alpha::BuildVersion( |
There was a problem hiding this comment.
Can you use CONSTRUCT_ON_FRIST_USE here as well?
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
mum4k
left a comment
There was a problem hiding this comment.
Just two documentation nits, please let me know if you prefer to merge and address later.
| */ | ||
| class VersionInfo { | ||
| public: | ||
| static const std::string& version(); |
There was a problem hiding this comment.
Can we document these public methods?
|
|
||
| string URL = 12; | ||
|
|
||
| string Version = 13; |
There was a problem hiding this comment.
(optional) Unsure what role this proto plays. If it is "public" by any means we should improve the documentation of these fields. We can leave this to a follow-up PR.
|
Discussed offline, we will address the documentation nits in another PR. This one going in will unblock two other PRs. |
PR Description
--versionoutput of executables sensible.Fixes #186, #235, #231
Signed-off-by: Otto van der Schaaf oschaaf@we-amp.com
Prerequisites to merging this
Discuss that the label field in Fortio output also contains machine name, we set it to.Nighthawk. Check which one is preferrable