Nothing proves a built-in carries the core version, and nothing tells an instance it is behind #272
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported as: the built-in plugins still say 0.2.1 although 0.3.0 is released, and a built-in
should always carry the release's version.
The rule is already the code.
plugins/base.py:274,shipped():It sets
version=__version__, and in this checkout bothpostulo.__version__andimportlib.metadata.version("postulo")return0.3.0, matchingpyproject.tomland thev0.3.0tag. There is no literal0.2.1anywhere insrc/.What is actually happening.
https://postulo.tiagoagueda.com/healthzanswers:The instance is running a pre-0.3.0 build, which is #251 — v0.3.0 was released without a
container image. So the built-ins are reporting 0.2.1 correctly: on that instance Postulo
genuinely is 0.2.1, and a built-in claiming 0.3.0 there would be the bug.
Ragnar wants updating once #251 produces an image. That part is not this issue.
What the report does expose, and it is worth fixing
1. Nothing proves the invariant
shipped()'s own docstring is careful about its standing:A convenience is not a guarantee. Nothing stops the next built-in being declared with a
literal version, or with
Manifest(...)directly, and nothing would catch it — there arefifteen in-tree plugins now.
This project guards exactly this kind of thing with a test:
tests/test_changelog.pyfor afile's shape,
tests/test_stylesheet.pyfor a build artefact going stale. The same moveapplies here and is a handful of lines:
postulo.__version__;SHIPPED_AUTHOR,SHIPPED_LICENCEandSHIPPED_SOURCE_URL, which is the driftshipped()says it exists to prevent.Worth extending to the official external plugins, which are a separate promise:
postulo-imap,-apprise,-dav,-paperless,-mcpand-helloworldare all at0.3.0today, matchedby hand, and each reads its own
__version__from package metadata. Nothing checks that theytrack the core, and the first one to be forgotten will be found by somebody reading a plugins
page rather than by CI.
2. Nothing tells an instance that it is behind
There is no update check anywhere in the tree — no
latest_version, noupdate_available,nothing. The footer (
base.html:211) printsPostulo {{ postulo_version }}and the pluginspage prints the same number beside each built-in. Both are correct, and there is no way,
from inside a running Postulo, to learn that a newer release exists.
That is what produced this report: a display that is right, looking like a bug, because the
number it would have to be compared against is not on the page.
For a self-hosted application this is more than cosmetic. An operator who does not know a
release exists does not know a security release exists, and Postulo is explicitly built to
be run by people who are not full-time administrators.
The constraint that makes this a decision rather than a feature: an update check is an
outbound request, and this application refuses to make requests on a reader's behalf —
jobs/logos.pyandplugins/logos.pyboth exist to avoid exactly that. So the options are:one else — never from the browser, never on a page load;
release feed they subscribe to themselves.
Either is defensible. What is not defensible is the current state, where the number is shown
and cannot be interpreted. That choice belongs in this issue, before any code.