Coder Social home page Coder Social logo

Comments (8)

cyrnicolase avatar cyrnicolase commented on May 24, 2024 1

Thank you very much!

from easegress.

suchen-sci avatar suchen-sci commented on May 24, 2024

copy that, i will try to find out what happens.

from easegress.

suchen-sci avatar suchen-sci commented on May 24, 2024
func (e *Echo) Name() string {
	return e.spec.Name()
}

There is a bug when generate code. Name() method should return name of spec.

from easegress.

cyrnicolase avatar cyrnicolase commented on May 24, 2024

It works.

The error message is not clear. Is there any way i can clearly understand the cause of the error ?

from easegress.

suchen-sci avatar suchen-sci commented on May 24, 2024
p.filters[filter.Name()] = filter

https://github.com/megaease/easegress/blob/main/pkg/object/pipeline/pipeline.go#L292

In flow, the filter name is echo. But in pipeline, the name became Echo. So when do handle, pipeline gets a nil. And a call Handle to nil causes the panic.

I will make a pr to fix the bug and also add some integration tests to make sure the kind of error never happen again!

from easegress.

cyrnicolase avatar cyrnicolase commented on May 24, 2024

Sorry , I reopen this issue. I still have a question . As I mentioned above, may I know more accurate error information, not like this:

图片

I can know which filter , where is the bug.

from easegress.

suchen-sci avatar suchen-sci commented on May 24, 2024

This is a little embarrassing for me.
Usually, Easegress prints error message when meet an error, used for users to debug. For example, for proxy filter, the backend is not exist, or an invalid spec.

In this case, this panic caused by a bug of egbuilder, I am afraid that we usually don't have error messages for a bug. Bug is not want we want, it always happens in an unexpected way. If we know there may be a bug, then we fix it before it cause a problem. So I actually do some diggings to find where cause the problem.

Here is what I do to find this bug, first I update the pipeline yaml, make it only contains one filter of proxy, then I find it works as expected. So, the bug happens in the new filter. Then I do some print in pipeline.go to find why I success to create it but fail to use it. Then I find the problem...

easegress-server expects filter.Name() return same value of spec.Name(). And it is true. The problem caused by egbuilder, it makes a mistake when generates the code.

from easegress.

cyrnicolase avatar cyrnicolase commented on May 24, 2024

thanks, I get it

from easegress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.