Skip to content

feat: Implement frontend and backend for MangoBoost NTT support#6

Closed
han-minhee wants to merge 1 commit intoopiproject:mainfrom
han-minhee:feat--implement-NTT
Closed

feat: Implement frontend and backend for MangoBoost NTT support#6
han-minhee wants to merge 1 commit intoopiproject:mainfrom
han-minhee:feat--implement-NTT

Conversation

@han-minhee
Copy link
Contributor

This patch implements MangoBoost NTT support for OPI.

@han-minhee han-minhee requested a review from a team as a code owner May 19, 2025 05:35
@han-minhee han-minhee force-pushed the feat--implement-NTT branch 2 times, most recently from d598022 to 669ece6 Compare May 20, 2025 04:43
@han-minhee
Copy link
Contributor Author

han-minhee commented May 21, 2025

I'm looking into the lint error:
It's because of the capital letter at the subject

This patch implements MangoBoost NTT support for OPI.

Signed-off-by: Minhee Han <minhee.han@mangoboost.io>
@han-minhee han-minhee force-pushed the feat--implement-NTT branch from 669ece6 to 46c512c Compare May 21, 2025 13:48
Copy link

@artek-koltun artek-koltun left a comment

Choose a reason for hiding this comment

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

can you pls split for multiple commits? Would it make sense to have a separate commit for backend and for frontend? thanks

pb "github.com/opiproject/opi-api/storage/v1alpha1/gen/go"
)

func (s *Server) validateCreateNvmeSubsystemRequest(in *pb.CreateNvmeSubsystemRequest) error {

Choose a reason for hiding this comment

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

this one looks very similar to the one from opi-spdk-bridge. It is embedded into Server, right? Can we try try to re-use it instead of creating the copy?

Pls also check other places where we can re-use the existing methods

Copy link
Contributor Author

@han-minhee han-minhee May 21, 2025

Choose a reason for hiding this comment

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

I copied them into separate files for possible future implementations of validation for the custom parameters.
I guess it’s better to remove them as you suggested and maybe add separate validation functions later when needed.

I’ll be making (split) commits again soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, why would Linters give an error?
I can try to modify the .golangci.yml according to the error messages,
but shouldn’t it work right away since the .golangci.yml has almost the same structure as the one in the opi-spdk-bridge repository?

Thanks a lot!

 Error: Failed to run: Error: Command failed: /home/runner/golangci-lint-1.64.8-linux-amd64/golangci-lint config verify
jsonschema: "run" does not validate with "/properties/run/type": got null, want object
jsonschema: "output.formats" does not validate with "/properties/output/properties/formats/type": got string, want array
Failed executing command with error: the configuration contains invalid elements
, Error: Command failed: /home/runner/golangci-lint-1.64.8-linux-amd64/golangci-lint config verify
jsonschema: "run" does not validate with "/properties/run/type": got null, want object
jsonschema: "output.formats" does not validate with "/properties/output/properties/formats/type": got string, want array
Failed executing command with error: the configuration contains invalid elements

    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)
Error: Command failed: /home/runner/golangci-lint-1.64.8-linux-amd64/golangci-lint config verify
jsonschema: "run" does not validate with "/properties/run/type": got null, want object
jsonschema: "output.formats" does not validate with "/properties/output/properties/formats/type": got string, want array
Failed executing command with error: the configuration contains invalid elements

Choose a reason for hiding this comment

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

opi-spdk-bridge pinned the used version of the linter here to v1.55.2
But in the mangoboost bridge, it is not, and v1.64.8 was used.
Thus, pls pin the version in go.mod

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh that was the reason. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@artek-koltun I realized that validation methods like validateCreateNvmeSubsystemRequest in the opi-spdk-bridge are not accessible from opi-mangoboost-bridge. Maybe that was the reason they were also included in another vendor's bridge?

Would there be any other way than just copying those methods?

@han-minhee han-minhee closed this Jun 20, 2025
@han-minhee han-minhee deleted the feat--implement-NTT branch July 1, 2025 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants