team: stop spurious edits that fail Gitea 1.26 permission validation #62
Reference in New Issue
Block a user
Delete Branch "benvin/gitea-provider-1.26"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
gitea_team(docker, terraform, rpmbuild, puppet, pybuild, forgebot, agents) withError: permission mode invalid, blocking the whole apply including the unkin-agent rollout (pipeline 135 on main).noneon any CreateTeam/EditTeam: onlyread/write/admin/ownerare accepted client-side (CreateTeamOption.Validate/EditTeamOption.Validate). This check is identical in SDK v0.21.0 (provider 0.7.0) and v0.25.1 (provider 0.8.1, already on main via #61), so the provider version is not the lever -- the bump to 0.8.1 was already merged and does not fix this.unitsandrepositoriesdrift on provider representation alone (the server returnsunitsas an unordered space-separated string that never matches the provider's comma-ordered default; staterepositoriesare sorted andinclude_all_repositoriespopulates every repo), so every apply plans an in-place update for every team.permission=none(kept byignore_changes) and fails validation. Owners (owner->admin) is the only team that passes.Change
unitsandrepositoriesto the teamignore_changesso provider representation churn no longer triggers a doomed EditTeam call.Note for review
permission: noneis preserved here, and the apply is unblocked. While a team staysnone, itsunits/repositoriescannot be edited through the provider (the SDK rejects any EditTeam on anoneteam).none-permission teams withunits_mapplus a valid coarsepermission(read/write/admin). That is a separate access-policy change.unkinben referenced this pull request2026-08-11 21:01:31 +10:00