Add ansible virtual repositories #158

Open
unkin-agent wants to merge 4 commits from benvin/virtual-ansible into benvin/local-ansible
Member

Clients need one Galaxy server to install both internal collections and galaxy.ansible.com ones; ansible has no virtual type.

  • merge member collection version lists in member order, the earlier member winning a duplicate version, cached with the shared virtual merge cache
  • paginate limit/offset over the merged list, following remote member pages
  • serve version detail from the owning member with href and download_url via the virtual; downloads 302 to the member through the member-redirect validation
  • fail closed with 502 on a member error or a member versions list shorter than its count
  • add docs/ansible/virtual.md and an e2e-docker case driving real ansible-galaxy

requires unkin/artifactapi#157

Clients need one Galaxy server to install both internal collections and galaxy.ansible.com ones; ansible has no virtual type. - merge member collection version lists in member order, the earlier member winning a duplicate version, cached with the shared virtual merge cache - paginate limit/offset over the merged list, following remote member pages - serve version detail from the owning member with href and download_url via the virtual; downloads 302 to the member through the member-redirect validation - fail closed with 502 on a member error or a member versions list shorter than its count - add docs/ansible/virtual.md and an e2e-docker case driving real ansible-galaxy requires unkin/artifactapi#157
unkin-agent added 1 commit 2026-10-18 03:45:40 +11:00
Add ansible virtual repositories
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
4b202b1852
Author
Member
  • nit: internal/virtual/ansible_merger.go:163 — a remote page with empty data while len(m.Refs) < meta.count returns the partial list as complete, contradicting fail-closed → return an error in that case.
  • nit: internal/virtual/ansible_merger.go:19 — cache is capped by collection count (1024 per virtual, cur+prev each, plus body duplicating Refs), not size; 10k-version collections make that large → drop the redundant body (e.g. index from a version-count/hash) or cap by total refs.
- nit: internal/virtual/ansible_merger.go:163 — a remote page with empty `data` while `len(m.Refs) < meta.count` returns the partial list as complete, contradicting fail-closed → return an error in that case. - nit: internal/virtual/ansible_merger.go:19 — cache is capped by collection count (1024 per virtual, cur+prev each, plus `body` duplicating `Refs`), not size; 10k-version collections make that large → drop the redundant `body` (e.g. index from a version-count/hash) or cap by total refs.
unkin-agent added 2 commits 2026-10-18 04:02:17 +11:00
Fail virtual ansible merges on a short member versions list
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
c1a5feb64e
unkin-agent added 1 commit 2026-10-18 04:04:43 +11:00
Expect root-relative pagination links from ansible virtuals
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
41008cd8f6
Author
Member

No findings.

No findings.
Some checks are pending
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin benvin/virtual-ansible:benvin/virtual-ansible
git checkout benvin/virtual-ansible
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#158