generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
MIGRATION PLAN: Morphir-Go Consolidation & Tooling Modernization
1. Overview
This document outlines the procedure to migrate Go tooling, CI/CD, and build scripts from the finos/morphir umbrella repository to finos/morphir-go. A primary goal is to preserve the complete git history while modernizing the build system by replacing Just with mise.
2. Scope of Migration
Source Assets (finos/morphir)
cmd/morphir/: The core Go CLI application.pkg/: All Go library packages (IR models, tooling, workspace).scripts/: Development and maintenance scripts.tests/bdd/: Behavioral testing suites..goreleaser.yaml: Distribution configuration..github/workflows/: Go-specific build/test/release actions.
Tooling Evolution
- Deprecate:
Justfile - Adopt:
mise.tomlandmisetasks for environment reproducibility and task orchestration.
3. History-Preserving Extraction
To ensure we do not lose the context of previous engineering efforts, use git-filter-repo to isolate the Go-specific history from the umbrella repo.
# Prepare a clean extraction
git clone https://github.com/finos/morphir.git morphir-extraction
cd morphir-extraction
# Filter for relevant paths only
git filter-repo \
--path cmd/morphir/ \
--path pkg/ \
--path scripts/ \
--path tests/bdd/ \
--path .github/workflows/ \
--path .goreleaser.yaml
# Rewrite import paths across history to reflect the new repository
git filter-repo --replace-text <(echo "github.com/finos/morphir==>github.com/finos/morphir-go")4. Environment & Task Configuration (mise)
Following the "immutable environment" philosophy, create a mise.toml in the root of morphir-go to manage tool versions and tasks.
mise.toml
[tools]
go = "1.23.5"
node = "20"
golangci-lint = "latest"
[env]
GO111MODULE = "on"
[tasks.build]
description = "Build the morphir-go CLI"
run = "go build -o bin/morphir ./cmd/morphir"
sources = ["cmd/**/*.go", "pkg/**/*.go"]
outputs = ["bin/morphir"]
[tasks.test]
description = "Execute all unit and BDD tests"
run = "go test ./..."
[tasks.lint]
description = "Run golangci-lint"
run = "golangci-lint run"
[tasks.ci]
description = "Full CI verification suite"
depends = ["lint", "test", "build"]5. Integration Steps
- Target Setup: In the existing
finos/morphir-gorepo, add the extracted source as a remote. - Merge:
git merge extraction/main --allow-unrelated-histories. - Refactor: Remove any existing
Justfileand replace it with themise.tomltasks. - CI Update: Update
.github/workflowsto usejdx/mise-actionfor environment setup.
6. Engineering Requirements
- Immutability: Ensure Go domain models (Sum/Product types) remain immutable and consistent across the move.
- Package Integrity: All package references must resolve to
github.com/finos/morphir-gopost-migration. - Testing: BDD tests must be fully operational via
mise run testto validate the IR logic integrity.
7. Definition of Done
- Git history for all Go assets preserved in
morphir-go. - All imports updated to
github.com/finos/morphir-go. -
Justfileremoved;misehandles all build tasks. - CI pipeline green on the new repository.
- Downstream
go installfor the CLI works via the new URL.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels