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 1713098: backport prometheus client_go race fix to 4.1 #23035

Merged

Conversation

rphillips
Copy link
Contributor

checkMetricConsistency relies on labels being sorted. If they are not, it is sorting them, which is modifying a slice that is assumed to be immutable elsewhere. Even if they are sorted, sort.Sort might temporarily change order (even if no equal elements are in the slice) if there are more than 12 labels (where the implementation switches from ShellSort to HeapSort or QuickSort).
Just using sort.Stable is not a solution as the immutable slice will still be mutated if it is not sorted (which can only happen with home-grown metric families, but it can still happen).

This is fixed in 4.2.

ref: prometheus/client_golang#513
ref: https://bugzilla.redhat.com/show_bug.cgi?id=1713098

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 5, 2019
@rphillips rphillips force-pushed the fixes/patch_prom_client_race branch from 92028ef to 9a85ac5 Compare June 5, 2019 14:44
@rphillips rphillips force-pushed the fixes/patch_prom_client_race branch from 9a85ac5 to fae15ad Compare June 5, 2019 14:52
@sjenning
Copy link
Contributor

sjenning commented Jun 5, 2019

test clusters failed to init
/retest

@sjenning
Copy link
Contributor

sjenning commented Jun 5, 2019

/approve
/lgtm

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

sjenning commented Jun 5, 2019

fyi @deads2k

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2019
@wking
Copy link
Member

wking commented Jun 5, 2019

/hold

PR subject should start with Bug 171309:, not BZ171309: to get the change-log reference link.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 5, 2019
@rphillips rphillips changed the title BZ171309: backport prometheus client_go race fix to 4.1 Bug 171309: backport prometheus client_go race fix to 4.1 Jun 5, 2019
@deads2k
Copy link
Contributor

deads2k commented Jun 5, 2019

/approve

This all looks good as long as the actual code change matches @sjenning expectations.

/assign @sjenning

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, rphillips, sjenning

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

@sjenning
Copy link
Contributor

sjenning commented Jun 5, 2019

PR subject has been fixed
/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 Jun 5, 2019
@stevekuznetsov stevekuznetsov merged commit 4b8c205 into openshift:release-4.1 Jun 5, 2019
@wking
Copy link
Member

wking commented Jun 5, 2019

nooo, we got openshift/release#3790 just too late to catch my #23035 (comment) dropping an 8 and therefore linking us to some 2005 Fedora bug 😭 Ah, well...

@rphillips rphillips changed the title Bug 171309: backport prometheus client_go race fix to 4.1 Bug 1713098: backport prometheus client_go race fix to 4.1 Jun 10, 2019
@openshift-ci-robot
Copy link

@rphillips: This pull request references a valid Bugzilla bug.

In response to this:

Bug 1713098: backport prometheus client_go race fix to 4.1

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 Jun 10, 2019
@rphillips
Copy link
Contributor Author

@wking sorry. missed that 8.

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.

None yet

6 participants