Configure bumpver for Concourse release pipeline#492
Conversation
mbertrand
left a comment
There was a problem hiding this comment.
Sentry comments need to be addressed to fix the failing version check unit test
- Add bump-my-version configuration to pyproject.toml with CalVer format - Track version in pyproject.toml [project] section - Track version in uv.lock - Replace test_semantic_version with test_bump_my_version_format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f15fd26 to
d3aed93
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Pull request overview
This PR aims to enable automated application version updates in the Concourse release pipeline by moving to a calver scheme and adding version-bump tool configuration, while also aligning Django’s VERSION constant with the package version.
Changes:
- Switch
project.version(and Djangosettings.VERSION) from semver-style to a calver-style version string. - Add version bump configuration under
pyproject.tomlto update version strings acrosspyproject.toml,main/settings.py, anduv.lock. - Update settings tests to validate the version format against the bump configuration.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
pyproject.toml |
Updates project version, adjusts a dependency pin, changes ruff ignore list, and adds version-bump tool configuration. |
main/settings.py |
Updates the Django VERSION constant to the new version format. |
main/settings_test.py |
Replaces semantic-version validation with a test that checks the configured calver parsing pattern and matches pyproject.toml. |
uv.lock |
Updates the learn-ai package version entry and includes additional dependency resolution changes. |
Comments suppressed due to low confidence (1)
pyproject.toml:199
PLC0415was removed fromruff’s ignore list, but the codebase still contains imports outside module top-level (e.g.,main/urls.pyhasimport debug_toolbarunderif settings.DEBUG:). WithPLrules enabled, this change is likely to introduce new lint failures. Either re-addPLC0415tolint.ignore, or update the affected files to comply (e.g., move imports to top-level or add targeted# noqa: PLC0415).
"N806",
"N999",
"PIE804",
"RET505",
"RET506",
"RET507",
"RET508",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [tool.bumpversion] | ||
| commit = false | ||
| tag = false | ||
| parse = "(?P<release>(?:[1-9][0-9]{3})\\.(?:1[0-2]|[1-9])\\.(?:3[0-1]|[12][0-9]|[1-9]))\\.(?P<build>\\d+)" | ||
| serialize = ["{release}.{build}"] |
| "langchain-core>=1.1.0,<2", | ||
| "langchain-litellm>=0.6.1,<0.7", | ||
| "langchain-openai>=1.1.0,<2", | ||
| "langgraph==1.0.10", | ||
| "langgraph==1.0.4", |
There was a problem hiding this comment.
Should be reverted back to 1.0.10
| from openapi.settings_spectacular import open_spectacular_settings | ||
|
|
||
| VERSION = "0.30.0" | ||
| VERSION = "2026.4.16.1" |
| parse = "(?P<release>(?:[1-9][0-9]{3})\\.(?:1[0-2]|[1-9])\\.(?:3[0-1]|[12][0-9]|[1-9]))\\.(?P<build>\\d+)" | ||
| serialize = ["{release}.{build}"] | ||
|
|
||
| [tool.bumpversion.parts.release] | ||
| calver_format = "{YYYY}.{MM}.{DD}" |
mbertrand
left a comment
There was a problem hiding this comment.
The other copilot review comments seem worth addressing too.
| "langchain-core>=1.1.0,<2", | ||
| "langchain-litellm>=0.6.1,<0.7", | ||
| "langchain-openai>=1.1.0,<2", | ||
| "langgraph==1.0.10", | ||
| "langgraph==1.0.4", |
There was a problem hiding this comment.
Should be reverted back to 1.0.10
| "N806", | ||
| "N999", | ||
| "PIE804", | ||
| "PLC0415", |
There was a problem hiding this comment.
Removing this led to many pre-commit errors about imports. Either the imports will need to be moved or this line will need to be added back.
What are the relevant tickets?
N/A
Description (What does it do?)
Adds
[tool.bumpver]configuration topyproject.tomlso the Concourserelease pipeline can update the application version automatically on each
release.
The new version format is
YYYY.MM.DD.N(e.g.,2026.04.16.1), whichreplaces the previous semver-style version strings. This is required by the
Concourse
releaseresource workflow being rolled out inmitodl/ol-infrastructure#4506.
The
VERSIONconstant in Django settings is updated to the initial releaseformat version as part of this change.
How can this be tested?
bumpverinstalled (pip install bumpver), runbumpver update --dryfrom the repo root and confirm it shows the expected diff with no errors.VERSIONin Django settings matchescurrent_versioninpyproject.toml.Additional Context
Part of the Concourse release pipeline modernization — migrating from the Doof
Slack bot to a Concourse-native release workflow using GitHub Issues as
production gates.