build: CI, packaging and release maintenance - #58
Merged
Conversation
Every CI run was warning that these four actions target Node 20 and are being forced onto Node 24: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ actions/checkout v4.3.1 -> v7.0.1 actions/setup-python v5.6.0 -> v7.0.0 astral-sh/setup-uv v4.2.0 -> v10.0.1 codecov/codecov-action v4.6.0 -> v7.0.0 The inputs we pass are all still supported: codecov v7 keeps `token`, `flags`, `fail_ci_if_error` and `working-directory`, and setup-uv is used with no inputs at all. This also gets actions/checkout onto the same major version as the release workflow, which was already on v6. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The package advertised `Framework :: Django :: 4.2` on PyPI, but Django
4.2 is not tested anywhere: tox's envlist is `py312-django{52,60}` and
CI runs the django52 and django60 environments. Replace it with the two
versions we do test.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Our pinned actions had drifted far enough behind to sit on a deprecated Node runtime, and because we pin to commit SHAs there is nothing that moves them forward on its own. Weekly dependabot PRs keep the pins and their version comments in step without anyone having to notice. Mirrors the config used elsewhere in the org, e.g. openedx-events: https://github.com/openedx/openedx-events/blob/main/.github/dependabot.yml Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comment read "Create a draft release", which suggests the release is left as a draft and something later has to publish it. `gh release create` does the whole sequence itself: it creates the release as a draft, uploads the assets, then publishes it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The release page only carried the backend distributions; the tutor plugin's went to PyPI alone. Build the tutor plugin before the release is created and pass both dist globs to `gh release create` so all four files land on the release. The ordering is load-bearing now: immutable releases freeze the asset list at publish time, so anything we want attached has to exist before that single command runs. Asset names don't collide -- the two projects are `openedx-plugin-sample` and `tutor-contrib-sample`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
=======================================
Coverage 93.04% 93.04%
=======================================
Files 16 16
Lines 503 503
Branches 18 18
=======================================
Hits 468 468
Misses 24 24
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
setup-uv v10 enables caching by default, so all five matrix jobs raced to save the same cache key and four of them warned: Failed to save: Unable to reserve cache with key setup-uv-2-x86_64-unknown-linux-gnu-... another job may be creating this cache. Each job runs a different toxenv and therefore populates the uv cache with a different set of dependencies, so a per-toxenv key is both quieter and a better fit than one shared key. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Follow-up maintenance after #57. Six independent commits, each reviewable on its own.
1.
build:CI actions off the deprecated Node 20 runtimeEvery CI run was emitting this deprecation warning for four actions in
backend-ci.yml:actions/checkoutactions/setup-pythonastral-sh/setup-uvcodecov/codecov-actionInput compatibility was checked rather than assumed: codecov v7's
action.ymlstill declares all four inputs we pass (token,flags,fail_ci_if_error,working-directory), and setup-uv is used with no inputs at all, so its large version jump has no surface here. This also bringsactions/checkoutonto the same major asrelease.yml, which was already on v6.2.
fix:declare the Django versions we actually supportpyproject.tomladvertisedFramework :: Django :: 4.2on PyPI, but tox's envlist ispy312-django{52,60}and CI runsdjango52/django60— 4.2 is tested nowhere. Replaced with5.2and6.0.3.
build:dependabot for GitHub ActionsBecause we pin to commit SHAs, nothing moves those pins forward on its own, which is how they drifted onto a deprecated runtime in the first place. Weekly
github-actionsupdates, mirroring openedx-events.4.
build:clarify the release step comment# Create a draft releaseread as though the release is left as a draft for something else to publish.gh release createdoes all three itself: draft, upload, publish.5.
build:attach the tutor plugin dists to the GitHub releaseThe release page only carried the backend distributions; the tutor plugin's went to PyPI alone.
Build | Tutor Pluginnow runs before the release is created and both dist globs are passed togh release create, so all four files land on the release.The ordering is load-bearing: immutable releases freeze the asset list at publish time, so everything we want attached has to exist before that one command runs. Asset names don't collide — the projects are
openedx-plugin-sampleandtutor-contrib-sample.6.
build:per-matrix-job uv cache keyBumping setup-uv surfaced a second, quieter problem: v10 enables caching by default, so all five matrix jobs raced to save one shared cache key and four warned
Unable to reserve cache with key ... another job may be creating this cache. Each job runs a different toxenv and so fills the uv cache with a different dependency set, makingcache-suffix: ${{ matrix.toxenv }}both quieter and a better fit than one shared key.Verified
make qualitypassestwine checkpasses on the sdist and the wheelcodecov/patchandcodecov/projectsuccessfullyThe reordering and the extra release assets can only be fully exercised by a real release, which happens on merge.
Deliberately not included
release.yml'supload-artifact(v4→v7),download-artifact(v4→v8) andsetup-node(v6→v7). Those are major jumps on a path PR CI never runs — the release workflow only triggers on push to main — so they'd first be exercised on a live release. Better handled as individual dependabot PRs, which item 3 now enables.