Skip to content

[Bug] sc.EventString() function will encounter nil pointer crash in some cases; #421

@ztonny

Description

@ztonny

Search before asking

  • I had searched in the issues and found no similar issues.

Version

25.5.3

What's Wrong?

in pkg/controller/sub_controller/disaggregated_cluster/computegroups/controller.go line 92

klog.Errorf("disaggregatedComputeGroupsController computeGroups sync failed, compute group Uniqueid %s sync failed, err=%s", cgs[i].UniqueId, sc.EventString(event))

sc.EventString() will encounter nil pointer crash in some cases, e.g. if event is nil but err is not nil when returned by dcgs.computeGroupSync(ctx, ddc, &cgs[i]) in line 87;

I think should change sc.EventString() to err.Error().

What You Expected?

will not happen nil pointer error

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions