Skip to content

[serve] Wrapper classes may obscure original Deployment metadata (e.g. __name__) #58240

@harshit-anyscale

Description

@harshit-anyscale

Problem Statement
Throughout the Ray Serve codebase, we create various wrapper classes(like ASGIIngressWrapper, TaskConsumerWrapper, etc.) around the user-defined Deployment class . When these wrappers are created, they have their own metadata properties like name, module, and doc.

If we are not careful, downstream logic in ray-serve might introspect the wrapper class for this metadata instead of the original user-defined class. This can lead to unintentional behavior and confusing outcomes for the user.

Expected Behavior
Ray Serve should always prioritize and use the metadata ( name, module, doc, etc.) from the original, user-defined Deployment class. Our internal wrapper classes should be transparent and correctly propagate the original class's metadata.

Action Required
This issue is to track an audit and verification of our internal wrapper class patterns. We need to:

  1. Identify all places in ray-serve where we create a wrapper class (or function) on top of a user's Deployment class.
  2. Verify that for each wrapper, the critical metadata (name, module, doc, etc...) from the original class is correctly transferred to, or preserved on, the wrapper.
  3. Fix any instances where the wrapper's metadata is used instead of the user's.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueGreat starter issue for someone just starting to contribute to RayserveRay Serve Related Issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions