Skip to content

fix: handle annual license key format in activation wizard#5335

Merged
markphelps merged 2 commits into
v2from
fix-license-activate
Jan 30, 2026
Merged

fix: handle annual license key format in activation wizard#5335
markphelps merged 2 commits into
v2from
fix-license-activate

Conversation

@markphelps

Copy link
Copy Markdown
Collaborator

Summary

  • Fix license activation wizard to properly handle annual license key format (key/<base64-payload>.<base64-signature>) in addition to monthly keys (XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-V3)
  • Show correct format guidance, placeholder, and validation based on the selected license type
  • Extract validation into a standalone validateLicenseKey function with test coverage

@markphelps
markphelps requested a review from a team as a code owner January 30, 2026 14:13
@markphelps markphelps added the v2 Flipt v2 label Jan 30, 2026
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 30, 2026
@dosubot

dosubot Bot commented Jan 30, 2026

Copy link
Copy Markdown

Related Documentation

Checked 2 published document(s) in 0 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov

codecov Bot commented Jan 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.29412% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.53%. Comparing base (d1704d4) to head (5c58688).
⚠️ Report is 1 commits behind head on v2.

Files with missing lines Patch % Lines
cmd/flipt/license.go 35.29% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #5335      +/-   ##
==========================================
- Coverage   60.54%   60.53%   -0.01%     
==========================================
  Files         138      138              
  Lines       13509    13531      +22     
==========================================
+ Hits         8179     8191      +12     
- Misses       4641     4651      +10     
  Partials      689      689              
Flag Coverage Δ
integrationtests 34.60% <0.00%> (-0.06%) ⬇️
unittests 51.83% <35.29%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@markphelps
markphelps force-pushed the fix-license-activate branch from a1fbc2d to 289c31b Compare January 30, 2026 15:01
The license key validation was hardcoded for monthly key format
(XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-V3), but annual keys use a
completely different format (key/<base64-payload>.<base64-signature>).

- Show correct format guidance and placeholder based on license type
- Validate annual keys check for 'key/' prefix and '.' separator
- Extract validation into testable validateLicenseKey function
- Add comprehensive test coverage for both key formats

Signed-off-by: Mark Phelps <[email protected]>
@markphelps
markphelps force-pushed the fix-license-activate branch from 289c31b to aa92391 Compare January 30, 2026 15:04
@markphelps
markphelps requested a review from erka January 30, 2026 17:44

@erka erka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@markphelps
markphelps merged commit aa2e232 into v2 Jan 30, 2026
27 of 29 checks passed
@markphelps
markphelps deleted the fix-license-activate branch January 30, 2026 19:54
@github-project-automation github-project-automation Bot moved this to Done in Flipt V2 Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants