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

Bug 1806787: Expose openshift_console_operator_build_info metric #384

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

jhadvig
Copy link
Member

@jhadvig jhadvig commented Feb 27, 2020

FIxed operator for sending openshift_console_operator_build_info metrics. Also refactored the metrics itself.

/assign @benjaminapetersen

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 27, 2020
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Bugzilla bug 1806787, which is invalid:

  • expected the bug to target the "4.5.0" release, but it targets "4.4.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1806787: Expose openshift_console_operator_build_info metric

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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 27, 2020
@jhadvig
Copy link
Member Author

jhadvig commented Feb 27, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 27, 2020
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Bugzilla bug 1806787, 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.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@jhadvig
Copy link
Member Author

jhadvig commented Feb 27, 2020

/retest

@@ -0,0 +1,88 @@
package metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I prefer leaving the file as console_url.go, as it contains a bunch of helpers only for console_url.

consoleBuildInfo.WithLabelValues(major, minor, gitCommit, gitVersion).Set(1)
}

// We will never want to panic our operator because of metric saving.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good add.


func Register() *ConsoleMetrics {
// thread safe
once.Do(func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Reason to eliminate?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe timing is a problem I was aiming to resolve,a lot of examples don't account for this.

)
)

func init() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe I orinally used init() but then moved away from it as "best practices" indicated its better to do so (thought its been a while since I worked on this). Timing is a potential problem that earlier examples didn't account for.

Copy link
Member Author

Choose a reason for hiding this comment

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

@benjaminapetersen right but our version.go is still using init(), also other operators (for which the metrics as build_info are working) are using this approach
Timing is not the best here I agree. So we have two options:

  • try to fix it
  • put on 4.5

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, its late, this fixes the bug. We can roll ahead, but prob should circle around and review approach again in 4.5.

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

With the init() changes, though see comment about reviewing that again in 4.5.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2020
@benjaminapetersen benjaminapetersen added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@jhadvig
Copy link
Member Author

jhadvig commented Mar 3, 2020

/cherry-pick release-4.4

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-4.4

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

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@benjaminapetersen
Copy link
Contributor

/retest

 Mar  4 16:33:43.849: INFO:  > ERROR: (gcloud.compute.instance-groups.list-instances) could not parse resource []
Mar  4 16:33:43.849: INFO:  > 
Mar  4 16:33:43.849: INFO: Cluster image sources lookup failed: exit status 1
Mar  4 16:33:43.851: INFO: Waiting up to 30m0s for all (but 100) nodes to be schedulable
Mar  4 16:33:43.874: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
STEP: Destroying namespace "e2e-test-router-scoped-sbqcr" for this suite.
Mar  4 16:39:08.081: INFO: Running AfterSuite actions on all nodes
Mar  4 16:39:08.081: INFO: Running AfterSuite actions on node 1
fail [github.com/openshift/origin/test/extended/util/framework.go:1565]: Unexpected error:
    <*errors.errorString | 0xc0002d63f0>: {
        s: "timed out waiting for the condition",
    }
    timed out waiting for the condition
occurred 

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 56e6863 into openshift:master Mar 4, 2020
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Bug 1806787: Expose openshift_console_operator_build_info metric

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

@jhadvig: new pull request created: #390

In response to this:

/cherry-pick release-4.4

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.

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