Registry obi on forge.metabarcoding.org, KIT_LANG=en, CeCILL-2.1. Skeleton generated by crate-kit adopt-kit.sh, plus docs/pilot-risks.md (Gitea risks to test on a throwaway crate before any publication).
6.2 KiB
6.2 KiB
Gitea risks to test on a throwaway crate
Nothing here has been run against forge.metabarcoding.org. Each item states what the kit does (read in
crate-kit 0.2.5 sources), why it may fail on this forge, and a test. Publish nothing from obiskim
or from a real crate until the pilot below passes.
Pilot: a throwaway crate obi/obi-pilot (repository in the obi organization, registry obi),
adopted with make -C obi-kit adopt CRATE=../obi-pilot. Delete the packages, tags and releases afterwards
(a published package version can be deleted from the forge UI/API, but cannot be re-published under the
same version on some setups: use a name and versions that are disposable).
1. Gitea version and Cargo registry (sparse index)
- Kit:
REGISTRY_INDEX = sparse+https://forge.metabarcoding.org/api/packages/obi/cargo/;cargo publish --registry obi;deps-check*.shread the public index andCargo.lockentries containing/api/packages/obi/. - Risk: the Cargo package registry exists only in recent Gitea/Forgejo; the sparse protocol requires
a recent enough version (older ones only serve a git index). The packages feature may also be disabled
in
app.ini([packages] ENABLED). - Test:
curl -s https://forge.metabarcoding.org/api/healthz//api/v1/versionfor the version;curl -I <index>/config.jsonmust answer 200 withdlandapikeys;cargo search --registry obi xorcargo publish --dry-run; real publish ofobi-pilot 0.1.0, then a consumer project resolving it. - Risk: the index is private if the organization or repository is private: anonymous index reads in
deps-check.shwould then get 401/404. Test with and without token; check whether the organizationobiis public.
2. /api/v1 endpoints of forgejo-release.sh
- Kit calls:
GET /api/v1/repos/$REPO/releases/tags/$TAG,GET .../git/refs/tags/$TAG,GET .../git/tags/$SHA,POST .../releases,POST .../releases/$ID/assets?name=...(multipartattachment). HeaderAuthorization: token $FORGETOKEN. - Risk: written against Forgejo; Gitea's API is close but not identical (response shapes of
git/refs, asset upload, annotated-tag message). The existingobiskim/.gitea/workflows/release.ymlalready uses-F attachment=@...against this forge, which is a good sign for assets only. - Test: replay the release workflow on a pilot tag twice (idempotency: "release already exists: reused", "asset already attached").
3. Wiki repository .wiki.git
- Kit:
wiki.shclones${origin%.git}.wiki.git(token viahttp.extraHeader), regenerates the pages, pushes. - Risks: (a) the wiki must be enabled and initialized on the repository (first page created) or the
clone fails; (b) the wiki of
obiskimis a separate checkout (../obiskim.wiki) whose remote still points toOBIKmers/obikmer.wiki.git; (c)wiki.shderives the URL fromorigin, so it depends on the origin fix done inobiskim(nowobi/obiskim.git); (d) a token without wiki rights. - Test: enable the wiki on
obi-pilot, runmake wiki DRY_RUN=1then for real. - Note:
wiki.shis for crates (API doc); the application's user-doc wiki stays onmake wikiofobiskim(pmotransdoc).
4. Secret FORGETOKEN
- Workflows read
${{ secrets.FORGETOKEN }}(repository secret) and use it for clone, publish, wiki and release. - Risks: the secret must exist per repository (or at organization level, to be tested: set it once on
the
obiorganization and check that it is inherited); token scopes must cover packages, repository, wiki and releases (write:package,write:repository,write:organizationmay be needed to see the organization's package registry); token owner must be a member ofobiwith write access. - Test: a workflow step that prints only
${FORGETOKEN:+set}; never echo the token. - Local:
secrets/forge-tokeninobi-kit(gitignored, mode 0600).
5. Runner
- Crate workflow:
runs-on: ubuntu-latest,apt-get install ... build-essential pkg-config, rustup install,cargo install cargo-doc-md --locked(a long compile at every release). - Risks: no runner registered for the
obiorganization (runners are per instance/organization/repo); labelubuntu-latestmay not exist (the existing obiskim workflow may use other labels: compare withobiskim/.gitea/workflows/release.yml); runner needs network access to crates.io and the forge;apt-getassumes a Debian/Ubuntu container running as root; timeout 30 min. - Test: trigger a no-op workflow on
obi-pilot; compare with the labels used by the working release.yml.
6. crate-kit location for the extension-kit workflow
obi-kit/.gitea/workflows/release.yamlclonescrate-kitfrom$SERVER/$CRATE_KIT_REPO, defaultLLM/crate-kit, on the same forge asobi-kit(SERVER=forge.metabarcoding.org).- Risk:
crate-kitcurrently lives ongargoton.petite-maison-orange.fr, another forge:LLM/crate-kitdoes not exist onforge.metabarcoding.org, so the obi-kit release workflow fails at its second clone. - Options to decide: mirror/push
crate-kitto theobiorganization and set the repository variableCRATE_KIT_REPO=obi/crate-kit, or change the clone URL. Not decided.
7. Other points seen while reading
dev-patch.shscansCargo.tomland*/Cargo.tomlof the project root only. Inobiskimthe members are undersrc/: local[patch.obi]to neighbouring extracted crates will not be generated until this is handled (setCARGO_TOML, or enrichdev-patch.shincrate-kitto take a members directory).deps-check.shmay have the same limitation. To test with the first extracted crate.make check(crate.mk) requirespublish = ["obi"]in publishable crates: add it when extracting (not in application crates, which are not published).obiskim/Makefilereleasetarget still usesgit tag/git push(pre-existing); not touched.jjreleaseneeds thejjaliasesauto-docandrelease-notes(pmojj) and amainbookmark trackingmain@origin: check on the pilot, not onobiskim.obiskim.wikiremote andobiskim's CI paths (.gitea/workflows/release.ymlmentions the binary nameobikmer) must follow the rename decision (see report).