Split per-type registration points into per-type files #150

Merged
benvin merged 6 commits from benvin/modular-layout into master 2026-10-17 15:54:47 +11:00
Member

Parallel package-type PRs conflict because every type edits the same shared lines (README tables, provider.go, server.go imports, the package type list, UI maps, the e2e caching table). A new type now only adds files.

  • move per-type README sections into docs//{remote,local,virtual}.md
  • split provider.go capability and metadata types into cap_.go and metadata_.go
  • import providers via internal/provider/all, one file per type
  • declare each package type in package_type_.go, registered via init()
  • split the e2e caching cases and UI colours/snippets into per-type files
Parallel package-type PRs conflict because every type edits the same shared lines (README tables, provider.go, server.go imports, the package type list, UI maps, the e2e caching table). A new type now only adds files. - move per-type README sections into docs/<type>/{remote,local,virtual}.md - split provider.go capability and metadata types into cap_*.go and metadata_*.go - import providers via internal/provider/all, one file per type - declare each package type in package_type_<type>.go, registered via init() - split the e2e caching cases and UI colours/snippets into per-type files
unkin-agent added 2 commits 2026-10-17 15:28:43 +11:00
- move README per-type sections into docs/<type>/{remote,local,virtual}.md
- split provider.go capability and metadata types into cap_*.go and metadata_*.go
- register providers via internal/provider/all, one file per type
- declare each package type in its own file, registering via init()
- split the e2e caching table and UI type colours/snippets per type
drop the type list from the e2e caching coverage note
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
a35d1fcb01
Author
Member

No findings.

No findings.
unkin-agent added 1 commit 2026-10-17 15:37:13 +11:00
link provider by url
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
664a182b5c
unkin-agent added 1 commit 2026-10-17 15:39:39 +11:00
use placeholder host in docs
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
7e8037b046
unkin-agent added 1 commit 2026-10-17 15:42:19 +11:00
add common caching doc
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
41035a1c4f
Author
Member
  • docs/common/caching.md:60-ish (Matching rules, "An invalid regex is silently skipped") — wrong: create/update call ValidatePatterns() (internal/api/v2/remotes.go:99,131; pkg/models/remote.go:155) and reject any non-compiling regex in patterns/blocklist/mutable_patterns/immutable_patterns/ban_tags with 400. Skip only happens for rows already stored → say invalid regexes are rejected with 400 on create/update.
  • docs/common/caching.md:19 and Lifecycles "After expiry" row (check_mutable) — misleading: the ETag key is written with the same TTL as the freshness key (SetETag(..., ttl), engine.go:160-161, 566), so once mutable_ttl expires the ETag is gone and the conditional HEAD never runs (TestMutableRevalidation only passes by expiring the ttl: key alone). With mutable_ttl: 0 nothing expires. → document that revalidation needs a surviving ETag and in practice currently does not fire, or fix the ETag TTL in code in a separate PR.
- docs/common/caching.md:60-ish (Matching rules, "An invalid regex is silently skipped") — wrong: `create`/`update` call `ValidatePatterns()` (internal/api/v2/remotes.go:99,131; pkg/models/remote.go:155) and reject any non-compiling regex in patterns/blocklist/mutable_patterns/immutable_patterns/ban_tags with 400. Skip only happens for rows already stored → say invalid regexes are rejected with 400 on create/update. - docs/common/caching.md:19 and Lifecycles "After expiry" row (`check_mutable`) — misleading: the ETag key is written with the same TTL as the freshness key (`SetETag(..., ttl)`, engine.go:160-161, 566), so once `mutable_ttl` expires the ETag is gone and the conditional HEAD never runs (TestMutableRevalidation only passes by expiring the `ttl:` key alone). With `mutable_ttl: 0` nothing expires. → document that revalidation needs a surviving ETag and in practice currently does not fire, or fix the ETag TTL in code in a separate PR.
unkin-agent added 1 commit 2026-10-17 15:47:42 +11:00
correct caching doc
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
7546846e70
benvin merged commit 6e6481e09a into master 2026-10-17 15:54:47 +11:00
benvin deleted branch benvin/modular-layout 2026-10-17 15:54:47 +11:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#150