-
Notifications
You must be signed in to change notification settings - Fork 5
Merge CSM SMD head to OpenCHAMI #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CASMHMS-6084
Fix case for the Arch enum in the swagger spec
CASMTRIAGE-5914
Fix HSN NIC numbering
CASMHMS-6073: Migrate HSM to hms-base v2 and hms-xname.
CASMHMS-6073 part2
Change FRU history to create 'Detected' events after 'Removed' events
Add ability to determine arch for paradise nodes (1.6 changes) CASMHMS-6130
CASMHMS-6150
CASMHMS-6199
(cherry picked from commit a96ea6763a97267cdbf53a41f1508cde23a6ee37)
CASMHMS-5838: Fix bugs that break component role/subrole bulk updates
…event is received CASMHMS-6219
…FPGA" CASMTRIAGE-7079
…ndpoint read over redfish CASMHMS-6233
… during discovery CASMHMS-6140
…pipeline CAST-36629
CASMHMS-6324
…ts (#167) CASMHMS-6363
* Updated image and module dependencies for security updates * Updated tests to look for 404 codes instead of 405 code due to gorilla/mux update * Resolved build warnings in Dockerfiles and docker compose files * Added image-pprof Makefile support * Internal tracking Jira: CASMHMS-5678
* Update module dependencies related to hms-certs * Updated vault override variables due to hms-certs update * Internal tracking ticket: CASMHMS-5678
* Updated test_components test to allow additional flag values Updated error message * Updated test file with new error message and test
* Fixed false positive ComponentEndpoints test failure * Internal tracking ticket: CASMTRIAGE-8027
* Updated module and image dependencies to latest versions * Update version of Go to v1.24 * Removed several sections of code code that's now redundant with the latest hms-base module * Fixed various issues associated with upgrading Go to v1.24 * Internal tracking tickets: CASMHMS-6482, CASMHMS-6401, CASMHMS-6402
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR merges changes from CSM’s SMD head into OpenCHAMI. Key changes include fixing resource leaks by ensuring HTTP responses and request bodies are properly closed, switching from the legacy base API to the new xnametypes API, adding support for pprof profiling, and enhancing error message details and test expectations.
Reviewed Changes
Copilot reviewed 82 out of 82 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
cmd/smd/*.go | Updated API calls to use xnametypes; added calls to DrainAndCloseRequestBody for proper resource finalization |
cmd/smd/routers.go | Integrated pprof handlers registration based on build tags |
cmd/smd/rfevent.go | Revised logging and added Foxconn Paradise node support |
cmd/smd-api_test.go | Updated test expectations to match revised error messages |
Makefile & Dockerfile | Updated build tags and version details to support go 1.24 and pprof support |
@@ -281,6 +283,8 @@ func compGetLockFltrToCompLockV2Filter(cglf CompGetLockFltr) (clf sm.CompLockV2F | |||
|
|||
// Get the readiness state of HSM | |||
func (s *SmD) doReadyGet(w http.ResponseWriter, r *http.Request) { | |||
defer base.DrainAndCloseRequestBody(r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The repeated use of 'defer base.DrainAndCloseRequestBody(r)' in many handlers suggests that this logic could be centralized in middleware. Moving this responsibility to a common middleware function would reduce code duplication and the risk of missing a handler.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on lots of successful testing.
This merges the HEAD of CSM SMD into OpenCHAMI.
The changes are>
Hopefully this is the last big PR merging changes in from CSM. In the future as changes go into CSM they can also be added to OpenCHAMI.
This PR includes all the changes that happened in CSM since SMD was forked for OpenCHAMI.