Feature/upgrade fabrica 4 4#13
Conversation
…ecks Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…ation, and Node resources Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Addresses Issue Building local docker containers with make docker-build is broken Fixes #8 Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…on logic for BMC, BootConfiguration, and Node handlers Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…n and /docs endpoints Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
… health command Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…pecification Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
- Revised the PROFILES.md documentation to clarify boot profile behaviors, including the distinction between requested profiles and the default profile. - Updated examples for creating boot configurations and outlined the selection algorithm for boot scripts. - Incremented the version of the 'fabrica' dependency from v0.4.4 to v0.4.5 in go.mod and updated the corresponding entries in go.sum. Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
There was a problem hiding this comment.
Pull request overview
Upgrades the Fabrica-generated Boot Service surfaces and supporting workflows/docs, adding Kubernetes-style PATCH and /status subresource operations, plus documenting and exposing service endpoints like /health, /openapi.json, and /docs.
Changes:
- Regenerates server/client/OpenAPI outputs to add
PATCHand{uid}/statusoperations forBMC,BootConfiguration, andNode, plus OpenAPI entries for/health,/openapi.json, and/docs. - Updates build/codegen workflow (
make generate-check, Makefile local Fabrica support, Docker build args). - Refreshes repository docs/config examples and adds an initial
CHANGELOG.md.
Reviewed changes
Copilot reviewed 12 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates repo overview, runtime behavior notes, and developer workflow docs. |
| pkg/client/client_generated.go | Adds client health support and regenerates client outputs. |
| Makefile | Adds Docker Go version derivation, local Fabrica --force, and improves docker-build args. |
| go.mod | Bumps Go version and upgrades Fabrica dependency. |
| go.sum | Updates dependency checksums for the Fabrica upgrade. |
| docs/PROFILES.md | Rewrites profile docs to reflect current controller vs legacy endpoint behavior. |
| docs/CONFIGURATION.md | Aligns configuration docs with keys actually consumed by cmd/server/main.go. |
| docs/AUTHENTICATION.md | Clarifies package-level auth vs current server runtime auth wiring. |
| docs/AUTHENTICATION_TESTING.md | Updates auth testing docs to match current pkg/auth test helpers and scope. |
| docs/API.md | Adds concise API surface reference (public/modern/legacy/client). |
| config.example.yaml | Aligns example config to runtime-parsed keys and current behavior notes. |
| cmd/server/openapi_generated.go | Extends generated OpenAPI spec with PATCH/status operations and service endpoints. |
| cmd/server/node_handlers_generated.go | Regenerates Node handlers with PATCH/status and validation hooks. |
| cmd/server/bootconfiguration_handlers_generated.go | Regenerates BootConfiguration handlers with PATCH/status and validation hooks. |
| cmd/server/bmc_handlers_generated.go | Regenerates BMC handlers with PATCH/status and validation hooks. |
| cmd/client/main.go | Adds client health command and regenerates CLI. |
| CHANGELOG.md | Introduces changelog with unreleased changes summary. |
| .github/workflows/golangci-lint.yaml | Minor whitespace cleanup. |
| .github/workflows/codegen-check.yaml | Switches codegen drift verification to make generate-check. |
| .github/copilot-instructions.md | Updates contributor instructions to match current runtime/codegen behavior. |
Files not reviewed (6)
- cmd/client/main.go: Language not supported
- cmd/server/bmc_handlers_generated.go: Language not supported
- cmd/server/bootconfiguration_handlers_generated.go: Language not supported
- cmd/server/node_handlers_generated.go: Language not supported
- cmd/server/openapi_generated.go: Language not supported
- pkg/client/client_generated.go: Language not supported
| patchSchema := &openapi3.SchemaRef{Value: openapi3.NewObjectSchema()} | ||
| return &openapi3.RequestBodyRef{ | ||
| Value: &openapi3.RequestBody{ | ||
| Required: true, | ||
| Content: openapi3.Content{ | ||
| "application/merge-patch+json": &openapi3.MediaType{Schema: patchSchema}, | ||
| "application/json-patch+json": &openapi3.MediaType{Schema: patchSchema}, | ||
| "application/shorthand-patch": &openapi3.MediaType{Schema: patchSchema}, | ||
| "application/json": &openapi3.MediaType{Schema: patchSchema}, |
There was a problem hiding this comment.
This looks like something that needs to be addressed in Fabrica. Shall we open an issue?
synackd
left a comment
There was a problem hiding this comment.
Initial review. My comments are mainly focused on documentation since that is what changed the most.
Not in the scope of this PR, but I noticed that the term "HSM" is being used instead of "SMD". Is this what we're using across services?
…TICATION and PROFILES guides Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
synackd
left a comment
There was a problem hiding this comment.
LGTM. There's one Copilot review comment that remains open, but seems to be a Fabrica issue.
Description
This pull request introduces several enhancements to the OpenAPI specification generation, adds support for PATCH and status subresource operations for key resources, and improves the code generation workflow. The most important changes are summarized below.
OpenAPI Spec Generation Enhancements
BMC,BootConfiguration, andNoderesources, including new endpoints for partial updates and status-only updates. This brings the API closer to Kubernetes-style resource management and improves client flexibility. [1] [2] [3] [4] [5] [6]patchRequestBodyhelper function to standardize PATCH request body schemas across resources.BMCStatus,BootConfigurationStatus,NodeStatus) to support the new status endpoints. [1] [2] [3]/healthendpoint to the OpenAPI spec for basic service health checks.Build and Code Generation Workflow
make generate-checktarget for improved reliability and maintainability in.github/workflows/codegen-check.yaml.Makefileto support a--forceflag for localfabricausage, ensuring consistent code generation behavior in local and CI environments. [1] [2]Dependency Updates
go.modto use Go version 1.26.3 and upgradedgithub.com/openchami/fabricato v0.4.4 for improved features and compatibility.Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryType of Change
For more info, see Contributing Guidelines.