Files
artifactapi/internal/api/v2
unkin-agent f8d6db3bd2
ci/woodpecker/tag/docker Pipeline failed
Preserve repo_type on remote update (#179)
PUT /api/v2/remotes/{name} decodes into a fresh struct without seeding repo_type, so terraform updates wipe it to "" on every non-local remote. Virtual repos then redirect member downloads to `/api/v1//<remote>/...`, which 404s.

- keep the existing repo_type when the PUT omits it or sends "", default to `remote` only for a new row, reject invalid values
- require base_url on update when repo_type is `remote`, matching create
- add migration 0011 to repair empty repo_type rows as `local` (no base_url) or `remote`
- add TestRepoTypeKeptOnUpdate

Reviewed-on: #179
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-01 21:18:37 +11:00
..
2026-06-07 19:30:35 +10:00
2026-06-07 19:30:35 +10:00
2026-10-19 00:01:50 +11:00
2026-06-07 19:30:35 +10:00
2026-06-07 19:30:35 +10:00