Skip to content

Add LFX V2 Mock Data Generator#1

Closed
bramwelt wants to merge 1 commit intomainfrom
bramwelt/initial-commit
Closed

Add LFX V2 Mock Data Generator#1
bramwelt wants to merge 1 commit intomainfrom
bramwelt/initial-commit

Conversation

@bramwelt
Copy link

This pull request introduces foundational improvements for the LFX V2 Mock Data Generator, focusing on project documentation, developer experience, and development workflows. The most important changes include the addition of comprehensive documentation (CLAUDE.md and an updated README.md), a sample environment configuration, a detailed Makefile for common tasks, and new GitHub Actions for CI and license compliance.

Documentation and Developer Experience

  • Added CLAUDE.md, a thorough technical guide for AI assistants and developers, explaining architecture, key concepts, YAML tags, template processing, reference resolution, error handling, and development workflows.
  • Major rewrite and expansion of README.md to provide user-focused instructions, feature overview, template syntax, troubleshooting, migration notes, and contribution guidelines.

Development Workflow and Tooling

  • Added a sample environment configuration file .env.example for local and Docker-based development, including mock server endpoints and API keys.
  • Introduced a new Makefile with targets for building, running, testing, dumping data, managing mock servers, and generating mock data, streamlining common development tasks.

Continuous Integration and Compliance

  • Added GitHub Actions workflow for running Go tests on push and pull requests (.github/workflows/test.yml).
  • Added GitHub Actions workflow for automated license header checks on relevant files (.github/workflows/license-header-check.yml).
  • Added LICENSE file with MIT license, clarifying project licensing and compliance.

Copilot AI review requested due to automatic review settings October 28, 2025 16:28
Copy link
Contributor

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

This PR introduces foundational infrastructure for the LFX V2 Mock Data Generator, establishing comprehensive documentation, development tooling, and local testing capabilities. The changes enable developers to generate hierarchical mock data for LFX V2 project APIs and Fine-Grained Authorization systems.

Key additions:

  • Complete implementation of Go-based mock data generator with template processing, JMESPath references, and HTTP request execution
  • Comprehensive documentation (README.md, CLAUDE.md) and sample templates for common use cases
  • Local mock server infrastructure for development and testing
  • CI/CD workflows for automated testing and license compliance
  • Development tooling via Makefile for common tasks

Reviewed Changes

Copilot reviewed 22 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
main.go, generator.go, generator_test.go Core mock data generator implementation with template processing, YAML parsing, and HTTP request execution
go.mod Go module dependencies including YAML parsing, templating, and JMESPath evaluation libraries
templates/*.yaml Sample YAML templates demonstrating project creation, nested hierarchies, and permission groups
mockserver/server.go, mockserver/go.mod, mockserver/Dockerfile HTTP mock server simulating Projects and FGA APIs for local testing
mockserver/README.md Detailed documentation for mock server setup, configuration, and troubleshooting
docker-compose.yml Docker Compose configuration for running Projects and FGA mock APIs with network aliases
README.md User-facing documentation covering installation, usage, template syntax, and migration notes
CLAUDE.md Technical documentation for AI assistants covering architecture, patterns, and development workflows
Makefile Build automation and common development tasks
LICENSE MIT license file
.env.example Sample environment configuration for local and Docker development
.github/workflows/*.yml CI workflows for tests and license header checks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


### Prerequisites

- Go 1.21 or later
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The Go version requirement in the mock server README (1.21) is inconsistent with the version specified in the root go.mod file (1.24.0). These should be aligned for consistency.

Suggested change
- Go 1.21 or later
- Go 1.24 or later

Copilot uses AI. Check for mistakes.
Implement Go-based mock data generator for LFX V2 projects with support
for YAML templates, JMESPath references, and playbook-driven API uploads.

Features:
- Go template processing with Sprig functions
- Custom YAML tags (!ref, !include) for references and file inclusion
- Retry logic for handling data dependencies
- Local mock server for testing
- Comprehensive test suite

Assisted by: [GitHub Copilot](https://github.com/features/copilot)
Generated with [Claude Code](https://claude.com/claude-code)

Issue: LFXV2-663
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
@bramwelt bramwelt force-pushed the bramwelt/initial-commit branch from 03c72f7 to d5aa32f Compare November 12, 2025 18:00
@emsearcy emsearcy closed this Nov 25, 2025
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

Comments