sentinel-golang icon indicating copy to clipboard operation
sentinel-golang copied to clipboard

Rule Manager: LoadRules API returns failed Rule list

Open louyuting opened this issue 4 years ago • 4 comments

Issue Description

Type: feature request

Describe what feature you want

func LoadRules(rules []*Rule) (bool, error)

Currently, LoadRule function will hide the failed rules(not valid or other reasons), maybe it doesn't make sense.

We might need to return failed rules.

The func signature is as below:

// LoadRules loads the given flow rules to the rule manager, while all previous rules will be replaced.
// First returned value(bool): whether occurs loading, if the rules is the same with current effective rules, return false, else return true.
// Second returned value(error): error when do load
// Third returned value([]*Rule): failed rule list
// If error isn't nil, the third returned value will be same with input params rules
func LoadRules(rules []*Rule) (bool, error, []*Rule) {
//......
}

Additional context

Add any other context or screenshots about the feature request here.

louyuting avatar Sep 09 '20 15:09 louyuting

can i try this pr?

xiaohanghang avatar Sep 11 '20 03:09 xiaohanghang

Sure~ Looking forward to seeing your PR~

louyuting avatar Sep 12 '20 19:09 louyuting

Hi @louyuting @sczyh30 , I am interested in this issue and hope I can make some contributions. May I know the release schedule on this request? I suppose there are about four rule-based checking modules(cb, flow, hotspot, system) along with UT cases and callers.

Thanks.

TimDu avatar Sep 22 '20 15:09 TimDu

It might schedule to Release 1.1 about on November. The Release 1.0 GA release is coming soon.

Discussion are welcome.

louyuting avatar Sep 27 '20 15:09 louyuting