Skip to content

Include annexed files in zip and tar.gz downloads#43

Open
matrss wants to merge 11 commits intoneuropoly:git-annexfrom
matrss:include-annex-content-in-archive-downloads
Open

Include annexed files in zip and tar.gz downloads#43
matrss wants to merge 11 commits intoneuropoly:git-annexfrom
matrss:include-annex-content-in-archive-downloads

Conversation

@matrss
Copy link

@matrss matrss commented Jun 26, 2023

Unfortunately there is no straightforward way to retroactively add additional files to tar or zip archives (at least not using the Writer based API provided by the go standard library). Therefore I chose a somewhat different approach:

For tar.gz:

  1. Use git archive to generate a tar archive of the git repo (i.e. what gitea did before)
  2. Immediately read this tar archive using tar.Reader and write it's content, excluding annexed paths (i.e. the symlinks or pointer files tracked in git), to a new tar.Writer (which is gzip'ed and then written to the end location of the archive as given by gitea).
    This should make sure that for standard git repos the output stays the same as before this change.
  3. Add the annexed files to the tar archive

For zip it is mostly the same, apart from needing to read the git archive output fully into memory, since zip files cannot be handled in a streaming fashion:

  1. use git archive to generate a zip archive of the git repo
  2. Read this archive into memory and create a zip.Reader from it
  3. Add all files, except annex'ed, from this archive to a new one at the target location
  4. Add the annexed files to the new zip archive

In general this approach should be pretty efficient, apart from needing to read the entire zip output from git archive into memory. Since a git repo by itself is usually not too large this should be OK for now, though.

TODOs:

  • add tests
  • handle the bundle archive type
  • check the code for bad/non-idiomatic style
  • optimize a bit (it should be possible to immediately start downloading the archive file, but the current implementation first creates the archive and then starts the download)

@matrss matrss force-pushed the include-annex-content-in-archive-downloads branch from a064593 to 2e597e1 Compare June 26, 2023 13:38
@gitea-sync gitea-sync bot force-pushed the git-annex branch 7 times, most recently from 35962fc to de39051 Compare July 3, 2023 13:20
@gitea-sync gitea-sync bot force-pushed the git-annex branch 8 times, most recently from 623fb15 to d27dc49 Compare July 11, 2023 13:19
@matrss
Copy link
Author

matrss commented Jul 12, 2023

I am a bit stuck writing a test case for this. I wanted to amend the integration test TestAPIDownloadArchive by also testing against an annex-enabled repository (or adding a similar test case against a git-annex repo).

Unfortunately I can't get the integration test suite to run, even on the latest git-annex branch. Running TAGS="bindata sqlite sqlite_unlock_notify" make build test-sqlite as taken from the gitea docs leads to a bunch of errors:

go test  -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
# code.gitea.io/gitea/tests/integration [code.gitea.io/gitea/tests/integration.test]
tests/integration/api_helper_for_declarative_test.go:473:68: undefined: auth.AccessTokenScopeWritePublicKey
tests/integration/git_annex_test.go:62:71: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:119:81: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:251:73: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:251:106: undefined: auth_model.AccessTokenScopeDeleteRepo
tests/integration/git_annex_test.go:267:62: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:268:62: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:269:64: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:567:74: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:567:107: undefined: auth_model.AccessTokenScopeDeleteRepo
tests/integration/git_annex_test.go:567:107: too many errors
make: *** [Makefile:704: integrations.sqlite.test] Error 1

This seems to be rooted in recent changes to how the access tokens are constructed / what scopes are available.

After replacing auth.AccessTokenScopeWritePublicKey with auth.AccessTokenScopeAll and auth_model.AccessTokenScopeRepo / auth_model.AccessTokenScopeDeleteRepo with auth_model.AccessTokenScopeWriteRepository the tests run, but many fail, even unrelated to git-annex, see:

test output

Running go generate...
bindata for migration already up-to-date
generating bindata for options
generating bindata for public
generating bindata for templates
CGO_CFLAGS="-O2 -g -DSQLITE_MAX_VARIABLE_NUMBER=32766" go build -v  -tags 'bindata sqlite sqlite_unlock_notify' -ldflags '-s -w  -X "main.MakeVersion=GNU Make 4.3" -X "main.Version=1.20.0+rc0-281-gd27dc49f7" -X "main.Tags=bindata sqlite sqlite_unlock_notify"' -o gitea
go test  -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
sed -e 's|{{REPO_TEST_DIR}}||g' \
	-e 's|{{TEST_LOGGER}}|test,file|g' \
	-e 's|{{TEST_TYPE}}|integration|g' \
		tests/sqlite.ini.tmpl > tests/sqlite.ini
