-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore: exactly match the list licenses v2 structure with FF on #6481
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
1 similar comment
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
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.
👍 Looks good to me! Reviewed everything up to ba2e84b in 48 seconds
More details
- Looked at
57
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. ee/query-service/app/api/license.go:221
- Draft comment:
Ensure consistent use ofMapOldPlanKeyToNewPlanName
for plan name to plan key conversion across the codebase to avoid potential bugs. - Reason this comment was not posted:
Confidence changes required:50%
The code inconvertLicenseV3ToLicenseV2
function inlicense.go
is correctly mapping the plan name to the plan key using theMapOldPlanKeyToNewPlanName
map. However, the map is defined inplans.go
and is not used consistently across the codebase. It would be better to ensure that this mapping is used wherever plan names are converted to plan keys to maintain consistency and avoid potential bugs.
2. ee/query-service/license/manager.go:256
- Draft comment:
Consider refactoring the logic for setting default validity period into a separate function to avoid code duplication and potential inconsistencies. This applies to bothGetLicenses
andGetLicensesV3
. - Reason this comment was not posted:
Confidence changes required:50%
The code inGetLicensesV3
function inmanager.go
is correctly setting a default validity period of one year for licenses withValidUntil
set to -1. This logic is repeated inGetLicenses
function as well. It would be better to refactor this logic into a separate function to avoid code duplication and potential inconsistencies.
3. ee/query-service/model/plans.go:20
- Draft comment:
Use predefined constants for plan names and features instead of hardcoding values. This is correctly done here and should be maintained throughout the codebase. - Reason this comment was not posted:
Confidence changes required:0%
The code inee/query-service/model/plans.go
is correctly using predefined constants for plan names and features, which aligns with the principle of using design tokens or predefined constants instead of hardcoding values.
Workflow ID: wflow_iD0NcRfB1SX20ssK
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
contributes to - https://github.com/SigNoz/platform-pod/issues/325 |
Summary
PLAN
in the string endRelated Issues / PR's
Screenshots
NA
Affected Areas and Manually Tested Areas
Important
Align license structure with feature flag by mapping old plan keys to new names and setting default validity in
license.go
andmanager.go
.convertLicenseV3ToLicenseV2
inlicense.go
, map old plan keys to new plan names usingMapOldPlanKeyToNewPlanName
.GetLicensesV3
inmanager.go
, setValidUntil
to one year fromValidFrom
ifValidUntil
is -1.MapOldPlanKeyToNewPlanName
inplans.go
to map old plan keys to new plan names.PlanKey
inLicensePlan
is correctly set inconvertLicenseV3ToLicenseV2
.This description was created by for ba2e84b. It will automatically update as commits are pushed.