docs(adr): amend ADR-0033 — withdraw apm-manager packageRule
Renovate's apm manager reads only the shorthand form, which apm cannot install for a Gitea subpath, so the overridePackageName rule cannot work. Record the object-form consumer pin and the planned, untested customManagers route. The tag shape decision is unchanged. Refs #235, #236 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
1 parent
0abe97270b
commit
b4a452b690
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
|
- **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>`.
|
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
|
- **`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}`
|
against a synthetic repo, and `apm_cli/marketplace/tag_pattern.py` lists `{name}-v{version}`
|
||||||
among its patterns.
|
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`
|
**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.
|
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
|
**3. Consumers pin with the object form; the `apm` manager does not update them.** *Amended
|
||||||
it.** On hosts other than GitHub and GitLab, Renovate's apm manager does not strip `/plugins/<name>`
|
2026-11-29 (holocron#235, #236); this replaces the original consequence 3, an `overridePackageName`
|
||||||
from the package URL (`lib/modules/manager/apm/extract.ts`, `resolveRepoPath`), so its `git-tags`
|
`packageRules` entry, which is withdrawn.* It was untested and cannot work, for any form:
|
||||||
lookup targets a repo that does not exist. A consumer-side `packageRules` entry along these lines
|
|
||||||
rewrites it. **It is untested.**
|
|
||||||
|
|
||||||
```json
|
- 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`
|
||||||
"matchManagers": ["apm"],
|
folds `plugins/<name>` into the repo path, and an install clones `.../plugins/<name>.git` and
|
||||||
"matchDatasources": ["git-tags"],
|
fails with "Not found". The separate `rstrip(".git")` parse bug (0.28.0) is already fixed upstream
|
||||||
"matchPackageNames": ["/\\/plugins\\/[^/]+$/"],
|
(microsoft/apm#3715, PR #3767).
|
||||||
"overridePackageName": "{{{replace '/plugins/[^/]+$' '' packageName}}}"
|
- 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
|
**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
|
`git cat-file -t <tag>` reports `tag` after fetching. That confirms it is annotated; the script
|
||||||
|
|||||||
Reference in new issue
Block a user