Skip to content

Bff V4 multi-frontend support#2032

Merged
Erwinvandervalk merged 1 commit intomainfrom
ev/bff/v4-1
Jun 3, 2025
Merged

Bff V4 multi-frontend support#2032
Erwinvandervalk merged 1 commit intomainfrom
ev/bff/v4-1

Conversation

@Erwinvandervalk
Copy link
Contributor

What issue does this PR address?

  • Multi-frontend support
  • Simplified wireup

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)

@Erwinvandervalk Erwinvandervalk self-assigned this Jun 2, 2025
@Erwinvandervalk Erwinvandervalk force-pushed the ev/bff/v4-1 branch 5 times, most recently from 8b0d605 to 46e549b Compare June 2, 2025 14:55
@Erwinvandervalk Erwinvandervalk requested review from Copilot and damianh and removed request for Copilot June 2, 2025 14:58
@Erwinvandervalk Erwinvandervalk force-pushed the ev/bff/v4-1 branch 2 times, most recently from fe2198e to e0324ac Compare June 3, 2025 08:30
@damianh damianh force-pushed the ev/bff/v4-1 branch 4 times, most recently from 8ecd79e to b6cc7d0 Compare June 3, 2025 12:01
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 introduces the initial BFF V4 support by wiring up a new multi-frontend host, updating token‐management APIs to the new .WithAccessToken patterns, and adjusting project and package configurations.

  • Add a new Hosts.Bff.MultiFrontend host with its HTTP test file, csproj, and BffConfig.json for multi-frontend routing.
  • Rename token retriever methods to *Async, update error/result handling, and switch remote‐API mappings to WithAccessToken.
  • Adjust launch settings (disable auto browser launch), update solution and package props for conditional versioning, and clean up project references.

Reviewed Changes

Copilot reviewed 275 out of 275 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
bff/hosts/Hosts.Bff.MultiFrontend/Hosts.Bff.MultiFrontend.http Add HTTP snippet for weatherforecast endpoint
bff/hosts/Hosts.Bff.MultiFrontend/Hosts.Bff.MultiFrontend.csproj New web project targeting net9.0 with Bff.Yarp ref
bff/hosts/Hosts.Bff.MultiFrontend/BffConfig.json Initial multi-frontend JSON config with remote APIs
bff/hosts/Hosts.Bff.InMemory/ImpersonationAccessTokenRetriever.cs Rename method to GetAccessTokenAsync, add cancellation token and update error/result types
bff/hosts/Hosts.Bff.InMemory/Extensions.cs Replace .RequireAccessToken calls with .WithAccessToken
bff/hosts/Hosts.AppHost/Program.cs Wire up BffMultiFrontend project and URLs
bff/hosts/Directory.Build.props Introduce <IsBffProject> flag
Directory.Packages.props Conditional package version upgrades and add hybrid caching
Comments suppressed due to low confidence (2)

bff/hosts/Hosts.Bff.InMemory/ImpersonationAccessTokenRetriever.cs:12

  • The new method signature GetAccessTokenAsync no longer implements the IAccessTokenRetriever.GetAccessToken contract. Ensure the interface is updated or an explicit overload is provided to match the async variant.
public async Task<AccessTokenResult> GetAccessTokenAsync(AccessTokenRetrievalContext context, CancellationToken ct = default)

bff/hosts/Hosts.AppHost/Program.cs:23

  • The WithUrl call is passing the same URL twice. Verify if the second argument should be a different path or host URL to avoid redundant bindings.
.WithUrl("https://app1.localhost:5005", "https://app1.localhost:5005")

@Erwinvandervalk Erwinvandervalk merged commit 62e6ffd into main Jun 3, 2025
39 checks passed
@Erwinvandervalk Erwinvandervalk deleted the ev/bff/v4-1 branch June 3, 2025 14:46
@Erwinvandervalk Erwinvandervalk added this to the bff-4.0.0 milestone Jun 5, 2025
@Erwinvandervalk Erwinvandervalk changed the title First attempt at BFF V4 Bff V4 multi-frontend support Jun 5, 2025
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