-
Notifications
You must be signed in to change notification settings - Fork 601
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
[CORE 8273] Adjust license warning text to include trial license links #24261
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5d58e71
ducktape: Centralise has_license_nag
BenPope c97b39f
features: Introduce enterprise_feature_messages
BenPope 32c2577
c/feature_manager: Switch license strings
BenPope fb700d9
config/property: Switch license strings
BenPope f599d83
cluster: Switch license strings
BenPope eeb149d
kafka: Switch license strings
BenPope f705dec
admin: Switch license strings
BenPope File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/* | ||
* Copyright 2024 Redpanda Data, Inc. | ||
* | ||
* Use of this software is governed by the Business Source License | ||
* included in the file licenses/BSL.md | ||
* | ||
* As of the Change Date specified in that file, in accordance with | ||
* the Business Source License, use of this software will be governed | ||
* by the Apache License, Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "base/seastarx.h" | ||
#include "ssx/sformat.h" | ||
|
||
#include <seastar/core/sstring.hh> | ||
|
||
#include <fmt/core.h> | ||
|
||
#include <string> | ||
#include <string_view> | ||
|
||
namespace features::enterprise_error_message { | ||
|
||
constexpr std::string_view required | ||
= "A Redpanda Enterprise Edition license is required"; | ||
|
||
constexpr std::string_view request_or_trial | ||
= "To request an Enterprise license, please visit " | ||
"https://redpanda.com/upgrade. To try Redpanda Enterprise for 30 days, " | ||
"visit https://redpanda.com/try-enterprise."; | ||
|
||
constexpr std::string_view get_started | ||
= "For more information, see " | ||
"<https://docs.redpanda.com/current/get-started/licenses>."; | ||
|
||
inline ss::sstring license_nag(const auto& features) { | ||
return ssx::sformat( | ||
"{} to use the currently enabled feature(s): ({}). Please provide a " | ||
"valid license key via rpk using 'rpk cluster license set <key>', or " | ||
"via Redpanda Console. {} {}", | ||
required, | ||
fmt::join(features, ", "), | ||
request_or_trial, | ||
get_started); | ||
} | ||
|
||
inline constexpr std::string upgrade_failure(const auto& features) { | ||
return fmt::format( | ||
"{} to use the currently enabled feature(s): ({}). To apply your " | ||
"license, downgrade this broker to the pre-upgrade version and provide a " | ||
"valid license key via rpk using 'rpk cluster license set <key>', or via " | ||
"Redpanda Console. {} {}", | ||
required, | ||
fmt::join(features, ", "), | ||
request_or_trial, | ||
get_started); | ||
} | ||
|
||
inline ss::sstring cluster_property(std::string_view name, auto value) { | ||
return ssx::sformat( | ||
"Rejected {}: '{}' '{}' is restricted to clusters with an Enterprise " | ||
"license. {}", | ||
name, | ||
value, | ||
name, | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring partition_autobalancing_continuous() { | ||
return ssx::sformat( | ||
R"({} to use feature "partition_autobalancing_mode" with value "continuous". Behavior is restricted to "node_add". {})", | ||
required, | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring core_balancing_continuous() { | ||
return ssx::sformat( | ||
R"({} to use enterprise feature "core_balancing_continuous". This property is being ignored. {})", | ||
required, | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring default_leaders_preference() { | ||
return ssx::sformat( | ||
R"({} to use the enterprise feature "leadership pinning". This feature is disabled. The values of the cluster property "default_leaders_preference" and the topic property "redpanda.leaders.preference" are being ignored. {})", | ||
required, | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring topic_property(auto features) { | ||
return ssx::sformat( | ||
"{} to enable ({}). {}.", | ||
required, | ||
fmt::join(features, ", "), | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring create_partition(auto features) { | ||
return ssx::sformat( | ||
"{} to create partitions with ({}). {}", | ||
required, | ||
fmt::join(features, ", "), | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring acl_with_rbac() { | ||
return ssx::sformat( | ||
"{} to create an ACL with a role binding. {}", | ||
required, | ||
request_or_trial); | ||
} | ||
|
||
inline ss::sstring audit_log_fetch() { | ||
return ssx::sformat( | ||
"{} to consume the audit log topic. {}", required, request_or_trial); | ||
} | ||
|
||
} // namespace features::enterprise_error_message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nice