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

Skip misconfigured vts entries #227

Merged
merged 3 commits into from
Jun 17, 2020
Merged

Conversation

mgreyo
Copy link
Contributor

@mgreyo mgreyo commented Jun 11, 2020

Misconfigured ingress resources have the ability to create invalid
VTS entries. These are long-lived and are not rectified againt the
running nginx config.

Because of this, it is possible that the metrics exported by feed
can flip between the valid and invalid VTS data causing erroneous
metrics to be exported.

This adds an extra filter to ensure that metrics are not generated
for misconfigured ingress resources.

Required by https://github.com/sky-uk/core-infrastructure/issues/7091

mgreyo added 2 commits June 10, 2020 17:36
Misconfigured ingress resources have the ability to create invalid
VTS entries. These are long-lived and are not rectified againt the
running nginx config.

Because of this, it is possible that the metrics exported by feed
can flip between the valid and invalid VTS data causing erroneous
metrics to be exported.

This adds an extra filter to ensure that metrics are not generated
for misconfigured ingress resources.
@ghost ghost added the review label Jun 11, 2020
totahuanocotl
totahuanocotl previously approved these changes Jun 16, 2020
Copy link
Contributor

@totahuanocotl totahuanocotl left a comment

Choose a reason for hiding this comment

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

Do not forget to put the reference of the issue when merging.
That is a very nice context which is unfortunately lost in the PR.
I think the summary of the PR is not enough to describe the change.

Just had one question about the new test scenarios that may make you want to change them or make them a bit more clear?

Comment on lines 2047 to 2052
assertIngressRequestCounters(t,
"duplicate-path.sandbox.cosmic.sky", "/path/",
5000.0, 2000.0, 0.0, 5.0, 0.0, 0.0, 0.0)
assertIngressRequestCounters(t,
"misconfigured-ingress.sandbox.cosmic.sky", "/bad/",
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

it is not really clear to me what is the difference between these two.
Is it to prove that a bad path with a valid duplicate will report the valid count, whereas a `bad path without a valid duplicate' will report 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. I've changed the names of these hosts and added comments that will hopefully express the tests intentions

Clearer host names and comments to make the test cases more descriptive
Copy link
Contributor

@totahuanocotl totahuanocotl left a comment

Choose a reason for hiding this comment

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

Nice 👍

@mgreyo mgreyo merged commit 0e2cd58 into master Jun 17, 2020
@ghost ghost removed the review label Jun 17, 2020
@mgreyo mgreyo deleted the skip-misconfigured-vts-entries branch June 17, 2020 14:30
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.

2 participants