Skip to content

Bug 1764313: 4.3 console_url is no longer reported on metrics endpoint (fix, with e2e test)#299

Merged
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
benjaminapetersen:monitoring/metrics-test
Nov 12, 2019
Merged

Bug 1764313: 4.3 console_url is no longer reported on metrics endpoint (fix, with e2e test)#299
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
benjaminapetersen:monitoring/metrics-test

Conversation

@benjaminapetersen
Copy link
Copy Markdown
Contributor

@benjaminapetersen benjaminapetersen commented Sep 21, 2019

An e2e test to validate that the /metrics endpoint on the operator responds with an expected output.

@benjaminapetersen benjaminapetersen changed the title Add e2e test for /metrics endpoint [WIP] Add e2e test for /metrics endpoint Sep 21, 2019
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 21, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 21, 2019
@jhadvig
Copy link
Copy Markdown
Member

jhadvig commented Sep 24, 2019

Currently will not run due to a 403 error on the endpoint. The test suite is not allowed to hit the endpoint. Needs to decide the best solution for this.

Is this due to the missing operator/operand implementation ?

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

I'm not really sure. I'm assuming we are running the tests as kube:admin since we use our kubeconfig. So I would expect we should be allowed to make a request against the /metrics url, but I get 403 Forbidden.

@benjaminapetersen benjaminapetersen force-pushed the monitoring/metrics-test branch 4 times, most recently from 92c8df4 to 112ee93 Compare October 21, 2019 20:52
@benjaminapetersen benjaminapetersen changed the title [WIP] Add e2e test for /metrics endpoint Add e2e test for /metrics endpoint Oct 21, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2019
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go
@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

/cherrypick release-4.2

@openshift-cherrypick-robot
Copy link
Copy Markdown

@benjaminapetersen: once the present PR merges, I will cherry-pick it on top of release-4.2 in a new PR and assign it to you.

Details

In response to this:

/cherrypick release-4.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

Ah, that is unfortunate as I know the release-4.2 will work. At present it appears our console_url metric died in 4.3. Exploring.

@jhadvig
Copy link
Copy Markdown
Member

jhadvig commented Oct 22, 2019

/retest

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

At present, this is expected for 4.3/master:

 --- FAIL: TestMetricsEndpoint (5.28s)
    metrics_test.go:143: route for metrics: https://metrics-openshift-console-operator.apps.ci-op-9pmrs04r-4e531.origin-ci-int-aws.dev.rhcloud.com/metrics
    metrics_test.go:149: route to /metrics: (https://metrics-openshift-console-operator.apps.ci-op-9pmrs04r-4e531.origin-ci-int-aws.dev.rhcloud.com/metrics) 
    metrics_test.go:62: did not find console_url 

Working on a fix.

Copy link
Copy Markdown
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Couple of minor comments. The test itself looks good 👍

I see that its failing on the:

metrics_test.go:62: did not find console_url

can you check if the response is valid and the console_url is missing or there is an issue with the route ?

Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
Comment thread test/e2e/metrics_test.go Outdated
@benjaminapetersen benjaminapetersen changed the title Add e2e test for /metrics endpoint Bug 1764313: Add e2e test for /metrics endpoint Oct 22, 2019
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@benjaminapetersen: This pull request references Bugzilla bug 1764313, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Bug 1764313: Add e2e test for /metrics endpoint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 22, 2019
@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

/hold

Now just needs PR to fix the missing console_url (separate, as this test is going to be cherry-picked to 4.2 & 4.1.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@benjaminapetersen: This pull request references Bugzilla bug 1764313, which is valid.

Details

In response to this:

Bug 1764313: 4.3 console_url is no longer reported on metrics endpoint (fix, with e2e test)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 7, 2019
@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

/retest

could not wait for build: the build src failed after 35s with reason DockerBuildFailed: Docker build strategy has failed.

@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 8, 2019
@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

/retest

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

/retest

console tests fail.

Comment thread test/e2e/metrics_test.go

// need to add the CAData, the kubeconfig has router certs
// that are missing from the system trust roots
rootCAs.AppendCertsFromPEM(config.CAData)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@stlaz thanks for your help here!

Copy link
Copy Markdown
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

@benjaminapetersen tests are passing, lets squash and remove the additional debugging prints 👍 so we can merge

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

+1 sounds good!

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

@jhadvig squashed into 3 commits:

  • Delay registry of console_url metric until starter.go
    • this is more of a best practices deal and may be part of what we backport.
  • Use k8s.io legacyregistry for metrics
    • this is the fix for this missing metrics in 4.3 and cannot be part of the backport.
  • Add e2e test for /metrics endpoint
    • this is the e2e test and can be part of the backport.

Backport will simply require a cherry pick of 3 commits:

I will create a branch for the backport to 4.1 once this merges and we verify our 4.3 metrics are again happy (backport will then require the backport for telemeter as well)

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Nov 11, 2019

@benjaminapetersen: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-upgrade 522bc54 link /test e2e-aws-upgrade

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

/retest

almost

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

@jhadvig looks like we are good to merge!

@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

benjaminapetersen commented Nov 12, 2019

@spadgett care to tag? Then we can (finally) get the 4.1 backport moving.

Copy link
Copy Markdown
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

Comment thread test/e2e/metrics_test.go
// alternatively:
// oc exec -it console-operator-<pod-id> /bin/bash
// curl --insecure -H "Authorization: Bearer <token> https://localhost:8443/metrics | grep console_url
func TestMetricsEndpoint(t *testing.T) {
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.

👍

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2019
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benjaminapetersen, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [benjaminapetersen,spadgett]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spadgett
Copy link
Copy Markdown
Member

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 12, 2019
@openshift-merge-robot openshift-merge-robot merged commit 2e066fe into openshift:master Nov 12, 2019
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@benjaminapetersen: All pull requests linked via external trackers have merged. Bugzilla bug 1764313 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1764313: 4.3 console_url is no longer reported on metrics endpoint (fix, with e2e test)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@benjaminapetersen: #299 failed to apply on top of branch "release-4.2":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/console/operator/operator.go
M	pkg/console/operator/sync_v400.go
M	pkg/console/starter/starter.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/console/starter/starter.go
CONFLICT (content): Merge conflict in pkg/console/starter/starter.go
Auto-merging pkg/console/operator/sync_v400.go
Auto-merging pkg/console/operator/operator.go
CONFLICT (content): Merge conflict in pkg/console/operator/operator.go
Patch failed at 0001 Delay registry of console_url metric until starter.go

Details

In response to this:

/cherrypick release-4.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@benjaminapetersen benjaminapetersen deleted the monitoring/metrics-test branch November 12, 2019 19:34
@benjaminapetersen
Copy link
Copy Markdown
Contributor Author

lol forgot there was a hold on this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants