forgejo/tests/sqlite.ini.tmpl

115 lines
3.5 KiB
Go HTML Template
Raw Permalink Normal View History

APP_NAME = Gitea: Git with a cup of tea
RUN_MODE = prod
[database]
DB_TYPE = sqlite3
PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea.db
[indexer]
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/indexers/repos.bleve
[queue.issue_indexer]
Rewrite queue (#24505) # ⚠️ Breaking Many deprecated queue config options are removed (actually, they should have been removed in 1.18/1.19). If you see the fatal message when starting Gitea: "Please update your app.ini to remove deprecated config options", please follow the error messages to remove these options from your app.ini. Example: ``` 2023/05/06 19:39:22 [E] Removed queue option: `[indexer].ISSUE_INDEXER_QUEUE_TYPE`. Use new options in `[queue.issue_indexer]` 2023/05/06 19:39:22 [E] Removed queue option: `[indexer].UPDATE_BUFFER_LEN`. Use new options in `[queue.issue_indexer]` 2023/05/06 19:39:22 [F] Please update your app.ini to remove deprecated config options ``` Many options in `[queue]` are are dropped, including: `WRAP_IF_NECESSARY`, `MAX_ATTEMPTS`, `TIMEOUT`, `WORKERS`, `BLOCK_TIMEOUT`, `BOOST_TIMEOUT`, `BOOST_WORKERS`, they can be removed from app.ini. # The problem The old queue package has some legacy problems: * complexity: I doubt few people could tell how it works. * maintainability: Too many channels and mutex/cond are mixed together, too many different structs/interfaces depends each other. * stability: due to the complexity & maintainability, sometimes there are strange bugs and difficult to debug, and some code doesn't have test (indeed some code is difficult to test because a lot of things are mixed together). * general applicability: although it is called "queue", its behavior is not a well-known queue. * scalability: it doesn't seem easy to make it work with a cluster without breaking its behaviors. It came from some very old code to "avoid breaking", however, its technical debt is too heavy now. It's a good time to introduce a better "queue" package. # The new queue package It keeps using old config and concept as much as possible. * It only contains two major kinds of concepts: * The "base queue": channel, levelqueue, redis * They have the same abstraction, the same interface, and they are tested by the same testing code. * The "WokerPoolQueue", it uses the "base queue" to provide "worker pool" function, calls the "handler" to process the data in the base queue. * The new code doesn't do "PushBack" * Think about a queue with many workers, the "PushBack" can't guarantee the order for re-queued unhandled items, so in new code it just does "normal push" * The new code doesn't do "pause/resume" * The "pause/resume" was designed to handle some handler's failure: eg: document indexer (elasticsearch) is down * If a queue is paused for long time, either the producers blocks or the new items are dropped. * The new code doesn't do such "pause/resume" trick, it's not a common queue's behavior and it doesn't help much. * If there are unhandled items, the "push" function just blocks for a few seconds and then re-queue them and retry. * The new code doesn't do "worker booster" * Gitea's queue's handlers are light functions, the cost is only the go-routine, so it doesn't make sense to "boost" them. * The new code only use "max worker number" to limit the concurrent workers. * The new "Push" never blocks forever * Instead of creating more and more blocking goroutines, return an error is more friendly to the server and to the end user. There are more details in code comments: eg: the "Flush" problem, the strange "code.index" hanging problem, the "immediate" queue problem. Almost ready for review. TODO: * [x] add some necessary comments during review * [x] add some more tests if necessary * [x] update documents and config options * [x] test max worker / active worker * [x] re-run the CI tasks to see whether any test is flaky * [x] improve the `handleOldLengthConfiguration` to provide more friendly messages * [x] fine tune default config values (eg: length?) ## Code coverage: ![image](https://user-images.githubusercontent.com/2114189/236620635-55576955-f95d-4810-b12f-879026a3afdf.png)
2023-05-08 11:49:59 +00:00
TYPE = level
DATADIR = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/indexers/issues.queue
[queue]
TYPE = immediate
[repository]
ROOT = {{REPO_TEST_DIR}}tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea-repositories
[repository.local]
LOCAL_COPY_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/tmp/local-repo
[repository.upload]
TEMP_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/tmp/uploads
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
2019-10-16 13:42:42 +00:00
[repository.signing]
SIGNING_KEY = none
[server]
SSH_DOMAIN = localhost
HTTP_PORT = 3003
ROOT_URL = http://localhost:3003/
DISABLE_SSH = false
SSH_LISTEN_HOST = localhost
SSH_PORT = 2203
START_SSH_SERVER = true
LFS_START_SERVER = true
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data
ENABLE_GZIP = true
BUILTIN_SSH_SERVER_USER = git
SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXWo7GMxTchtzmJHYzfN6sZ9FAPFR4ijMLfGki+olvOMO5Fql1/yGnGfbELQa1S6y4shSvj/5K+zUFScmEXYf3Gcr87RqilLkyk16RS+cHNB1u87xTHbETaa3nyCJeGQRpd4IQ4NKob745mwDZ7jQBH8AZEng50Oh8y8fi8skBBBzaYp1ilgvzG740L7uex6fHV62myq0SXeCa+oJUjq326FU8y+Vsa32H8A3e7tOgXZPdt2TVNltx2S9H2WO8RMi7LfaSwARNfy1zu+bfR50r6ef8Yx5YKCMz4wWb1SHU1GS800mjOjlInLQORYRNMlSwR1+vLlVDciOqFapDSbj+YOVOawR0R1aqlSKpZkt33DuOBPx9qe6CVnIi7Z+Px/KqM+OLCzlLY/RS+LbxQpDWcfTVRiP+S5qRTcE3M3UioN/e0BE/1+MpX90IGpvVkA63ILYbKEa4bM3ASL7ChTCr6xN5XT+GpVJveFKK1cfNx9ExHI4rzYE=
[attachment]
PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/attachments
[mailer]
ENABLED = true
PROTOCOL = dummy
FROM = sqlite-{{TEST_TYPE}}-test@gitea.io
[service]
REGISTER_EMAIL_CONFIRM = false
REGISTER_MANUAL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
NO_REPLY_ADDRESS = noreply.example.org
[picture]
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false
AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/repo-avatars
[session]
PROVIDER = file
PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/sessions
[log]
MODE = {{TEST_LOGGER}}
ROOT_PATH = {{REPO_TEST_DIR}}sqlite-log
ENABLE_SSH_LOG = true
logger.xorm.MODE = file
[log.test]
LEVEL = Info
COLORIZE = true
[log.file]
[TESTS] increase test-sqlite log level to Trace It does not pollute the output because they go to sqlite-log/gitea.log and it may provide clues for debugging. When trying to figure out a problem in production, Debug is likely to be used but in a development environment a very fine grain log is the most useful. If that's really too much noise, the lines can be trimmed by removing all those with [T]. (cherry picked from commit 666b02eb9d6e50b3a8d3ec5659fa6fb8451d0d9f) (cherry picked from commit b69e4d30581258d82d9b2a4daf932f75d7d7171e) (cherry picked from commit 0c1aecd7ec0d3bf9801c02ae24c89dd5ce074255) (cherry picked from commit 0304e41345e8ab19537d3686b5487c8cb4b280c2) (cherry picked from commit 4bcc7e02ce496bea54de39d1059cf39617d2a8d9) (cherry picked from commit 98364235f2792ce058984c03dde2f609adfbfc88) (cherry picked from commit ca465e97c1b5d1db684cf9fa1ecbaa14f4bb077c) (cherry picked from commit 653045ade1e2423ce363ffd2682c1f5cadf8059f) (cherry picked from commit 9ca2e644ab28c867a92925a6eb83ecbb6805434f) (cherry picked from commit 47c8a05b37d17201b24bab2d211d672e1fd6c2e0) (cherry picked from commit 4235d929ed1cb03e96c4f117a33b3120372235e0) (cherry picked from commit 10541c4b1c61ce6dc8c56481c0999e6ed52dbc80) (cherry picked from commit c1a0e1eb2f7673de83a57295531675c1ffbcdc8e) (cherry picked from commit 1c20bf30b2e9d1be68c6b2175fe33965a6bf761c) (cherry picked from commit d4b372db3108a350492d8dd8842cd6c98e7d3cdc) (cherry picked from commit fe3e43429979d8a9518861a5d795204038ee1f41) (cherry picked from commit d2b544847f0c4418f92c1bb657c88900ccbf3f82) (cherry picked from commit 059f067a98b9faedfa7c5ed7e764faa350236ed5) (cherry picked from commit 72ad3d7d7e1fdc7132418e0051f76df617dffad7) (cherry picked from commit 6037e9a273162ae9d478bf844cc0b6145c334a77) (cherry picked from commit d63aee6921aa061d61169e00f4cdf7a693066724) (cherry picked from commit 7a0d05f802cf48fbb1cedbe2dd7095b4c35a8df2) (cherry picked from commit 9b9965b269a84b25b20aa1dc2b1e076e55136edd) (cherry picked from commit 5ca35d9753c382c700bf20327c721fb3854f694f) (cherry picked from commit 9b003f0a0ebd62752daacb72512bb6c92bc6e404) (cherry picked from commit d3769a6cdc1a37457683f3f761bb52f78b699ead) (cherry picked from commit b84f38e71c7a6994debef8962d3a8d69b0fb0957) (cherry picked from commit 85e687e551d4e7947627fb3a6bc22c0bcdae23e4)
2023-07-21 05:35:52 +00:00
LEVEL = Trace
[security]
[CI] set PASSWORD_HASH_ALGO = argon2 for integration tests (cherry picked from commit 1d7ce2a39c841e77492ef08c0e86c3544ecca88d) (cherry picked from commit 3af8757583ab9bf8fc5eb05ed1e6901a34682512) (cherry picked from commit 0b818152096d58e402e3c8bbc2415695af0cdfb9) (cherry picked from commit 7180a3222a00c33ec7dc9bcaa7e5a1e3ae924735) (cherry picked from commit 069044f4a6dd7457662e5ca296c714275d16becf) (cherry picked from commit dd1438f38995e397399d8957fca696f82b73707e) (cherry picked from commit 4ae6b5d64d59902ce003199b5d652d6c4799ffcf) (cherry picked from commit c572666d78d0f2cf2a33d5a50ea363430ac9a0a9) (cherry picked from commit de0a4480bc3e40d61aa5342d93a2ef510abe3826) (cherry picked from commit 60272ef4f73608407ffedd27892376b6c36a7069) (cherry picked from commit a68fdde4becef625ce4e654ba6ea8ebee55251e5) (cherry picked from commit ff448cf3a698dd45c713b734fce3e374c99940bf) (cherry picked from commit 208498caaab339d4543abfb2b77de3c5793a73c8) (cherry picked from commit 1abd3efad842f276f1c768ab40213200b62a0d3b) (cherry picked from commit 818c7f4ca9d59afd75d6cb9597c67cb0564cf775) (cherry picked from commit 1e552bbe44f79d9a2f5567a0180505b9a41d39d3) (cherry picked from commit 88dbd6da1d7b4a7faf9dda2d25d68f3202c250a5) (cherry picked from commit b1c86fb7775dd34511f4d5069db1bd3e5ef68e7a) (cherry picked from commit 185b1e25b12b56c9ae904adb787854da9b74ddc2) (cherry picked from commit 0af35605ae8a2594ae0b594278748242bce9d8e0) (cherry picked from commit 350975b63f12df508e7d8d01845032d32f30035c) (cherry picked from commit 2788142515ff6bb316a120be60556f39659ee9ea) (cherry picked from commit b418a53717b247e10d2dda26d1d236400d423a94) (cherry picked from commit 086cde3f10d786cd3c05bf59e359f08a23183d91) (cherry picked from commit 3e4818c779bd894b4b86a3672d24623fa45e1824) (cherry picked from commit f2bf1fe64f9ebf8460a93805289fdba2d5cad6d3) (cherry picked from commit db4eb288ee464c9a799ff2e059c0a5aa632e633b) (cherry picked from commit f8db31821b8089d5c9390f902854b7817a0381ef) (cherry picked from commit 2b13c06f499110ba76d3121d1c2f09df3023564f) (cherry picked from commit 3fd0092056a4e0f43ff59b2123539ddb1ea0afcc) (cherry picked from commit 6f7662507f26c34a3de54b3e69ea65ab10921163) (cherry picked from commit 8a15e41887ee3a72fdb5b7718d2750d48615205b) Conflicts: tests/mysql8.ini.tmpl https://codeberg.org/forgejo/forgejo/pulls/1573 (cherry picked from commit 56e67e34e2b4d07bc516aa38bf691b5a195821fe) (cherry picked from commit 6a049a939babf4422ac18f2561a77afea9218861) (cherry picked from commit 454fe7f5e1113d310375bfbc8ebd44b53ce75e2d) (cherry picked from commit 93fa4406b74a1019be44f4b40b80d43a777c0e73) (cherry picked from commit eab1c7222755e06e4308ed3b2c5d7b23c96f54bb) (cherry picked from commit 8228adfd26616743138de4ab279d2714e8dcc8cf) (cherry picked from commit ffdbe1bac8d7beddef775bb46a8c33342ee93528) (cherry picked from commit 7df440771403bae81fa9c0def90bdbe95a4dd53b) (cherry picked from commit 9d8c4bc7cad4d56528a19d7892b0f08e21dd252a) (cherry picked from commit 6696e09b1f644bc176d2ca0129d85d8de23d3e4c) (cherry picked from commit 1bdc0e345807800e2deffc8f9677d708a06a4828) (cherry picked from commit e2d1598475f5278c7aa14379086d775bbcec7b9a) (cherry picked from commit 6e0928ae00ba06b14b4d8d3326102ef4f2a91b89) (cherry picked from commit eede74e7096f200677909d59b32a18808d143605) (cherry picked from commit b4fb5f64c68089a9fb28f63e705f68fce29c568e) (cherry picked from commit cf05ec745a0f00dbd7235e91c669f285aa3d3e8e)
2023-02-20 22:17:52 +00:00
PASSWORD_HASH_ALGO = argon2
DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTI3OTU5ODN9.OQkH5UmzID2XBdwQ9TAI6Jj2t1X-wElVTjbE7aoN4I8
DISABLE_QUERY_AUTH_TOKEN = true
[oauth2]
JWT_SECRET = KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko
[lfs]
PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/lfs
[packages]
ENABLED = true
[markup.html]
ENABLED = true
FILE_EXTENSIONS = .html
RENDER_COMMAND = `go run build/test-echo.go`
IS_INPUT_FILE = false
RENDER_CONTENT_MODE=sanitized
[actions]
ENABLED = true