Skip to content

Feature/upgrade fabrica#8

Merged
alexlovelltroy merged 25 commits into
mainfrom
feature/upgrade-fabrica
May 14, 2026
Merged

Feature/upgrade fabrica#8
alexlovelltroy merged 25 commits into
mainfrom
feature/upgrade-fabrica

Conversation

@alexlovelltroy
Copy link
Copy Markdown
Member

Description

This pull request introduces significant improvements to the project’s structure, developer workflow, and documentation to better align with the Fabrica framework and modernize the codebase. The changes include the addition of new configuration files, Makefile enhancements for code generation, updates to documentation and developer instructions, improved support for authentication in the CLI, and a refactor of the server’s WireGuard integration.

Key changes:

Fabrica Integration & Configuration

  • Added .fabrica.yaml and apis.yaml to define project metadata, enabled features, and resource groups/types for Fabrica-based code generation. [1] [2]
  • Updated Makefile to add generate and generate-check targets for Fabrica code generation, supporting both released and local Fabrica builds. [1] [2]
  • Updated all generated Go files to reference the new code generation workflow and copyright year. [1] [2] [3] [4] [5] [6] [7]

Documentation & Developer Experience

  • Updated documentation (README.md, .github/copilot-instructions.md, CLOUDINIT.md) to reflect new resource locations (apis/cloud-init.openchami.io/v1/), code generation steps, and WireGuard integration patterns. [1] [2] [3] [4] [5] [6] [7]
  • Clarified and centralized instructions for adding new resources, running tests, and regenerating code using Fabrica. [1] [2]

CLI Improvements

  • Added support for a JWT bearer token via the --token flag and CLOUD_INIT_TOKEN environment variable in the CLI, enabling future authentication support. [1] [2] [3] [4]

Server Refactoring

  • Refactored server initialization to move WireGuard integration into a single function (registerCustomServerIntegrations), improving maintainability and modularity. [1] [2] [3]
  • Updated references to generated code and removed direct dependencies on the old resource paths. [1] [2]

Miscellaneous

  • Improved Makefile clean target to also clear Go build cache.
  • Updated comments and instructions in generated files to match new workflow. [1] [2] [3] [4] [5] [6] [7] [8]

These changes modernize the project, streamline developer workflows, and set the foundation for future enhancements, especially around code generation and authentication support.

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 6 commits April 26, 2026 11:16
Fix .gitignore which was overly broad with yaml files

Re-Generate

Update Makefile

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…rce models

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
… output

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
@alexlovelltroy alexlovelltroy force-pushed the feature/upgrade-fabrica branch from 463b9d3 to bab3634 Compare April 26, 2026 09:17
alexlovelltroy and others added 18 commits April 28, 2026 15:13
…sions

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…ustom OpenAPI extension support

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
- Introduced a new GitHub Actions workflow for Scorecard supply-chain security analysis.
- Configured to run on branch protection rule and scheduled weekly.
- Added permissions for security events and ID token for result publishing.
- Implemented steps for code checkout, analysis execution, and result uploads.

chore: Update .gitignore to include workflow files

- Modified .gitignore to ensure workflow YAML files are not ignored.

docs: Update LEGACY_COMPATIBILITY.md with copyright and license information

- Added SPDX copyright and license information to the legacy compatibility document.

feat: Add CC0 1.0 Universal license file

- Included CC0 1.0 Universal license text in LICENSES directory.

build: Update Makefile for local Fabrica binary support

- Enhanced Makefile to allow specifying a local Fabrica binary path.
- Updated generate and generate-check targets to reflect local binary usage.

refactor: Rename project from cloud-init to metadata-service

- Updated all references in code and documentation to reflect the new project name.
- Adjusted import paths, CLI commands, and configuration file names accordingly.

fix: Update server routes and handlers for new package structure

- Refactored server routes and handlers to use the new metadata-service package structure.
- Ensured all imports and function calls are updated to match the new naming conventions.

test: Update integration tests for metadata-service

- Modified integration tests to align with the new project structure and naming.
- Ensured all test cases are updated to reflect the new API and service names.

chore: Update go.mod and go.sum for dependency management

- Changed module name in go.mod to github.com/OpenCHAMI/metadata-service.
- Updated dependencies to the latest versions and removed obsolete replacements.

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…liasing

feat: Add mock SMD fixture and loading function for testing
test: Create HTTP client tests for fallback IP and MAC address retrieval

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…d tests

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…onality

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…entries

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…linting setup

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
… with build instructions

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…nt in Docker setup

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…ion in handlers

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…ce health status

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…th command for service status

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…d example

Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
- Added functions to retrieve the latest ClusterDefaults, InstanceInfo, and Group resources based on their updated timestamps.
- Updated GetClusterDefaults, GetInstanceInfo, and GetGroupData methods to utilize the new retrieval functions.
- Introduced a new test file for comprehensive testing of the StorageAdapter methods, ensuring correct retrieval of the latest resources.
- Updated OpenAPI generation comments for clarity and accuracy.
- Registered resource prefixes in the server integration setup.
- Refactored example scripts to improve usability and clarity, including updates to the demo and quick-test scripts.
- Updated go.mod to use the latest version of the fabrica package.

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

@travisbcotton travisbcotton left a comment

Choose a reason for hiding this comment

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

As far as I can tell this is good to go.

…mation

Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
@alexlovelltroy alexlovelltroy merged commit f06889a into main May 14, 2026
8 checks passed
@synackd synackd deleted the feature/upgrade-fabrica 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.

2 participants