Skip to content

[Misc] Fix staticcheck findings under pkg/#558

Merged
pallasathena92 merged 1 commit into
mainfrom
weiwei-dev
Apr 6, 2026
Merged

[Misc] Fix staticcheck findings under pkg/#558
pallasathena92 merged 1 commit into
mainfrom
weiwei-dev

Conversation

@heymrbox
Copy link
Copy Markdown
Collaborator

@heymrbox heymrbox commented Apr 3, 2026

What this PR does

Fix static analysis issues in pkg/

Why we need it

staticcheck reports multiple issues under pkg/.

Fixes #556

How to test

make test

Checklist

  • Tests added/updated (if applicable)
  • Docs updated (if applicable)
  • make test passes locally

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added auth Authentication and authorization changes runtime Runtime configuration changes models Model configuration changes storage Storage provider changes inferenceservice InferenceService controller changes model-agent Model agent changes autoscaling Autoscaling (HPA/KEDA) changes controller Controller changes accelerator Accelerator class changes ingress Ingress/networking changes tests Test changes dependencies Dependency updates labels Apr 3, 2026
}

// buildS3URI constructs an S3 URI from bucket and key
func buildS3URI(bucket, key string) string {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we delete this because we didn't use it?
we don't have download from s3 and gcp for now, but we will keep this helper function for others use s3 and gcp.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good call, restored them

}

// Check model format
if format.ModelFormat != nil && &model.ModelFormat != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just remove &model.ModelFormat != nil

Comment thread go.sum Outdated
cloud.google.com/go/auth v0.16.1/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI=
cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
cloud.google.com/go/automl v1.14.4/go.mod h1:sVfsJ+g46y7QiQXpVs9nZ/h8ntdujHm5xhjHW32b3n4=
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would you try to tidy go sum here

@pallasathena92 pallasathena92 merged commit df0bfca into main Apr 6, 2026
29 checks passed
@pallasathena92 pallasathena92 deleted the weiwei-dev branch April 6, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accelerator Accelerator class changes auth Authentication and authorization changes autoscaling Autoscaling (HPA/KEDA) changes controller Controller changes dependencies Dependency updates inferenceservice InferenceService controller changes ingress Ingress/networking changes model-agent Model agent changes models Model configuration changes runtime Runtime configuration changes storage Storage provider changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix staticcheck findings in pkg/controller

2 participants