-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
base, licenseccl: Revise resolution strategy for LicenseTTL #129052
base, licenseccl: Revise resolution strategy for LicenseTTL #129052
Conversation
log.Errorf(ctx, "unable to initialize periodic license metric update: %v", err) | ||
} | ||
appRegistry.AddMetric(metric.NewFunctionalGauge(base.LicenseTTLMetadata, func() int64 { | ||
return base.GetLicenseTTL(ctx, cfg.Settings, timeutil.DefaultTimeSource{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the cluster settings are closed here on server startup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @xinhaoz)
e118486
to
8849773
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a question on the metadata help string based on reading the discussion in the ticket linked.
pkg/base/license.go
Outdated
var LicenseTTL = metric.NewGauge(licenseTTLMetadata) | ||
var AdditionalLicenseTTLMetadata = metric.Metadata{ | ||
Name: "seconds_until_license_expiry", | ||
Help: "Seconds until license expiry (0 if no license present or running without enterprise features)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that this help string is still referencing enterprise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this is a good question, I'll check in to see what we want the help string to look like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good check, changed the helptext copy
Previously, for resolving the cluster's license expiry we relied on a metric whose value was regularly ticked down by an async task. This change seeks to only the resolve value at read time by reading directly from the cluster settings when its requested. Release note: None Fixes: CRDB-40592 Epic: CRDB-8035
8849773
to
d9c375b
Compare
bors r+ |
blathers backport 24.2 24.1 23.2 23.1 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error setting reviewers, but backport branch blathers/backport-release-24.2-129052 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/129871/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 24.2 failed. See errors above. error setting reviewers, but backport branch blathers/backport-release-24.1-129052 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/129873/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 24.1 failed. See errors above. error creating merge commit from d9c375b to blathers/backport-release-23.2-129052: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2 failed. See errors above. error creating merge commit from d9c375b to blathers/backport-release-23.1-129052: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Previously, for resolving the cluster's license expiry we relied on a metric
whose value was regularly ticked down by an async task. This change seeks to
only the resolve value at read time by reading directly from the cluster
settings when its requested.
Release note: None
Fixes: CRDB-40592
Epic: CRDB-8035