Migrate kolibri-oidc-client-plugin into the Python monorepo
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Migrate kolibri-oidc-client-plugin from its standalone repo into python_packages/ as a workspace member.
It has frontend code (OIDCLogin.vue) alongside Python. Resolving its JS deps against the local pnpm workspace requires adding python_packages/* to pnpm-workspace.yaml — the first migration to do so. That glob change also pulls kolibri-sentry-plugin into the workspace. So this issue also finishes sentry's frontend wiring and adds the publish-workflow entry #14666 missed.
Per-plugin migration under #13720, following #14663 (setup), #14666 (sentry), and the Python-only sync-extras migration.
Complexity: Medium Target branch: develop
Context
kolibri-oidc-client-plugin lets Kolibri act as an OpenID Connect client (SSO login). Its standalone repo contains:
- Python module (
kolibri_oidc_client_plugin/):kolibri_plugin.py,auth.py,options.py,root_urls.py,settings.py,buildConfig.js. - Frontend:
assets/src/views/OIDCLogin.vue. package.json(private: true) with stale pins:kolibri ^0.15.4, KDS via a#v1.3.1-beta0git URL,vue 2.6.14,kolibri-tools 0.16.0-dev.3.- External Python dep
mozilla-django-oidc==1.2.4(old pin), pluskolibri>=0.15. setup.cfg/setup.py,Makefile,MANIFEST.in,CONTRIBUTING.rst,.flake8, standalone CI,yarn.lock.
The Change
Code migration
- Move
learningequality/kolibri-oidc-client-plugincontents intopython_packages/kolibri-oidc-client-plugin/(Python module +package.json). - Replace
setup.cfg/setup.pywith apyproject.tomlper #14663 conventions: staticversionfield,mozilla-django-oidcdeclared as a dependency. - Drop standalone-only / root-duplicative files (
.github/,Makefile,MANIFEST.in,LICENSE,AUTHORS.rst,CONTRIBUTING.rst,.flake8,setup.cfg,setup.py,yarn.lock); keep the plugin-specificREADME. - Conform the code to monorepo pre-commit (ruff etc.).
Git history
- Preserve via
git filter-repo --to-subdirectory-filter python_packages/kolibri-oidc-client-pluginon a fresh clone, thengit merge --allow-unrelated-histories(procedure from #14663).git blametraces to original commits.
Frontend workspace integration
- Add
python_packages/*topnpm-workspace.yaml(general infrastructure — retroactively makes sentry a workspace member). kolibri→workspace:*.kolibri-design-system→ pnpm catalog (drop the#v1.3.1-beta0git URL).vue→2.7.16.kolibri-toolsdevDep →kolibri-buildatworkspace:*.
Python workspace integration
- Picked up by the
python_packages/*uv glob;uv sync --group devresolves it. Add its import name toknown-first-partyin rootpyproject.toml's ruff isort config.
Sentry catch-up (enabled by the glob change above)
- Convert sentry's
package.jsondeps toworkspace:*/catalog (samekolibri-tools→kolibri-buildswap) and record it inpnpm-lock.yaml— finishing the frontend wiring #14666 intended. - Add
kolibri-sentry-plugintopypi_packages_publish.yml(missed in #14666).
Publishing / CI
- Add
kolibri-oidc-client-plugintopypi_packages_publish.yml(paths filter +workflow_dispatchoptions). - If the plugin has Python tests, add a Stage 2 per-member-package job (modelled on
sync_extras_plugin_tests) and wire it intostage2_required_checks'sneeds:.
Build / runtime
kolibri-build prod --plugins kolibri_oidc_client_pluginproduces the JS bundle.- Wheel from the migrated dir installs into a fresh venv alongside Kolibri; OIDC login exercised against a test provider before merge.
Out of Scope
- Migrating other external plugins — separate per-plugin tasks under #13720.
- Publishing sentry/oidc-client to PyPI or archiving their source repos — publishing wiring lands here; the release action itself is a separate step.
- Behavioural changes to the OIDC client — like-for-like migration (bumping
mozilla-django-oidcis allowed where needed for the migration to work).
Acceptance Criteria
Code migration
- [ ] Plugin code lives at
python_packages/kolibri-oidc-client-plugin/(Python module +package.json). - [ ]
pyproject.tomlreplacessetup.cfg/setup.py, follows #14663 conventions, declares a staticversionandmozilla-django-oidc. - [ ] Standalone-only files (
.github/,Makefile,MANIFEST.in,LICENSE,AUTHORS.rst,CONTRIBUTING.rst,.flake8,setup.cfg,setup.py,yarn.lock) absent from the migrated directory. - [ ] Migrated code passes monorepo pre-commit without per-file ignores.
- [ ] History preserved via
git filter-repo --to-subdirectory-filter;git blametraces to original commits.
Frontend workspace integration
- [ ]
pnpm-workspace.yamlincludespython_packages/*. - [ ] oidc-client
package.json:kolibriatworkspace:*, KDS from catalog (no git URL),vue 2.7.16,kolibri-buildatworkspace:*replacingkolibri-tools. - [ ]
pnpm installrecords oidc-client inpnpm-lock.yamlwith deps resolved to local workspace packages.
Python workspace integration
- [ ] Appears as a uv workspace member;
uv sync --group devincludes it. - [ ] Import name added to
known-first-party.
Sentry catch-up
- [ ] Sentry
package.jsondeps converted toworkspace:*/catalog; sentry recorded inpnpm-lock.yaml. - [ ]
pypi_packages_publish.ymllistskolibri-sentry-plugin.
Publishing / CI
- [ ]
pypi_packages_publish.ymllistskolibri-oidc-client-plugin(paths filter + workflow_dispatch options). - [ ] If the plugin has tests, a Stage 2 job runs them and is in
stage2_required_checks'sneeds:.
Build and runtime
- [ ]
kolibri-build prod --plugins kolibri_oidc_client_pluginproduces the JS bundle in the expected location. - [ ] A wheel built from the migrated directory installs into a fresh virtualenv alongside Kolibri.
- [ ] After installation, Kolibri loads the plugin and OIDC login completes against a test OIDC provider (verified manually).
References
- Source repository: https://github.com/learningequality/kolibri-oidc-client-plugin
- Prior migrations: #14663 (setup), #14666 (sentry, with frontend), sync-extras (Python-only)
- pnpm workspaces: https://pnpm.io/workspaces
- uv workspaces: https://docs.astral.sh/uv/concepts/projects/workspaces/
AI usage
Used Claude Code to draft this issue iteratively. I drove scope and decisions throughout — the workspace-vs-published dependency approach, modernising the JS deps as acceptance criteria, the kolibri-tools → kolibri-build rename, and folding the sentry fixes in here. Claude reviewed the source repo and the current monorepo state and surfaced two gaps not visible from #14666: sentry's package.json still uses published pins and isn't in pnpm-lock.yaml, and sentry was never added to pypi_packages_publish.yml.
Watching for resolution on behalf of learningequality/kolibri#14949.
Plan: Move kolibri-oidc-client-plugin from its standalone repo into python_packages/kolibri-oidc-client-plugin/ as a uv + pnpm workspace member (with history preserved), finish the pnpm/CI wiring kolibri-sentry-plugin's migration (#14666) left undone, and wire both packages into publishing and Stage 2 CI.
- [ ] Clone and inspect the source repo
- [ ] Merge source history into
python_packages/kolibri-oidc-client-plugin/ - [ ] Remove standalone-only files
- [ ] Write
pyproject.toml, fix__init__.pyversioning, register workspace membership - [ ] Add
python_packages/*topnpm-workspace.yamland fix oidc'spackage.json - [ ] Verify
pnpm installresolves oidc against the local workspace - [ ] Fix
kolibri-sentry-plugin/package.jsonto workspace/catalog conventions - [ ] Register both packages in
pypi_packages_publish.yml - [ ] Add a Stage 2 test job for oidc (conditional) and wire it into
stage2_required_checks - [ ] Build the oidc frontend bundle and a wheel; install into a fresh venv
- [ ] Manually verify OIDC login against a test provider
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.