Skip to content

Rebrand AIAdvisor to MigrationCompanion and integrate into Gradle build system#2686

Draft
AndreKurait wants to merge 19 commits intoopensearch-project:mainfrom
AndreKurait:migration-companion-scaffolding
Draft

Rebrand AIAdvisor to MigrationCompanion and integrate into Gradle build system#2686
AndreKurait wants to merge 19 commits intoopensearch-project:mainfrom
AndreKurait:migration-companion-scaffolding

Conversation

@AndreKurait
Copy link
Copy Markdown
Member

Description

Rebrands the AIAdvisor directory to MigrationCompanion and fully integrates it into the project's Gradle build system and Docker image pipeline.

Changes

Rebrand AIAdvisor → MigrationCompanion

  • Rename AIAdvisor/ directory to MigrationCompanion/
  • Update all CI workflow references in .github/workflows/CI.yml

Unified Docker image

  • Combine the opensearch-pricing-calculator (Go) and solr-opensearch-migration-advisor (Python) into a single migration_companion Docker image
  • Multi-stage Dockerfile: Go binary compiled in stage 1, Python skill pip-installed in stage 2
  • Fix GOARCH to use TARGETARCH for buildx multi-platform builds (amd64/arm64)
  • Remove standalone build.sh and setup/docker/claude/ scripts

Gradle integration

  • Register MigrationCompanion as a Gradle subproject with goTest and pythonTest tasks wired into check
  • Add migrationCompanion buildKit entry in buildImages/build.gradle with syncVersionFile dependency
  • Image builds via ./gradlew buildKit_migrationCompanion (multi-arch) or _amd64/_arm64 variants

Version alignment

  • Remove hardcoded version from pyproject.toml; use dynamic versioning from root VERSION file
  • syncVersionFile_migrationCompanion stages VERSION into Docker context following project conventions

Testing

  • ./gradlew :MigrationCompanion:check — runs both Go and Python tests
  • ./gradlew :MigrationCompanion:goTest — Go tests only
  • ./gradlew :MigrationCompanion:pythonTest — Python tests only
  • CI matrix entry for MigrationCompanion/skills/solr-opensearch-migration-advisor unchanged

- Rename AIAdvisor/ directory to MigrationCompanion/
- Update all CI workflow references from AIAdvisor to MigrationCompanion
- Replace hardcoded GOARCH=amd64 with ARG TARGETARCH for multi-platform
  Docker buildx builds (amd64/arm64)

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
- Delete standalone build.sh (replaced by Gradle buildKit)
- Add opensearchPricingCalculator buildKit entry for Docker image builds
- Create build.gradle with goTest task wired into check lifecycle
- Register as MigrationCompanion:opensearch-pricing-calculator subproject

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
…mpanion image

- Create unified Dockerfile at MigrationCompanion/ that builds the Go
  binary and pip-installs the Python solr-migration-advisor skill
- Remove standalone docker scripts (setup/docker/claude/) and old
  opensearch-pricing-calculator/Dockerfile
- Update buildKit entry: contextDir=MigrationCompanion,
  imageName=migration_companion
- Move build.gradle to MigrationCompanion/ with goTest and pythonTest
  tasks both wired into check lifecycle
- Update settings.gradle to include MigrationCompanion directly

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
- Add syncVersionFile_migrationCompanion task following project pattern
- Add requiredDependencies in buildKit config so VERSION is staged
  before Docker build
- Copy VERSION file in Dockerfile for consistent image versioning
- Add .dockerignore to exclude tests and build artifacts from context
- Fix docker-compose.yml to reference unified Dockerfile

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Signed-off-by: Andre Kurait <andrekurait@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.53%. Comparing base (b3bb603) to head (b893ae2).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2686   +/-   ##
=========================================
  Coverage     72.52%   72.53%           
  Complexity       90       90           
=========================================
  Files           709      709           
  Lines         32988    32988           
  Branches       2823     2826    +3     
=========================================
+ Hits          23925    23927    +2     
+ Misses         7784     7782    -2     
  Partials       1279     1279           
Flag Coverage Δ
gradle 68.74% <ø> (ø)
node 92.64% <ø> (ø)
python 76.59% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Signed-off-by: Andre Kurait <andrekurait@gmail.com>
… worktrees

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
setuptools refuses to read files outside the package directory, so
Gradle syncs the root VERSION file into the skill directory before
pythonSetup runs.

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Signed-off-by: Andre Kurait <andrekurait@gmail.com>
…ects

The other Python projects (console_link, cluster_tools) use hardcoded
versions in setup.py. Image versioning is handled by Gradle's
syncVersionFile and buildKit tagging, not the Python package version.

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
- Switch runtime from alpine:3.21 to amazonlinux:2023 (AL2023)
- Parameterize base images via ARG for pull-through cache support
- Add ptc.rewrite buildArgs for BUILDER_IMAGE and RUNTIME_IMAGE
- Use python3.11 from AL2023 repos instead of Alpine py3-pip

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
- Restore entrypoint.sh for Claude agent (symlinks skills, references,
  scripts, steering into processing dir and launches claude)
- Install Claude CLI, jq, curl in the image
- Set up skill directory structure for Claude agent consumption
- Image now contains both: pricing calculator API (/app/) and
  Claude agent environment (/home/user/claude/)

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
…erignore

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Use a Gradle Sync task to stage only the needed files into
build/dockerContext, matching the pattern used by migrationConsole.
This eliminates the .dockerignore and makes the build context explicit.

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
Signed-off-by: Andre Kurait <andrekurait@gmail.com>
priceCache.json is not in the source tree (gitignored) and is not
produced by the go build step. The Go app already handles this at
runtime: LoadFromLocalFile() calls InvalidateCache() when the file
is missing, downloading pricing data from AWS APIs on first start.

Signed-off-by: Andre Kurait <andrekurait@gmail.com>
@sumobrian
Copy link
Copy Markdown
Member

Waiting for OSC deliverable before merging.

@sumobrian sumobrian marked this pull request as draft April 13, 2026 22:06
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