Skip to content

Conversation

@robocanic
Copy link
Contributor

Please provide a description of this PR:
Using memory to support ResourceStore. Ref: #1308

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • Docs
  • Installation
  • User Experience
  • Dubboctl
  • Console
  • Core Component

Please check any characteristics that apply to this pull request.

@robocanic robocanic requested a review from Copilot September 27, 2025 07:13
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

Introduces a memory-based implementation of the ResourceStore interface to support in-memory resource storage for the Dubbo Admin project. This allows the application to use memory as a store backend instead of requiring external databases.

  • Implements a complete memory-based ResourceStore using Kubernetes client-go cache mechanisms
  • Refactors error handling by renaming the errors package to bizerror to avoid conflicts
  • Updates store interface to use string type for index values instead of interface{}

Reviewed Changes

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

Show a summary per file
File Description
pkg/store/memory/store.go Core implementation of memory-based resource store
pkg/store/memory/store_test.go Comprehensive test suite for memory store functionality
pkg/store/memory/factory.go Factory implementation for creating memory stores
pkg/core/store/store.go Interface updates to support new GetByKeys method and string-typed indexes
pkg/common/bizerror/common.go Package renamed from errors to bizerror
Multiple files Updated imports and method signatures to use bizerror and string-typed indexes
app/dubbo-admin/dubbo-admin.yaml Configuration updated to use memory store type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@robocanic robocanic requested a review from Copilot September 27, 2025 07:43
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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ctx.ResourceManager(),
meshresource.DynamicConfigKind,
map[string]interface{}{
map[string]string{

Choose a reason for hiding this comment

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

没觉得这个改动有多大意义

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个是因为client go 的index接口中使用的是string类型,在上层将interface改为string有助于上层使用索引时知道这个特性

@robocanic robocanic requested a review from Copilot October 11, 2025 13:41
@sonarqubecloud
Copy link

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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

pkg/store/memory/store_test.go:1

  • [nitpick] Use total-- instead of total -= 1 for consistency with Go idioms when decrementing by one.
/*

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@AlexStocks AlexStocks merged commit 90fdfc2 into apache:develop Oct 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants