Merge pull request 'docs(adr): amend ADR-0033 for object-form pins (#235, #236)' (#258) from docs/adr-0033-consumer-pin-amendment into main
Reviewed-on: #258 Reviewed-by: Defame1297 <[email protected]>
This commit was merged in pull request #258.
This commit is contained in:
commit
276fd1f099
1 file changed
+25
-13
@@ -9,6 +9,9 @@ are known, and both read the same tag shape:
|
||||
|
||||
- **Renovate's `apm` manager** (≥ 44.153.0) looks up a dependency on a `plugins/<name>` subpath
|
||||
through the `git-tags` datasource. It considers only tags of the form `<prefix>-v<x.y.z>`.
|
||||
*Amended 2026-11-29 (holocron#235, #236): this is wrong for Holocron consumers. The manager reads
|
||||
only the shorthand form, which apm cannot install for a Gitea subpath, so it does not serve them
|
||||
today. See consequence 3.*
|
||||
- **`apm outdated`** matches the tag pattern `{name}-v{version}`. This was verified with apm 0.28.0
|
||||
against a synthetic repo, and `apm_cli/marketplace/tag_pattern.py` lists `{name}-v{version}`
|
||||
among its patterns.
|
||||
@@ -159,20 +162,29 @@ cuts the same tags on the same commits.
|
||||
**2. The root catalogue's version is not tagged per plugin.** Only the `plugins/<name>/apm.yml`
|
||||
versions get `<plugin>-v*` tags. The marketplace catalogue's own version is out of scope.
|
||||
|
||||
**3. Renovate consumers on this Gitea need an `overridePackageName` rule until upstream fixes
|
||||
it.** On hosts other than GitHub and GitLab, Renovate's apm manager does not strip `/plugins/<name>`
|
||||
from the package URL (`lib/modules/manager/apm/extract.ts`, `resolveRepoPath`), so its `git-tags`
|
||||
lookup targets a repo that does not exist. A consumer-side `packageRules` entry along these lines
|
||||
rewrites it. **It is untested.**
|
||||
**3. Consumers pin with the object form; the `apm` manager does not update them.** *Amended
|
||||
2026-11-29 (holocron#235, #236); this replaces the original consequence 3, an `overridePackageName`
|
||||
`packageRules` entry, which is withdrawn.* It was untested and cannot work, for any form:
|
||||
|
||||
```json
|
||||
{
|
||||
"matchManagers": ["apm"],
|
||||
"matchDatasources": ["git-tags"],
|
||||
"matchPackageNames": ["/\\/plugins\\/[^/]+$/"],
|
||||
"overridePackageName": "{{{replace '/plugins/[^/]+$' '' packageName}}}"
|
||||
}
|
||||
```
|
||||
- On a generic git host such as this Gitea, apm (0.28.0, and still on `main` at 0.39.1) cannot
|
||||
resolve a plugin subdirectory from the shorthand form. `<host>/Mortis/Holocron/plugins/<name>#ref`
|
||||
folds `plugins/<name>` into the repo path, and an install clones `.../plugins/<name>.git` and
|
||||
fails with "Not found". The separate `rstrip(".git")` parse bug (0.28.0) is already fixed upstream
|
||||
(microsoft/apm#3715, PR #3767).
|
||||
- The object form (`git:` + `path:` + `ref:`) is the only working way to pin a Holocron plugin.
|
||||
Consumers set `ref: <plugin>-v<x.y.z>`.
|
||||
- Renovate's `apm` manager (schema `apm: LooseArray(z.string())`) extracts only shorthand strings and
|
||||
silently drops object-form entries. No `apm.yml` entry is both installable by apm and updatable by
|
||||
that manager for a Gitea subpath, so no `packageRules` entry can fix it.
|
||||
|
||||
The planned route is a Renovate `customManagers` regex manager on the object-form `ref:` line: the
|
||||
`git-tags` datasource, a `currentValue` capturing only the version after `<plugin>-v`, an
|
||||
`extractVersion` scoped to that plugin's own prefix, and automerge off. **This is planned and
|
||||
untested, and no snippet is given.** The verified rule goes in a later amendment, after a live
|
||||
consumer proof. Two upstream reports are to be filed: an apm issue for generic-host subpath folding,
|
||||
and a Renovate Discussion for object-form extraction.
|
||||
|
||||
The Decision, the tag shape `<plugin>-v<version>`, is unchanged by this amendment.
|
||||
|
||||
**4. For a maintainer, Gitea's `create_tag` is an equivalent way to cut a tag**, provided
|
||||
`git cat-file -t <tag>` reports `tag` after fetching. That confirms it is annotated; the script
|
||||
|
||||
Reference in new issue
Block a user