Skip to content

Fortio output: add missing fields & correct some of the output fields#226

Merged
mum4k merged 50 commits intoenvoyproxy:masterfrom
oschaaf:fortio-version-field
Jan 14, 2020
Merged

Fortio output: add missing fields & correct some of the output fields#226
mum4k merged 50 commits intoenvoyproxy:masterfrom
oschaaf:fortio-version-field

Conversation

@oschaaf
Copy link
Copy Markdown
Member

@oschaaf oschaaf commented Dec 11, 2019

PR Description

  • Define NH version in the code in a canonical place.
  • Update the fortio output formatter - add missing version field
  • Consume the new version information in various places to make
    --version output of executables sensible.
  • Implement a couple of missing fields in the Fortio output
  • Amend a couple of fields for correctness

Fixes #186, #235, #231

Signed-off-by: Otto van der Schaaf oschaaf@we-amp.com

Prerequisites to merging this

  • Move RELEASE_PROCEDURE.md into its own PR
  • Land API: Add extension information the Node message. envoy#9301
  • [WIP] Update the NH Envoy dependency so we can use ^^: Update Envoy #261
  • Update this PR to leverage the structured versioning that now is available
  • Fix missing stuff in the Fortio output, punt what cannot be completed yet to TODO/issues and/or task lists here.
  • amend inaccurate things
  • Discuss that the label field in Fortio output also contains machine name, we set it to Nighthawk. Check which one is preferrable.
  • Get consensus on what we want to show for the concurrency value in the Fortio visualization, discussion
  • use experimental pool features (h1 connection re-use strategy, h2 multiple connection support)

- 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>
@mum4k mum4k self-requested a review December 11, 2019 15:17
- 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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it help if we include example commands for some of these steps?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes I think so; I added some placeholder commands for @htuch to review (he has been doing the actual releases).

@@ -0,0 +1,7 @@
# Release procedure

- Update [version_history.md](docs/root/version_history.md).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, filed #228

const int MAJOR_VERSION{0};
const int MINOR_VERSION{3};

class Globals {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Curious - why wrap it in a class?

Considering its generic name - won't this attract more possibly unrelated methods?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't we want to set this to the actual version?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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>
Copy link
Copy Markdown
Member Author

@oschaaf oschaaf left a comment

Choose a reason for hiding this comment

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

@mum4k thanks; I addressed your feedback in 6f23597

- 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
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes I think so; I added some placeholder commands for @htuch to review (he has been doing the actual releases).

@@ -0,0 +1,7 @@
# Release procedure

- Update [version_history.md](docs/root/version_history.md).
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, filed #228

const int MAJOR_VERSION{0};
const int MINOR_VERSION{3};

class Globals {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

- Update [version_history.md](docs/root/version_history.md).
- Make sure breaking changes are explicitly called out.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure. Could be useful for new maintainers, +1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure. Could be useful for new maintainers, +1

Filed #230, let me know if you have any more things that should go in there.

- 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to do the tagging? If we do a GitHub tagged release, does it generate these for us?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Those currently exist, so if that is what you did earlier, then yes :-) I'll amend

namespace Nighthawk {

const int MAJOR_VERSION{0};
const int MINOR_VERSION{3};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you want full semantic major.minor.patch style versions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Lets go for that, I'll amend


string URL = 12;

string Version = 13;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You could make this a structured type, @yanavlasov is introducing this in envoyproxy/envoy#9301

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
@oschaaf
Copy link
Copy Markdown
Member Author

oschaaf commented Dec 12, 2019

@mum4k @htuch I addressed feedback and iterated on the release procedure;
As we can only land this after envoyproxy/envoy#9301 goes in, it's a nice time to
discuss this some more, so please let me know what you think! I tried to capture
some of the things we did in the earlier releases, as well as added some ideas.

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf requested a review from jplevyak December 13, 2019 22:36
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>
@oschaaf oschaaf changed the title Fortio output: add version field Fortio output: add version field, resolve some inaccuracies Dec 14, 2019
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf
Copy link
Copy Markdown
Member Author

oschaaf commented Dec 14, 2019

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.

@oschaaf oschaaf changed the title Fortio output: add version field, resolve some inaccuracies Fortio output: add missing fields & correct some of the output fields Dec 14, 2019
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf
Copy link
Copy Markdown
Member Author

oschaaf commented Dec 15, 2019

/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>
@oschaaf
Copy link
Copy Markdown
Member Author

oschaaf commented Jan 9, 2020

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>
mum4k pushed a commit that referenced this pull request Jan 10, 2020
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>
@oschaaf oschaaf added waiting-for-review A PR waiting for a review. and removed blocked A PR that is blocked by prerequisites. waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. labels Jan 10, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added this to the 0.3 milestone Jan 11, 2020
jplevyak
jplevyak previously approved these changes Jan 13, 2020

string URL = 12;

string Version = 13;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/supper/support/

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++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can use a range-based for loop here.

}

const envoy::config::core::v3alpha::BuildVersion& VersionInfo::buildVersion() {
static const auto* result = new envoy::config::core::v3alpha::BuildVersion(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you use CONSTRUCT_ON_FRIST_USE here as well?

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf
Copy link
Copy Markdown
Member Author

oschaaf commented Jan 13, 2020

@jplevyak feedback addressed in 13b5222

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@mum4k mum4k self-assigned this Jan 14, 2020
Copy link
Copy Markdown
Collaborator

@mum4k mum4k left a comment

Choose a reason for hiding this comment

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

Just two documentation nits, please let me know if you prefer to merge and address later.

*/
class VersionInfo {
public:
static const std::string& version();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we document these public methods?


string URL = 12;

string Version = 13;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Followed up on the requested doc comments in 77a7eb2 over at #265

@mum4k
Copy link
Copy Markdown
Collaborator

mum4k commented Jan 14, 2020

Discussed offline, we will address the documentation nits in another PR. This one going in will unblock two other PRs.

@mum4k mum4k merged commit c88bc4e into envoyproxy:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0 Highest priority waiting-for-review A PR waiting for a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fortio numthreads field is inaccurate

5 participants