Skip to content

Feature Development: Changes to the BFF Architecture - #50

Merged
kubeedge-bot merged 7 commits into
kubeedge:mainfrom
DoisLONG:main
Jun 17, 2025
Merged

kubeedge-bot merged 7 commits into
kubeedge:mainfrom
DoisLONG:main

Conversation

@DoisLONG

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Introduced a BFF layer to optimize frontend-backend communication structure, enhancing data processing capabilities and system maintainability.

Which issue(s) this PR fixes:

Fixes #37

Special notes for your reviewer:

This PR only includes the base structure and example interfaces.

Does this PR introduce a user-facing change?:

NONE


@kubeedge-bot kubeedge-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 13, 2025
@kubeedge-bot kubeedge-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 13, 2025
@DoisLONG DoisLONG closed this Apr 14, 2025
@kubeedge-bot kubeedge-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 14, 2025
@DoisLONG DoisLONG reopened this Apr 14, 2025
@kubeedge-bot kubeedge-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 14, 2025
@DoisLONG DoisLONG changed the title Feature Development: Changes to the BFF Architecture [WIP]Feature Development: Changes to the BFF Architecture Apr 14, 2025
@kubeedge-bot kubeedge-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 14, 2025
Signed-off-by: udde <udde@163.com>
Signed-off-by: DoisLONG <15221580643@163.com>
DoisLONG added 2 commits May 20, 2025 18:43
Signed-off-by: DoisLONG <15221580643@163.com>
Signed-off-by: DoisLONG <15221580643@163.com>
@DoisLONG DoisLONG changed the title [WIP]Feature Development: Changes to the BFF Architecture Feature Development: Changes to the BFF Architecture May 26, 2025
@kubeedge-bot kubeedge-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 26, 2025
Signed-off-by: DoisLONG <15221580643@163.com>
Comment thread modules/api/main.go
@@ -0,0 +1,47 @@
package main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread modules/api/main.go Outdated
"github.com/kubeedge/dashboard/api/pkg/args"
"github.com/kubeedge/dashboard/api/pkg/handler"
"github.com/kubeedge/dashboard/client"
"k8s.io/klog/v2"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

import need be sorted in three segments: standard lib, third-party lib, project lib.

Signed-off-by: DoisLONG <15221580643@163.com>
Comment thread modules/api/go.mod
Comment on lines +6 to +9
github.com/emicklei/go-restful/v3 v3.12.2
github.com/kubeedge/api v1.20.0
github.com/kubeedge/dashboard/errors v0.0.0-00010101000000-000000000000
github.com/kubeedge/dashboard/client v0.0.0-00010101000000-000000000000

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.

Is there something wrong with the format here?

Comment thread modules/api/pkg/handler/device.go Outdated
Comment on lines +69 to +75
kubeedgeClient, err := client.KubeEdgeClient(request.Request)
if err != nil {
errors.HandleInternalError(response, err)
return
}

namespace := request.PathParameter("namespace")

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.

This part of the code seems to always appear repeatedly. Can it be abstracted into a function and called multiple times?

Comment thread modules/api/pkg/handler/devicemodel.go Outdated
Comment on lines +69 to +75
kubeedgeClient, err := client.KubeEdgeClient(request.Request)
if err != nil {
errors.HandleInternalError(response, err)
return
}

namespace := request.PathParameter("namespace")

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.

ditto

)

func GetVersion(client k8sClient.Interface) (*version.Info, error) {
klog.V(4).Infof("Getting kubernetes version")

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.

Suggested change
klog.V(4).Infof("Getting kubernetes version")
klog.V(4).Info("Getting kubernetes version")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review! I’ve updated the code according to your suggestions.

Signed-off-by: DoisLONG <15221580643@163.com>
@wbc6080

wbc6080 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 16, 2025

@Shelley-BaoYue Shelley-BaoYue left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/approve

@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Shelley-BaoYue

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 17, 2025
@kubeedge-bot
kubeedge-bot merged commit 9b15dde into kubeedge:main Jun 17, 2025
fengjunkang pushed a commit to fengjunkang/dashboard that referenced this pull request Sep 18, 2025
Feature Development: Changes to the BFF  Architecture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KubeEdge Dashboard Enhancement - BFF

4 participants