Skip to content

Feature/upgrade fabrica 4 4#13

Merged
alexlovelltroy merged 10 commits into
mainfrom
feature/upgrade-fabrica-4-4
May 13, 2026
Merged

Feature/upgrade fabrica 4 4#13
alexlovelltroy merged 10 commits into
mainfrom
feature/upgrade-fabrica-4-4

Conversation

@alexlovelltroy
Copy link
Copy Markdown
Member

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

  • Added PATCH and status subresource operations for BMC, BootConfiguration, and Node resources, 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]
  • Introduced a reusable patchRequestBody helper function to standardize PATCH request body schemas across resources.
  • Registered new OpenAPI schemas for status subresources (BMCStatus, BootConfigurationStatus, NodeStatus) to support the new status endpoints. [1] [2] [3]
  • Added a /health endpoint to the OpenAPI spec for basic service health checks.

Build and Code Generation Workflow

  • Updated the code generation workflow: replaced the manual git diff check with a make generate-check target for improved reliability and maintainability in .github/workflows/codegen-check.yaml.
  • Enhanced the Makefile to support a --force flag for local fabrica usage, ensuring consistent code generation behavior in local and CI environments. [1] [2]

Dependency Updates

  • Updated go.mod to use Go version 1.26.3 and upgraded github.com/openchami/fabrica to v0.4.4 for improved features and compatibility.

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

For more info, see Contributing Guidelines.

alexlovelltroy and others added 8 commits May 11, 2026 07:44
…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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 PATCH and {uid}/status operations for BMC, BootConfiguration, and Node, 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

Comment thread pkg/client/client_generated.go
Comment thread cmd/server/openapi_generated.go
Comment on lines +864 to +872
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},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like something that needs to be addressed in Fabrica. Shall we open an issue?

Comment thread Makefile Outdated
Comment thread go.mod
Comment thread CHANGELOG.md Outdated
Comment thread pkg/client/client_generated.go Outdated
Comment thread cmd/client/main.go
Copy link
Copy Markdown
Contributor

@synackd synackd left a comment

Choose a reason for hiding this comment

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

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?

Comment thread .github/copilot-instructions.md
Comment thread cmd/client/main.go
Comment thread docs/AUTHENTICATION.md
Comment thread docs/CONFIGURATION.md Outdated
Comment thread docs/CONFIGURATION.md
Comment thread docs/PROFILES.md Outdated
Comment thread docs/PROFILES.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread config.example.yaml
…TICATION and PROFILES guides

Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Copy link
Copy Markdown
Contributor

@synackd synackd left a comment

Choose a reason for hiding this comment

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

LGTM. There's one Copilot review comment that remains open, but seems to be a Fabrica issue.

@alexlovelltroy alexlovelltroy merged commit 3a65e32 into main May 13, 2026
6 checks passed
@synackd synackd deleted the feature/upgrade-fabrica-4-4 branch May 14, 2026 15:04
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.

3 participants