Closed xordspar0 closed 4 years ago
In the future we plan to add a metric for the memory used by xkeys and possibly others.
Oops, we made a mistake. This increments n_xkey for every backend request, even if the xkey already exists from a previous request. Test case incoming.
☝️ That's fixed now.
It looks like the Travis builds run against Varnish 4.1. That won't work for this since counters were first exposed to VMODs in 6.0. That's the reason for the configure script failure: in Varnish 4.1, the VARNISH_COUNTERS autoconf macro wasn't defined yet.
Moving to circleci is on my plate, but with a low priority. I would warmly welcome a PR to setup circleci, or to update the Travis file, if you're up for it.
On Thu, Feb 27, 2020, 15:24 Jordan Christiansen notifications@github.com wrote:
It looks like the Travis builds run against Varnish 4.1. That won't work for this since counters were first exposed to VMODs in 6.0. That's the reason for the configure script failure: in Varnish 4.1, the VARNISH_COUNTERS autoconf macro wasn't defined yet.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/varnish/varnish-modules/pull/151?email_source=notifications&email_token=AA42AKKBAHXI5E4HDKNUMRTRFBDURA5CNFSM4K47UXS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENGLEYA#issuecomment-592228960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA42AKLNCCVEWNOMT3M4HETRFBDURANCNFSM4K47UXSQ .
I just realized that makes any release of varnish-modules after this merge commit no longer backward compatible with varnish < 6.0. Probably fine though.
totally fine, there's a varnish-module
branch for each varnish-cache
branch
I don't have any experience with CircleCI, but I can definitely change the Travis config to point to a different version of Varnish.
The master branch should probably test the weeklies.
It looks like vmod-bodyaccess has some build failures. It also has build failures master, but these failures are different. Is this related to the Varnish upgrade and should I fix them in this branch?
a few things have (unexpectedly) changed in varnish, and bodyaccess
needs to be updated. I'll try to have a look next week (unless you beat me to it, but in another branch), then we'll have a clear Travis view here
@xordspar0, I've just pushed the body_access
fixes, so you should be able to rebase without the .travis.yml
commits and it should be fine.
Small bikeshedding: can you name the counter g_xkey_keys
please? the g_
will make it clear it's a gauge, and having a xkey
namespace will make additions easier to name in the future.
Small bikeshedding: can you name the counter
g_xkey_keys
please? theg_
will make it clear it's a gauge, and having axkey
namespace will make additions easier to name in the future.
I disagree with adding one more layer of namespacing, the gauge is already in the XKEY.
namespace so really we should change it to XKEY.g_keys
.
What other kind of keys do you think vmod_xkey would keep track of?
The ever-watching Dridi is right, I didn't realize the counter was already in its own subsection. The gauge point still holds, so XKEY.g_keys
is the way to go here.
@xordspar0, I'm not sure you need that pointer, but it looks like we are missing the vsc
file in EXTRA_DIST
to make travis
happy
Thanks! I was struggling to reproduce this locally since something weird is going on with pkg-config for my local builds.
Alright, the build succeeds, the tests pass, everything seems to be working! Do you need me to squash or rebase my branch?
I only added a couple of comments (style nitpick and the assert point). All good for me, but I'd like an extra amen from @Dridi or @nigoroll
I'll merge at the end of the week if I don't hear any complaints
Ok, that should resolve all comments so far.
rebase, squash, and we should be good :-)
Done.
I'm merging, the rest, if any, can be handled later.
Thank you for this PR!
This adds a counter for the number of xkeys.
Co-authored-by: Ben Zvan ben.zvan@target.com