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

rpk: license warning text changes. #24264

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rpk: avoid repeating warning for trial licenses
When the license is a trial license and the cluster
has enterprise features enabled, rpk already
prints a warning when creating the admin API client

We avoid printing another warning in this command
as this can be repetitive.
  • Loading branch information
r-vasquez committed Nov 22, 2024
commit 45d48d58918c64e5110b382e7bf9a4c5fee35aba
9 changes: 8 additions & 1 deletion src/go/rpk/pkg/cli/cluster/license/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ func checkLicenseExpiry(expiresUnix int64, licenseType string, enterpriseFeature
}
if daysLeft < dayThreshold && !ut.Before(time.Now()) {
msg := "WARNING: your license will expire soon.\n\n"
if isTrial && len(enterpriseFeatures) == 0 {
if isTrial {
if len(enterpriseFeatures) > 0 {
// We don't print if isTrial and we have enterprise features.
// Because in this case we already print the warning when
// creating the admin client and printing another warning is
// repetitive.
return
}
msg = fmt.Sprintf("Note: your TRIAL license will expire in %v days. To request a license, please visit https://redpanda.com/upgrade. To try Redpanda Enterprise for 30 days, visit https://redpanda.com/try-enterprise. For more information, see https://docs.redpanda.com/current/get-started/licenses/#redpanda-enterprise-edition\n\n", daysLeft)
}
if ws, err := mTerm.GetWinsize(0); err == nil {
Expand Down