Skip to content

Adds license warnings to the BFF#2130

Merged
Erwinvandervalk merged 6 commits intomainfrom
ev/bff/licensing
Jul 24, 2025
Merged

Adds license warnings to the BFF#2130
Erwinvandervalk merged 6 commits intomainfrom
ev/bff/licensing

Conversation

@Erwinvandervalk
Copy link
Contributor

What issue does this PR address?

This PR warns on license enforcement but doesn't actually implement any enforcement yet. This will happen on final release of V4.

  • Warns on no license
  • Warns on invalid license
  • Warns on expired license
  • Warns if license doesn't contain BFF Feature
  • Displays message on valid log message
  • Messages when frontend is added within license boundaries
  • Messages when frontend is added which exceeds number of frontends

Important: Any code or remarks in your Pull Request are under the following terms:

If You provide us with any comments, bug reports, feedback, enhancements, or modifications proposed or suggested by You for the Software, such Feedback is provided on a non-confidential basis (notwithstanding any notice to the contrary You may include in any accompanying communication), and Licensor shall have the right to use such Feedback at its discretion, including, but not limited to the incorporation of such suggested changes into the Software. You hereby grant Licensor a perpetual, irrevocable, transferable, sublicensable, nonexclusive license under all rights necessary to incorporate and use your Feedback for any purpose, including to make and sell any products and services.

(see our license, section 7)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements license warnings for the BFF (Backend for Frontend) framework by replacing the existing license validation system with a new warning-based approach. The implementation warns users about license issues without enforcing them yet, in preparation for V4 release.

Key changes include:

  • Replaces the existing license validation logic with a warning-only system
  • Adds comprehensive licensing warnings for various scenarios (no license, expired license, invalid license, frontend limits)
  • Integrates license validation into frontend collection management

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
bff/src/Bff/Licensing/LicenseValidator.cs Complete rewrite of license validation logic to use warning-based approach instead of enforcement
bff/src/Bff/Licensing/LicensingLogMessages.cs New file containing structured log messages for various license scenarios
bff/src/Bff/Licensing/License.cs Removed legacy license class implementation
bff/src/Bff/DynamicFrontends/Internal/FrontendCollection.cs Integrates license validator to log warnings when frontends are added
bff/test/Bff.Tests/LicensingTests.cs New comprehensive test suite covering all license warning scenarios
Comments suppressed due to low confidence (2)

bff/test/Bff.Tests/LicensingTests.cs:98

  • [nitpick] The method name should be consistent with other test method names. Consider using 'warns' instead of 'warning' to match the pattern used in other test methods.
    public async Task When_exceeding_number_of_licensed_frontends_then_warning()

Copy link
Member

@maartenba maartenba left a comment

Choose a reason for hiding this comment

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

Couple of suggestions (also depending on https://github.com/DuendeSoftware/fenix/pull/508)

Erwinvandervalk and others added 4 commits July 24, 2025 14:05
@Erwinvandervalk Erwinvandervalk merged commit 8d41112 into main Jul 24, 2025
24 checks passed
@Erwinvandervalk Erwinvandervalk deleted the ev/bff/licensing branch July 24, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants