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

Support location zones and resolver metrics in go client #31

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

bvighnesha
Copy link

@bvighnesha bvighnesha commented Sep 16, 2019

Proposed changes

Support the newly added per location and resolver metrics.

APIVersion upgrade 4 -> 5
NGINX Plus version upgrade R18 -> R19

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@bvighnesha bvighnesha self-assigned this Sep 16, 2019
Copy link
Contributor

@Dean-Coakley Dean-Coakley left a comment

Choose a reason for hiding this comment

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

Client updates looks pretty good.

Tests need to be completed before merging.

Please add a note in the PR description regarding:

  • APIVersion upgrade 4 -> 5
  • NGINX Plus version upgrade R18 -> R19

tests/client_test.go Outdated Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

@b-v-r please see my comments

client/nginx.go Show resolved Hide resolved
client/nginx.go Outdated Show resolved Hide resolved
client/nginx.go Outdated Show resolved Hide resolved
client/nginx.go Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
@pleshakov pleshakov added change Pull requests that introduce a change enhancement Pull requests for new features/feature enhancements labels Sep 17, 2019
client/nginx.go Outdated Show resolved Hide resolved
client/nginx.go Outdated Show resolved Hide resolved
client/nginx.go Outdated Show resolved Hide resolved
client/nginx.go Outdated Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
tests/client_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Dean-Coakley Dean-Coakley left a comment

Choose a reason for hiding this comment

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

Looks pretty good now. Just unit tests need improvement

docker/test.conf Outdated Show resolved Hide resolved
Copy link

@Rulox Rulox left a comment

Choose a reason for hiding this comment

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

Looks good now 👍

Copy link
Contributor

@Dean-Coakley Dean-Coakley left a comment

Choose a reason for hiding this comment

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

I think the resolvers test could be extended to validate metrics are correctly marshalled and returned.

Something like:

if resolver, ok := stats.Resolvers[resolverMetric]; ok {
    if resolver.Requests.Name < 1 {
        t.Errorf("Resolvers stats missing: %v", resolver.Requests)
    }
} else {
    t.Errorf("Resolver %v not found", resolverMetric)
}

The current test of configuring one resolver and testing for the existence/absence of that resolver could be considered sufficient.

I defer to your judgement. LGTM.

@bvighnesha bvighnesha force-pushed the Location-zones_and_resolver-metrics branch from 9840cf8 to 2d0f83b Compare September 24, 2019 17:59
@bvighnesha bvighnesha merged commit f2921a1 into master Sep 24, 2019
@Rulox Rulox deleted the Location-zones_and_resolver-metrics branch September 26, 2019 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Pull requests that introduce a change enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants