Skip to content

Migrate kolibri-installer-android into platforms/android/ - #15001

Merged
rtibbles merged 634 commits into
learningequality:developfrom
rtibblesbot:issue-14997-efb1bd
Jul 15, 2026
Merged

Migrate kolibri-installer-android into platforms/android/#15001
rtibbles merged 634 commits into
learningequality:developfrom
rtibblesbot:issue-14997-efb1bd

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Kolibri's Android installer lived in a standalone repo consumed through a cross-repo @v0.2.0 workflow pin, so changes spanning the app and Kolibri core (needed for upcoming zeroconf/mDNS work) had to cross two repositories. This migrates the installer into platforms/android/ as a uv workspace member with git history preserved, repointing the Gradle/Chaquopy build at the shared workspace .venv and deriving versionName from the Kolibri version. It follows the platforms/ pattern established by the server and Pi migrations.

References

Fixes #14997. Part of #13720. Prior migrations: #14964, #14967. Source: learningequality/kolibri-installer-android.

Reviewer guidance

The migration is complete: the workspace-tar make target (platforms/android/Makefile), the platform-android-* CI workflows and their pr_build_kolibri.yml wiring, and the Android Studio docs (platforms/android/README.md, AGENTS.md) are all on this branch.

  • pyproject.toml:149 — the member is picked up by the platforms/* workspace glob, with platforms/raspberry-pi (no pyproject.toml) explicitly excluded so uv doesn't error on it; confirm uv sync --group dev --all-packages resolves with no google-* conflict.
  • uv.lock header — confirm requires-python = ">=3.7, <3.15" is unchanged, i.e. the new member did not narrow the workspace Python floor below Kolibri's 3.6/3.7 support.
  • .pre-commit-config.yaml:9 — the general check-yaml stays strict and instead excludes the Maestro flows; a separate scoped check-yaml hook carries --allow-multiple-documents limited to platforms/android/.maestro/*.yaml, so the multi-document relaxation cannot weaken YAML validation elsewhere.

AI usage

Used Claude Code to execute the migration plan: the git filter-repo history rewrite, uv workspace registration with google-* pin reconciliation, and the Gradle buildPython/versionName rewire. Verified with uv lock, uv sync --group dev --all-packages, and prek run.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks
@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-07-15 05:25 UTC

rtibbles and others added 30 commits August 8, 2023 14:37
Add release toggle to upload AAB to play store internal testing track.
Download universal signed APK for reuse.
Output versionCode for later promotion.
Add error handling and retry behaviour.
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…bot/github_actions/actions/checkout-4

Bump actions/checkout from 3 to 4
…_the_log

Tweak logging to avoid repeated logging calls.
@rtibblesbot
rtibblesbot marked this pull request as ready for review July 13, 2026 01:29
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please finish the migration fully. Not sure why you're opening PRs when the work is half done.

We should also be bringing in the CLAUDE.md text and .claude skill from the source repository.

@github-actions github-actions Bot added the DEV: dev-ops Continuous integration & deployment label Jul 13, 2026
@rtibblesbot

Copy link
Copy Markdown
Contributor Author

Addressed both points and rebased onto develop (it was conflicting on pyproject.toml/uv.lock).

Finish the migration fully — the CI wiring was the missing half, now done:

  • Added platform-android-build_apk.yml and platform-android-release_apk.yml as local reusables (ported from the source build_apk.yml/release_apk.yml), checking out the monorepo itself (no cross-repo ref) and running under platforms/android with deps from the shared workspace lock (uv sync --package kolibri-installer-android --extra build + the Chaquopy requirements.txt).
  • Repointed pr_build_kolibri.yml's apk job at the local reusable using the workspace-built tar, dropping the …kolibri-installer-android/…@v0.2.0 cross-repo pin, and added a non-blocking android_smoke_test job beside pi_smoke_test. The WHL smoke-test fan-in stays the only required gate.

CLAUDE.md text and .claude skillAGENTS.md (the full Android agent guide) and CLAUDE.md (@AGENTS.md) are both in the migrated tree. The .claude/ directory is gitignored in the source repo (.claude/ under "Claude Code sandbox artifacts"), so the screenshot command never reached git history and filter-repo couldn't carry it. I reconstructed /screenshot from the loop documented in AGENTS.md §3 into platforms/android/.claude/commands/screenshot.md and narrowed the migrated .gitignore so committed commands are tracked while transient artifacts stay ignored — please drop your canonical version in over mine if it differs.

Two cleanups also went in: the imported build-infra commits whose subjects read WIP/temp/debug were reworded (author, date and content unchanged, so git blame still attributes each line to its original author), and the inline # noqa/# isort: skip markers in the migrated Python moved into the nested pyproject.toml [tool.ruff.lint.per-file-ignores].

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one thing that stands out now.

Comment thread platforms/android/README.md Outdated
make avd # Recreate AVD
```

## Contributing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can remove everything from here on in the README, redundant with the repository documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 9784485 — removed the Contributing/License/Support sections. The build/emulator instructions above them are kept; everything below is redundant with the repository documentation.

@rtibbles rtibbles self-assigned this Jul 14, 2026

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is ready to go - we just need to clean up the commits that were added after the repository commits.

@rtibblesbot

Copy link
Copy Markdown
Contributor Author

Cleaned up the commits added on top of the imported repository history. The migration is now a single import merge (Merge kolibri-installer-android history into platforms/android/, whose second parent is the original repo tip) followed by 8 logical commits:

  • Prune source-repo CI and pre-commit scaffolding from migrated Android tree
  • Register kolibri-installer-android as a uv workspace member
  • Point the Gradle build at the monorepo workspace
  • Stage the workspace tar via make and document the monorepo build
  • Make the migrated Maestro smoke flow pass monorepo pre-commit
  • Replace inline lint exemptions in migrated Android Python with ruff config
  • Add the Android screenshot Claude command to the migrated tree
  • Wire the Android APK build and smoke test into the monorepo CI

The fixup/flip-flop commits are folded into the commit they correct. Imported history and git blame are untouched — the import merge keeps the original repo tip as a parent, and blame on migrated files still traces to the original authors and commits. The tree content is byte-identical to the previously approved state; this was a history rewrite only.

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You've added 3 more commits since you "collapsed" the commit history. Why do you keep adding things?

@rtibblesbot

Copy link
Copy Markdown
Contributor Author

Folded those 3 follow-up commits back into the logical commits they belonged to (Makefile fix → the make/tar commit, YAML + workflow fixes → the pre-commit and CI-wiring commits). The branch is now the same 8 migration commits on top of the untouched imported repository history — no new commits on top. The working tree is byte-identical to the approved state (git diff against the pre-fold commit is empty). Sorry for the churn.

… tree

The five source workflows are re-authored at the monorepo root and the
pre-commit / pull-request-target scaffolding collapses into the monorepo's
existing workflows, so drop the migrated copies along with dependabot.yml.
Add the member to the workspace and fold its host tooling into the shared
lock, dropping its standalone uv.lock. Bump the Play Store pins to align with
Kolibri's google-auth==2.38.0 and marker-guard the 3.8+ host deps, and hold
requires-python at >=3.7 so the member does not raise the workspace floor.
The Chaquopy embedded runtime stays out of the lock (requirements.txt).
Repoint buildPython at the shared root .venv, pin it to Python 3.10 for
Chaquopy, and derive versionName from the Kolibri version, dropping the
hardcoded installer version.
Add a make target that stages the workspace-built Kolibri tar into
platforms/android/tar/ instead of downloading it, and document opening
platforms/android/ in Android Studio against the enclosing monorepo.
Allow multiple YAML documents in check-yaml so the multi-document Maestro
flow validates, and reformat the flow to satisfy the monorepo hooks.
…onfig

Move the migrated scripts' inline noqa comments into per-file-ignores and
pin ruff's target-version to py310, so the exemptions live in one place and
survive the monorepo's shared ruff run.
Carry the screenshot helper command and adjust .gitignore to keep committed
.claude/commands while still ignoring transient sandbox artifacts.
Add the platform-android build_apk / release_apk reusables and repoint
pr_build_kolibri.yml's apk job at the local build, feeding it the
workspace-built tar. The non-blocking Maestro smoke test runs beside
pi_smoke_test, with the flaky API 35 axis marked advisory.
@rtibblesbot

Copy link
Copy Markdown
Contributor Author

Rebased onto current develop to clear the merge conflict (the debian-server migration #14964 landed, conflicting on pyproject.toml, uv.lock, and pr_build_kolibri.yml). Resolutions: took the platforms/* members glob (already covers platforms/android); regenerated uv.lock; and kept both server_smoke_test and android_smoke_test after pi_smoke_test.

No commits added — still the same import merge (second parent = original repo tip 146772a789) plus the same 8 logical commits. The platforms/android/ tree is byte-identical to the approved state (git diff vs the pre-rebase branch over platforms/android/ is empty), and git blame on migrated files is untouched. The force-push is purely the rebase.

@rtibbles
rtibbles merged commit a7d2228 into learningequality:develop Jul 15, 2026
102 of 109 checks passed
@rtibblesbot
rtibblesbot deleted the issue-14997-efb1bd branch July 15, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: backend Python, databases, networking, filesystem... DEV: dev-ops Continuous integration & deployment SIZE: very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate kolibri-installer-android into the Python monorepo

7 participants