refactor: replace AWS SDK with a REST client for CodeCommit migration (#39330)

Replace `aws-sdk-go-v2` in the CodeCommit migration with a minimal REST
client for the four read-only API calls it uses. Binary shrinks by ~3.1
MB.

Mock data was recorded against live from a AWS CodeCommit repo and then
anonymized.

Also stop storing the repo description as the default branch which fixes
below issue. All comments in
https://github.com/go-gitea/gitea/issues/34627 are addressed, the merge
metadata was fixed earlier in
https://github.com/go-gitea/gitea/pull/34645.

Fixes: https://github.com/go-gitea/gitea/issues/34627
This commit is contained in:
silverwind
2026-09-17 09:58:05 +00:00
committed by GitHub
parent e77d3bffae
commit afb7edef07
11 changed files with 244 additions and 143 deletions
+7
View File
@@ -111,6 +111,13 @@ gitea-runner exec -W ./.github/workflows/pull-db-tests.yml --event=pull_request
gitea-runner exec -W ./.github/workflows/pull-db-tests.yml --event=pull_request --default-actions-url="https://github.com" -i catthehacker/ubuntu:runner-latest -j <job_name>
```
## Recorded API responses
Repository migration unit and integration tests replay API responses recorded under
`_mock_data/`, so they run offline. Setting the environment variables a test reads, usually
API credentials, makes it record from the live API instead. To re-record, delete the test's
`_mock_data` directory, run the test with those variables set, and update its assertions.
## End-to-end tests
End-to-end tests drive a running Gitea instance with [Playwright](https://playwright.dev/):