Skip to content

E0-F1-S1-T1: Create git-repo Makefile Structure#53

Closed
matt-dresden-caylent wants to merge 6 commits intoGerritCodeReview:mainfrom
caylent-solutions:backlog/e0-f1-s1-t1
Closed

E0-F1-S1-T1: Create git-repo Makefile Structure#53
matt-dresden-caylent wants to merge 6 commits intoGerritCodeReview:mainfrom
caylent-solutions:backlog/e0-f1-s1-t1

Conversation

@matt-dresden-caylent
Copy link

Summary

  • Replaces tox-based Makefile with spec-compliant structure using bash shell and -euo pipefail
  • All required .PHONY targets: help, lint, format, format-check, check, test, test-unit, test-functional, validate, clean
  • Placeholder targets fail-fast with non-zero exit and actionable error messages
  • Correct dependency chains: validate->check+test, check->lint+format-check
  • Updated CAYLENT-README.md and SUBMITTING_PATCHES.md with make target documentation
  • Added unit/functional pytest markers to pyproject.toml with pythonpath config
  • 10 unit tests verifying Makefile structure, syntax, dependencies, and fail-fast behavior

Test plan

  • All 10 tests in tests/test_makefile_structure.py pass
  • make help prints all targets with descriptions
  • make clean removes all cache directories
  • Placeholder targets exit non-zero with ERROR message to stderr
  • All 4 judge reviews passed (code_review, test_review, doc_review, changes_manifest)

feat: Add CPM support with envsubst command and development tooling

Adds CPM (Caylent Project Manager) support to git-repo with environment
variable substitution in manifests, comprehensive development tooling, and
test infrastructure improvements.

New Features:
- envsubst command: New `repo envsubst` subcommand for environment variable
  substitution in XML manifests
  - Supports ${ENVVAR} syntax in manifest files
  - Recursively processes all XML files in .repo/manifests/**/*.xml
  - Creates .bak backup files before modification
  - Comprehensive test coverage (237 test cases)

Repository Configuration:
- Updated REPO_URL to https://github.com/caylent-solutions/git-repo
- Updated BUG_URL to GitHub issues
- REPO_REV now lazy-loads latest caylent-* tag from GitHub API
- Added repo script to setup.py for proper installation

Development Environment:
- Devcontainer: Full VSCode devcontainer setup with all dependencies
- Makefile: Common tasks (test, lint, format, coverage, pre-commit)
- Git Hooks: Pre-push validation runs format, lint, and tests
- .tool-versions: Version pinning for pre-commit (4.0.1) and python (3.12.9)
- requirements-dev.txt: Development dependencies (tox, pytest, black, flake8, isort)

Cleanup:
- Removed all man pages (27 files, 3,282 lines deleted)
- Removed manpage generation scripts
- Removed Python 3.8 test runner (Python 3.12 only)
- Removed .coverage file from repository

Bug Fixes:
- Fixed file copy error handling in project.py (OSError → IOError)
- Removed unnecessary chmod operations on copied files
- Added REPO_REV environment variable to tests to prevent network calls

Testing:
- All 287 tests passing
- Added envsubst test suite with edge case coverage
- Simplified tox.ini to Python 3.12 only
- Tests now run without network dependencies

Files Changed:
- Added (10 files): devcontainer config, Makefile, git hooks, envsubst
  command/tests, requirements-dev.txt
- Modified (11 files): repo, project.py, pyproject.toml, tox.ini, run_tests,
  setup.py, .gitignore, .flake8, .isort.cfg, .tool-versions
- Deleted (30 files): All man pages, manpage generation scripts, .coverage
* fix: repo download

* Fix import order in repo file
…instructions

- Add Caylent fork notice to main README.md
- Create comprehensive CAYLENT-README.md with installation and usage
- Add one-liner to auto-fetch and install latest tag
- Document --no-repo-verify requirement until GPG signing is added
- Include uninstall instructions
- Reduce server_ready.wait timeout from 120s to 5s
- Reduce thread join timeout from 5s to 2s
- Add check for alive thread after join
- Prevents intermittent test hangs during git push hooks
Replaces tox-based Makefile with spec-compliant structure:
- SHELL := /bin/bash with -euo pipefail
- All required .PHONY targets: help, lint, format, format-check, check,
  test, test-unit, test-functional, validate, clean
- Placeholder targets fail-fast with non-zero exit and error message
- validate depends on check + test; check depends on lint + format-check
- clean removes __pycache__, .pytest_cache, .ruff_cache, htmlcov, .coverage
- Updated SUBMITTING_PATCHES.md and CAYLENT-README.md with make targets
- Added unit/functional pytest markers to pyproject.toml
- 10 unit tests verifying Makefile structure and behavior
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Thanks for your contribution! Unfortunately, we don't use GitHub pull requests to manage code contributions to this repository. Instead, please see README.md which provides full instructions on how to get involved.

@google-cla
Copy link

google-cla bot commented Mar 5, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot closed this Mar 5, 2026
@matt-dresden-caylent matt-dresden-caylent deleted the backlog/e0-f1-s1-t1 branch March 5, 2026 03:05
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.

1 participant