GITEA_ROOT="/home/icg149/Projects/gitea-neuropoly" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test
2023/07/12 14:29:59 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/attachments
2023/07/12 14:29:59 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/avatars
2023/07/12 14:29:59 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/repo-avatars
2023/07/12 14:29:59 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/lfs
2023/07/12 14:29:59 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/repo-archive
2023/07/12 14:29:59 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/packages
2023/07/12 14:29:59 ...s/storage/storage.go:219:initActions() [I] Initialising Actions storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/actions_log
2023/07/12 14:29:59 ...s/storage/storage.go:223:initActions() [I] Initialising ActionsArtifacts storage with type: local
2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/actions_artifacts
2023/07/12 14:29:59 modules/git/git.go:132:checkInit() [W] git module has been initialized already, duplicate init may work but it's better to fix it
2023/07/12 14:29:59 modules/git/git.go:132:checkInit() [W] git module has been initialized already, duplicate init may work but it's better to fix it
2023/07/12 14:29:59 routers/init.go:112:InitWebInstalled() [I] Git version: 2.34.1, Wire Protocol Version 2 Enabled (home: /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/home)
2023/07/12 14:29:59 ...g/config_provider.go:321:deprecatedSetting() [E] Deprecated fallback `[log]` `ROUTER` present. Use `[log]` `logger.router.MODE` instead. This fallback will be/has been removed in 1.21
2023/07/12 14:29:59 ...g/config_provider.go:321:deprecatedSetting() [E] Deprecated fallback `[log]` `XORM` present. Use `[log]` `logger.xorm.MODE` instead. This fallback will be/has been removed in 1.21
??? [TestLogger] 2023/07/12 14:29:59 ...les/setting/cache.go:75:loadCacheFrom() [I] Cache Service Enabled
??? [TestLogger] 2023/07/12 14:29:59 ...les/setting/cache.go:90:loadCacheFrom() [I] Last Commit Cache Service Enabled
??? [TestLogger] 2023/07/12 14:29:59 ...s/setting/session.go:74:loadSessionFrom() [I] Session Service Enabled
??? [TestLogger] 2023/07/12 14:29:59 ...g/config_provider.go:321:deprecatedSetting() [E] Deprecated fallback `[mailer]` `MAILER_TYPE` present. Use `[mailer]` `PROTOCOL` instead. This fallback will be/has been removed in v1.19.0
??? [TestLogger] 2023/07/12 14:29:59 ...es/setting/mailer.go:179:loadMailerFrom() [E] unable to infer unspecified mailer.PROTOCOL from mailer.SMTP_PORT = "", assume using smtps
??? [TestLogger] 2023/07/12 14:29:59 ...es/setting/mailer.go:275:tryResolveAddr() [W] could not look up mailer.SMTP_ADDR: lookup : no such host
??? [TestLogger] 2023/07/12 14:29:59 ...es/setting/mailer.go:237:loadMailerFrom() [I] Mail Service Enabled
??? [TestLogger] 2023/07/12 14:29:59 ...es/setting/mailer.go:259:loadNotifyMailFrom() [I] Notify Mail Service Enabled
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/attachments
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/avatars
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/repo-avatars
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/lfs
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/repo-archive
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/packages
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:219:initActions() [I] Initialising Actions storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/actions_log
??? [TestLogger] 2023/07/12 14:29:59 ...s/storage/storage.go:223:initActions() [I] Initialising ActionsArtifacts storage with type: local
??? [TestLogger] 2023/07/12 14:29:59 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/actions_artifacts
??? [TestLogger] 2023/07/12 14:29:59 routers/init.go:130:InitWebInstalled() [I] SQLite3 support is enabled
??? [TestLogger] 2023/07/12 14:29:59 routers/common/db.go:21:InitDBEngine() [I] Beginning ORM engine initialization.
??? [TestLogger] 2023/07/12 14:29:59 routers/common/db.go:28:InitDBEngine() [I] ORM engine initialization attempt #1/10...
??? [TestLogger] 2023/07/12 14:30:00 routers/init.go:136:InitWebInstalled() [I] ORM engine initialization successful!
??? [TestLogger] 2023/07/12 14:30:00 ...er/issues/indexer.go:91:func2() [I] PID 105495: Initializing Issue Indexer: bleve
??? [TestLogger] 2023/07/12 14:30:00 ...exer/code/indexer.go:168:func3() [I] PID: 105495 Initializing Repository Indexer at: /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/indexers/repos.bleve
??? [TestLogger] 2023/07/12 14:30:00 ...xer/stats/indexer.go:39:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
??? [TestLogger] 2023/07/12 14:30:00 routers/init.go:81:syncAppConfForGit() [I] AppPath changed from '' to '/home/icg149/Projects/gitea-neuropoly/gitea'
??? [TestLogger] 2023/07/12 14:30:00 routers/init.go:86:syncAppConfForGit() [I] CustomConf changed from '' to '/home/icg149/Projects/gitea-neuropoly/tests/sqlite.ini'
??? [TestLogger] 2023/07/12 14:30:00 routers/init.go:92:syncAppConfForGit() [I] re-sync repository hooks ...
??? [TestLogger] 2023/07/12 14:30:00 routers/init.go:95:syncAppConfForGit() [I] re-write ssh public keys ...
??? [TestLogger] 2023/07/12 14:30:00 ...er/issues/indexer.go:168:func3() [I] Issue Indexer Initialization took 6.957323ms
??? [TestLogger] 2023/07/12 14:30:00 ...exer/code/indexer.go:249:func4() [I] Repository Indexer Initialization took 7.421304ms
??? [TestLogger] 2023/07/12 14:30:00 ...exer/code/indexer.go:275:populateRepoIndexer() [I] Populating the repo indexer with existing repositories
??? [TestLogger] 2023/07/12 14:30:03 modules/ssh/ssh.go:325:Listen() [I] Adding SSH host key: /home/icg149/Projects/gitea-neuropoly/tests/integration/gitea-integration-sqlite/data/ssh/gitea.rsa
??? [TestLogger] 2023/07/12 14:30:03 modules/ssh/init.go:26:Init() [I] SSH server started on localhost:2203. Cipher list ([chacha20-poly1305@openssh.com aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com]), key exchange algorithms ([curve25519-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group14-sha1]), MACs ([hmac-sha2-256-etm@openssh.com hmac-sha2-256 hmac-sha1])
??? [TestLogger] 2023/07/12 14:30:03 ...s/graceful/server.go:62:NewServer() [I] Starting new SSH server: tcp:localhost:2203 on PID: 105495
=== TestPullRequestTargetEvent (tests/integration/actions_trigger_test.go:29)
=== TestAdminConfig (/usr/local/go/src/testing/testing.go:1576)
=== TestAdminViewUsers (/usr/local/go/src/testing/testing.go:1576)
=== TestAdminViewUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAdminEditUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAdminDeleteUser (/usr/local/go/src/testing/testing.go:1576)
=== TestActionsArtifactUpload (/usr/local/go/src/testing/testing.go:1576)
=== TestActionsArtifactUploadNotExist (/usr/local/go/src/testing/testing.go:1576)
=== TestActionsArtifactConfirmUpload (/usr/local/go/src/testing/testing.go:1576)
=== TestActionsArtifactUploadWithoutToken (/usr/local/go/src/testing/testing.go:1576)
=== TestActionsArtifactDownload (/usr/local/go/src/testing/testing.go:1576)
=== TestActivityPubPerson (tests/integration/api_activitypub_person_test.go:31)
=== TestActivityPubMissingPerson (tests/integration/api_activitypub_person_test.go:69)
=== TestActivityPubPersonInbox (tests/integration/api_activitypub_person_test.go:87)
=== TestAPIAdminOrgCreate (tests/integration/api_admin_org_test.go:22)
=== TestAPIAdminOrgCreateBadVisibility (tests/integration/api_admin_org_test.go:56)
=== TestAPIAdminOrgCreateNotAdmin (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIAdminCreateAndDeleteSSHKey (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIAdminDeleteMissingSSHKey (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIAdminDeleteUnauthorizedKey (/usr/local/go/src/testing/testing.go:1576)
=== TestAPISudoUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAPISudoUserForbidden (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListUsers (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListUsersNotLoggedIn (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListUsersNonAdmin (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateUserInvalidEmail (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateAndDeleteUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateRepoForUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRenameUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetBranch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateBranch (tests/integration/api_branch_test.go:100)
=== TestAPIBranchProtection (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetCommentAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListCommentAttachments (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateCommentAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditCommentAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteCommentAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListRepoComments (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListIssueComments (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateComment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetComment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditComment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteComment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListIssueTimeline (/usr/local/go/src/testing/testing.go:1576)
=== TestFeed/User/Atom (/usr/local/go/src/testing/testing.go:1576)
=== TestFeed/User/RSS (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateForkNoLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListGitignoresTemplates (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetGitignoreTemplateInfo (/usr/local/go/src/testing/testing.go:1576)
=== TestGPGKeys (/usr/local/go/src/testing/testing.go:1576)
=== TestHTTPSigPubKey (/usr/local/go/src/testing/testing.go:1576)
=== TestHTTPSigCert (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetIssueAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListIssueAttachments (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateIssueAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditIssueAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteIssueAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGetDefaultIssueConfig (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposValidateDefaultIssueConfig (/usr/local/go/src/testing/testing.go:1576)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/login for test-mock:12345, 200 OK in 1.2ms @ auth/auth.go:141(auth.SignIn)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/login for test-mock:12345, 303 See Other in 7.5ms @ auth/auth.go:170(auth.SignInPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.3ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/settings/applications for test-mock:12345, 303 See Other in 8.6ms @ setting/applications.go:33(setting.ApplicationsPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.3ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/repos/user2/repo2/labels?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 201 Created in 10.8ms @ repo/label.go:117(repo.CreateLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/repos/user2/repo2/labels?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 201 Created in 10.6ms @ repo/label.go:117(repo.CreateLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/repos/user2/repo2/labels?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 422 Unprocessable Entity in 7.9ms @ repo/label.go:117(repo.CreateLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/repos/user2/repo2/labels?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 200 OK in 8.2ms @ repo/label.go:21(repo.ListLabels)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/repos/user2/repo2/labels/10?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 200 OK in 8.3ms @ repo/label.go:67(repo.GetLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /api/v1/repos/user2/repo2/labels/10?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 200 OK in 10.7ms @ repo/label.go:171(repo.EditLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /api/v1/repos/user2/repo2/labels/10?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 422 Unprocessable Entity in 8.7ms @ repo/label.go:171(repo.EditLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed DELETE /api/v1/repos/user2/repo2/labels/10?token=afd0a9effa6ae4dbb812b7b034861b6683f60117 for test-mock:12345, 204 No Content in 10.9ms @ repo/label.go:243(repo.DeleteLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/login for test-mock:12345, 200 OK in 0.9ms @ auth/auth.go:141(auth.SignIn)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/login for test-mock:12345, 303 See Other in 7.7ms @ auth/auth.go:170(auth.SignInPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.2ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/settings/applications for test-mock:12345, 303 See Other in 8.4ms @ setting/applications.go:33(setting.ApplicationsPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.1ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/repos/user2/repo1/issues/1/labels?token=3e4978dc94b3df9cd095dede14ddf22e62c7a8b3 for test-mock:12345, 200 OK in 12.7ms @ repo/issue_label.go:67(repo.AddIssueLabels)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/login for test-mock:12345, 200 OK in 0.8ms @ auth/auth.go:141(auth.SignIn)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/login for test-mock:12345, 303 See Other in 7.8ms @ auth/auth.go:170(auth.SignInPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.0ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/settings/applications for test-mock:12345, 303 See Other in 8.2ms @ setting/applications.go:33(setting.ApplicationsPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.0ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed PUT /api/v1/repos/user2/repo1/issues/1/labels?token=edf230ac901fe1aedb11e80af2adbe70bf226d75 for test-mock:12345, 200 OK in 10.3ms @ repo/issue_label.go:194(repo.ReplaceIssueLabels)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/login for test-mock:12345, 200 OK in 0.9ms @ auth/auth.go:141(auth.SignIn)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/login for test-mock:12345, 303 See Other in 7.4ms @ auth/auth.go:170(auth.SignInPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.3ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /user/settings/applications for test-mock:12345, 303 See Other in 8.0ms @ setting/applications.go:33(setting.ApplicationsPost)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/settings/applications for test-mock:12345, 200 OK in 2.2ms @ setting/applications.go:23(setting.Applications)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/orgs/user3/labels?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 201 Created in 10.5ms @ org/label.go:62(org.CreateLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/orgs/user3/labels?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 201 Created in 10.5ms @ org/label.go:62(org.CreateLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/orgs/user3/labels?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 422 Unprocessable Entity in 8.0ms @ org/label.go:62(org.CreateLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/orgs/user3/labels?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 200 OK in 8.4ms @ org/label.go:21(org.ListLabels)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/orgs/user3/labels/12?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 200 OK in 7.8ms @ org/label.go:110(org.GetLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /api/v1/orgs/user3/labels/12?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 200 OK in 10.6ms @ org/label.go:155(org.EditLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /api/v1/orgs/user3/labels/12?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 422 Unprocessable Entity in 8.0ms @ org/label.go:155(org.EditLabel)
??? [TestLogger] 2023/07/12 14:30:21 ...eb/routing/logger.go:102:func1() [I] router: completed DELETE /api/v1/orgs/user3/labels/12?token=8d06908e00550645112bbfbd19d8c377078a77df for test-mock:12345, 204 No Content in 10.1ms @ org/label.go:221(org.DeleteLabel)
=== TestAPIIssuesMilestone (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIPinIssue (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUnpinIssue (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIMoveIssuePin (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListPinnedIssues (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListPinnedPullrequests (/usr/local/go/src/testing/testing.go:1576)
=== TestAPINewPinAllowed (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIIssuesReactions (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICommentReactions (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListStopWatches (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIStopStopWatches (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICancelStopWatches (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIStartStopWatches (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIIssueSubscriptions (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListIssues (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateIssue (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateIssueParallel (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditIssue (/usr/local/go/src/testing/testing.go:1576)
=== TestAPISearchIssues (/usr/local/go/src/testing/testing.go:1576)
=== TestAPISearchIssuesWithLabels (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetTrackedTimes (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteTrackedTime (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIAddTrackedTimes (/usr/local/go/src/testing/testing.go:1576)
=== TestViewDeployKeysNoLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateDeployKeyNoLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestGetDeployKeyNoLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestDeleteDeployKeyNoLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateReadOnlyDeployKey (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateReadWriteDeployKey (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateUserKey (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListLabelTemplates (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetLabelTemplateInfo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListLicenseTemplates (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetLicenseTemplateInfo (/usr/local/go/src/testing/testing.go:1576)
=== TestNodeinfo (tests/integration/api_nodeinfo_test.go:26)
=== TestAPINotification (/usr/local/go/src/testing/testing.go:1576)
=== TestAPINotificationPUT (/usr/local/go/src/testing/testing.go:1576)
=== TestOAuth2Application (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUpdateOrgAvatar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteOrgAvatar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIOrgCreate (tests/integration/api_org_test.go:28)
=== TestAPIOrgEdit (tests/integration/api_org_test.go:100)
=== TestAPIOrgEditBadVisibility (tests/integration/api_org_test.go:127)
=== TestAPIOrgDeny (tests/integration/api_org_test.go:144)
=== TestAPIGetAll (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIOrgSearchEmptyTeam (tests/integration/api_org_test.go:188)
=== TestPackageAlpine (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageAlpine/RepositoryKey (tests/integration/api_packages_alpine_test.go:68)
=== TestPackageAlpine/[Branch:v3.16,Repository:main]/Upload (tests/integration/api_packages_alpine_test.go:81)
=== TestPackageAlpine/[Branch:v3.16,Repository:main]/Index (tests/integration/api_packages_alpine_test.go:143)
=== TestPackageAlpine/[Branch:v3.16,Repository:main]/Download (tests/integration/api_packages_alpine_test.go:202)
=== TestPackageAlpine/[Branch:v3.16,Repository:testing]/Upload (tests/integration/api_packages_alpine_test.go:81)
=== TestPackageAlpine/[Branch:v3.16,Repository:testing]/Index (tests/integration/api_packages_alpine_test.go:143)
=== TestPackageAlpine/[Branch:v3.16,Repository:testing]/Download (tests/integration/api_packages_alpine_test.go:202)
=== TestPackageAlpine/[Branch:v3.17,Repository:main]/Upload (tests/integration/api_packages_alpine_test.go:81)
=== TestPackageAlpine/[Branch:v3.17,Repository:main]/Index (tests/integration/api_packages_alpine_test.go:143)
=== TestPackageAlpine/[Branch:v3.17,Repository:main]/Download (tests/integration/api_packages_alpine_test.go:202)
=== TestPackageAlpine/[Branch:v3.17,Repository:testing]/Upload (tests/integration/api_packages_alpine_test.go:81)
=== TestPackageAlpine/[Branch:v3.17,Repository:testing]/Index (tests/integration/api_packages_alpine_test.go:143)
=== TestPackageAlpine/[Branch:v3.17,Repository:testing]/Download (tests/integration/api_packages_alpine_test.go:202)
=== TestPackageAlpine/[Branch:v3.18,Repository:main]/Upload (tests/integration/api_packages_alpine_test.go:81)
=== TestPackageAlpine/[Branch:v3.18,Repository:main]/Index (tests/integration/api_packages_alpine_test.go:143)
=== TestPackageAlpine/[Branch:v3.18,Repository:main]/Download (tests/integration/api_packages_alpine_test.go:202)
=== TestPackageAlpine/[Branch:v3.18,Repository:testing]/Upload (tests/integration/api_packages_alpine_test.go:81)
=== TestPackageAlpine/[Branch:v3.18,Repository:testing]/Index (tests/integration/api_packages_alpine_test.go:143)
=== TestPackageAlpine/[Branch:v3.18,Repository:testing]/Download (tests/integration/api_packages_alpine_test.go:202)
=== TestPackageAlpine/Delete (tests/integration/api_packages_alpine_test.go:212)
=== TestPackageCargo (tests/integration/api_packages_cargo_test.go:33)
=== TestPackageCargo/Index/Git/Config (tests/integration/api_packages_cargo_test.go:102)
=== TestPackageCargo/Index/HTTP/Config (tests/integration/api_packages_cargo_test.go:115)
=== TestPackageCargo/Upload/InvalidNameOrVersion (tests/integration/api_packages_cargo_test.go:131)
=== TestPackageCargo/Upload/InvalidContent (tests/integration/api_packages_cargo_test.go:154)
=== TestPackageCargo/Upload/Valid (tests/integration/api_packages_cargo_test.go:170)
=== TestPackageCargo/Upload/Valid/Index/Git/Entry (tests/integration/api_packages_cargo_test.go:211)
=== TestPackageCargo/Upload/Valid/Index/Git/Rebuild (tests/integration/api_packages_cargo_test.go:238)
=== TestPackageCargo/Upload/Valid/Index/HTTP/Entry (tests/integration/api_packages_cargo_test.go:249)
=== TestPackageCargo/Download (tests/integration/api_packages_cargo_test.go:281)
=== TestPackageCargo/Search (tests/integration/api_packages_cargo_test.go:303)
=== TestPackageCargo/Yank (tests/integration/api_packages_cargo_test.go:334)
=== TestPackageCargo/Unyank (tests/integration/api_packages_cargo_test.go:354)
=== TestPackageCargo/ListOwners (tests/integration/api_packages_cargo_test.go:374)
=== TestPackageChef (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageChef/Authenticate/MissingUser (tests/integration/api_packages_chef_test.go:93)
=== TestPackageChef/Authenticate/NotExistingUser (tests/integration/api_packages_chef_test.go:102)
=== TestPackageChef/Authenticate/Timestamp (tests/integration/api_packages_chef_test.go:112)
=== TestPackageChef/Authenticate/SigningVersion (tests/integration/api_packages_chef_test.go:127)
=== TestPackageChef/Authenticate/SignedHeaders (tests/integration/api_packages_chef_test.go:158)
=== TestPackageChef/Authenticate/SignedHeaders/1.0 (tests/integration/api_packages_chef_test.go:255)
=== TestPackageChef/Authenticate/SignedHeaders/1.1 (tests/integration/api_packages_chef_test.go:255)
=== TestPackageChef/Authenticate/SignedHeaders/1.2 (tests/integration/api_packages_chef_test.go:255)
=== TestPackageChef/Authenticate/SignedHeaders/1.3 (tests/integration/api_packages_chef_test.go:255)
=== TestPackageChef/Upload (tests/integration/api_packages_chef_test.go:301)
=== TestPackageChef/Download (tests/integration/api_packages_chef_test.go:329)
=== TestPackageChef/Universe (tests/integration/api_packages_chef_test.go:336)
=== TestPackageChef/Search (tests/integration/api_packages_chef_test.go:367)
=== TestPackageChef/EnumeratePackages (tests/integration/api_packages_chef_test.go:418)
=== TestPackageChef/PackageMetadata (tests/integration/api_packages_chef_test.go:469)
=== TestPackageChef/PackageVersionMetadata (tests/integration/api_packages_chef_test.go:501)
=== TestPackageChef/Delete/Version (tests/integration/api_packages_chef_test.go:531)
=== TestPackageChef/Delete/Package (tests/integration/api_packages_chef_test.go:546)
=== TestPackageComposer (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageComposer/ServiceIndex (tests/integration/api_packages_composer_test.go:60)
=== TestPackageComposer/Upload/MissingVersion (tests/integration/api_packages_composer_test.go:76)
=== TestPackageComposer/Upload/Valid (tests/integration/api_packages_composer_test.go:84)
=== TestPackageComposer/Download (tests/integration/api_packages_composer_test.go:120)
=== TestPackageComposer/SearchService (tests/integration/api_packages_composer_test.go:144)
=== TestPackageComposer/EnumeratePackages (tests/integration/api_packages_composer_test.go:178)
=== TestPackageComposer/PackageMetadata (tests/integration/api_packages_composer_test.go:194)
=== TestPackageConan (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageConan/v1/Ping (tests/integration/api_packages_conan_test.go:225)
=== TestPackageConan/v1/Authenticate (tests/integration/api_packages_conan_test.go:236)
=== TestPackageConan/v1/CheckCredentials (tests/integration/api_packages_conan_test.go:249)
=== TestPackageConan/v1/Upload (tests/integration/api_packages_conan_test.go:257)
=== TestPackageConan/v1/Upload/Validate (tests/integration/api_packages_conan_test.go:262)
=== TestPackageConan/v1/Download (tests/integration/api_packages_conan_test.go:306)
=== TestPackageConan/v1/Search/Recipe (tests/integration/api_packages_conan_test.go:372)
=== TestPackageConan/v1/Search/Package (tests/integration/api_packages_conan_test.go:409)
=== TestPackageConan/v1/Delete/Package (tests/integration/api_packages_conan_test.go:425)
=== TestPackageConan/v1/Delete/Recipe (tests/integration/api_packages_conan_test.go:454)
=== TestPackageConan/v2/Ping (tests/integration/api_packages_conan_test.go:483)
=== TestPackageConan/v2/Authenticate (tests/integration/api_packages_conan_test.go:494)
=== TestPackageConan/v2/CheckCredentials (tests/integration/api_packages_conan_test.go:507)
=== TestPackageConan/v2/Upload (tests/integration/api_packages_conan_test.go:515)
=== TestPackageConan/v2/Upload/Validate (tests/integration/api_packages_conan_test.go:520)
=== TestPackageConan/v2/Latest (tests/integration/api_packages_conan_test.go:529)
=== TestPackageConan/v2/ListRevisions (tests/integration/api_packages_conan_test.go:551)
=== TestPackageConan/v2/Search/Recipe (tests/integration/api_packages_conan_test.go:594)
=== TestPackageConan/v2/Search/Package (tests/integration/api_packages_conan_test.go:631)
=== TestPackageConan/v2/Delete/Package (tests/integration/api_packages_conan_test.go:657)
=== TestPackageConan/v2/Delete/Recipe (tests/integration/api_packages_conan_test.go:699)
=== TestPackageConda (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageConda/Upload/.tar.bz2 (tests/integration/api_packages_conda_test.go:57)
=== TestPackageConda/Upload/.conda (tests/integration/api_packages_conda_test.go:91)
=== TestPackageConda/Download/.tar.bz2 (tests/integration/api_packages_conda_test.go:148)
=== TestPackageConda/Download/.conda (tests/integration/api_packages_conda_test.go:158)
=== TestPackageConda/EnumeratePackages/.tar.bz2 (tests/integration/api_packages_conda_test.go:213)
=== TestPackageConda/EnumeratePackages/.conda (tests/integration/api_packages_conda_test.go:244)
=== TestPackageContainer (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageContainer/Authenticate/Anonymous (tests/integration/api_packages_container_test.go:89)
=== TestPackageContainer/Authenticate/User (tests/integration/api_packages_container_test.go:112)
=== TestPackageContainer/DetermineSupport (tests/integration/api_packages_container_test.go:137)
=== TestPackageContainer/[Image:test]/UploadBlob/Monolithic (tests/integration/api_packages_container_test.go:150)
=== TestPackageContainer/[Image:test]/UploadBlob/Chunked (tests/integration/api_packages_container_test.go:180)
=== TestPackageContainer/[Image:test]/UploadBlob/Chunked/Cancel (tests/integration/api_packages_container_test.go:234)
=== TestPackageContainer/[Image:test]/UploadBlob/Mount (tests/integration/api_packages_container_test.go:264)
=== TestPackageContainer/[Image:test]/[Tag:latest]/UploadManifest (tests/integration/api_packages_container_test.go:301)
=== TestPackageContainer/[Image:test]/[Tag:latest]/HeadManifest (tests/integration/api_packages_container_test.go:376)
=== TestPackageContainer/[Image:test]/[Tag:latest]/GetManifest (tests/integration/api_packages_container_test.go:391)
=== TestPackageContainer/[Image:test]/[Tag:main]/UploadManifest (tests/integration/api_packages_container_test.go:301)
=== TestPackageContainer/[Image:test]/[Tag:main]/HeadManifest (tests/integration/api_packages_container_test.go:376)
=== TestPackageContainer/[Image:test]/[Tag:main]/GetManifest (tests/integration/api_packages_container_test.go:391)
=== TestPackageContainer/[Image:test]/UploadUntaggedManifest (tests/integration/api_packages_container_test.go:410)
=== TestPackageContainer/[Image:test]/UploadIndexManifest (tests/integration/api_packages_container_test.go:450)
=== TestPackageContainer/[Image:test]/HeadBlob (tests/integration/api_packages_container_test.go:499)
=== TestPackageContainer/[Image:test]/GetBlob (tests/integration/api_packages_container_test.go:518)
=== TestPackageContainer/[Image:test]/GetTagList (tests/integration/api_packages_container_test.go:534)
=== TestPackageContainer/[Image:test]/Delete/Blob (tests/integration/api_packages_container_test.go:596)
=== TestPackageContainer/[Image:test]/Delete/ManifestByDigest (tests/integration/api_packages_container_test.go:608)
=== TestPackageContainer/[Image:test]/Delete/ManifestByTag (tests/integration/api_packages_container_test.go:620)
=== TestPackageContainer/[Image:te/st]/UploadBlob/Monolithic (tests/integration/api_packages_container_test.go:150)
=== TestPackageContainer/[Image:te/st]/UploadBlob/Chunked (tests/integration/api_packages_container_test.go:180)
=== TestPackageContainer/[Image:te/st]/UploadBlob/Chunked/Cancel (tests/integration/api_packages_container_test.go:234)
=== TestPackageContainer/[Image:te/st]/UploadBlob/Mount (tests/integration/api_packages_container_test.go:264)
=== TestPackageContainer/[Image:te/st]/[Tag:latest]/UploadManifest (tests/integration/api_packages_container_test.go:301)
=== TestPackageContainer/[Image:te/st]/[Tag:latest]/HeadManifest (tests/integration/api_packages_container_test.go:376)
=== TestPackageContainer/[Image:te/st]/[Tag:latest]/GetManifest (tests/integration/api_packages_container_test.go:391)
=== TestPackageContainer/[Image:te/st]/[Tag:main]/UploadManifest (tests/integration/api_packages_container_test.go:301)
=== TestPackageContainer/[Image:te/st]/[Tag:main]/HeadManifest (tests/integration/api_packages_container_test.go:376)
=== TestPackageContainer/[Image:te/st]/[Tag:main]/GetManifest (tests/integration/api_packages_container_test.go:391)
=== TestPackageContainer/[Image:te/st]/UploadUntaggedManifest (tests/integration/api_packages_container_test.go:410)
=== TestPackageContainer/[Image:te/st]/UploadIndexManifest (tests/integration/api_packages_container_test.go:450)
=== TestPackageContainer/[Image:te/st]/HeadBlob (tests/integration/api_packages_container_test.go:499)
=== TestPackageContainer/[Image:te/st]/GetBlob (tests/integration/api_packages_container_test.go:518)
=== TestPackageContainer/[Image:te/st]/GetTagList (tests/integration/api_packages_container_test.go:534)
=== TestPackageContainer/[Image:te/st]/Delete/Blob (tests/integration/api_packages_container_test.go:596)
=== TestPackageContainer/[Image:te/st]/Delete/ManifestByDigest (tests/integration/api_packages_container_test.go:608)
=== TestPackageContainer/[Image:te/st]/Delete/ManifestByTag (tests/integration/api_packages_container_test.go:620)
=== TestPackageContainer/ParallelUpload (tests/integration/api_packages_container_test.go:636)
=== TestPackageContainer/OwnerNameChange (tests/integration/api_packages_container_test.go:661)
=== TestPackageContainer/OwnerNameChange/Catalog[user2] (tests/integration/api_packages_container_test.go:665)
=== TestPackageContainer/OwnerNameChange/Catalog[newUsername] (tests/integration/api_packages_container_test.go:665)
=== TestPackageCran (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageCran/Source/Upload (tests/integration/api_packages_cran_test.go:67)
=== TestPackageCran/Source/Download (tests/integration/api_packages_cran_test.go:114)
=== TestPackageCran/Source/Enumerate (tests/integration/api_packages_cran_test.go:122)
=== TestPackageCran/Binary/Upload (tests/integration/api_packages_cran_test.go:153)
=== TestPackageCran/Binary/Download (tests/integration/api_packages_cran_test.go:200)
=== TestPackageCran/Binary/Enumerate (tests/integration/api_packages_cran_test.go:220)
=== TestPackageDebian (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageDebian/RepositoryKey (tests/integration/api_packages_debian_test.go:69)
=== TestPackageDebian/[Distribution:test]/[Component:main,Architecture:all]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:test]/[Component:main,Architecture:all]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:test]/[Component:main,Architecture:all]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:test]/[Component:main,Architecture:amd64]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:test]/[Component:main,Architecture:amd64]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:test]/[Component:main,Architecture:amd64]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:test]/[Component:stable,Architecture:all]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:test]/[Component:stable,Architecture:all]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:test]/[Component:stable,Architecture:all]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:test]/[Component:stable,Architecture:amd64]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:test]/[Component:stable,Architecture:amd64]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:test]/[Component:stable,Architecture:amd64]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:test]/Release (tests/integration/api_packages_debian_test.go:190)
=== TestPackageDebian/[Distribution:gitea]/[Component:main,Architecture:all]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:gitea]/[Component:main,Architecture:all]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:gitea]/[Component:main,Architecture:all]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:gitea]/[Component:main,Architecture:amd64]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:gitea]/[Component:main,Architecture:amd64]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:gitea]/[Component:main,Architecture:amd64]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:gitea]/[Component:stable,Architecture:all]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:gitea]/[Component:stable,Architecture:all]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:gitea]/[Component:stable,Architecture:all]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:gitea]/[Component:stable,Architecture:amd64]/Upload (tests/integration/api_packages_debian_test.go:84)
=== TestPackageDebian/[Distribution:gitea]/[Component:stable,Architecture:amd64]/Download (tests/integration/api_packages_debian_test.go:150)
=== TestPackageDebian/[Distribution:gitea]/[Component:stable,Architecture:amd64]/Packages (tests/integration/api_packages_debian_test.go:159)
=== TestPackageDebian/[Distribution:gitea]/Release (tests/integration/api_packages_debian_test.go:190)
=== TestPackageDebian/Delete (tests/integration/api_packages_debian_test.go:227)
=== TestPackageGeneric (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageGeneric/Upload (tests/integration/api_packages_generic_test.go:36)
=== TestPackageGeneric/Upload/Exists (tests/integration/api_packages_generic_test.go:63)
=== TestPackageGeneric/Upload/Additional (tests/integration/api_packages_generic_test.go:71)
=== TestPackageGeneric/Upload/InvalidParameter (tests/integration/api_packages_generic_test.go:85)
=== TestPackageGeneric/Download (tests/integration/api_packages_generic_test.go:102)
=== TestPackageGeneric/Download/NotExists (tests/integration/api_packages_generic_test.go:126)
=== TestPackageGeneric/Download/RequireSignInView (tests/integration/api_packages_generic_test.go:133)
=== TestPackageGeneric/Download/ServeDirect (tests/integration/api_packages_generic_test.go:145)
=== TestPackageGeneric/Delete (tests/integration/api_packages_generic_test.go:182)
=== TestPackageGeneric/Delete/File (tests/integration/api_packages_generic_test.go:185)
=== TestPackageGeneric/Delete/File/RemovesVersion (tests/integration/api_packages_generic_test.go:206)
=== TestPackageGeneric/Delete/Version (tests/integration/api_packages_generic_test.go:219)
=== TestPackageGo (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageGo/Upload (tests/integration/api_packages_goproxy_test.go:47)
=== TestPackageGo/List (tests/integration/api_packages_goproxy_test.go:102)
=== TestPackageGo/Info (tests/integration/api_packages_goproxy_test.go:111)
=== TestPackageGo/GoMod (tests/integration/api_packages_goproxy_test.go:144)
=== TestPackageGo/Download (tests/integration/api_packages_goproxy_test.go:158)
=== TestPackageHelm (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageHelm/Upload (tests/integration/api_packages_helm_test.go:67)
=== TestPackageHelm/Download (tests/integration/api_packages_helm_test.go:102)
=== TestPackageHelm/Index (tests/integration/api_packages_helm_test.go:123)
=== TestPackageMaven (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageMaven/Upload (tests/integration/api_packages_maven_test.go:50)
=== TestPackageMaven/UploadExists (tests/integration/api_packages_maven_test.go:79)
=== TestPackageMaven/Download (tests/integration/api_packages_maven_test.go:85)
=== TestPackageMaven/UploadVerifySHA1 (tests/integration/api_packages_maven_test.go:108)
=== TestPackageMaven/UploadVerifySHA1/Missmatch (tests/integration/api_packages_maven_test.go:111)
=== TestPackageMaven/UploadVerifySHA1/Valid (tests/integration/api_packages_maven_test.go:116)
=== TestPackageMaven/UploadPOM (tests/integration/api_packages_maven_test.go:131)
=== TestPackageMaven/DownloadPOM (tests/integration/api_packages_maven_test.go:166)
=== TestPackageMaven/DownloadChecksums (tests/integration/api_packages_maven_test.go:189)
=== TestPackageMaven/DownloadMetadata (tests/integration/api_packages_maven_test.go:210)
=== TestPackageNpm (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageNpm/Upload (tests/integration/api_packages_npm_test.go:88)
=== TestPackageNpm/UploadExists (tests/integration/api_packages_npm_test.go:120)
=== TestPackageNpm/Download (tests/integration/api_packages_npm_test.go:128)
=== TestPackageNpm/PackageMetadata (tests/integration/api_packages_npm_test.go:150)
=== TestPackageNpm/AddTag (tests/integration/api_packages_npm_test.go:184)
=== TestPackageNpm/ListTags (tests/integration/api_packages_npm_test.go:200)
=== TestPackageNpm/PackageMetadataDistTags (tests/integration/api_packages_npm_test.go:217)
=== TestPackageNpm/DeleteTag (tests/integration/api_packages_npm_test.go:234)
=== TestPackageNpm/Search (tests/integration/api_packages_npm_test.go:249)
=== TestPackageNpm/Delete (tests/integration/api_packages_npm_test.go:280)
=== TestPackageNpm/Delete/Version (tests/integration/api_packages_npm_test.go:294)
=== TestPackageNpm/Delete/Full (tests/integration/api_packages_npm_test.go:313)
=== TestPackageNuGet (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageNuGet/ServiceIndex/v2 (tests/integration/api_packages_nuget_test.go:115)
=== TestPackageNuGet/ServiceIndex/v3 (tests/integration/api_packages_nuget_test.go:152)
=== TestPackageNuGet/Upload/DependencyPackage (tests/integration/api_packages_nuget_test.go:213)
=== TestPackageNuGet/Upload/SymbolPackage (tests/integration/api_packages_nuget_test.go:246)
=== TestPackageNuGet/Download (tests/integration/api_packages_nuget_test.go:333)
=== TestPackageNuGet/Download/Symbol (tests/integration/api_packages_nuget_test.go:359)
=== TestPackageNuGet/SearchService/v2/Search() (tests/integration/api_packages_nuget_test.go:393)
=== TestPackageNuGet/SearchService/v2/Packages() (tests/integration/api_packages_nuget_test.go:415)
=== TestPackageNuGet/SearchService/v3 (tests/integration/api_packages_nuget_test.go:438)
=== TestPackageNuGet/SearchService/v3/EnforceGrouped (tests/integration/api_packages_nuget_test.go:453)
=== TestPackageNuGet/RegistrationService/RegistrationIndex (tests/integration/api_packages_nuget_test.go:497)
=== TestPackageNuGet/RegistrationService/RegistrationLeaf/v2 (tests/integration/api_packages_nuget_test.go:524)
=== TestPackageNuGet/RegistrationService/RegistrationLeaf/v3 (tests/integration/api_packages_nuget_test.go:541)
=== TestPackageNuGet/PackageService/v2 (tests/integration/api_packages_nuget_test.go:559)
=== TestPackageNuGet/PackageService/v3 (tests/integration/api_packages_nuget_test.go:579)
=== TestPackageNuGet/Delete (tests/integration/api_packages_nuget_test.go:594)
=== TestPackageNuGet/DownloadNotExists (tests/integration/api_packages_nuget_test.go:606)
=== TestPackageNuGet/DeleteNotExists (tests/integration/api_packages_nuget_test.go:618)
=== TestPackagePub (/usr/local/go/src/testing/testing.go:1576)
=== TestPackagePub/Upload (tests/integration/api_packages_pub_test.go:62)
=== TestPackagePub/Download (tests/integration/api_packages_pub_test.go:128)
=== TestPackagePub/EnumeratePackageVersions (tests/integration/api_packages_pub_test.go:153)
=== TestPackagePyPI (/usr/local/go/src/testing/testing.go:1576)
=== TestPackagePyPI/Upload (tests/integration/api_packages_pypi_test.go:64)
=== TestPackagePyPI/UploadAddFile (tests/integration/api_packages_pypi_test.go:92)
=== TestPackagePyPI/UploadHashMismatch (tests/integration/api_packages_pypi_test.go:123)
=== TestPackagePyPI/UploadExists (tests/integration/api_packages_pypi_test.go:130)
=== TestPackagePyPI/Download (tests/integration/api_packages_pypi_test.go:137)
=== TestPackagePyPI/PackageMetadata (tests/integration/api_packages_pypi_test.go:157)
=== TestPackageRpm (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageRpm/RepositoryConfig (tests/integration/api_packages_rpm_test.go:77)
=== TestPackageRpm/RepositoryKey (tests/integration/api_packages_rpm_test.go:93)
=== TestPackageRpm/Download (tests/integration/api_packages_rpm_test.go:139)
=== TestPackageRpm/Repository (tests/integration/api_packages_rpm_test.go:148)
=== TestPackageRpm/Repository/repomd.xml (tests/integration/api_packages_rpm_test.go:156)
=== TestPackageRpm/Repository/repomd.xml.asc (tests/integration/api_packages_rpm_test.go:214)
=== TestPackageRpm/Repository/primary.xml.gz (tests/integration/api_packages_rpm_test.go:232)
=== TestPackageRpm/Repository/filelists.xml.gz (tests/integration/api_packages_rpm_test.go:319)
=== TestPackageRpm/Repository/other.xml.gz (tests/integration/api_packages_rpm_test.go:356)
=== TestPackageRpm/Delete (tests/integration/api_packages_rpm_test.go:396)
=== TestPackageRubyGems (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageRubyGems/Upload (tests/integration/api_packages_rubygems_test.go:124)
=== TestPackageRubyGems/UploadExists (tests/integration/api_packages_rubygems_test.go:151)
=== TestPackageRubyGems/Download (tests/integration/api_packages_rubygems_test.go:157)
=== TestPackageRubyGems/DownloadGemspec (tests/integration/api_packages_rubygems_test.go:172)
=== TestPackageRubyGems/EnumeratePackages (tests/integration/api_packages_rubygems_test.go:191)
=== TestPackageRubyGems/Delete (tests/integration/api_packages_rubygems_test.go:210)
=== TestPackageSwift (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageSwift/CheckAcceptMediaType (tests/integration/api_packages_swift_test.go:46)
=== TestPackageSwift/Upload (tests/integration/api_packages_swift_test.go:75)
=== TestPackageSwift/Download (tests/integration/api_packages_swift_test.go:169)
=== TestPackageSwift/EnumeratePackageVersions (tests/integration/api_packages_swift_test.go:189)
=== TestPackageSwift/PackageVersionMetadata (tests/integration/api_packages_swift_test.go:218)
=== TestPackageSwift/DownloadManifest/Default (tests/integration/api_packages_swift_test.go:263)
=== TestPackageSwift/DownloadManifest/DifferentVersion (tests/integration/api_packages_swift_test.go:276)
=== TestPackageSwift/DownloadManifest/Redirect (tests/integration/api_packages_swift_test.go:292)
=== TestPackageSwift/LookupPackageIdentifiers (tests/integration/api_packages_swift_test.go:304)
=== TestPackageAPI (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageAPI/ListPackages (tests/integration/api_packages_test.go:49)
=== TestPackageAPI/GetPackage (tests/integration/api_packages_test.go:66)
=== TestPackageAPI/GetPackage/RepositoryLink (tests/integration/api_packages_test.go:84)
=== TestPackageAPI/ListPackageFiles (tests/integration/api_packages_test.go:123)
=== TestPackageAPI/DeletePackage (tests/integration/api_packages_test.go:144)
=== TestPackageAccess (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageAccess/Upload (tests/integration/api_packages_test.go:193)
=== TestPackageAccess/Download (tests/integration/api_packages_test.go:278)
=== TestPackageAccess/API (tests/integration/api_packages_test.go:359)
=== TestPackageQuota (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageQuota/Common (tests/integration/api_packages_test.go:393)
=== TestPackageQuota/Container (tests/integration/api_packages_test.go:421)
=== TestPackageCleanup (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageCleanup/Common (tests/integration/api_packages_test.go:452)
=== TestPackageCleanup/CleanupRules (tests/integration/api_packages_test.go:490)
=== TestPackageCleanup/CleanupRules/Disabled (tests/integration/api_packages_test.go:591)
=== TestPackageCleanup/CleanupRules/KeepCount (tests/integration/api_packages_test.go:591)
=== TestPackageCleanup/CleanupRules/KeepPattern (tests/integration/api_packages_test.go:591)
=== TestPackageCleanup/CleanupRules/RemoveDays (tests/integration/api_packages_test.go:591)
=== TestPackageCleanup/CleanupRules/RemovePattern (tests/integration/api_packages_test.go:591)
=== TestPackageCleanup/CleanupRules/MatchFullName (tests/integration/api_packages_test.go:591)
=== TestPackageCleanup/CleanupRules/Mixed (tests/integration/api_packages_test.go:591)
=== TestPackageVagrant (/usr/local/go/src/testing/testing.go:1576)
=== TestPackageVagrant/Authenticate (tests/integration/api_packages_vagrant_test.go:60)
=== TestPackageVagrant/Upload (tests/integration/api_packages_vagrant_test.go:75)
=== TestPackageVagrant/Download (tests/integration/api_packages_vagrant_test.go:120)
=== TestPackageVagrant/EnumeratePackageVersions (tests/integration/api_packages_vagrant_test.go:129)
=== TestAPIPrivateNoServ (tests/integration/api_private_serv_test.go:19)
=== TestAPIPrivateServ (tests/integration/api_private_serv_test.go:41)
=== TestAPIPullCommits (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIPullReview (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIPullReviewRequest (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIViewPulls (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIMergePullWIP (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreatePullSuccess (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreatePullWithFieldsSuccess (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreatePullWithFieldsFailure (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditPull (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListReleases (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateAndUpdateRelease (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateReleaseToDefaultBranch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateReleaseToDefaultBranchOnExistingTag (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetLatestRelease (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetReleaseByTag (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteReleaseByTagName (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDownloadArchive (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUpdateRepoAvatar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteRepoAvatar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoBranchesPlain (tests/integration/api_repo_branch_test.go:27)
=== TestAPIRepoBranchesMirror (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoCollaboratorPermission (tests/integration/api_repo_collaborator_test.go:22)
=== TestAPIRepoEdit (tests/integration/api_repo_edit_test.go:137)
=== TestAPICreateFile (tests/integration/api_repo_file_create_test.go:143)
=== TestAPIDeleteFile (tests/integration/api_repo_file_delete_test.go:41)
=== TestAPIGetRawFileOrLFS (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetRawFileOrLFS (tests/integration/api_repo_file_get_test.go:27)
=== TestAPIUpdateFile (tests/integration/api_repo_file_update_test.go:109)
=== TestAPIChangeFiles (tests/integration/api_repo_files_change_test.go:64)
=== TestAPIGetContentsList (tests/integration/api_repo_get_contents_list_test.go:53)
=== TestAPIGetContents (tests/integration/api_repo_get_contents_test.go:55)
=== TestAPIGetContentsRefFormats (tests/integration/api_repo_get_contents_test.go:166)
=== TestAPIReposGitBlobs (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitCommits (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitCommitList (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitCommitListNotMaster (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitCommitListPage2Empty (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitCommitListDifferentBranch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitCommitListWithoutSelectFields (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadCommitDiffOrPatch (/usr/local/go/src/testing/testing.go:1576)
=== TestGetFileHistory (/usr/local/go/src/testing/testing.go:1576)
=== TestGetFileHistoryNotOnMaster (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListGitHooks (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListGitHooksNoHooks (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListGitHooksNoAccess (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetGitHook (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetGitHookNoAccess (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditGitHook (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditGitHookNoAccess (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteGitHook (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteGitHookNoAccess (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitNotes (tests/integration/api_repo_git_notes_test.go:20)
=== TestAPIReposGitRefs (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGitTags (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteTagByName (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIReposGitTrees (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateHook (/usr/local/go/src/testing/testing.go:1576)
=== TestRepoLanguages (tests/integration/api_repo_languages_test.go:16)
=== TestAPILFSLocksNotStarted (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSLocksNotLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSLocksLogged (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoLFSMigrateLocal (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSNotStarted (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSMediaType (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSBatch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSBatch/InvalidJsonRequest (tests/integration/api_repo_lfs_test.go:99)
=== TestAPILFSBatch/InvalidOperation (tests/integration/api_repo_lfs_test.go:107)
=== TestAPILFSBatch/InvalidPointer (tests/integration/api_repo_lfs_test.go:117)
=== TestAPILFSBatch/PointerSizeMismatch (tests/integration/api_repo_lfs_test.go:143)
=== TestAPILFSBatch/Download (tests/integration/api_repo_lfs_test.go:161)
=== TestAPILFSBatch/Download/PointerNotInStore (tests/integration/api_repo_lfs_test.go:164)
=== TestAPILFSBatch/Download/MetaNotFound (tests/integration/api_repo_lfs_test.go:181)
=== TestAPILFSBatch/Download/Success (tests/integration/api_repo_lfs_test.go:205)
=== TestAPILFSBatch/Upload (tests/integration/api_repo_lfs_test.go:226)
=== TestAPILFSBatch/Upload/FileTooBig (tests/integration/api_repo_lfs_test.go:229)
=== TestAPILFSBatch/Upload/AddMeta (tests/integration/api_repo_lfs_test.go:252)
=== TestAPILFSBatch/Upload/AlreadyExists (tests/integration/api_repo_lfs_test.go:290)
=== TestAPILFSBatch/Upload/NewFile (tests/integration/api_repo_lfs_test.go:307)
=== TestAPILFSUpload (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSUpload/InvalidPointer (tests/integration/api_repo_lfs_test.go:351)
=== TestAPILFSUpload/AlreadyExistsInStore (tests/integration/api_repo_lfs_test.go:359)
=== TestAPILFSUpload/MetaAlreadyExists (tests/integration/api_repo_lfs_test.go:394)
=== TestAPILFSUpload/HashMismatch (tests/integration/api_repo_lfs_test.go:402)
=== TestAPILFSUpload/SizeMismatch (tests/integration/api_repo_lfs_test.go:410)
=== TestAPILFSUpload/Success (tests/integration/api_repo_lfs_test.go:418)
=== TestAPILFSVerify (/usr/local/go/src/testing/testing.go:1576)
=== TestAPILFSVerify/InvalidJsonRequest (tests/integration/api_repo_lfs_test.go:458)
=== TestAPILFSVerify/InvalidPointer (tests/integration/api_repo_lfs_test.go:466)
=== TestAPILFSVerify/PointerNotExisting (tests/integration/api_repo_lfs_test.go:474)
=== TestAPILFSVerify/Success (tests/integration/api_repo_lfs_test.go:482)
=== TestAPIReposRaw (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoTags (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoTeams (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserReposNotLogin (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserReposWithWrongToken (/usr/local/go/src/testing/testing.go:1576)
=== TestAPISearchRepo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIViewRepo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIOrgRepos (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetRepoByIDUnauthorized (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoMigrate (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoMigrateConflict (tests/integration/api_repo_test.go:380)
=== TestAPIMirrorSyncNonMirrorRepo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIOrgRepoCreate (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoCreateConflict (tests/integration/api_repo_test.go:461)
=== TestAPIRepoTransfer (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIAcceptTransfer (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRejectTransfer (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGenerateRepo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoGetReviewers (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoGetAssignees (/usr/local/go/src/testing/testing.go:1576)
=== TestAPITopicSearch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIRepoTopic (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIExposedSettings (/usr/local/go/src/testing/testing.go:1576)
=== TestAPITeam (/usr/local/go/src/testing/testing.go:1576)
=== TestAPITeamSearch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIGetTeamRepo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPITeamUser (/usr/local/go/src/testing/testing.go:1576)
=== TestAPICreateAndDeleteToken (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteMissingToken (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeniesPermissionBasedOnTokenScope (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/admin/emails (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/admin/users (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/admin/users (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/PATCH_/api/v1/admin/users/user2 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/admin/users/user2/orgs (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/admin/users/user2/orgs (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/admin/orgs (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/markdown (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/markdown/raw (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/notifications (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/PUT_/api/v1/notifications (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/org/org1/repos (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/packages/user1/type/name/1 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/DELETE_/api/v1/packages/user1/type/name/1 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/PATCH_/api/v1/repos/user1/repo1 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/DELETE_/api/v1/repos/user1/repo1 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1/branches (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1/archive/foo (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1/issues (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1/media/foo (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1/raw/foo (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user1/repo1/teams (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/PUT_/api/v1/repos/user1/repo1/teams/team1 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/repos/user1/repo1/transfer (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user2/repo2 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/repos/user2/repo2#01 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/settings/api (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/user (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/user/emails (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/user/emails (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/DELETE_/api/v1/user/emails (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/user/applications/oauth2 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/POST_/api/v1/user/applications/oauth2 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/users/search (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/users/user31 (tests/integration/api_token_test.go:467)
=== TestAPIDeniesPermissionBasedOnTokenScope/GET_/api/v1/users/user31/gpg_keys (tests/integration/api_token_test.go:467)
=== TestAPIUpdateUserAvatar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteUserAvatar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListEmails (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIAddEmail (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIDeleteEmail (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIFollow (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIFollow/Follow (tests/integration/api_user_follow_test.go:31)
=== TestAPIFollow/ListFollowing (tests/integration/api_user_follow_test.go:38)
=== TestAPIFollow/ListMyFollowing (tests/integration/api_user_follow_test.go:50)
=== TestAPIFollow/ListFollowers (tests/integration/api_user_follow_test.go:62)
=== TestAPIFollow/ListMyFollowers (tests/integration/api_user_follow_test.go:74)
=== TestAPIFollow/CheckFollowing (tests/integration/api_user_follow_test.go:86)
=== TestAPIFollow/CheckMyFollowing (tests/integration/api_user_follow_test.go:96)
=== TestAPIFollow/Unfollow (tests/integration/api_user_follow_test.go:106)
=== TestUserHeatmap (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserInfo (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserInfo/GetInfo (tests/integration/api_user_info_test.go:28)
=== TestAPIUserInfo/GetAuthenticatedUser (tests/integration/api_user_info_test.go:42)
=== TestTokenNeeded (/usr/local/go/src/testing/testing.go:1576)
=== TestWithOwnerUser (tests/integration/api_user_org_perm_test.go:51)
=== TestCanWriteUser (tests/integration/api_user_org_perm_test.go:66)
=== TestAdminUser (tests/integration/api_user_org_perm_test.go:81)
=== TestAdminCanNotCreateRepo (tests/integration/api_user_org_perm_test.go:96)
=== TestCanReadUser (tests/integration/api_user_org_perm_test.go:111)
=== TestUnknowUser (/usr/local/go/src/testing/testing.go:1576)
=== TestUnknowOrganization (/usr/local/go/src/testing/testing.go:1576)
=== TestUserOrgs (/usr/local/go/src/testing/testing.go:1576)
=== TestMyOrgs (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserSearchLoggedIn (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserSearchNotLoggedIn (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserSearchAdminLoggedInUserHidden (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIUserSearchNotLoggedInUserHidden (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIStar (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIStar/Star (tests/integration/api_user_star_test.go:29)
=== TestAPIStar/GetStarredRepos (tests/integration/api_user_star_test.go:36)
=== TestAPIStar/GetMyStarredRepos (tests/integration/api_user_star_test.go:50)
=== TestAPIStar/IsStarring (tests/integration/api_user_star_test.go:64)
=== TestAPIStar/Unstar (tests/integration/api_user_star_test.go:74)
=== TestAPIWatch (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIWatch/Watch (tests/integration/api_user_watch_test.go:29)
=== TestAPIWatch/GetWatchedRepos (tests/integration/api_user_watch_test.go:36)
=== TestAPIWatch/GetMyWatchedRepos (tests/integration/api_user_watch_test.go:50)
=== TestAPIWatch/IsWatching (tests/integration/api_user_watch_test.go:64)
=== TestAPIWatch/Unwatch (tests/integration/api_user_watch_test.go:74)
=== TestAPIGetWikiPage (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListWikiPages (/usr/local/go/src/testing/testing.go:1576)
=== TestAPINewWikiPage (/usr/local/go/src/testing/testing.go:1576)
=== TestAPINewWikiPage (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIEditWikiPage (/usr/local/go/src/testing/testing.go:1576)
=== TestAPIListPageRevisions (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateAnonymousAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestCreateIssueAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestGetAttachment (/usr/local/go/src/testing/testing.go:1576)
=== TestLDAPAuthChange (/usr/local/go/src/testing/testing.go:1576)
=== TestViewBranches (/usr/local/go/src/testing/testing.go:1576)
=== TestDeleteBranch (/usr/local/go/src/testing/testing.go:1576)
=== TestUndoDeleteBranch (tests/integration/branches_test.go:35)
=== TestChangeDefaultBranch (/usr/local/go/src/testing/testing.go:1576)
=== Test_CmdKeys (tests/integration/cmd_keys_test.go:22)
=== TestCompareTag (/usr/local/go/src/testing/testing.go:1576)
=== TestCompareDefault (/usr/local/go/src/testing/testing.go:1576)
=== TestCompareBranches (/usr/local/go/src/testing/testing.go:1576)
=== TestCORSNotSet (/usr/local/go/src/testing/testing.go:1576)
=== TestSessionFileCreation (/usr/local/go/src/testing/testing.go:1576)
=== TestSessionFileCreation/NoSessionOnViewIssue (tests/integration/create_no_session_test.go:81)
=== TestSessionFileCreation/CreateSessionOnLogin (tests/integration/create_no_session_test.go:91)
=== TestCsrfProtection (/usr/local/go/src/testing/testing.go:1576)
=== TestUserDeleteAccount (/usr/local/go/src/testing/testing.go:1576)
=== TestUserDeleteAccountStillOwnRepos (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadByID (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadByIDForSVGUsesSecureHeaders (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadByIDMedia (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadByIDMediaForSVGUsesSecureHeaders (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadRawTextFileWithoutMimeTypeMapping (/usr/local/go/src/testing/testing.go:1576)
=== TestDownloadRawTextFileWithMimeTypeMapping (/usr/local/go/src/testing/testing.go:1576)
=== TestDumpRestore (tests/integration/dump_restore_test.go:32)
=== TestCreateFile (tests/integration/editor_test.go:20)
=== TestCreateFileOnProtectedBranch (tests/integration/editor_test.go:44)
=== TestEditFile (tests/integration/editor_test.go:162)
=== TestEditFileToNewBranch (tests/integration/editor_test.go:169)
=== TestEmptyRepo (/usr/local/go/src/testing/testing.go:1576)
=== TestEmptyRepoAddFile (/usr/local/go/src/testing/testing.go:1576)
=== TestEmptyRepoUploadFile (/usr/local/go/src/testing/testing.go:1576)
=== TestEmptyRepoAddFileByAPI (/usr/local/go/src/testing/testing.go:1576)
=== TestEventSourceManagerRun (/usr/local/go/src/testing/testing.go:1576)
+++ TestEventSourceManagerRun is a slow test (took 13.134759047s)
=== TestExploreRepos (/usr/local/go/src/testing/testing.go:1576)
=== TestGitAnnexMedia (tests/integration/git_annex_test.go:61)
--- FAIL: TestGitAnnexMedia (2.08s)
    api_helper_for_declarative_test.go:68: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:68
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:41
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:65
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:61
        	Error:      	Not equal: 
        	            	expected: 201
        	            	actual  : 403
        	Test:       	TestGitAnnexMedia
        	Messages:   	Request: POST /api/v1/user/repos?token=f296c61ff0c48355e9bf8f47aa10bfadc6fe8cd6
    api_helper_for_declarative_test.go:68: Response:  {"message":"token does not have at least one of required scope(s): [write:user]","url":"http://localhost:3003/api/swagger"}
        
    api_helper_for_declarative_test.go:85: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:85
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:42
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:65
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:61
        	Error:      	Not equal: 
        	            	expected: 200
        	            	actual  : 404
        	Test:       	TestGitAnnexMedia
        	Messages:   	Request: PATCH /api/v1/repos/user2/annex-media-test?token=f296c61ff0c48355e9bf8f47aa10bfadc6fe8cd6
    api_helper_for_declarative_test.go:85: Response:  {"errors":null,"message":"The target couldn't be found.","url":"http://localhost:3003/api/swagger"}
        
    git_helper_for_declarative_test.go:129: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:129
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:65
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:61
        	Error:      	Received unexpected error:
        	            	exit status 128 - Cloning into '/tmp/TestGitAnnexMedia588544839/002/annex-media-test.git'...
        	            	Warning: Permanently added '[localhost]:2203' (RSA) to the list of known hosts.
        	            	Gitea: Cannot find repository: user2/annex-media-test
        	            	fatal: Could not read from remote repository.
        	            	
        	            	Please make sure you have the correct access rights
        	            	and the repository exists.
        	Test:       	TestGitAnnexMedia
    git_helper_for_declarative_test.go:132: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:132
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:65
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:61
        	Error:      	Should be true
        	Test:       	TestGitAnnexMedia
    git_annex_test.go:65: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:65
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:61
        	Error:      	Received unexpected error:
        	            	Unable to initialize remote repo with git-annex fixture: open /tmp/TestGitAnnexMedia588544839/002/annex-media-test.git/.gitattributes: no such file or directory
        	Test:       	TestGitAnnexMedia
=== TestGitAnnexViews (tests/integration/git_annex_test.go:118)
--- FAIL: TestGitAnnexViews (0.86s)
    api_helper_for_declarative_test.go:68: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:68
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:41
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:118
        	Error:      	Not equal: 
        	            	expected: 201
        	            	actual  : 403
        	Test:       	TestGitAnnexViews
        	Messages:   	Request: POST /api/v1/user/repos?token=27958443f2c7f0de3226dafaf48b5dc853eca834
    api_helper_for_declarative_test.go:68: Response:  {"message":"token does not have at least one of required scope(s): [write:user]","url":"http://localhost:3003/api/swagger"}
        
    api_helper_for_declarative_test.go:85: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:85
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:42
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:118
        	Error:      	Not equal: 
        	            	expected: 200
        	            	actual  : 404
        	Test:       	TestGitAnnexViews
        	Messages:   	Request: PATCH /api/v1/repos/user2/annex-template-render-test?token=27958443f2c7f0de3226dafaf48b5dc853eca834
    api_helper_for_declarative_test.go:85: Response:  {"errors":null,"message":"The target couldn't be found.","url":"http://localhost:3003/api/swagger"}
        
    git_helper_for_declarative_test.go:129: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:129
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:118
        	Error:      	Received unexpected error:
        	            	exit status 128 - Cloning into '/tmp/TestGitAnnexViews2740583998/002/annex-template-render-test.git'...
        	            	Gitea: Cannot find repository: user2/annex-template-render-test
        	            	fatal: Could not read from remote repository.
        	            	
        	            	Please make sure you have the correct access rights
        	            	and the repository exists.
        	Test:       	TestGitAnnexViews
    git_helper_for_declarative_test.go:132: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:132
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:118
        	Error:      	Should be true
        	Test:       	TestGitAnnexViews
    git_annex_test.go:122: 
        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:123
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:118
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:122
        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:118
        	Error:      	Received unexpected error:
        	            	Unable to initialize remote repo with git-annex fixture: open /tmp/TestGitAnnexViews2740583998/002/annex-template-render-test.git/.gitattributes: no such file or directory
        	Test:       	TestGitAnnexViews
=== TestGitAnnexPermissions (tests/integration/git_annex_test.go:237)
=== TestGitAnnexPermissions/Public (tests/integration/git_annex_test.go:249)
=== TestGitAnnexPermissions/Private (tests/integration/git_annex_test.go:565)
--- FAIL: TestGitAnnexPermissions (3.68s)
    --- FAIL: TestGitAnnexPermissions/Public (0.98s)
        api_helper_for_declarative_test.go:68: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:68
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:41
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:254
            	Error:      	Not equal: 
            	            	expected: 201
            	            	actual  : 403
            	Test:       	TestGitAnnexPermissions/Public
            	Messages:   	Request: POST /api/v1/user/repos?token=7cbaaccc58485d769c14a8090bd4f3de79d9497f
        api_helper_for_declarative_test.go:68: Response:  {"message":"token does not have at least one of required scope(s): [write:user]","url":"http://localhost:3003/api/swagger"}
            
        api_helper_for_declarative_test.go:85: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:85
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:42
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:254
            	Error:      	Not equal: 
            	            	expected: 200
            	            	actual  : 404
            	Test:       	TestGitAnnexPermissions/Public
            	Messages:   	Request: PATCH /api/v1/repos/user2/annex-public?token=7cbaaccc58485d769c14a8090bd4f3de79d9497f
        api_helper_for_declarative_test.go:85: Response:  {"errors":null,"message":"The target couldn't be found.","url":"http://localhost:3003/api/swagger"}
            
        git_helper_for_declarative_test.go:129: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:129
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:254
            	Error:      	Received unexpected error:
            	            	exit status 128 - Cloning into '/tmp/TestGitAnnexPermissionsPublic713002368/002/annex-public.git'...
            	            	Gitea: Cannot find repository: user2/annex-public
            	            	fatal: Could not read from remote repository.
            	            	
            	            	Please make sure you have the correct access rights
            	            	and the repository exists.
            	Test:       	TestGitAnnexPermissions/Public
        git_helper_for_declarative_test.go:132: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:132
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:254
            	Error:      	Should be true
            	Test:       	TestGitAnnexPermissions/Public
        git_annex_test.go:254: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:254
            	Error:      	Received unexpected error:
            	            	Unable to initialize remote repo with git-annex fixture: open /tmp/TestGitAnnexPermissionsPublic713002368/002/annex-public.git/.gitattributes: no such file or directory
            	Test:       	TestGitAnnexPermissions/Public
    --- FAIL: TestGitAnnexPermissions/Private (2.59s)
        api_helper_for_declarative_test.go:68: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:68
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:41
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:570
            	Error:      	Not equal: 
            	            	expected: 201
            	            	actual  : 403
            	Test:       	TestGitAnnexPermissions/Private
            	Messages:   	Request: POST /api/v1/user/repos?token=9e2270c2f3756d185af1aedab195f2789e591c98
        api_helper_for_declarative_test.go:68: Response:  {"message":"token does not have at least one of required scope(s): [write:user]","url":"http://localhost:3003/api/swagger"}
            
        api_helper_for_declarative_test.go:85: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:85
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:42
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:570
            	Error:      	Not equal: 
            	            	expected: 200
            	            	actual  : 404
            	Test:       	TestGitAnnexPermissions/Private
            	Messages:   	Request: PATCH /api/v1/repos/user2/annex-private?token=9e2270c2f3756d185af1aedab195f2789e591c98
        api_helper_for_declarative_test.go:85: Response:  {"errors":null,"message":"The target couldn't be found.","url":"http://localhost:3003/api/swagger"}
            
        git_helper_for_declarative_test.go:129: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:129
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:570
            	Error:      	Received unexpected error:
            	            	exit status 128 - Cloning into '/tmp/TestGitAnnexPermissionsPrivate3126283180/002/annex-private.git'...
            	            	Gitea: Cannot find repository: user2/annex-private
            	            	fatal: Could not read from remote repository.
            	            	
            	            	Please make sure you have the correct access rights
            	            	and the repository exists.
            	Test:       	TestGitAnnexPermissions/Private
        git_helper_for_declarative_test.go:132: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:132
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1218
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:48
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:487
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:70
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:476
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:1279
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:47
            	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:570
            	Error:      	Should be true
            	Test:       	TestGitAnnexPermissions/Private
        git_annex_test.go:570: 
            	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_annex_test.go:570
            	Error:      	Received unexpected error:
            	            	Unable to initialize remote repo with git-annex fixture: open /tmp/TestGitAnnexPermissionsPrivate3126283180/002/annex-private.git/.gitattributes: no such file or directory
            	Test:       	TestGitAnnexPermissions/Private
=== TestRepoCloneWiki (tests/integration/git_clone_wiki_test.go:34)
=== TestRepoCloneWiki (tests/integration/git_helper_for_declarative_test.go:123)
=== TestGitSmartHTTP (tests/integration/git_smart_http_test.go:16)
=== TestGit (tests/integration/git_test.go:42)
=== TestGit/HTTP (tests/integration/git_test.go:54)
=== TestGit/HTTP/Standard (tests/integration/git_test.go:143)
=== TestGit/HTTP/Standard/PushCommit (tests/integration/git_test.go:187)
=== TestGit/HTTP/Standard/PushCommit/Little (tests/integration/git_test.go:189)
=== TestGit/HTTP/Standard/PushCommit/Big (tests/integration/git_test.go:197)
+++ TestGit/HTTP/Standard/PushCommit/Big is a slow test (took 11.018311561s)
+++ TestGit/HTTP/Standard/PushCommit is a slow test (took 11.362106451s)
+++ TestGit/HTTP/Standard is a slow test (took 11.402946674s)
=== TestGit/HTTP/LFS (tests/integration/git_test.go:151)
=== TestGit/HTTP/LFS/PushCommit (tests/integration/git_test.go:187)
=== TestGit/HTTP/LFS/PushCommit/Little (tests/integration/git_test.go:189)
=== TestGit/HTTP/LFS/PushCommit/Big (tests/integration/git_test.go:197)
=== TestGit/HTTP/LFS/Locks (tests/integration/git_test.go:178)
=== TestGit/HTTP/Raw (tests/integration/git_test.go:206)
=== TestGit/HTTP/Media (tests/integration/git_test.go:246)
=== TestGit/HTTP/CreateAgitFlowPull (tests/integration/git_test.go:695)
=== TestGit/HTTP/BranchProtectMerge (tests/integration/git_test.go:358)
=== TestGit/HTTP/AutoMerge (tests/integration/git_test.go:604)
=== TestGit/HTTP/CreatePRAndSetManuallyMerged (tests/integration/git_test.go:496)
=== TestGit/HTTP/MergeFork (tests/integration/git_test.go:86)
=== TestGit/HTTP/MergeFork/CreatePRAndMerge (tests/integration/git_test.go:448)
+++ TestGit/HTTP/MergeFork/CreatePRAndMerge is a slow test (took 10.422484103s)
=== TestGit/HTTP/MergeFork/Raw (tests/integration/git_test.go:206)
=== TestGit/HTTP/MergeFork/Media (tests/integration/git_test.go:246)
+++ TestGit/HTTP/MergeFork is a slow test (took 10.846893514s)
=== TestGit/HTTP/PushCreate (tests/integration/git_test.go:548)
+++ TestGit/HTTP is a slow test (took 34.592933528s)
=== TestGit/SSH (tests/integration/git_test.go:95)
=== TestGit/SSH/Standard (tests/integration/git_test.go:143)
=== TestGit/SSH/Standard/PushCommit (tests/integration/git_test.go:187)
=== TestGit/SSH/Standard/PushCommit/Little (tests/integration/git_test.go:189)
=== TestGit/SSH/Standard/PushCommit/Big (tests/integration/git_test.go:197)
=== TestGit/SSH/LFS (tests/integration/git_test.go:151)
=== TestGit/SSH/LFS/PushCommit (tests/integration/git_test.go:187)
=== TestGit/SSH/LFS/PushCommit/Little (tests/integration/git_test.go:189)
=== TestGit/SSH/LFS/PushCommit/Big (tests/integration/git_test.go:197)
=== TestGit/SSH/LFS/Locks (tests/integration/git_test.go:178)
=== TestGit/SSH/Raw (tests/integration/git_test.go:206)
=== TestGit/SSH/Media (tests/integration/git_test.go:246)
=== TestGit/SSH/CreateAgitFlowPull (tests/integration/git_test.go:695)
=== TestGit/SSH/BranchProtectMerge (tests/integration/git_test.go:358)
=== TestGit/SSH/MergeFork (tests/integration/git_test.go:125)
=== TestGit/SSH/MergeFork/CreatePRAndMerge (tests/integration/git_test.go:448)
=== TestGit/SSH/MergeFork/Raw (tests/integration/git_test.go:206)
=== TestGit/SSH/MergeFork/Media (tests/integration/git_test.go:246)
=== TestGit/SSH/PushCreate (tests/integration/git_test.go:548)
--- FAIL: TestGit (45.70s)
    --- FAIL: TestGit/SSH (10.88s)
        --- FAIL: TestGit/SSH/Clone (0.07s)
            git_helper_for_declarative_test.go:129: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:129
                	Error:      	Received unexpected error:
                	            	exit status 128 - Cloning into '/tmp/TestGitSSH1997620208/002'...
                	            	Gitea: Cannot find key: 11
                	            	fatal: Could not read from remote repository.
                	            	
                	            	Please make sure you have the correct access rights
                	            	and the repository exists.
                	Test:       	TestGit/SSH/Clone
            git_helper_for_declarative_test.go:132: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:132
                	Error:      	Should be true
                	Test:       	TestGit/SSH/Clone
        --- FAIL: TestGit/SSH/Standard (0.32s)
            --- FAIL: TestGit/SSH/Standard/PushCommit (0.27s)
                --- FAIL: TestGit/SSH/Standard/PushCommit/Little (0.04s)
                    git_test.go:293: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:293
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:190
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/Standard/PushCommit/Little
                    git_test.go:295: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:295
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:190
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/Standard/PushCommit/Little
                --- FAIL: TestGit/SSH/Standard/PushCommit/Big (0.19s)
                    git_test.go:293: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:293
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:198
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/Standard/PushCommit/Big
                    git_test.go:295: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:295
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:198
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/Standard/PushCommit/Big
        --- FAIL: TestGit/SSH/LFS (0.43s)
            git_test.go:156: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:156
                	Error:      	Received unexpected error:
                	            	exit status 128
                	Test:       	TestGit/SSH/LFS
            git_test.go:158: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:158
                	Error:      	Received unexpected error:
                	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                	            	 - fatal: not a git repository (or any of the parent directories): .git
                	Test:       	TestGit/SSH/LFS
            git_test.go:173: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:173
                	Error:      	Received unexpected error:
                	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                	            	 - fatal: not a git repository (or any of the parent directories): .git
                	Test:       	TestGit/SSH/LFS
            --- FAIL: TestGit/SSH/LFS/PushCommit (0.28s)
                --- FAIL: TestGit/SSH/LFS/PushCommit/Little (0.04s)
                    git_test.go:293: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:293
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:190
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/LFS/PushCommit/Little
                    git_test.go:295: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:295
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:190
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/LFS/PushCommit/Little
                --- FAIL: TestGit/SSH/LFS/PushCommit/Big (0.20s)
                    git_test.go:293: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:293
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:198
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/LFS/PushCommit/Big
                    git_test.go:295: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:295
                        	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:198
                        	Error:      	Received unexpected error:
                        	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                        	            	 - fatal: not a git repository (or any of the parent directories): .git
                        	Test:       	TestGit/SSH/LFS/PushCommit/Big
            --- FAIL: TestGit/SSH/LFS/Locks (0.08s)
                git_test.go:282: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:282
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:277
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:179
                    	Error:      	Received unexpected error:
                    	            	exit status 2 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	Error while retrieving locks: missing protocol: ""
                    	            	 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	Error while retrieving locks: missing protocol: ""
                    	Test:       	TestGit/SSH/LFS/Locks
                git_test.go:284: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:284
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:277
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:179
                    	Error:      	Received unexpected error:
                    	            	exit status 2 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	failed to call git rev-parse --show-toplevel: exit status 128 
                    	            	 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	failed to call git rev-parse --show-toplevel: exit status 128 
                    	Test:       	TestGit/SSH/LFS/Locks
                git_test.go:286: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:286
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:277
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:179
                    	Error:      	Received unexpected error:
                    	            	exit status 2 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	Error while retrieving locks: missing protocol: ""
                    	            	 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	Error while retrieving locks: missing protocol: ""
                    	Test:       	TestGit/SSH/LFS/Locks
                git_test.go:288: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:288
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:277
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:179
                    	Error:      	Received unexpected error:
                    	            	exit status 2 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	Unable to determine path: failed to call git rev-parse --show-toplevel: exit status 128 
                    	            	 - Error reading git config: error running /usr/lib/git-core/git 'rev-parse' '--is-bare-repository': 'fatal: not a git repository (or any of the parent directories): .git' 'exit status 128'
                    	            	Unable to determine path: failed to call git rev-parse --show-toplevel: exit status 128 
                    	Test:       	TestGit/SSH/LFS/Locks
        --- FAIL: TestGit/SSH/Raw (0.07s)
            git_test.go:214: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:214
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Raw
                	Messages:   	Request: GET /user2/repo-tmp-18/raw/branch/master
            git_test.go:215: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:215
                	Error:      	Not equal: 
                	            	expected: 1024
                	            	actual  : 11
                	Test:       	TestGit/SSH/Raw
            git_test.go:219: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:219
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Raw
                	Messages:   	Request: GET /user2/repo-tmp-18/raw/branch/master
            git_test.go:219: Response:  Not found.
                
            git_test.go:223: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:223
                	Error:      	"Not found.\n" does not contain "version https://git-lfs.github.com/spec/v1"
                	Test:       	TestGit/SSH/Raw
            git_test.go:229: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:229
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Raw
                	Messages:   	Request: GET /user2/repo-tmp-18/raw/branch/master
            git_test.go:230: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:230
                	Error:      	Not equal: 
                	            	expected: 134217728
                	            	actual  : 11
                	Test:       	TestGit/SSH/Raw
            git_test.go:234: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:234
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Raw
                	Messages:   	Request: GET /user2/repo-tmp-18/raw/branch/master
            git_test.go:234: Response:  Not found.
                
            git_test.go:237: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:237
                	Error:      	"Not found.\n" does not contain "version https://git-lfs.github.com/spec/v1"
                	Test:       	TestGit/SSH/Raw
        --- FAIL: TestGit/SSH/Media (0.07s)
            git_test.go:255: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:255
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Media
                	Messages:   	Request: GET /user2/repo-tmp-18/media/branch/master
            git_test.go:256: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:256
                	Error:      	Not equal: 
                	            	expected: 1024
                	            	actual  : 11
                	Test:       	TestGit/SSH/Media
            git_test.go:259: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:259
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Media
                	Messages:   	Request: GET /user2/repo-tmp-18/media/branch/master
            git_test.go:260: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:260
                	Error:      	Not equal: 
                	            	expected: 1024
                	            	actual  : 11
                	Test:       	TestGit/SSH/Media
            git_test.go:264: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:264
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Media
                	Messages:   	Request: GET /user2/repo-tmp-18/media/branch/master
            git_test.go:265: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:265
                	Error:      	Not equal: 
                	            	expected: 134217728
                	            	actual  : 11
                	Test:       	TestGit/SSH/Media
            git_test.go:269: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:269
                	Error:      	Not equal: 
                	            	expected: 200
                	            	actual  : 404
                	Test:       	TestGit/SSH/Media
                	Messages:   	Request: GET /user2/repo-tmp-18/media/branch/master
            git_test.go:270: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:270
                	Error:      	Not equal: 
                	            	expected: 134217728
                	            	actual  : 11
                	Test:       	TestGit/SSH/Media
        --- FAIL: TestGit/SSH/CreateAgitFlowPull (0.04s)
            git_test.go:703: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:703
                	Error:      	Received unexpected error:
                	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                	Test:       	TestGit/SSH/CreateAgitFlowPull
        --- FAIL: TestGit/SSH/BranchProtectMerge (0.17s)
            --- FAIL: TestGit/SSH/BranchProtectMerge/CreateBranchProtected (0.00s)
                git_helper_for_declarative_test.go:203: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:203
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/CreateBranchProtected
            --- FAIL: TestGit/SSH/BranchProtectMerge/PushProtectedBranch (0.00s)
                git_helper_for_declarative_test.go:189: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:189
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/PushProtectedBranch
            --- FAIL: TestGit/SSH/BranchProtectMerge/GenerateCommit (0.00s)
                git_test.go:366: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:366
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/GenerateCommit
            --- FAIL: TestGit/SSH/BranchProtectMerge/PushToUnprotectedBranch (0.00s)
                git_helper_for_declarative_test.go:189: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:189
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/PushToUnprotectedBranch
            --- FAIL: TestGit/SSH/BranchProtectMerge/CreatePullRequest (0.01s)
                api_helper_for_declarative_test.go:235: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:235
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:373
                    	Error:      	Not equal: 
                    	            	expected: 201
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/BranchProtectMerge/CreatePullRequest
                    	Messages:   	Request: POST /api/v1/repos/user2/repo-tmp-18/pulls?token=35bbede1db5c89948076de3b2c1a750da25e9912
                api_helper_for_declarative_test.go:235: Response:  {"errors":null,"message":"IsBranchExist","url":"http://localhost:3003/api/swagger"}
                    
            --- FAIL: TestGit/SSH/BranchProtectMerge/GenerateCommit#01 (0.00s)
                git_test.go:378: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:378
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/GenerateCommit#01
            --- FAIL: TestGit/SSH/BranchProtectMerge/PushToUnprotectedBranch#01 (0.00s)
                git_helper_for_declarative_test.go:189: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:189
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/PushToUnprotectedBranch#01
            --- FAIL: TestGit/SSH/BranchProtectMerge/CreatePullRequest#01 (0.01s)
                api_helper_for_declarative_test.go:235: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:235
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:383
                    	Error:      	Not equal: 
                    	            	expected: 201
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/BranchProtectMerge/CreatePullRequest#01
                    	Messages:   	Request: POST /api/v1/repos/user2/repo-tmp-18/pulls?token=35bbede1db5c89948076de3b2c1a750da25e9912
                api_helper_for_declarative_test.go:235: Response:  {"errors":null,"message":"IsBranchExist","url":"http://localhost:3003/api/swagger"}
                    
            --- FAIL: TestGit/SSH/BranchProtectMerge/MergePR2 (0.01s)
                api_helper_for_declarative_test.go:294: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:294
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/BranchProtectMerge/MergePR2
                    	Messages:   	Request: POST /api/v1/repos/user2/repo-tmp-18/pulls/0/merge?token=35bbede1db5c89948076de3b2c1a750da25e9912
                api_helper_for_declarative_test.go:296: Response:  {"errors":["pull request does not exist [id: 0, issue_id: 0, head_repo_id: 0, base_repo_id: 0, head_branch: , base_branch: ]"],"message":"GetPullRequestByIndex","url":"http://localhost:3003/api/swagger"}
                    
            --- FAIL: TestGit/SSH/BranchProtectMerge/MergePR (0.01s)
                api_helper_for_declarative_test.go:294: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:294
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/BranchProtectMerge/MergePR
                    	Messages:   	Request: POST /api/v1/repos/user2/repo-tmp-18/pulls/0/merge?token=35bbede1db5c89948076de3b2c1a750da25e9912
                api_helper_for_declarative_test.go:296: Response:  {"errors":["pull request does not exist [id: 0, issue_id: 0, head_repo_id: 0, base_repo_id: 0, head_branch: , base_branch: ]"],"message":"GetPullRequestByIndex","url":"http://localhost:3003/api/swagger"}
                    
            --- FAIL: TestGit/SSH/BranchProtectMerge/PullProtected (0.00s)
                git_helper_for_declarative_test.go:224: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:224
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/PullProtected
            --- FAIL: TestGit/SSH/BranchProtectMerge/GenerateCommit#02 (0.00s)
                git_test.go:393: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:393
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/GenerateCommit#02
            --- FAIL: TestGit/SSH/BranchProtectMerge/PushUnprotectedFilesToProtectedBranch (0.00s)
                git_helper_for_declarative_test.go:189: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:189
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/PushUnprotectedFilesToProtectedBranch
            --- FAIL: TestGit/SSH/BranchProtectMerge/CheckoutMaster (0.00s)
                git_helper_for_declarative_test.go:210: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:210
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/CheckoutMaster
            --- FAIL: TestGit/SSH/BranchProtectMerge/CreateBranchForced (0.00s)
                git_helper_for_declarative_test.go:203: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:203
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/CreateBranchForced
            --- FAIL: TestGit/SSH/BranchProtectMerge/GenerateCommit#03 (0.00s)
                git_test.go:403: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:403
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/GenerateCommit#03
            --- FAIL: TestGit/SSH/BranchProtectMerge/MergeProtectedToToforce (0.00s)
                git_helper_for_declarative_test.go:217: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:217
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/MergeProtectedToToforce
            --- FAIL: TestGit/SSH/BranchProtectMerge/PushToProtectedBranch (0.00s)
                git_helper_for_declarative_test.go:189: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:189
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/PushToProtectedBranch
            --- FAIL: TestGit/SSH/BranchProtectMerge/CheckoutMasterAgain (0.00s)
                git_helper_for_declarative_test.go:210: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:210
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - fatal: not a git repository (or any of the parent directories): .git
                    	            	 - fatal: not a git repository (or any of the parent directories): .git
                    	Test:       	TestGit/SSH/BranchProtectMerge/CheckoutMasterAgain
        --- FAIL: TestGit/SSH/MergeFork (7.60s)
            --- FAIL: TestGit/SSH/MergeFork/CreatePRAndMerge (7.42s)
                --- FAIL: TestGit/SSH/MergeFork/CreatePRAndMerge/MergePR (6.71s)
                    api_helper_for_declarative_test.go:294: 
                        	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/api_helper_for_declarative_test.go:294
                        	Error:      	Not equal: 
                        	            	expected: 200
                        	            	actual  : 405
                        	Test:       	TestGit/SSH/MergeFork/CreatePRAndMerge/MergePR
                        	Messages:   	Request: POST /api/v1/repos/user4/repo-tmp-18/pulls/1/merge?token=95dde81e7e07e8b4d148be74207e3565dea5ecb3
            --- FAIL: TestGit/SSH/MergeFork/Raw (0.07s)
                git_test.go:214: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:214
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Raw
                    	Messages:   	Request: GET /user4/repo-tmp-18/raw/branch/master
                git_test.go:215: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:215
                    	Error:      	Not equal: 
                    	            	expected: 1024
                    	            	actual  : 11
                    	Test:       	TestGit/SSH/MergeFork/Raw
                git_test.go:219: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:219
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Raw
                    	Messages:   	Request: GET /user4/repo-tmp-18/raw/branch/master
                git_test.go:219: Response:  Not found.
                    
                git_test.go:223: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:223
                    	Error:      	"Not found.\n" does not contain "version https://git-lfs.github.com/spec/v1"
                    	Test:       	TestGit/SSH/MergeFork/Raw
                git_test.go:229: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:229
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Raw
                    	Messages:   	Request: GET /user4/repo-tmp-18/raw/branch/master
                git_test.go:230: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:230
                    	Error:      	Not equal: 
                    	            	expected: 134217728
                    	            	actual  : 11
                    	Test:       	TestGit/SSH/MergeFork/Raw
                git_test.go:234: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:379
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:173
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:234
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Raw
                    	Messages:   	Request: GET /user4/repo-tmp-18/raw/branch/master
                git_test.go:234: Response:  Not found.
                    
                git_test.go:237: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:237
                    	Error:      	"Not found.\n" does not contain "version https://git-lfs.github.com/spec/v1"
                    	Test:       	TestGit/SSH/MergeFork/Raw
            --- FAIL: TestGit/SSH/MergeFork/Media (0.07s)
                git_test.go:255: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:255
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Media
                    	Messages:   	Request: GET /user4/repo-tmp-18/media/branch/master
                git_test.go:256: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:256
                    	Error:      	Not equal: 
                    	            	expected: 1024
                    	            	actual  : 11
                    	Test:       	TestGit/SSH/MergeFork/Media
                git_test.go:259: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:259
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Media
                    	Messages:   	Request: GET /user4/repo-tmp-18/media/branch/master
                git_test.go:260: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:260
                    	Error:      	Not equal: 
                    	            	expected: 1024
                    	            	actual  : 11
                    	Test:       	TestGit/SSH/MergeFork/Media
                git_test.go:264: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:264
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Media
                    	Messages:   	Request: GET /user4/repo-tmp-18/media/branch/master
                git_test.go:265: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:265
                    	Error:      	Not equal: 
                    	            	expected: 134217728
                    	            	actual  : 11
                    	Test:       	TestGit/SSH/MergeFork/Media
                git_test.go:269: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:391
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/integration_test.go:190
                    	            				/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:269
                    	Error:      	Not equal: 
                    	            	expected: 200
                    	            	actual  : 404
                    	Test:       	TestGit/SSH/MergeFork/Media
                    	Messages:   	Request: GET /user4/repo-tmp-18/media/branch/master
                git_test.go:270: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:270
                    	Error:      	Not equal: 
                    	            	expected: 134217728
                    	            	actual  : 11
                    	Test:       	TestGit/SSH/MergeFork/Media
        --- FAIL: TestGit/SSH/PushCreate (0.29s)
            --- FAIL: TestGit/SSH/PushCreate/SuccessfullyPushAndCreateTestRepository (0.07s)
                git_helper_for_declarative_test.go:189: 
                    	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_helper_for_declarative_test.go:189
                    	Error:      	Received unexpected error:
                    	            	exit status 128 - Gitea: Cannot find key: 11
                    	            	fatal: Could not read from remote repository.
                    	            	
                    	            	Please make sure you have the correct access rights
                    	            	and the repository exists.
                    	            	 - Gitea: Cannot find key: 11
                    	            	fatal: Could not read from remote repository.
                    	            	
                    	            	Please make sure you have the correct access rights
                    	            	and the repository exists.
                    	Test:       	TestGit/SSH/PushCreate/SuccessfullyPushAndCreateTestRepository
            git_test.go:576: 
                	Error Trace:	/home/icg149/Projects/gitea-neuropoly/tests/integration/git_test.go:576
                	Error:      	Received unexpected error:
                	            	repository does not exist [id: 0, uid: 0, owner_name: user2, name: repo-tmp-push-create-ssh]
                	Test:       	TestGit/SSH/PushCreate

Am I missing some step?

@gitea-sync gitea-sync bot force-pushed the git-annex branch 5 times, most recently from 968cd74 to df9116c Compare July 16, 2023 13:14
@matrss matrss force-pushed the include-annex-content-in-archive-downloads branch from 2e597e1 to 807ab78 Compare July 17, 2023 12:01
@matrss
Copy link
Author

matrss commented Jul 24, 2023

@kousu in case you haven't seen my comment above, I am a bit stuck on writing tests for this. It looks like the git-annex repositories used in the tests are missing in the testing setup.

@kousu
Copy link

kousu commented Jul 24, 2023

I'm sorry! I don't know why I didn't see this. Maybe my inbox was just too noisy but I thought I would have kept my eye out for this because I am very excited for this feature.

I'll take a look today and give you feedback.

Writing tests for this took me a long time too.

@kousu
Copy link

kousu commented Jul 24, 2023

api_helper_for_declarative_test.go:68: Response:  {"message":"token does not have at least one of required scope(s): [write:user]","url":"http://localhost:3003/api/swagger"}

Oh I see. I had this error message too! It is entirely related to upstream's recent token changes, the same ones that you had fix the build also changed how you have to write the tests. I have fixed this in #1 already by adding the missing scopes everywhere, e.g.

https://github.com/neuropoly/gitea/blob/807ab789ba64156ad273b09009b2eb7df8147bd1/tests/integration/git_annex_test.go#L62-L62

https://github.com/neuropoly/gitea/blob/807ab789ba64156ad273b09009b2eb7df8147bd1/tests/integration/git_annex_test.go#L119

so if you rebase/merge #1 into your branch that it should fix it up. I'll build it locally and try to see if it does.

Again I'm super super sorry for holding this up. I see the problem now: I am only watching issues I'm tagged in; I'll change that, though if you definitely want my attention feel free to tag me for reviews / in comments like you did! And thanks a lot for this work, and I hope we can get this out together soon :)


By the way, the reason the error is confusing is that they should be using require.NoError() where they've used assert.NoError():

https://github.com/neuropoly/gitea/blob/807ab789ba64156ad273b09009b2eb7df8147bd1/tests/integration/git_annex_test.go#L40-L41

calls

https://github.com/neuropoly/gitea/blob/807ab789ba64156ad273b09009b2eb7df8147bd1/tests/integration/api_helper_for_declarative_test.go#L68

calls

https://github.com/neuropoly/gitea/blob/807ab789ba64156ad273b09009b2eb7df8147bd1/tests/integration/integration_test.go#L166-L169

assert just notes that it failed and then continues, and each further assert is more noise. You can tell what tests I added because they all use require. I think assert. would only make sense at the end, when examining created data structures, not in the middle of a process with dependencies. But since I'm trying not to fork too hard, I've just learned to live with being confused by the errors. Maybe I'll submit a PR to them to replace every assert with a require.

@kousu
Copy link

kousu commented Jul 24, 2023

Nope: on my branch I'm currently getting

$ TAGS="bindata gogit sqlite sqlite_unlock_notify" make test-sqlite#TestGitAnnex
go test  -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
# code.gitea.io/gitea/tests/integration [code.gitea.io/gitea/tests/integration.test]
tests/integration/git_annex_test.go:62:71: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:119:81: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:251:73: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:251:106: undefined: auth_model.AccessTokenScopeDeleteRepo
tests/integration/git_annex_test.go:267:62: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:268:62: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:269:64: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:567:74: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:567:107: undefined: auth_model.AccessTokenScopeDeleteRepo
tests/integration/git_annex_test.go:583:62: undefined: auth_model.AccessTokenScopeRepo
tests/integration/git_annex_test.go:583:62: too many errors
make: *** [Makefile:704 : integrations.sqlite.test] Erreur 1

The tests have indeed been failing for about a month, so I never actually fixed this properly, e.g.

https://github.com/neuropoly/gitea/actions/runs/5390321986/job/14590474958#step:9:113

I'll try to figure out what they changed now, fix it, and let you know when you can rebase on me.

@kousu
Copy link

kousu commented Jul 24, 2023

Okay @matrss I fixed all the tokens that needed tokening and rebased your branch locally:

commit 600ea25b48c9182e6ed43cc243eab21b5f78e88e (HEAD -> include-annex-content-in-archive-downloads)
Author: Matthias Riße <m.risse@fz-juelich.de>
Date:   Mon Jun 26 15:12:06 2023 +0200

    Include annexed files in zip and tar.gz downloads

commit e5d49c5304d6cec7d23aa3944a5d218baf4ddf1d (origin/git-annex, git-annex)
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date:   Mon May 8 19:51:49 2023 -0400

    git-annex: Only run git-annex tests.
    
    Upstream can handle the full test suite; to avoid tedious waiting,
    we only test the code added in this fork.

and the tests are back to passing.

make test-sqlite#TestGitAnnex
kousu@dev:~/src/neurogitea/gitea$ TAGS="bindata gogit sqlite sqlite_unlock_notify" make test-sqlite#TestGitAnnex
go test  -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
sed -e 's|{{REPO_TEST_DIR}}||g' \
        -e 's|{{TEST_LOGGER}}|test,file|g' \
        -e 's|{{TEST_TYPE}}|integration|g' \
                tests/sqlite.ini.tmpl > tests/sqlite.ini
GITEA_ROOT="/home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run TestGitAnnex
2023/07/24 13:40:21 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/attachments
2023/07/24 13:40:21 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/avatars
2023/07/24 13:40:21 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/repo-avatars
2023/07/24 13:40:21 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/lfs
2023/07/24 13:40:21 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/repo-archive
2023/07/24 13:40:21 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/packages
2023/07/24 13:40:21 ...s/storage/storage.go:219:initActions() [I] Initialising Actions storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/actions_log
2023/07/24 13:40:21 ...s/storage/storage.go:223:initActions() [I] Initialising ActionsArtifacts storage with type: local
2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/actions_artifacts
2023/07/24 13:40:21 modules/git/git.go:132:checkInit() [W] git module has been initialized already, duplicate init may work but it's better to fix it
2023/07/24 13:40:21 modules/git/git.go:132:checkInit() [W] git module has been initialized already, duplicate init may work but it's better to fix it
2023/07/24 13:40:21 routers/init.go:112:InitWebInstalled() [I] Git version: 2.34.1, Wire Protocol Version 2 Enabled (home: /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/home)
2023/07/24 13:40:21 ...g/config_provider.go:321:deprecatedSetting() [E] Deprecated fallback `[log]` `ROUTER` present. Use `[log]` `logger.router.MODE` instead. This fallback will be/has been removed in 1.21
2023/07/24 13:40:21 ...g/config_provider.go:321:deprecatedSetting() [E] Deprecated fallback `[log]` `XORM` present. Use `[log]` `logger.xorm.MODE` instead. This fallback will be/has been removed in 1.21
??? [TestLogger] 2023/07/24 13:40:21 ...les/setting/cache.go:75:loadCacheFrom() [I] Cache Service Enabled
??? [TestLogger] 2023/07/24 13:40:21 ...les/setting/cache.go:90:loadCacheFrom() [I] Last Commit Cache Service Enabled
??? [TestLogger] 2023/07/24 13:40:21 ...s/setting/session.go:74:loadSessionFrom() [I] Session Service Enabled
??? [TestLogger] 2023/07/24 13:40:21 ...g/config_provider.go:321:deprecatedSetting() [E] Deprecated fallback `[mailer]` `MAILER_TYPE` present. Use `[mailer]` `PROTOCOL` instead. This fallback will be/has been removed in v1.19.0
??? [TestLogger] 2023/07/24 13:40:21 ...es/setting/mailer.go:179:loadMailerFrom() [E] unable to infer unspecified mailer.PROTOCOL from mailer.SMTP_PORT = "", assume using smtps
??? [TestLogger] 2023/07/24 13:40:21 ...es/setting/mailer.go:275:tryResolveAddr() [W] could not look up mailer.SMTP_ADDR: lookup : no such host
??? [TestLogger] 2023/07/24 13:40:21 ...es/setting/mailer.go:237:loadMailerFrom() [I] Mail Service Enabled
??? [TestLogger] 2023/07/24 13:40:21 ...es/setting/mailer.go:259:loadNotifyMailFrom() [I] Notify Mail Service Enabled
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/attachments
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/avatars
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/repo-avatars
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/lfs
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/repo-archive
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/packages
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:219:initActions() [I] Initialising Actions storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/actions_log
??? [TestLogger] 2023/07/24 13:40:21 ...s/storage/storage.go:223:initActions() [I] Initialising ActionsArtifacts storage with type: local
??? [TestLogger] 2023/07/24 13:40:21 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/actions_artifacts
??? [TestLogger] 2023/07/24 13:40:21 routers/init.go:130:InitWebInstalled() [I] SQLite3 support is enabled
??? [TestLogger] 2023/07/24 13:40:21 routers/common/db.go:21:InitDBEngine() [I] Beginning ORM engine initialization.
??? [TestLogger] 2023/07/24 13:40:21 routers/common/db.go:28:InitDBEngine() [I] ORM engine initialization attempt #1/10...
??? [TestLogger] 2023/07/24 13:40:21 routers/init.go:136:InitWebInstalled() [I] ORM engine initialization successful!
??? [TestLogger] 2023/07/24 13:40:21 ...er/issues/indexer.go:91:func2() [I] PID 1772189: Initializing Issue Indexer: bleve
??? [TestLogger] 2023/07/24 13:40:21 ...exer/code/indexer.go:168:func3() [I] PID: 1772189 Initializing Repository Indexer at: /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/indexers/repos.bleve
??? [TestLogger] 2023/07/24 13:40:21 ...xer/stats/indexer.go:39:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
??? [TestLogger] 2023/07/24 13:40:21 modules/ssh/ssh.go:325:Listen() [I] Adding SSH host key: /home/GRAMES.POLYMTL.CA/p115628/src/neurogitea/gitea/tests/integration/gitea-integration-sqlite/data/ssh/gitea.rsa
??? [TestLogger] 2023/07/24 13:40:21 modules/ssh/init.go:26:Init() [I] SSH server started on localhost:2203. Cipher list ([chacha20-poly1305@openssh.com aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com]), key exchange algorithms ([curve25519-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group14-sha1]), MACs ([hmac-sha2-256-etm@openssh.com hmac-sha2-256 hmac-sha1])
??? [TestLogger] 2023/07/24 13:40:21 ...s/graceful/server.go:70:NewServer() [I] Starting new SSH server: tcp:localhost:2203 on PID: 1772189
??? [TestLogger] 2023/07/24 13:40:21 ...exer/code/indexer.go:249:func4() [I] Repository Indexer Initialization took 3.801231ms
??? [TestLogger] 2023/07/24 13:40:21 ...exer/code/indexer.go:275:populateRepoIndexer() [I] Populating the repo indexer with existing repositories
??? [TestLogger] 2023/07/24 13:40:21 ...er/issues/indexer.go:168:func3() [I] Issue Indexer Initialization took 4.117475ms
??? [TestLogger] 2023/07/24 13:40:21 ...tions/clear_tasks.go:64:stopTasks() [W] Cannot transfer logs of task 47: dbfs open "actions_log/artifact-test2/2f/47.log": file does not exist
??? [TestLogger] 2023/07/24 13:40:21 ...ons/commit_status.go:27:CreateCommitStatus() [E] Failed to create commit status for job 192: GetPushEventPayload: readObjectStart: expect { or n, but found , error found in #0 byte of ...||..., bigger context ...||...
=== TestGitAnnexMedia (tests/integration/git_annex_test.go:66)
=== TestGitAnnexMedia/AnnexSymlink (tests/integration/git_annex_test.go:74)
=== TestGitAnnexMedia/AnnexPointer (tests/integration/git_annex_test.go:78)
+++ TestGitAnnexMedia is a slow test (took 10.776584277s)
=== TestGitAnnexViews (tests/integration/git_annex_test.go:123)
=== TestGitAnnexViews/Index (tests/integration/git_annex_test.go:133)
=== TestGitAnnexViews/View (tests/integration/git_annex_test.go:146)
=== TestGitAnnexViews/View/Binary (tests/integration/git_annex_test.go:168)
=== TestGitAnnexViews/View/Binary/AnnexSymlink (tests/integration/git_annex_test.go:179)
=== TestGitAnnexViews/View/Binary/AnnexPointer (tests/integration/git_annex_test.go:183)
=== TestGitAnnexViews/View/Text (tests/integration/git_annex_test.go:189)
=== TestGitAnnexViews/View/Text/AnnexSymlink (tests/integration/git_annex_test.go:197)
=== TestGitAnnexViews/View/Text/AnnexSymlink/Markdown (tests/integration/git_annex_test.go:202)
=== TestGitAnnexViews/View/Text/AnnexPointer (tests/integration/git_annex_test.go:208)
=== TestGitAnnexViews/View/Text/AnnexPointer/Markdown (tests/integration/git_annex_test.go:213)
+++ TestGitAnnexViews is a slow test (took 14.747524676s)
=== TestGitAnnexPermissions (tests/integration/git_annex_test.go:242)
=== TestGitAnnexPermissions/Public (tests/integration/git_annex_test.go:254)
=== TestGitAnnexPermissions/Public/Owner (tests/integration/git_annex_test.go:282)
=== TestGitAnnexPermissions/Public/Owner/SSH (tests/integration/git_annex_test.go:285)
=== TestGitAnnexPermissions/Public/Owner/SSH/Init (tests/integration/git_annex_test.go:298)
=== TestGitAnnexPermissions/Public/Owner/SSH/Download (tests/integration/git_annex_test.go:304)
=== TestGitAnnexPermissions/Public/Owner/SSH/Upload (tests/integration/git_annex_test.go:310)

+++ TestGitAnnexPermissions/Public/Owner/SSH is a slow test (took 13.402236672s)
=== TestGitAnnexPermissions/Public/Owner/HTTP (tests/integration/git_annex_test.go:318)
=== TestGitAnnexPermissions/Public/Owner/HTTP/Init (tests/integration/git_annex_test.go:331)
=== TestGitAnnexPermissions/Public/Owner/HTTP/Download (tests/integration/git_annex_test.go:336)

+++ TestGitAnnexPermissions/Public/Owner is a slow test (took 14.762946498s)
=== TestGitAnnexPermissions/Public/Writer (tests/integration/git_annex_test.go:344)
=== TestGitAnnexPermissions/Public/Writer/SSH (tests/integration/git_annex_test.go:347)
=== TestGitAnnexPermissions/Public/Writer/SSH/Init (tests/integration/git_annex_test.go:360)
=== TestGitAnnexPermissions/Public/Writer/SSH/Download (tests/integration/git_annex_test.go:366)
=== TestGitAnnexPermissions/Public/Writer/SSH/Upload (tests/integration/git_annex_test.go:372)
+++ TestGitAnnexPermissions/Public/Writer/SSH is a slow test (took 10.089337965s)
=== TestGitAnnexPermissions/Public/Writer/HTTP (tests/integration/git_annex_test.go:380)
=== TestGitAnnexPermissions/Public/Writer/HTTP/Init (tests/integration/git_annex_test.go:393)
=== TestGitAnnexPermissions/Public/Writer/HTTP/Download (tests/integration/git_annex_test.go:398)
+++ TestGitAnnexPermissions/Public/Writer is a slow test (took 11.468803719s)
=== TestGitAnnexPermissions/Public/Reader (tests/integration/git_annex_test.go:406)
=== TestGitAnnexPermissions/Public/Reader/SSH (tests/integration/git_annex_test.go:409)
=== TestGitAnnexPermissions/Public/Reader/SSH/Init (tests/integration/git_annex_test.go:422)
=== TestGitAnnexPermissions/Public/Reader/SSH/Download (tests/integration/git_annex_test.go:428)
=== TestGitAnnexPermissions/Public/Reader/SSH/Upload (tests/integration/git_annex_test.go:434)
+++ TestGitAnnexPermissions/Public/Reader/SSH is a slow test (took 10.138516477s)
=== TestGitAnnexPermissions/Public/Reader/HTTP (tests/integration/git_annex_test.go:442)
=== TestGitAnnexPermissions/Public/Reader/HTTP/Init (tests/integration/git_annex_test.go:455)
=== TestGitAnnexPermissions/Public/Reader/HTTP/Download (tests/integration/git_annex_test.go:460)
+++ TestGitAnnexPermissions/Public/Reader is a slow test (took 11.49346837s)
=== TestGitAnnexPermissions/Public/Outsider (tests/integration/git_annex_test.go:468)
=== TestGitAnnexPermissions/Public/Outsider/SSH (tests/integration/git_annex_test.go:471)
=== TestGitAnnexPermissions/Public/Outsider/SSH/Init (tests/integration/git_annex_test.go:484)
=== TestGitAnnexPermissions/Public/Outsider/SSH/Download (tests/integration/git_annex_test.go:490)
=== TestGitAnnexPermissions/Public/Outsider/SSH/Upload (tests/integration/git_annex_test.go:496)
=== TestGitAnnexPermissions/Public/Outsider/HTTP (tests/integration/git_annex_test.go:504)
=== TestGitAnnexPermissions/Public/Outsider/HTTP/Init (tests/integration/git_annex_test.go:517)
=== TestGitAnnexPermissions/Public/Outsider/HTTP/Download (tests/integration/git_annex_test.go:522)
+++ TestGitAnnexPermissions/Public/Outsider is a slow test (took 10.601959009s)
=== TestGitAnnexPermissions/Public/Anonymous (tests/integration/git_annex_test.go:530)
=== TestGitAnnexPermissions/Public/Anonymous/HTTP (tests/integration/git_annex_test.go:534)
=== TestGitAnnexPermissions/Public/Anonymous/HTTP/Init (tests/integration/git_annex_test.go:548)
=== TestGitAnnexPermissions/Public/Anonymous/HTTP/Download (tests/integration/git_annex_test.go:553)
=== TestGitAnnexPermissions/Public/Delete (tests/integration/git_annex_test.go:560)
+++ TestGitAnnexPermissions/Public is a slow test (took 1m1.188219422s)
=== TestGitAnnexPermissions/Private (tests/integration/git_annex_test.go:570)
=== TestGitAnnexPermissions/Private/Owner (tests/integration/git_annex_test.go:600)
=== TestGitAnnexPermissions/Private/Owner/SSH (tests/integration/git_annex_test.go:603)
=== TestGitAnnexPermissions/Private/Owner/SSH/Init (tests/integration/git_annex_test.go:616)
=== TestGitAnnexPermissions/Private/Owner/SSH/Download (tests/integration/git_annex_test.go:622)
=== TestGitAnnexPermissions/Private/Owner/SSH/Upload (tests/integration/git_annex_test.go:628)
+++ TestGitAnnexPermissions/Private/Owner/SSH is a slow test (took 15.618633337s)
=== TestGitAnnexPermissions/Private/Owner/HTTP (tests/integration/git_annex_test.go:636)
=== TestGitAnnexPermissions/Private/Owner/HTTP/Init (tests/integration/git_annex_test.go:649)
=== TestGitAnnexPermissions/Private/Owner/HTTP/Download (tests/integration/git_annex_test.go:654)
+++ TestGitAnnexPermissions/Private/Owner is a slow test (took 17.002577219s)
=== TestGitAnnexPermissions/Private/Writer (tests/integration/git_annex_test.go:662)
=== TestGitAnnexPermissions/Private/Writer/SSH (tests/integration/git_annex_test.go:665)
=== TestGitAnnexPermissions/Private/Writer/SSH/Init (tests/integration/git_annex_test.go:678)
=== TestGitAnnexPermissions/Private/Writer/SSH/Download (tests/integration/git_annex_test.go:684)
=== TestGitAnnexPermissions/Private/Writer/SSH/Upload (tests/integration/git_annex_test.go:690)
=== TestGitAnnexPermissions/Private/Writer/HTTP (tests/integration/git_annex_test.go:698)
=== TestGitAnnexPermissions/Private/Writer/HTTP/Init (tests/integration/git_annex_test.go:711)
=== TestGitAnnexPermissions/Private/Writer/HTTP/Download (tests/integration/git_annex_test.go:716)
+++ TestGitAnnexPermissions/Private/Writer is a slow test (took 11.437693014s)
=== TestGitAnnexPermissions/Private/Reader (tests/integration/git_annex_test.go:724)
=== TestGitAnnexPermissions/Private/Reader/SSH (tests/integration/git_annex_test.go:727)
=== TestGitAnnexPermissions/Private/Reader/SSH/Init (tests/integration/git_annex_test.go:740)
=== TestGitAnnexPermissions/Private/Reader/SSH/Download (tests/integration/git_annex_test.go:746)
=== TestGitAnnexPermissions/Private/Reader/SSH/Upload (tests/integration/git_annex_test.go:752)
=== TestGitAnnexPermissions/Private/Reader/HTTP (tests/integration/git_annex_test.go:760)
=== TestGitAnnexPermissions/Private/Reader/HTTP/Init (tests/integration/git_annex_test.go:773)
=== TestGitAnnexPermissions/Private/Reader/HTTP/Download (tests/integration/git_annex_test.go:778)
=== TestGitAnnexPermissions/Private/Outsider (tests/integration/git_annex_test.go:786)
=== TestGitAnnexPermissions/Private/Outsider/SSH (tests/integration/git_annex_test.go:789)

=== TestGitAnnexPermissions/Private/Outsider/SSH/Init (tests/integration/git_annex_test.go:802)
=== TestGitAnnexPermissions/Private/Outsider/SSH/Download (tests/integration/git_annex_test.go:808)
=== TestGitAnnexPermissions/Private/Outsider/SSH/Upload (tests/integration/git_annex_test.go:814)
=== TestGitAnnexPermissions/Private/Outsider/HTTP (tests/integration/git_annex_test.go:822)
=== TestGitAnnexPermissions/Private/Outsider/HTTP/Init (tests/integration/git_annex_test.go:835)
=== TestGitAnnexPermissions/Private/Outsider/HTTP/Download (tests/integration/git_annex_test.go:840)
=== TestGitAnnexPermissions/Private/Anonymous (tests/integration/git_annex_test.go:848)
=== TestGitAnnexPermissions/Private/Anonymous/HTTP (tests/integration/git_annex_test.go:852)
=== TestGitAnnexPermissions/Private/Anonymous/HTTP/Init (tests/integration/git_annex_test.go:866)
=== TestGitAnnexPermissions/Private/Anonymous/HTTP/Download (tests/integration/git_annex_test.go:871)
=== TestGitAnnexPermissions/Private/Delete (tests/integration/git_annex_test.go:878)
+++ TestGitAnnexPermissions/Private is a slow test (took 56.038586792s)
+++ TestGitAnnexPermissions is a slow test (took 1m57.517452452s)
PASS

That should unblock you.

@matrss
Copy link
Author

matrss commented Oct 10, 2023

I pushed a fix for the database blocking issue. As far as I can tell this fixes parallel archive creation and also the non-responsive UI issue.

Edit: upstream PR for this is go-gitea#27563

Copy link

@kousu kousu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I think this is quite good now! And has been held off for long enough.

Do you prefer me to squash this or include all your commits in series?

@kousu
Copy link

kousu commented Oct 20, 2023

Maybe this squashes to three commits:

  1. feature
  2. tests
  3. Do not block the database(sqlite) during archive creation go-gitea/gitea#27563

@matrss
Copy link
Author

matrss commented Oct 20, 2023

I squashed it down to 3 commits as you suggested; that is probably easier to maintain as a patchset on top of upstream gitea, right? I also extended the commit messages a bit to describe what's done.

@kousu
Copy link

kousu commented Oct 21, 2023

I rebuilt and retested my load test by grabbing out several commit SHA1s and doing

p115628@joplin:/tmp/gitreateaf/a$ cat commits | awk '{ print "http://localhost:3000/nguenthe/data-single-subject/archive/" $1 ".tar.gz" }' | xargs -n 1 -t -P 10 curl -JLO;
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/1d6ce4f9ae8755c8bac8cad2fb3c494980dffc6d.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/5c3c42ce39bc5cf1eaa0aee8bf9a5ef4a4433d84.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/9f4466934fd26004c26c8b66c88f39e1987308a7.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/0cebd54e9bf40ea14e44a678a6615ecf1b987812.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/cee68b762b2bbc0e999daeee050dafaa15f85a22.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/145a46a041235d24d2b83bec9cc1204136e14846.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/3b99172f8588cf11b7cd2bccff907806c606bc4b.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/bb1eefb519ffbb8b806f4231ba0ab123034ccacd.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/daf1618185c3cd2d68de4b460b911ae7cb6f4b67.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/ea493b2c8136fe66b426b8e5b9005bf1e62780eb.tar.gz
[...]

I can see it them running in parallel here, and also see that there's only one archive being created and I'm only using 1 CPU (-> 125% CPU)

2023-10-20-230738_1366x768_scrot

p115628@joplin:~/src/neurogitea/gitea$ ls data/repo-archive/tmp/
upload-2295538376

And, success, the UI is responsive now!!


but, this is super weird, if I hit similar URLs from Firefox, each of those triggers a parallel archive? Here I tried downloading an extra 3 URLs from Firefox and found by CPU usage increased by 300% (-> 375% in this screenshot but it was flucating around 400%, not quite 300% )

2023-10-20-231529_1366x768_scrot

and four archives running at once

p115628@joplin:~/src/neurogitea/gitea$ ls data/repo-archive/tmp/
upload-1214059512  upload-1244874101  upload-2464168600  upload-360532464

And firefox even starts downloading multiple archives at once.

I don't know if this was caused by your unblocking workaround? that's super weird.


I backed out the unblocking commit:

git checkout HEAD~1
git show  # at 8ab68e9b61710123904e85f3888415a30637a875
TAGS="bindata gogit sqlite sqlite_unlock_notify" make build
./gitea

and went to http://localhost:3000/admin and clicked "Supprimer toutes les archives des dépôts (ZIP, TAR.GZ, etc..)"

and confirmed they were actually gone:

p115628@joplin:~/src/neurogitea/gitea$ tree data/repo-archive/1/
data/repo-archive/1/
├── 0c
├── 14
├── 1d
├── 3b
├── 4c
├── 5c
├── 79
├── 9f
├── aa
├── b9
├── bb
├── ce
├── da
├── e4
└── ea

Then I re-ran the load test:

xargs parallel curl downloads
p115628@joplin:/tmp/gitreateaf/a$ rm *.tar.gz
p115628@joplin:/tmp/gitreateaf/a$ cat commits | awk '{ print "http://localhost:3000/nguenthe/data-single-subject/archive/" $1 ".tar.gz" }' | xargs -n 1 -t -P 10 curl -JLO
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/1d6ce4f9ae8755c8bac8cad2fb3c494980dffc6d.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/5c3c42ce39bc5cf1eaa0aee8bf9a5ef4a4433d84.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/9f4466934fd26004c26c8b66c88f39e1987308a7.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/0cebd54e9bf40ea14e44a678a6615ecf1b987812.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/cee68b762b2bbc0e999daeee050dafaa15f85a22.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/145a46a041235d24d2b83bec9cc1204136e14846.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/3b99172f8588cf11b7cd2bccff907806c606bc4b.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/bb1eefb519ffbb8b806f4231ba0ab123034ccacd.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/daf1618185c3cd2d68de4b460b911ae7cb6f4b67.tar.gz
curl -JLO http://localhost:3000/nguenthe/data-single-subject/archive/ea493b2c8136fe66b426b8e5b9005bf1e62780eb.tar.gz
  % Tota l   %   T%o tRaelc e i v e%d  %R eXcfeeirvde d  A%v eXrfaegred S p eAevd e r Taigmee  S  p eTiemde        TTiimme e  C u r reTnitm
e             T i m e     C u r r e n t 
                      %    DT lo ot a ad l      U p  l  o% a  dR  e  c  e Ti vo et da  l %    XD flSoepareddn  t   AU vp le orLaaedgf et    S TpSoepteeade ld  
 i Sm ep0 e  n  t    T  i m0  eL  e  f  t0     T Si pm e ee0 d  
r  r0  e0 n  t  
     0    0              00                0    0     -  -0 :  -  -  :  -  - 0   -  -  :  -  -  :D0-l -o   a- d-  :  -0U- p:-l--o-: a- d -  :  -0 -T o-t-a:l- - : -S-p e-n-t: - - : -Le-f t     S p0eed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0    %   T o0t a l        0%   R e c e 0i v-e-d: --%: -X-f e-r-d: - -A:v-e-r a-g-e: -S-p:e-e-d       T i0me    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0   -%- :T-o-t:a-l-   - - :%- -R:e-c-e i-v-e:d- -%: -X-f e r d    0Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  -  0  0  0: 0  0:   00  :0 01:  910- 9 --  :-- -:- -0-::- --- :-: -  --  - 00   :   0   0   : 10009   - - : -0- : - -      0    0    0 --:--:--  0:00:19 --:--:--              0  00   0              0  0  0  0              0 0        00            0    0       -00 -  0:-- --- -:: :-- --- -::0 --  -- 0   :   000 0 :::0002 0 00: : 2- 20          0        000       0                00     00      0          0   0       0     0  0-    -- 0 :-0  -: -  - -  : :   --0 0--       0-  0 -0 : :: 00 -00   -0:  -0 0  :  : 0-  00 - 00     : 2  0  2 0     :   - 00  0-0  0 ::     -2 0  -2     : - 0 - - :  -0 - 0   -   - :   -0-   : -0  -0    -    :   0-    0-  -  00-   : 0-- :-- 0:0   -    -  00          00   :    0  0 0   0:0   2    3        0- 0  -0   :     --0  --   ::-0 --- 0--:   :-- - --  - :0 : - 0- - :-0  0:  0-0 :-:02 30 0   :0- 2:- 3 0        00      00           0      0 0      0 0       0      0 00            0       0     0 00       0       0     0  0        00           0     0  0         0   0     -   0-   :  0 - 0  -    :    -    -0 0       - -00-0- :: :-0----0:---::-::-2----4::--- - - --   - 0 0: :0:-00:0-0:000:::00-22::-44 22  -4- 4 -:-  ---- :-:-- -::-0-00     0      0     0      0      0   0 0     0     0           0 00      0           0      0 0   0   0        0-    -00  :  0  -    -    :   0-  0 -0          0  0   :  -- 0 0-  00  0:: 0 200: 50:0  :00 -20: -5:20: 25 --5  --: - :--- ---:-0: -: - -- - :- :  - -   --00            0   0   00    0      0      0 --:--:--  0:00:25 --:--:  0      0   0    0  0     0        0       0      0  0 0 0 -     -0    :  0   -  -  0  : 0  0  -   0 -            0    0    0 : 0  00     0  0  :     2     060   0       -  0- - :  -  -0--:   :--- 0- :--0- - : : - --- : --- -  :: -  --0 00--  ::  00-  :0-0 0: : 02: 0 62000 6:: - 02---06-:-: :-:-2-6--:- ---:-::----- -:-- : -  - -  - : 0      0        00   0   0      0     -  0  - :   0  -  0  -     :0  0  - 0  0--     -     :   0  0 -  0: -   00:0  0 -   : -    2      7  0    000-0- : - - 0 :-: 0 ---: : --- 2 ::-07 --:-   0 - - -   -  --  0 :-0   -::0  --0: 0:-00 -::0 --2:  -720   7   - -  0---:0::--0-:-0::---2:--7-:   ---  --   : 0 -0: -0 0:: -20-7   - - : -0-:--00    :    02 8         - 0 0-0   :    -  0 -    :   0-00  -       0             0 0 0   0    0             000    0                  0 00 0     -   -    : 0 -   - :  0 0       00 0               0  0  00                00 0  0       -   -   :0 0- 0 -   :   -  0 -  0      0  0:   0   00  : 0 2   9      0-    - 0-:  --0 :-  -:  --  :-     0 0 0             00   0        0     00              00   0     - - :00-  -  :  -  -   00   0  :  0  0  :  300 0     -  -  :  - 0-0 : ------: :- -- -: :- --0-    0      000:  0  0  :  3  100   -  -  :  -00-   :  -  -    00            000          00            00           0  0- --:--:--:--:-- -  0 :00:00:03:13 1- --:--:--:--:--     0 0:0 0  0  :  5  5 0 0 -  -  :  - 0-0 :  -  -        00      0    00          00            00            00  ----::----::----    00::0000::5555  ----::----::---- 100  857M  100  857M    0     0  10.2M      0  0:01:24  0:01:24 --:--:--  229M          00  ----::----::----    00::0011::2233  ----::----::----          00
       00      0        0 0          0 0 0               000    -  -  : 0-  -  :0 -  -  0      0  :  00 1  :0- 2- 8:  - --- : :-0-- - -: --0:-:- 0- 1 :: -2 -80   -0-::0- :  - 0-0      0  :  0 01 : 20 9     - 0 - 0:  -  -  :  - 0-0            0    0 0      0      0   - -0: - - : - -  0  0-:-0:1-:-2:9- -- - :0-:-0:1-:-2 9   - - :0--:--     - 0-0 :  -  -  :  - 0-0            0 0 0         00        00          00            00            00  ----::----::----    00::0011::4422  ----::----::----          0       00      0         00      0      0      0      0    0      0     - 0-0 :  -- -- :: --0--  :  - 0- :  0  100:: 406 1  :- 4- 6:  --0-- ::------: :- -- -:  -  -      0 0 0              000            000               000             0    0 0          0       0 0   - - --0:: -- -- :: -- --   0   00-::0-01:1:-:4-47:7 - ---- -: :-        00     -0 -  :  - 0-  :0 -  -    0   0  :0 0   2 : 00  00   -  -0 :  -  -  : 0-  - 0             0 0   0        0   -0- :----::----: - -0 : 002::0020: 0-0- :---      000               000            00      0          00       0  0   -0  -  :  -  - 0:0 -  -       0  :  0002  :  2  8     -  -00:  ------:::------ :: -- --      0100  857M  100  857M    0     0  5242k      0  0:02:47  0:02:47 --:--:--  188M:47 --:--:--     0:0--:--  0:02:46 --:--:--     0  - -0:--:--     0     0   00-     0
    -  -0 : 0-  -  :  -  -00       0:  0  400:  0  2     -0 - 0:  -  -  :  -00-                000            00   - - : - -0: ---- : -0-::0-4-: 0 20 :-0-4::-0-2: ---- 100  857M  100  857M    0     0  3429k      0  0:04:16  0:04:16 --:--:--  211M0    0 : 0 4 :01 6- --:--:--:--:-- -  0 : 0 4 :016 --:--:--     0    0 0  0
        0 0 0            0   0 0      0       0 0   0            000              0    0 0            0      00    -- -- ::0-- ---::--:---- -  : -00-::0 04 4:0:2:2404 4    0 0 0            0   00         0   00            0   00         0   00            0   00               0   00                0 0 0 - ----:-:-:----:-:-:---- -    0       000              000            0 0 0           0   00            0 0    0          0    0   0     -  -  :0- - 0:  - -- -  :  -00-: :0--4--::2 6-  -0-::-0-:4--: -  - - :0- - : -  0  0        00        -0  0         0      0  0     0  0       0     0     0       0   - -0: ----::---- : -0:- 0 40:4:80 4-:48 -:----::----:-  -      0    0   0   0      0       0 0      0      00      0        0 0       0     0      0    0       0         00    -- --0: :- -- -: :-- --    0 0 0:-:0-044:::-55-77:  ---- 0    0 0           00   0          0 0  0          0 0    0         00   0            0   00               0   00    -  -  :   -0 - 0:- ----:- -: --0:-:-:0-4- -:  50 90      00      0         00      0      00      0         00      0      00             00   0              0   00     -  -  :  -0 - 0-: ---:---: -- :-0-::--0 -5  :0 0: 0 0    0           0 00            000               000            000              00   0               00   0               00   0-- ---::----:-:-:----:- -  - 0 0: - 0 - :  0-   -    0             0 00 0           0   0   0 -  -  : 0-  -0 :  -  - 0      0 0:  0  50 :  3  2   0 -  -  : 0-  -  :  -0  - -  - 0:  - -- -:0:---- : -0-: -  -  :00-  -  :   -  - 0  0   0  :  00 5 0:   3  3    0- - 0:  -   - 0:  -0 -           0   00          0  0          0  0- --:--:--:--:-- -  0 :00:50:53:33 3- --:--:-100  857M  100  857M    0     0  2538k      0  0:05:46  0:05:46 --:--:--  225M    0 --:--:--  0:05:41 --:--:--     005:38 --:--:--     0 --:--:--     0 0  0
100  857M  100  857M    0     0  2034k      0  0:07:11  0:07:11 --:--:--  241M          00  ----::----::----    00::0077::1100  ----::----::----          00
100  857M  100  857M    0     0  1699k      0  0:08:36  0:08:36 --:--:--  246M
        000              00    0       0 0    0        0 0       0         00   0               000    -  -  : -  -  :00-  --  -  :0 -: -0 :90-:- 5 -5  --0:-:-:0--:9-:-      0  00            0 0 0        0      0 0      0         0   00         0      0     0   0 -  -  : 0-  -  :  -0 -       00  : -0 -90:: -5--6-: :------ :: --0--:: 0   0   00            00   0         0   00            00   0             000                0 0 0     -  -  :  - 0-0 :  -- --  :  - 0-0:: 0--9--: :5 -70- ::-0--9-:: -5         00   0           0 00            00   0            00       0    0       0       0 0   -  -  :0 -  --:--  - 0:0:- 0- 9: :- 5- 8    0-0 -:-:0--9:-:-:5--8:- - --       000              0 0 0           000              0 0 0           0 0      0       0 0           0     0- 0-  :  -  -  :  - 0-0   - --0-:::-0--9-:::-5--9-    - 0-       00      0      0   0    0        0 0    0       0     0      0    0 0            0    0-0 -  :  -  -  :  - 0-0     - 0- :: 1- 0-0:: 0--0--  :- --0-:::--1--0: :-        0    0    0       00       0   0      0      0  0    0       0  0      0       0  0         0      0    0        0     -0 -0 :- ----:-:-:---:--- :- - 0- : 01 :01        0 0 0            000             0 0 0             00   0         0   0      0      -0 - 0: -  -  :  -  - 0    00  : -1 -0 :: 0-02-  :------:: -- --0:::--1--0         0   00            00   0       0     0      0      00           0 0   0- -  :   -  - 0:  -0 -         0 0:  1  00:   0- 3-  :0-- ---::---:---: -- :-0- :- 1  0  : 0      0      0   0 -  - 0:  -  -0 :  - 0-        00  :  1 00  :  0  40   0-  -  :  -  -  :00- -- -  :  -  - :  - 0-0    0 : 1 0 :00 4- --:--:--:--:-- -  0 : 1 0 :004         000     -   -  :00-  -  :  -  - 0 0    0  :  1  000:  0   5    0-  -0 :  -  -  :0 -  -    0         0   0    0   - -0: ----::---- : -0-: 1 00::1005: 0-5- :----:100  857M  100  857M    0     0  1438k      0  0:10:10  0:10:10 --:--:--  210M--:--:--     0--     0
100  857M  100  857M    0     0  1127k      0  0:12:59  0:12:59 --:--:--  259M  0 : 1 7 :02 4  0 :01:71:20:55 8  0 :01:20:45:82 6  0 :10548:M07  161M     00
100  857M  100  857M    0     0  1127k      0  0:12:59  0:12:59 --:--:--  257M
100  857M  100  857M    0     0  1014k      0  0:14:25  0:14:25 --:--:--  212M

and I also tried loading, from firefox,

With this:

  • The UI is nonresponsive again

  • There is only ever one archive being created in

    p115628@joplin:~/src/neurogitea/gitea$ ls data/repo-archive/tmp/
    upload-1250668661
    

    and the CPU only ever goes to 125%

  • Firefox still downloads multiple archives in parallel, but less, because it takes longer for each to become ready

So I think the committing patch did something weird that allowed multiple archives to be generated at once; I don't know why I only seem to be able to trigger it from Firefox though. I also don't know that that's necessarily a bad thing; either people can DoS the site by blocking the UI, or DoS the site by spiking the CPU load; you can control CPU load in other ways, like systemd CPU limits.

@kousu
Copy link

kousu commented Oct 21, 2023

+x -x

I wanted to see if git's executable (+x) file mode would survive being annexed. Unfortunately it does not.

Here's a script to make a repo:

script to generate test repo
cd $(mktemp -d)
git init
cat >> script.sh <<EOF
#!/bin/sh

echo "This is a normal script"
EOF
chmod +x script.sh

cat >> README.md <<EOF
# Hello

This is a normal file
EOF

git add .
git commit -m "Initial commit"

git annex init
echo '* annex.largefiles=anything filter=annex' > .gitattributes

cat >> annex-script.sh <<EOF
#!/bin/sh

echo "This is annexed"
EOF
chmod +x annex-script.sh

cat >> annexed-notes.txt <<EOF
This text file is annexed too
EOF

git add .
git commit -m "Annexed"

This made for me:

p115628@joplin:/tmp/tmp.qXfM5HeseV$ git log -p
commit 28c7792e5088fa536b726e6415b4b9b68e14fb07 (HEAD -> main)
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date:   Sat Oct 21 12:13:31 2023 -0400

    Annexed

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9fd5115
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* annex.largefiles=anything filter=annex
diff --git a/annex-script.sh b/annex-script.sh
new file mode 100755
index 0000000..889e00d
--- /dev/null
+++ b/annex-script.sh
@@ -0,0 +1 @@
+/annex/objects/SHA256E-s34--ecfabe120a5ed3a430212f2ddfc51e32f8e443921a0047b09285d54ad13efe70.sh
diff --git a/annexed-notes.txt b/annexed-notes.txt
new file mode 100644
index 0000000..8e03ebe
--- /dev/null
+++ b/annexed-notes.txt
@@ -0,0 +1 @@
+/annex/objects/SHA256E-s30--894d9d59aa0adda9514401e467def2fb50a59a6a4dfedf5d2d1709e7b8317928.txt

commit 04b11f62e323d015af9cc3e72db4ae3323eaad46
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date:   Sat Oct 21 12:13:31 2023 -0400

    Initial commit

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3d03ba9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Hello
+
+This is a normal file
diff --git a/script.sh b/script.sh
new file mode 100755
index 0000000..390d315
--- /dev/null
+++ b/script.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "This is a normal script"
p115628@joplin:/tmp/tmp.qXfM5HeseV$ ls -l
total 16
-rw------- 2 p115628 domain users 30 oct 21 12:13 annexed-notes.txt
-rwx------ 2 p115628 domain users 34 oct 21 12:13 annex-script.sh
-rw------- 1 p115628 domain users 31 oct 21 12:13 README.md
-rwx------ 1 p115628 domain users 42 oct 21 12:13 script.sh

Notice that git has recorded "new file mode 100755" for annex-script.sh.

I make an empty repo in gitea and upload to it:

Details
p115628@joplin:/tmp/tmp.qXfM5HeseV$ git remote add origin p115628@localhost:nguenthe/test-mode.git
p115628@joplin:/tmp/tmp.qXfM5HeseV$ git push origin
Énumération des objets: 9, fait.
Décompte des objets: 100% (9/9), fait.
Compression par delta en utilisant jusqu'à 128 fils d'exécution
Compression des objets: 100% (6/6), fait.
Écriture des objets: 100% (9/9), 878 octets | 878.00 Kio/s, fait.
Total 9 (delta 1), réutilisés 0 (delta 0), réutilisés du pack 0
remote: . Processing 1 references
remote: Processed 1 references in total
To localhost:nguenthe/test-mode.git
 * [new branch]      main -> main
p115628@joplin:/tmp/tmp.qXfM5HeseV$ git annex sync --content
commit 
Sur la branche main
rien à valider, la copie de travail est propre
ok
pull origin 
remote: Énumération des objets: 2, fait.
remote: Décompte des objets: 100% (2/2), fait.
remote: Total 2 (delta 0), réutilisés 0 (delta 0), réutilisés du pack 0
Dépaquetage des objets: 100% (2/2), 138 octets | 138.00 Kio/s, fait.
Depuis localhost:nguenthe/test-mode
 * [nouvelle branche] git-annex  -> origin/git-annex
ok
(merging origin/git-annex into git-annex...)
(recording state in git...)
copy annex-script.sh (to origin...) 
ok                                
copy annexed-notes.txt (to origin...) 
ok                                
pull origin 
ok
(recording state in git...)
push origin 
Énumération des objets: 24, fait.
Décompte des objets: 100% (24/24), fait.
Compression par delta en utilisant jusqu'à 128 fils d'exécution
Compression des objets: 100% (18/18), fait.
Écriture des objets: 100% (23/23), 1.98 Kio | 674.00 Kio/s, fait.
Total 23 (delta 6), réutilisés 0 (delta 0), réutilisés du pack 0
remote: 
remote: Create a new pull request for 'synced/git-annex':
remote:   http://localhost:3000/nguenthe/test-mode/compare/main...synced/git-annex
remote: 
remote: 
remote: Create a new pull request for 'synced/main':
remote:   http://localhost:3000/nguenthe/test-mode/compare/main...synced/main
remote: 
remote: .. Processing 2 references
remote: Processed 2 references in total
To localhost:nguenthe/test-mode.git
 * [new branch]      git-annex -> synced/git-annex
 * [new branch]      main -> synced/main
ok

Gitea's UI handles it okay:

Screenshot 2023-10-21 at 12-15-41 test-mode_annex-script sh at main

2023-10-21-121605_713x86_scrot
2023-10-21-121557_694x109_scrot

But downloading gives:

p115628@joplin:/tmp/tmp.qXfM5HeseV$ cd $(mktemp -d)
p115628@joplin:/tmp/tmp.sGz2Gxk5PZ$ mkdir zip
p115628@joplin:/tmp/tmp.sGz2Gxk5PZ$ cd zip
p115628@joplin:/tmp/tmp.sGz2Gxk5PZ/zip$ curl -JLO http://localhost:3000/nguenthe/test-mode/archive/main.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1219  100  1219    0     0   1209      0  0:00:01  0:00:01 --:--:--  1210
p115628@joplin:/tmp/tmp.sGz2Gxk5PZ/zip$ zipinfo test-mode-main.zip 
Archive:  test-mode-main.zip
Zip file size: 1219 bytes, number of entries: 6
drwx---     2.0 fat        0 bx stor 23-Oct-21 12:13 test-mode/
-rw----     2.0 fat       41 bX defN 23-Oct-21 12:13 test-mode/.gitattributes
-rw----     2.0 fat       31 bX stor 23-Oct-21 12:13 test-mode/README.md
-r--------  2.0 unx       34 bX defN 23-Oct-21 12:15 test-mode/annex-script.sh
-r--------  2.0 unx       30 bX defN 23-Oct-21 12:15 test-mode/annexed-notes.txt
-rwxr-xr-x  2.0 unx       42 bX stor 23-Oct-21 12:13 test-mode/script.sh
6 files, 178 bytes uncompressed, 193 bytes compressed:  -8.4%
p115628@joplin:/tmp/tmp.sGz2Gxk5PZ/tgz$ tar -ztvf test-mode-main.tar.gz 
drwxrwxr-x root/root         0 2023-10-21 12:13 test-mode/
-rw-rw-r-- root/root        41 2023-10-21 12:13 test-mode/.gitattributes
-rw-rw-r-- root/root        31 2023-10-21 12:13 test-mode/README.md
-r-------- p115628/domain users 34 2023-10-21 12:15 test-mode/annex-script.sh
-r-------- p115628/domain users 30 2023-10-21 12:15 test-mode/annexed-notes.txt
-rwxrwxr-x root/root            42 2023-10-21 12:13 test-mode/script.sh

So annex-script.sh loses its +x bit when its run through the archiver.

Furthermore, even the non-+x files are wrong. Git only supports three file mode: 0644 (files), 0755 (scripts), and 120000 (links). annex-notes.txt should have come out =r,ug=w, but instead it is u=r and this causes weirdnesses like not being able to rm a file from the unpacked archive that you can easily git rm in the repo.

Also the .tgz preserved on the annex files the username of the user running gitea (p115628/domain users), while all the rest are owned root/root.

It must be copying from the modes of the files in .git/annex/objects, which due to lockdown are -w by default.

@kousu
Copy link

kousu commented Oct 21, 2023

annex symlinks vs pointer files

Older git-annex used symlinks; newer git annex defaults to using pointer files, though it's possible (unfortunately) to mix and match (git annex add will make symlinks while git add with .gitattributes configured will make pointer files).

The archive export should be able to handle both formats in the same repo.

create test repo
cd $(mktemp -d)
git init

cat >> README.md <<EOF
# Hello

This is a normal file
EOF

git add .
git commit -m "Initial commit"

git annex init

cat >> annexed-notes-symlink.txt <<EOF
This text file is annexed via a symlink file too
EOF

git annex add .
git commit -m "Annex symlinks"

echo '* annex.largefiles=anything filter=annex' > .gitattributes

cat >> annexed-notes-pointer.txt <<EOF
This text file is annexed via a pointer file
EOF

git add .
git commit -m "Annex pointers"

This made me

p115628@joplin:/tmp/tmp.oONiGJH1xE$ ls -l
total 12
-rw------- 2 p115628 domain users  45 oct 21 14:20 annexed-notes-pointer.txt
lrwxrwxrwx 1 p115628 domain users 188 oct 21 14:20 annexed-notes-symlink.txt -> .git/annex/objects/FM/f0/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt
-rw------- 1 p115628 domain users  31 oct 21 14:20 README.md
p115628@joplin:/tmp/tmp.oONiGJH1xE$ git show HEAD:annexed-notes-symlink.txt 
.git/annex/objects/FM/f0/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt
p115628@joplin:/tmp/tmp.oONiGJH1xE$ git show HEAD:annexed-notes-pointer.txt 
/annex/objects/SHA256E-s45--b37660ddaf90c92ea0b6073ac872eb8e3bf071073b9c26aceaf8f14a8013d44c.txt

I upload it

Details
p115628@joplin:/tmp/tmp.oONiGJH1xE$ git remote add origin p115628@localhost:nguenthe/test-symlinks.git
p115628@joplin:/tmp/tmp.oONiGJH1xE$ git push origin
gitÉnumération des objets: 10, fait.
Décompte des objets: 100% (10/10), fait.
Compression par delta en utilisant jusqu'à 128 fils d'exécution
Compression des objets: 100% (7/7), fait.
Écriture des objets: 100% (10/10), 1.02 Kio | 1.02 Mio/s, fait.
Total 10 (delta 1), réutilisés 0 (delta 0), réutilisés du pack 0
 annexremote: . Processing 1 references
remote: Processed 1 references in total
 To localhost:nguenthe/test-symlinks.git
 * [new branch]      main -> main
p115628@joplin:/tmp/tmp.oONiGJH1xE$ git annex sync --content
commit 
Sur la branche main
rien à valider, la copie de travail est propre
ok
pull origin 
remote: Énumération des objets: 2, fait.
remote: Décompte des objets: 100% (2/2), fait.
remote: Total 2 (delta 0), réutilisés 0 (delta 0), réutilisés du pack 0
Dépaquetage des objets: 100% (2/2), 137 octets | 137.00 Kio/s, fait.
Depuis localhost:nguenthe/test-symlinks
 * [nouvelle branche] git-annex  -> origin/git-annex
ok
(merging origin/git-annex into git-annex...)
(recording state in git...)
copy annexed-notes-pointer.txt (to origin...) 
ok                                
copy annexed-notes-symlink.txt (to origin...) 
ok                                
pull origin 
ok
(recording state in git...)
push origin 
Énumération des objets: 24, fait.
Décompte des objets: 100% (24/24), fait.
Compression par delta en utilisant jusqu'à 128 fils d'exécution
Compression des objets: 100% (18/18), fait.
Écriture des objets: 100% (23/23), 1.98 Kio | 1012.00 Kio/s, fait.
Total 23 (delta 6), réutilisés 0 (delta 0), réutilisés du pack 0
remote: 
remote: Create a new pull request for 'synced/git-annex':
remote:   http://localhost:3000/nguenthe/test-symlinks/compare/main...synced/git-annex
remote: 
remote: 
remote: Create a new pull request for 'synced/main':
remote:   http://localhost:3000/nguenthe/test-symlinks/compare/main...synced/main
remote: 
remote: .. Processing 2 references
remote: Processed 2 references in total
To localhost:nguenthe/test-symlinks.git
 * [new branch]      git-annex -> synced/git-annex
 * [new branch]      main -> synced/main
ok

And then download it

p115628@joplin:/tmp/tmp.oONiGJH1xE$ curl -JLO http://localhost:3000/nguenthe/test-symlinks/archive/main.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1110  100  1110    0     0    552      0  0:00:02  0:00:02 --:--:--   553
p115628@joplin:/tmp/tmp.oONiGJH1xE$ curl -JLO http://localhost:3000/nguenthe/test-symlinks/archive/main.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   527  100   527    0     0    497      0  0:00:01  0:00:01 --:--:--   497

It successfully recovered the contents

p115628@joplin:/tmp/tmp.oONiGJH1xE$ unzip test-symlinks-main.zip 
Archive:  test-symlinks-main.zip
2bd21155a108cfd521a57cc67b66053f850e4349
   creating: test-symlinks/
  inflating: test-symlinks/.gitattributes  
 extracting: test-symlinks/README.md  
  inflating: test-symlinks/annexed-notes-pointer.txt  
  inflating: test-symlinks/annexed-notes-symlink.txt  
p115628@joplin:/tmp/tmp.oONiGJH1xE$ ls -l test-symlinks/
total 12
-r-------- 1 p115628 domain users 45 oct 21 14:21 annexed-notes-pointer.txt
-r-------- 1 p115628 domain users 49 oct 21 14:21 annexed-notes-symlink.txt
-rw------- 1 p115628 domain users 31 oct 21 14:20 README.md
p115628@joplin:/tmp/tmp.oONiGJH1xE$ cat test-symlinks/annexed-notes-pointer.txt 
This text file is annexed via a pointer file
p115628@joplin:/tmp/tmp.oONiGJH1xE$ cat test-symlinks/annexed-notes-symlink.txt 
This text file is annexed via a symlink file too
p115628@joplin:/tmp/tmp.oONiGJH1xE$ rm -rf test-symlinks
p115628@joplin:/tmp/tmp.oONiGJH1xE$ tar -zxvf test-symlinks-main.tar.gz 
test-symlinks/
test-symlinks/.gitattributes
test-symlinks/README.md
test-symlinks/annexed-notes-pointer.txt
test-symlinks/annexed-notes-symlink.txt
p115628@joplin:/tmp/tmp.oONiGJH1xE$ ls -l test-symlinks
total 12
-r-------- 1 p115628 domain users 45 oct 21 14:21 annexed-notes-pointer.txt
-r-------- 1 p115628 domain users 49 oct 21 14:21 annexed-notes-symlink.txt
-rw------- 1 p115628 domain users 31 oct 21 14:20 README.md
p115628@joplin:/tmp/tmp.oONiGJH1xE$ cat test-symlinks/annexed-notes-symlink.txt 
This text file is annexed via a symlink file too
p115628@joplin:/tmp/tmp.oONiGJH1xE$ cat test-symlinks/annexed-notes-pointer.txt 
This text file is annexed via a pointer file

And again both file modes are wrong, pointer and non-pointer, probably because the archive copied the mode from the annexed content not from what the header in git.

symlinks + pointer files + +x bit

create test repo
cd $(mktemp -d)
git init
cat >> script.sh <<EOF
#!/bin/sh

echo "This is a normal script"
EOF
chmod +x *.sh

cat >> README.md <<EOF
# Hello

This is a normal file
EOF

git add .
git commit -m "Initial commit"

git annex init


cat >> annex-script-symlink.sh <<EOF
#!/bin/sh

echo "This is annexed via a symlink file"
EOF
chmod +x *.sh

cat >> annexed-notes-symlink.txt <<EOF
This text file is annexed via a symlink file too
EOF

git annex add .
git commit -m "Annex symlinks"

echo '* annex.largefiles=anything filter=annex' > .gitattributes

cat >> annex-script-pointer.sh <<EOF
#!/bin/sh

echo "This is annexed via a pointer file"
EOF
chmod +x *.sh

cat >> annexed-notes-pointer.txt <<EOF
This text file is annexed via a pointer file too
EOF

git add .
git commit -m "Annex pointers"

This created this data structure for me:

p115628@joplin:/tmp/tmp.qtyqR3hYCl$ ls -la
total 28
drwx------  3 p115628 domain users  200 oct 21 14:01 .
drwxrwxrwt 59 root    root         1240 oct 21 14:01 ..
-rw-------  2 p115628 domain users   49 oct 21 14:01 annexed-notes-pointer.txt
lrwxrwxrwx  1 p115628 domain users  188 oct 21 14:01 annexed-notes-symlink.txt -> .git/annex/objects/FM/f0/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt
-rwx------  2 p115628 domain users   53 oct 21 14:01 annex-script-pointer.sh
lrwxrwxrwx  1 p115628 domain users  186 oct 21 14:01 annex-script-symlink.sh -> .git/annex/objects/1W/fq/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh
drwx------  9 p115628 domain users  280 oct 21 14:01 .git
-rw-------  1 p115628 domain users   41 oct 21 14:01 .gitattributes
-rw-------  1 p115628 domain users   31 oct 21 14:01 README.md
-rwx------  1 p115628 domain users   42 oct 21 14:01 script.sh
p115628@joplin:/tmp/tmp.qtyqR3hYCl$ ls -U -l .git/annex/objects/FM/f0/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt .git/annex/objects/1W/fq/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh
-r-------- 1 p115628 domain users 49 oct 21 14:01 .git/annex/objects/FM/f0/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt
-r-x------ 1 p115628 domain users 53 oct 21 14:01 .git/annex/objects/1W/fq/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh

Here's the git log;

git log

Notice that the annex symlinks (filemode 120000) start with ".git/" while the pointer files

p115628@joplin:/tmp/tmp.qtyqR3hYCl$ git log -p
commit 33fb4f74541ee70fa0662e536fc988384611996c (HEAD -> main)
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date:   Sat Oct 21 14:01:53 2023 -0400

    Annex pointers

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9fd5115
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* annex.largefiles=anything filter=annex
diff --git a/annex-script-pointer.sh b/annex-script-pointer.sh
new file mode 100755
index 0000000..5f03ec0
--- /dev/null
+++ b/annex-script-pointer.sh
@@ -0,0 +1 @@
+/annex/objects/SHA256E-s53--7eff012b7919ff766c3e58ccf6791b11a20dacb909ed21276f71da6c24fc51c4.sh
diff --git a/annexed-notes-pointer.txt b/annexed-notes-pointer.txt
new file mode 100644
index 0000000..f803cef
--- /dev/null
+++ b/annexed-notes-pointer.txt
@@ -0,0 +1 @@
+/annex/objects/SHA256E-s49--7e7a45d52a39d62e3b951fb60a55740685634599f7c9208ea14faf5be0bcde5e.txt

commit ae3777d87592f61377ba350cf55795693ec4ff3f
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date:   Sat Oct 21 14:01:52 2023 -0400

    Annex symlinks

diff --git a/annex-script-symlink.sh b/annex-script-symlink.sh
new file mode 120000
index 0000000..bb3d4c6
--- /dev/null
+++ b/annex-script-symlink.sh
@@ -0,0 +1 @@
+.git/annex/objects/1W/fq/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh/SHA256E-s53--6edf57b2565c4cd082cbdf94ec70403623ab96998565cf74f49dade8abb5c541.sh
\ No newline at end of file
diff --git a/annexed-notes-symlink.txt b/annexed-notes-symlink.txt
new file mode 120000
index 0000000..9953387
--- /dev/null
+++ b/annexed-notes-symlink.txt
@@ -0,0 +1 @@
+.git/annex/objects/FM/f0/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt/SHA256E-s49--658c3f878ba028b302e6965b99cc6b0a6579cd5f023f54e80a219ccc11a7323b.txt
\ No newline at end of file

commit f5a6763cbe05329ba268151537d4b6ea90114c53
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date:   Sat Oct 21 14:01:52 2023 -0400

    Initial commit

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3d03ba9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Hello
+
+This is a normal file
diff --git a/script.sh b/script.sh
new file mode 100755
index 0000000..390d315
--- /dev/null
+++ b/script.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "This is a normal script"

Upload + download:

Details
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ git remote add origin p115628@localhost:nguenthe/test-link-mode.git
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ git push origin
Énumération des objets: 13, fait.
Décompte des objets: 100% (13/13), fait.
Compression par delta en utilisant jusqu'à 128 fils d'exécution
Compression des objets: 100% (10/10), fait.
Écriture des objets: 100% (13/13), 1.33 Kio | 1.33 Mio/s, fait.
Total 13 (delta 2), réutilisés 0 (delta 0), réutilisés du pack 0
remote: . Processing 1 references
remote: Processed 1 references in total
To localhost:nguenthe/test-link-mode.git
 * [new branch]      main -> main
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ git annex sync --content
commit 
Sur la branche main
rien à valider, la copie de travail est propre
ok
pull origin 
remote: Énumération des objets: 2, fait.
remote: Décompte des objets: 100% (2/2), fait.
remote: Total 2 (delta 0), réutilisés 0 (delta 0), réutilisés du pack 0
Dépaquetage des objets: 100% (2/2), 138 octets | 138.00 Kio/s, fait.
Depuis localhost:nguenthe/test-link-mode
 * [nouvelle branche] git-annex  -> origin/git-annex
ok
(merging origin/git-annex into git-annex...)
(recording state in git...)
copy annex-script-pointer.sh (to origin...) 
ok                                
copy annex-script-symlink.sh (to origin...) 
ok                                
copy annexed-notes-pointer.txt (to origin...) 
ok                                
copy annexed-notes-symlink.txt (to origin...) 
ok                                
pull origin 
ok
(recording state in git...)
push origin 
Énumération des objets: 38, fait.
Décompte des objets: 100% (38/38), fait.
Compression par delta en utilisant jusqu'à 128 fils d'exécution
Compression des objets: 100% (28/28), fait.
Écriture des objets: 100% (37/37), 2.88 Kio | 590.00 Kio/s, fait.
Total 37 (delta 12), réutilisés 0 (delta 0), réutilisés du pack 0
remote: 
remote: Create a new pull request for 'synced/git-annex':
remote:   http://localhost:3000/nguenthe/test-link-mode/compare/main...synced/git-annex
remote: 
remote: 
remote: Create a new pull request for 'synced/main':
remote:   http://localhost:3000/nguenthe/test-link-mode/compare/main...synced/main
remote: 
remote: .. Processing 2 references
remote: Processed 2 references in total
To localhost:nguenthe/test-link-mode.git
 * [new branch]      git-annex -> synced/git-annex
 * [new branch]      main -> synced/main
ok
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ curl -JLO http://localhost:3000/nguenthe/test-link-mode/archive/main.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   677  100   677    0     0    672      0  0:00:01  0:00:01 --:--:--   672
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ curl -JLO http://localhost:3000/nguenthe/test-link-mode/archive/main.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1831  100  1831    0     0   1819      0  0:00:01  0:00:01 --:--:--  1820

Results:

p115628@joplin:/tmp/tmp.TAMvSGPYxK$ zipinfo test-link-mode-main.zip 
Archive:  test-link-mode-main.zip
Zip file size: 1831 bytes, number of entries: 8
drwx---     2.0 fat        0 bx stor 23-Oct-21 14:45 test-link-mode/
-rw----     2.0 fat       41 bX defN 23-Oct-21 14:45 test-link-mode/.gitattributes
-rw----     2.0 fat       31 bX stor 23-Oct-21 14:45 test-link-mode/README.md
-r--------  2.0 unx       53 bX defN 23-Oct-21 14:46 test-link-mode/annex-script-pointer.sh
-r--------  2.0 unx       53 bX defN 23-Oct-21 14:46 test-link-mode/annex-script-symlink.sh
-r--------  2.0 unx       49 bX defN 23-Oct-21 14:46 test-link-mode/annexed-notes-pointer.txt
-r--------  2.0 unx       49 bX defN 23-Oct-21 14:46 test-link-mode/annexed-notes-symlink.txt
-rwxr-xr-x  2.0 unx       42 bX stor 23-Oct-21 14:45 test-link-mode/script.sh
8 files, 318 bytes uncompressed, 337 bytes compressed:  -6.0%
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ tar -ztvf test-link-mode-main.tar.gz 
drwxrwxr-x root/root         0 2023-10-21 14:45 test-link-mode/
-rw-rw-r-- root/root        41 2023-10-21 14:45 test-link-mode/.gitattributes
-rw-rw-r-- root/root        31 2023-10-21 14:45 test-link-mode/README.md
-r-------- p115628/domain users 53 2023-10-21 14:46 test-link-mode/annex-script-pointer.sh
-r-------- p115628/domain users 53 2023-10-21 14:46 test-link-mode/annex-script-symlink.sh
-r-------- p115628/domain users 49 2023-10-21 14:46 test-link-mode/annexed-notes-pointer.txt
-r-------- p115628/domain users 49 2023-10-21 14:46 test-link-mode/annexed-notes-symlink.txt
-rwxrwxr-x root/root            42 2023-10-21 14:45 test-link-mode/script.sh
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ ls -l test-link-mode
total 24
-r-------- 1 p115628 domain users 49 oct 21 14:46 annexed-notes-pointer.txt
-r-------- 1 p115628 domain users 49 oct 21 14:46 annexed-notes-symlink.txt
-r-------- 1 p115628 domain users 53 oct 21 14:46 annex-script-pointer.sh
-r-------- 1 p115628 domain users 53 oct 21 14:46 annex-script-symlink.sh
-rw------- 1 p115628 domain users 31 oct 21 14:45 README.md
-rwx------ 1 p115628 domain users 42 oct 21 14:45 script.sh
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ ls -l test-link-mode^C
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ cat test-link-mode/annex-script-pointer.sh 
#!/bin/sh

echo "This is annexed via a pointer file"
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ cat test-link-mode/annex-script-symlink.sh 
#!/bin/sh

echo "This is annexed via a symlink file"
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ cat test-link-mode/annexed-notes-pointer.txt 
This text file is annexed via a pointer file too
p115628@joplin:/tmp/tmp.TAMvSGPYxK$ cat test-link-mode/annexed-notes-symlink.txt 
This text file is annexed via a symlink file too

So in summary, the modes are wrong but the content is correct.

@kousu
Copy link

kousu commented Oct 21, 2023

Okay I know I already approved this but I'm a jerk and I went back to nitpick and found this bug with the file modes. I patched it in 41bba27 and I think a did a good job but maybe there's something I haven't thought of; what do you think @matrss ?

This bit is maybe a bit weird

https://github.com/neuropoly/gitea/blob/41bba271dd3fe5f467e6aff5be9bb8d4ddcb7119/modules/annex/annex_archive.go#L84-L93

With this patch in place my tests come out all uniformly with the permission bits I expect:

zip:

p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ curl -JLO http://localhost:3000/nguenthe/test-link-mode/archive/main.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1831  100  1831    0     0   242k      0 --:--:-- --:--:-- --:--:--  298k
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ zipinfo test-link-mode-main.zip 
Archive:  test-link-mode-main.zip
Zip file size: 1831 bytes, number of entries: 8
drwx---     2.0 fat        0 bx stor 23-Oct-21 14:45 test-link-mode/
-rw----     2.0 fat       41 bX defN 23-Oct-21 14:45 test-link-mode/.gitattributes
-rw----     2.0 fat       31 bX stor 23-Oct-21 14:45 test-link-mode/README.md
-rwxr-xr-x  2.0 unx       53 bX defN 23-Oct-21 14:46 test-link-mode/annex-script-pointer.sh
-rwxr-xr-x  2.0 unx       53 bX defN 23-Oct-21 14:46 test-link-mode/annex-script-symlink.sh
-rw-r--r--  2.0 unx       49 bX defN 23-Oct-21 14:46 test-link-mode/annexed-notes-pointer.txt
-rw-r--r--  2.0 unx       49 bX defN 23-Oct-21 14:46 test-link-mode/annexed-notes-symlink.txt
-rwxr-xr-x  2.0 unx       42 bX stor 23-Oct-21 14:45 test-link-mode/script.sh
8 files, 318 bytes uncompressed, 337 bytes compressed:  -6.0%
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ unzip test-link-mode-main.zip 
Archive:  test-link-mode-main.zip
198884ab03410066c1d34858806c889b0e65a921
   creating: test-link-mode/
  inflating: test-link-mode/.gitattributes  
 extracting: test-link-mode/README.md  
  inflating: test-link-mode/annex-script-pointer.sh  
  inflating: test-link-mode/annex-script-symlink.sh  
  inflating: test-link-mode/annexed-notes-pointer.txt  
  inflating: test-link-mode/annexed-notes-symlink.txt  
 extracting: test-link-mode/script.sh  
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ ls -l test-link-mode
total 24
-rw-r--r-- 1 p115628 domain users 49 oct 21 14:46 annexed-notes-pointer.txt
-rw-r--r-- 1 p115628 domain users 49 oct 21 14:46 annexed-notes-symlink.txt
-rwxr-xr-x 1 p115628 domain users 53 oct 21 14:46 annex-script-pointer.sh
-rwxr-xr-x 1 p115628 domain users 53 oct 21 14:46 annex-script-symlink.sh
-rw------- 1 p115628 domain users 31 oct 21 14:45 README.md
-rwxr-xr-x 1 p115628 domain users 42 oct 21 14:45 script.sh

tgz:

p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ curl -JLO http://localhost:3000/nguenthe/test-link-mode/archive/main.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   777  100   777    0     0    386      0  0:00:02  0:00:02 --:--:--   387
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ tar -ztvf test-link-mode-main.tar.gz 
drwxrwxr-x root/root         0 2023-10-21 14:45 test-link-mode/
-rw-rw-r-- root/root        41 2023-10-21 14:45 test-link-mode/.gitattributes
-rw-rw-r-- root/root        31 2023-10-21 14:45 test-link-mode/README.md
-rwxr-xr-x root/root        53 2023-10-21 14:45 test-link-mode/annex-script-pointer.sh
-rwxr-xr-x root/root        53 2023-10-21 14:45 test-link-mode/annex-script-symlink.sh
-rw-r--r-- root/root        49 2023-10-21 14:45 test-link-mode/annexed-notes-pointer.txt
-rw-r--r-- root/root        49 2023-10-21 14:45 test-link-mode/annexed-notes-symlink.txt
-rwxrwxr-x root/root        42 2023-10-21 14:45 test-link-mode/script.sh
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ tar -zxvf test-link-mode-main.tar.gz 
test-link-mode/
test-link-mode/.gitattributes
test-link-mode/README.md
test-link-mode/annex-script-pointer.sh
test-link-mode/annex-script-symlink.sh
test-link-mode/annexed-notes-pointer.txt
test-link-mode/annexed-notes-symlink.txt
test-link-mode/script.sh
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ ls -l test-link-mode
total 24
-rw------- 1 p115628 domain users 49 oct 21 14:45 annexed-notes-pointer.txt
-rw------- 1 p115628 domain users 49 oct 21 14:45 annexed-notes-symlink.txt
-rwx------ 1 p115628 domain users 53 oct 21 14:45 annex-script-pointer.sh
-rwx------ 1 p115628 domain users 53 oct 21 14:45 annex-script-symlink.sh
-rw------- 1 p115628 domain users 31 oct 21 14:45 README.md
-rwx------ 1 p115628 domain users 42 oct 21 14:45 script.sh
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ umask   # the inconsistency between the extracted perms and the archived perms is just this
0077

I'm working on patching your tests to match now. They're pretty nice tests by the way! They're short and precise.

@matrss
Copy link
Author

matrss commented Oct 23, 2023

but, this is super weird, if I hit similar URLs from Firefox, each of those triggers a parallel archive? Here I tried downloading an extra 3 URLs from Firefox and found by CPU usage increased by 300% (-> 375% in this screenshot but it was flucating around 400%, not quite 300% )

This is intended behaviour. The number of parallel archive creations should be limited by the queue.repo-archive.MAX_WORKERS setting (https://docs.gitea.com/administration/config-cheat-sheet#queue-queue-and-queue), which should be 10 for you, looking at your screenshots.

This should also apply for the curl downloads. There seems to be a race condition where two archive downloads started at the same time do not run in parallel. A delay in between the curl calls makes them run in parallel too, e.g. with:

curl -JLO http://localhost:3000/gitea/data-single-subject/archive/b99a62714fb4948cbe1d1dbe53b206f5bba4f8eb.tar.gz &
sleep 2
curl -JLO http://localhost:3000/gitea/data-single-subject/archive/6884df96233801478a2d493b5e166f8a369f6011.tar.gz &
sleep 2
curl -JLO http://localhost:3000/gitea/data-single-subject/archive/c9f763a5acf2c7e94954ff7e865f863cac59ed95.tar.gz &
sleep 2
curl -JLO http://localhost:3000/gitea/data-single-subject/archive/e29563ed9bb5a428e91e12ab46e6c6d6413b1395.tar.gz &
wait

So I think the committing patch did something weird that allowed multiple archives to be generated at once; I don't know why I only seem to be able to trigger it from Firefox though. I also don't know that that's necessarily a bad thing; either people can DoS the site by blocking the UI, or DoS the site by spiking the CPU load; you can control CPU load in other ways, like systemd CPU limits.

As above, intended behaviour by gitea which was just broken with sqlite. Since the maximum number of workers is limited I don't think this qualifies as a DoS by CPU load. Worst case, set MAX_WORKERS to 1 and this should not be an issue.

So annex-script.sh loses its +x bit when its run through the archiver.

Yes, that was an oversight in the case of pointer files.

Furthermore, even the non-+x files are wrong. Git only supports three file mode: 0644 (files), 0755 (scripts), and 120000 (links). annex-notes.txt should have come out =r,ug=w, but instead it is u=r and this causes weirdnesses like not being able to rm a file from the unpacked archive that you can easily git rm in the repo.

For what it's worth, I did not yet understand how git archive assigns permissions as well. A targz archive from git archive produces files with -rwxrwxr-x permissions, even without git-annex involved.

Also the .tgz preserved on the annex files the username of the user running gitea (p115628/domain users), while all the rest are owned root/root.

Right, that is a bug as well.

It must be copying from the modes of the files in .git/annex/objects, which due to lockdown are -w by default.

That is what my implementation did, for all annexed files (symlink and pointer file). I think you improved that already, right? You did.

Older git-annex used symlinks; newer git annex defaults to using pointer files, though it's possible (unfortunately) to mix and match (git annex add will make symlinks while git add with .gitattributes configured will make pointer files).

I don't think git-annex prefers pointer files over symlinks in newer versions. As you noted, git annex add will produce symlinks. Also, I prefer those over pointer files since they are way easier to distinguish from other files in a repository. I always thought pointer files are just an improvement for unlocked files, not something intended to replace the symlinks. For what it's worth, DataLad also produces symlinks, probably because it uses git annex add internally.

Edit:
This seems to fit with my understanding of the difference between symlinks and pointer files being just locked vs unlocked:

That changes what's stored in git between a git-annex symlink (locked) and a git-annex pointer file (unlocked). You can commit the change, if you want that file to be unlocked in other clones of the repository. To lock the file again, use git annex lock.

Taken from: https://git-annex.branchable.com/tips/unlocked_files/

I am wondering why git add with your .gitattributes file does not create symlinks, i.e. locked files, though...

The archive export should be able to handle both formats in the same repo.

Yes, it should.

@matrss
Copy link
Author

matrss commented Oct 23, 2023

p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ curl -JLO http://localhost:3000/nguenthe/test-link-mode/archive/main.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 777 100 777 0 0 386 0 0:00:02 0:00:02 --:--:-- 387
p115628@joplin:/tmp/tmp.ZQGCDDkqCl$ tar -ztvf test-link-mode-main.tar.gz
drwxrwxr-x root/root 0 2023-10-21 14:45 test-link-mode/
-rw-rw-r-- root/root 41 2023-10-21 14:45 test-link-mode/.gitattributes
-rw-rw-r-- root/root 31 2023-10-21 14:45 test-link-mode/README.md
-rwxr-xr-x root/root 53 2023-10-21 14:45 test-link-mode/annex-script-pointer.sh
-rwxr-xr-x root/root 53 2023-10-21 14:45 test-link-mode/annex-script-symlink.sh
-rw-r--r-- root/root 49 2023-10-21 14:45 test-link-mode/annexed-notes-pointer.txt
-rw-r--r-- root/root 49 2023-10-21 14:45 test-link-mode/annexed-notes-symlink.txt
-rwxrwxr-x root/root 42 2023-10-21 14:45 test-link-mode/script.sh

The permissions in this last line are what I find weird with git archive. Since that is a git file it is directly copied over. But it is 775, not 755. How does that happen, if these permissions can't be coming from git?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this direct mapping correct? According to https://pkg.go.dev/code.gitea.io/gitea/modules/git#EntryMode git.EntryModeExec is 0o100755. According to https://pkg.go.dev/io/fs#FileMode ModePerm is 0o777 and according to https://pkg.go.dev/io/fs#FileMode.IsRegular regular files should have no ModeType bits set. Shouldn't therefore git.EntryModeExec map to fs.FileMode(0o755) instead? This applies for targz and git.EntryModeBlob as well.

@matrss
Copy link
Author

matrss commented Oct 24, 2023

Re: symlink vs pointer file

I opened a bug report here for git-annex because I would really prefer git add to add symlinks, i.e. locked files. It looks like Joey would prefer that too but there is a technical limitation that prevents git-annex from doing that, unfortunately.

@matrss
Copy link
Author

matrss commented Oct 26, 2023

I tested a bit and found this:

For a file with executable permissions in git, git archive puts unix 0775 permissions on the file in tar.gz, but puts 0755 permissions on it in zip.

For a file without executable permissions, git archive puts unix 0664 permission on the file in tar.gz, but puts fat rw permissions on it in zip.

We should probably match that behavior as well and I am working on a patch for that (and for the test suite).

@kousu
Copy link

kousu commented Oct 26, 2023

That's a weird inconsistency in git, I'd even wonder if it's a bug, but yes we should match it!

Thank you for your incredibly good attention to detail and patience. It's clear you want to make a quality product like I do :)

And sorry again for not making the time this week to finish up the patch I started.

@matrss
Copy link
Author

matrss commented Oct 27, 2023

That's a weird inconsistency in git, I'd even wonder if it's a bug, but yes we should match it!

I wondered about that too. The code in git is pretty explicit about it though, e.g. for tar it internally uses an explicit tar_umask of 002.

@matrss
Copy link
Author

matrss commented Oct 27, 2023

I pushed another refactor of the archive tests, since I had that lying around already and it made it easier to deal with properly checking the file permissions. It also runs 100 parallel downloads against each of the download endpoints, which I mainly did to try if it handles parallel downloads properly.

The file permissions should now match what git archive would produce for standard git files as well.

@matrss
Copy link
Author

matrss commented Oct 27, 2023

Rebased again. I would probably squash this down to 3 commits again before this is merged.

@matrss
Copy link
Author

matrss commented Oct 31, 2023

I squashed it down again. I think this is ready for another review now.

Nick Guenther and others added 11 commits November 4, 2023 11:55
[git-annex](https://git-annex.branchable.com/) is a more complicated cousin to
git-lfs, storing large files in an optional-download side content.  Unlike lfs,
it allows mixing and matching storage remotes, so the content remote(s) doesn't
need to be on the same server as the git remote, making it feasible to scatter
a collection across cloud storage, old harddrives, or anywhere else storage can
be scavenged.  Since this can get complicated, fast, it has a content-tracking
database (`git annex whereis`) to help find everything later.

The use-case we imagine for including it in Gitea is just the simple case, where
we're primarily emulating git-lfs: each repo has its large content at the same URL.

Our motivation is so we can self-host https://www.datalad.org/ datasets, which
currently are only hostable by fragilely scrounging together cloud storage --
and having to manage all the credentials associated with all the pieces -- or at
https://openneuro.org which is fragile in its own ways.

Supporting git-annex also allows multiple Gitea instance to be annex remotes for
each other, mirroring the content or otherwise collaborating the split up the
hosting costs.

Enabling
--------

TODO

HTTP
----

TODO

Permission Checking
-------------------

This tweaks the API in routers/private/serv.go to expose the calling user's
computed permission, instead of just returning HTTP 403.

This doesn't fit in super well. It's the opposite from how the git-lfs support is
done, where there's a complete list of possible subcommands and their matching
permission levels, and then the API compares the requested with the actual level
and returns HTTP 403 if the check fails.

But it's necessary. The main git-annex verbs, 'git-annex-shell configlist' and
'git-annex-shell p2pstdio' are both either read-only or read-write operations,
depending on the state on disk on either end of the connection and what the user
asked it to ask for, with no way to know before git-annex examines the situation.
So tell the level via GIT_ANNEX_READONLY and trust it to handle itself.

In the older Gogs version, the permission was directly read in cmd/serv.go:

```
mode, err = db.UserAccessMode(user.ID, repo)
```
- https://github.com/G-Node/gogs/blob/966e925cf320beff768b192276774d9265706df5/internal/cmd/serv.go#L334

but in Gitea permission enforcement has been centralized in the API layer.
(perhaps so the cmd layer can avoid making direct DB connections?)

Deletion
--------

git-annex has this "lockdown" feature where it tries
really quite very hard to prevent you deleting its
data, to the point that even an rm -rf won't do it:
each file in annex/objects/ is nested inside a
folder with read-only permissions.

The recommended workaround is to run chmod -R +w when
you're sure you actually want to delete a repo. See
https://git-annex.branchable.com/internals/lockdown

So we edit util.RemoveAll() to do just that, so now
it's `chmod -R +w && rm -rf` instead of just `rm -rf`.
Fixes neuropoly#11

Tests:

* `git annex init`
* `git annex copy --from origin`
* `git annex copy --to origin`

over:

* ssh

for:

* the owner
* a collaborator
* a read-only collaborator
* a stranger

in a

* public repo
* private repo

And then confirms:

* Deletion of the remote repo (to ensure lockdown isn't messing with us: https://git-annex.branchable.com/internals/lockdown/#comment-0cc5225dc5abe8eddeb843bfd2fdc382)

------

To support all this:

* Add util.FileCmp()
* Patch withKeyFile() so it can be nested in other copies of itself

-------

Many thanks to Mathieu for giving style tips and catching several bugs,
including a subtle one in util.filecmp() which neutered it.

Co-authored-by: Mathieu Guay-Paquet <mathieu.guay-paquet@polymtl.ca>
Fixes neuropoly#8

Co-authored-by: Mathieu Guay-Paquet <mathieu.guaypaquet@gmail.com>
This makes HTTP symmetric with SSH clone URLs.

This gives us the fancy feature of _anonymous_ downloads,
so people can access datasets without having to set up an
account or manage ssh keys.

Previously, to access "open access" data shared this way,
users would need to:

  1. Create an account on gitea.example.com
  2. Create ssh keys
  3. Upload ssh keys (and make sure to find and upload the correct file)
  4. `git clone git@gitea.example.com:user/dataset.git`
  5. `cd dataset`
  6. `git annex get`

This cuts that down to just the last three steps:

  1. `git clone https://gitea.example.com/user/dataset.git`
  2. `cd dataset`
  3. `git annex get`

This is significantly simpler for downstream users, especially for those
unfamiliar with the command line.

Unfortunately there's no uploading. While git-annex supports uploading
over HTTP to S3 and some other special remotes, it seems to fail on a
_plain_ HTTP remote. See neuropoly#7
and https://git-annex.branchable.com/forum/HTTP_uploads/#comment-ce28adc128fdefe4c4c49628174d9b92.

This is not a major loss since no one wants uploading to be anonymous anyway.

To support private repos, I had to hunt down and patch a secret extra security
corner that Gitea only applies to HTTP for some reason (services/auth/basic.go).

This was guided by https://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/

Fixes neuropoly#3

Co-authored-by: Mathieu Guay-Paquet <mathieu.guaypaquet@polymtl.ca>
This moves the `annexObjectPath()` helper out of the tests and into a
dedicated sub-package as `annex.ContentLocation()`, and expands it with
`.Pointer()` (which validates using `git annex examinekey`),
`.IsAnnexed()` and `.Content()` to make it a more useful module.

The tests retain their own wrapper version of `ContentLocation()`
because I tried to follow close to the API modules/lfs uses, which in
terms of abstract `git.Blob` and `git.TreeEntry` objects, not in terms
of `repoPath string`s which are more convenient for the tests.
Previously, Gitea's LFS support allowed direct-downloads of LFS content,
via http://$HOSTNAME:$PORT/$USER/$REPO/media/branch/$BRANCH/$FILE
Expand that grace to git-annex too. Now /media should provide the
relevant *content* from the .git/annex/objects/ folder.

This adds tests too. And expands the tests to try symlink-based annexing,
since /media implicitly supports both that and pointer-file-based annexing.
This updates the repo index/file view endpoints so annex files match the way
LFS files are rendered, making annexed files accessible via the web instead of
being black boxes only accessible by git clone.

This mostly just duplicates the existing LFS logic. It doesn't try to combine itself
with the existing logic, to make merging with upstream easier. If upstream ever
decides to accept, I would like to try to merge the redundant logic.

The one bit that doesn't directly copy LFS is my choice to hide annex-symlinks.
LFS files are always _pointer files_ and therefore always render with the "file"
icon and no special label, but annex files come in two flavours: symlinks or
pointer files. I've conflated both kinds to try to give a consistent experience.

The tests in here ensure the correct download link (/media, from the last PR)
renders in both the toolbar and, if a binary file (like most annexed files will be),
in the main pane, but it also adds quite a bit of code to make sure text files
that happen to be annexed are dug out and rendered inline like LFS files are.
Upstream can handle the full test suite; to avoid tedious waiting,
we only test the code added in this fork.
This extends the archive creation logic to add annexed files to the
created archives. The basic flow is this:
1. Create an archive using `git archive`
2. Read in that archive and write out a new one, replacing all annexed
   files with their annexed content; leaving the git-only files as-is

The file permissions with which the annexed files are put into the
archive are decided based on what `git archive` does for other files as
well:
- For tar.gz archives, executable files get permissions 0775 and regular
  files get 0664.
- For zip archives, executable files get permissions 0755 and regular
  files are archived with "FAT permissions" rw, instead of unix
  permissions.

If for a given archive request an annexed file is not present on the
gitea instance then the content as tracked by git (i.e. a symlink or
pointer file) is silently put into the resulting archive instead.

Co-authored-by: Nick Guenther <nick.guenther@polymtl.ca>
Tests include:
- Compare the list of files in the resulting archive with the list of
  files as tracked in the archived git tree.
- Compare the content of each file with what it should be (git blob
  content or the annexed file, respectively).
- Check that the file mode matches the expected file mode for all
  archived files.
- Check that the resulting archive has the archived commitID set as a
  comment (as `git archive` does as well).

The tests are done for both the "web" endpoints at
`/<user>/<repo>/archive/<git-ref>.{tar.gz,zip}` and the "api-v1"
endpoints at `/api/v1/<user>/<repo>/archive/<git-ref>.{tar.gz,zip}`.
This commit can be dropped as soon as
go-gitea#27563 is accepted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants