Repository navigation
[WIP] poc implementation of extendable services - #1
Open
felipemontoya wants to merge 63 commits into
Open
felipemontoya wants to merge 63 commits into
felipemontoya wants to merge 63 commits into
Conversation
Part of: openedx-unsupported/web-fragments#309 Bumps version to 6.2.0
This commit contains no changes, but satisfies the requirements of the configured GitHub actions to publish a release to PyPi.
feat: force release
There was a problem hiding this comment.
Pull request overview
Adds a proof-of-concept mechanism for loading XBlock runtime services from installed-package entry points (xblock.service.v1), so runtimes can pick up optional capabilities without hardcoding them in the host application.
Changes:
- Introduces a
ServiceProviderplugin loader (entry-point based) and aRuntime.service()fallback to instantiate provider classes when a runtime service isn’t present. - Adds pytest coverage for plugin-provided services, runtime shadowing, and needs/wants behavior.
- Adds an ADR documenting the motivation and intended resolution order for service discovery.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
xblock/runtime.py |
Adds ServiceProvider and runtime fallback that loads service providers from xblock.service.v1. |
xblock/test/test_plugin_services.py |
New tests validating entry-point service loading and interaction with runtime-provided services. |
docs/decisions/0001-service-entry-points.rst |
ADR describing the design rationale and expected behavior of entry-point-provided services. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+56
to
+63
| @ServiceProvider.register_temp_plugin( | ||
| DummyAIService, identifier='ai_extensions', group='xblock.service.v1', | ||
| ) | ||
| def test_runtime_service_shadows_plugin_service(): | ||
| sentinel = object() | ||
| runtime = TestRuntime(services={'ai_extensions': sentinel}) | ||
| block = make_block(WantsAIBlock, runtime=runtime) | ||
| assert block.runtime.service(block, 'ai_extensions') is sentinel |
Comment on lines
+1
to
+3
| 0001 Plugin-provided runtime services via entry points | ||
| ###################################################### | ||
|
|
felipemontoya
force-pushed
the
fmo/extensible-services
branch
from
June 10, 2026 22:38
35dbbd5 to
ea3e7b0
Compare
* fix: semantic release issue fix Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Feanil Patel <feanil@axim.org> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@df4cb1c...9c091bb) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) Remove threading.RLock from Mixologist's class cache so mix() no longer blocks the event loop under ASGI deployments. dict.setdefault() atomicity (via CPython's GIL) provides equivalent thread safety, and asyncio's cooperative scheduler ensures mix() — which has no await points — is never interleaved within the same thread. ObjectAggregator has no production callers; mark it deprecated so it can be removed in a future major release. Closes openedx#918 Co-authored-by: Irfan Ahmad <irfan.ahmad@A006-01919.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.2.0 to 6.3.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@a309ff8...ece7cb0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [python-semantic-release/publish-action](https://github.com/python-semantic-release/publish-action) from 10.5.3 to 10.6.1. - [Release notes](https://github.com/python-semantic-release/publish-action/releases) - [Changelog](https://github.com/python-semantic-release/publish-action/blob/main/releaserc.toml) - [Commits](python-semantic-release/publish-action@v10.5.3...v10.6.1) --- updated-dependencies: - dependency-name: python-semantic-release/publish-action dependency-version: 10.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…enedx#937) Bumps [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release) from 10.5.3 to 10.6.1. - [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases) - [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.rst) - [Commits](python-semantic-release/python-semantic-release@v10.5.3...v10.6.1) --- updated-dependencies: - dependency-name: python-semantic-release/python-semantic-release dependency-version: 10.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: Upgrade Python requirements * fix: pin pytest-django<4.13.0 to fix Django 4.2 compatibility pytest-django 4.13.0 (released 2026-08-06) references `_pre_setup_ran_eagerly` which is a Django 5.x attribute not present in Django 4.2. Pin to <4.13.0 so the django42 tox env continues to work. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: farhan <farhan.khan@arbisoft.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.3.0 to 7.0.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@ece7cb0...5fda3b9) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@9c091bb...3d3c42e) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/actions/checkout-7.0.1 build(deps): bump actions/checkout from 7.0.0 to 7.0.1
Bumps [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release) from 10.6.1 to 10.6.2. - [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases) - [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.rst) - [Commits](python-semantic-release/python-semantic-release@v10.6.1...v10.6.2) --- updated-dependencies: - dependency-name: python-semantic-release/python-semantic-release dependency-version: 10.6.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/python-semantic-release/python-semantic-release-10.6.2 build(deps): bump python-semantic-release/python-semantic-release from 10.6.1 to 10.6.2
chore: Update VirtualEnv website
pylint 4.1.2 reports W0622 (redefined-builtin) on the `def` line in fields.py and W1113 (keyword-arg-before-vararg) on the `def __init__` line in core.py, but the suppression comments were on subsequent continuation lines, causing I0021 (useless-suppression) errors. Move each disable comment to the line pylint actually flags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-requirements-384e405 chore: Upgrade Python requirements
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.1 to 7.0.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@043fb46...cf430e0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/actions/upload-artifact-7.0.2 build(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@3e5f45b...9000827) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/actions/download-artifact-8.0.2 build(deps): bump actions/download-artifact from 8.0.1 to 8.0.2
…0-19-26ccd61 build: upgrade certifi to 2026.10.19
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@5fda3b9...6d4fd22) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…/actions/setup-python-7.1.0 build(deps): bump actions/setup-python from 7.0.0 to 7.1.0
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.14.2 to 1.14.3. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@dc37677...7245906) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.14.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/pypa/gh-action-pypi-publish-1.14.3 build(deps): bump pypa/gh-action-pypi-publish from 1.14.2 to 1.14.3
Setting django_response[name] for each webob header overwrote earlier Set-Cookie headers, so only the last cookie reached the client. Route Set-Cookie values through the response's cookie jar instead, which emits one header per cookie. Fixes openedx#523.
SimpleCookie parses with the request Cookie grammar, so loading a Set-Cookie header straight into the response's cookie jar could drop attributes, drop the cookie, or add a second cookie. Parse each header on its own and raise BadHeaderError unless it yields exactly one cookie.
fix: preserve all Set-Cookie headers in webob_to_django_response
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
felipemontoya
force-pushed
the
fmo/extensible-services
branch
from
December 2, 2026 22:53
a47654f to
d23091d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is test PR to see the implementation in action internally. It will be closed in favor of a public PR to the upstream repo