Skip to content

Migrate kolibri-oidc-client-plugin into python_packages/ (part 1)#14955

Open
rtibblesbot wants to merge 164 commits into
learningequality:developfrom
rtibblesbot:issue-14948-05d609
Open

Migrate kolibri-oidc-client-plugin into python_packages/ (part 1)#14955
rtibblesbot wants to merge 164 commits into
learningequality:developfrom
rtibblesbot:issue-14948-05d609

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates kolibri-oidc-client-plugin's code and history from its standalone repo into python_packages/kolibri-oidc-client-plugin/, and wires it up as a uv + pnpm workspace member, following the precedent set by kolibri-sync-extras-plugin (#14663, Python-only) and kolibri-sentry-plugin (#14666, Python + frontend).

This is a checkpoint draft covering the code-migration and workspace-integration phases only. The sentry catch-up (package.json), publishing/CI wiring, and build/manual-verification work described in the issue will follow as additional commits before this leaves draft.

References

Resolves #14948

Reviewer guidance

  • 1c649971f6 is the git filter-repo --to-subdirectory-filter history merge — git log --follow -- python_packages/kolibri-oidc-client-plugin/kolibri_oidc_client_plugin/auth.py and git blame on files under the plugin trace to their original commits/authors rather than a single migration commit.
  • OIDCLogin.vue is a like-for-like migration except one import path fix (kolibri.utils.loginComponentskolibri-common/utils/loginComponents) — the old alias only existed in the now-deleted kolibri-tools webpack config and has no kolibri-build equivalent.
  • package.json declares browserslist-config-kolibri explicitly even though the source repo never did — its browserslist field extends that package but relied on implicit node_modules hoisting, which doesn't hold in the strict pnpm workspace.
  • uv sync --group dev and pnpm install both resolve against local workspace members, not registry versions — verified locally.
  • No screenshots yet — kolibri-build hasn't been run against this code, so there's nothing running to capture.

AI usage

Implemented with Claude Code (Claude Sonnet 5) following a pre-approved implementation plan, using test-driven development where applicable.


@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

Status: 🟡 Waiting for feedback · updated 2026-07-03 08:31 UTC

jredrejo and others added 30 commits September 20, 2019 17:50
Update version of the plugin
…patch-1

Allow more efficient auto-discovery of plugin.
Co-Authored-By: Devon Rueckner <indirectlylit@users.noreply.github.com>
Co-Authored-By: Devon Rueckner <indirectlylit@users.noreply.github.com>
…options

New options to set some of the oidc endpoints when they are not standard
Co-Authored-By: Devon Rueckner <indirectlylit@users.noreply.github.com>
jredrejo and others added 25 commits December 14, 2024 09:50
…ot/npm_and_yarn/nanoid-3.3.8

Bump nanoid from 3.3.6 to 3.3.8
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](chimurai/http-proxy-middleware@v2.0.7...v2.0.9)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sha.js](https://github.com/crypto-browserify/sha.js) from 2.4.11 to 2.4.12.
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](browserify/sha.js@v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ot/github_actions/actions/setup-python-6

Bump actions/setup-python from 5 to 6
…ot/github_actions/actions/setup-node-5

Bump actions/setup-node from 4 to 5
…ot/npm_and_yarn/sha.js-2.4.12

Bump sha.js from 2.4.11 to 2.4.12
…ot/github_actions/actions/download-artifact-5

Bump actions/download-artifact from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [cipher-base](https://github.com/crypto-browserify/cipher-base) from 1.0.4 to 1.0.6.
- [Changelog](https://github.com/browserify/cipher-base/blob/master/CHANGELOG.md)
- [Commits](browserify/cipher-base@v1.0.4...v1.0.6)

---
updated-dependencies:
- dependency-name: cipher-base
  dependency-version: 1.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ot/npm_and_yarn/http-proxy-middleware-2.0.9

Bump http-proxy-middleware from 2.0.7 to 2.0.9
…ot/npm_and_yarn/cipher-base-1.0.6

Bump cipher-base from 1.0.4 to 1.0.6
…ot/github_actions/actions/checkout-5

Bump actions/checkout from 4 to 5
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.6.0 to 6.6.1.
- [Commits](indutny/elliptic@v6.6.0...v6.6.1)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-version: 6.6.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pbkdf2](https://github.com/crypto-browserify/pbkdf2) from 3.0.17 to 3.1.3.
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](browserify/pbkdf2@v3.0.17...v3.1.3)

---
updated-dependencies:
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ot/npm_and_yarn/pbkdf2-3.1.3

Bump pbkdf2 from 3.0.17 to 3.1.3
…ot/npm_and_yarn/elliptic-6.6.1

Bump elliptic from 6.6.0 to 6.6.1
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.0 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](form-data/form-data@v4.0.0...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ot/npm_and_yarn/form-data-4.0.4

Bump form-data from 4.0.0 to 4.0.4
CI workflows, packaging metadata (setup.py/setup.cfg), and license/
contributing docs are superseded by the monorepo's own tooling.
Trim .gitignore to just the webpack build-output entry, matching
kolibri-sentry-plugin's post-migration form.
Add a pyproject.toml modeled on kolibri-sentry-plugin's:
- Static version field (0.3.2, matching the prior __init__.py value)
- mozilla-django-oidc declared as a dependency
- kolibri pinned via [tool.uv.sources] workspace = true

Switch __init__.py to read its version from importlib.metadata at
runtime instead of a hardcoded string, matching the other in-tree
plugins.

Register kolibri_oidc_client_plugin in root pyproject.toml's ruff
isort known-first-party list.

Document the monorepo dev/install/publish workflow in the plugin's
README.

Reformat the migrated Python files per ruff (import order, line
wrapping) now that they're linted by the monorepo's pre-commit config.
Add python_packages/* to pnpm-workspace.yaml's packages glob, the
first migrated package to need it since it has frontend code.

Rewrite the plugin's package.json:
- kolibri and kolibri-common to workspace:*
- kolibri-design-system and vue to the pnpm catalog, dropping the
  stale git-URL pin
- kolibri-tools devDependency replaced by kolibri-build at workspace:*
- browserslist-config-kolibri declared explicitly instead of relying
  on node_modules hoisting
- build/clean scripts updated for kolibri-build's flatter CLI, plus a
  new dev script

Fix OIDCLogin.vue's loginComponents import:
- The old dotted-path alias ('kolibri.utils.loginComponents') only
  the deleted kolibri-tools webpack config understood
- kolibri-build has no equivalent alias, so switch to the real module
  path (kolibri-common/utils/loginComponents), matching AuthBase.vue
- Reformat the file per the monorepo's prettier config
@github-actions github-actions Bot added DEV: backend Python, databases, networking, filesystem... SIZE: very large labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The migrated OIDCLogin.vue used class="button raised secondary" from
the standalone repo's old CSS framework, which no longer exists in the
monorepo. Manual QA (rendering the exact markup on the live sign-in
page) confirmed it renders as an unstyled plain link instead of a
button, inconsistent with the KDS-styled sign-in options around it.
Rewrite it as a KExternalLink with the same raised-button/secondary
appearance already used for the sibling "Create an account" button.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@rtibblesbot rtibblesbot marked this pull request as ready for review July 3, 2026 08:31
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... SIZE: very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate kolibri-oidc-client-plugin into the Python monorepo

4 participants