Skip to content

Commit c5edcd8

Browse files
authored
Merge branch 'main' into swift-package-manager-publishing-using-commandline-throws-error
2 parents f8b66c5 + dd0caf7 commit c5edcd8

File tree

98 files changed

+896
-575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+896
-575
lines changed

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
uses: docker/build-push-action@v5
100100
with:
101101
context: .
102-
platforms: linux/amd64,linux/arm64
102+
platforms: linux/amd64,linux/arm64,linux/riscv64
103103
push: true
104104
tags: |-
105105
gitea/gitea:${{ steps.clean_name.outputs.branch }}

.github/workflows/release-tag-rc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
uses: docker/build-push-action@v5
105105
with:
106106
context: .
107-
platforms: linux/amd64,linux/arm64
107+
platforms: linux/amd64,linux/arm64,linux/riscv64
108108
push: true
109109
tags: ${{ steps.meta.outputs.tags }}
110110
labels: ${{ steps.meta.outputs.labels }}
@@ -147,7 +147,7 @@ jobs:
147147
uses: docker/build-push-action@v5
148148
with:
149149
context: .
150-
platforms: linux/amd64,linux/arm64
150+
platforms: linux/amd64,linux/arm64,linux/riscv64
151151
push: true
152152
file: Dockerfile.rootless
153153
tags: ${{ steps.meta.outputs.tags }}

.github/workflows/release-tag-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
uses: docker/build-push-action@v5
113113
with:
114114
context: .
115-
platforms: linux/amd64,linux/arm64
115+
platforms: linux/amd64,linux/arm64,linux/riscv64
116116
push: true
117117
tags: ${{ steps.meta.outputs.tags }}
118118
labels: ${{ steps.meta.outputs.labels }}
@@ -158,7 +158,7 @@ jobs:
158158
uses: docker/build-push-action@v5
159159
with:
160160
context: .
161-
platforms: linux/amd64,linux/arm64
161+
platforms: linux/amd64,linux/arm64,linux/riscv64
162162
push: true
163163
file: Dockerfile.rootless
164164
tags: ${{ steps.meta.outputs.tags }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ endif
110110

111111
LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
112112

113-
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
113+
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/riscv64
114114

115115
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
116116
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)

assets/go-licenses.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

custom/conf/app.example.ini

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,29 @@ LEVEL = Info
940940
;;
941941
;; Disable the code explore page.
942942
;DISABLE_CODE_PAGE = false
943+
944+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
945+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
946+
;[qos]
947+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
948+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
943949
;;
950+
;; Enable request quality of service and overload protection.
951+
; ENABLED = false
952+
;;
953+
;; The maximum number of concurrent requests that the server will
954+
;; process before enqueueing new requests. Default is "CpuNum * 4".
955+
; MAX_INFLIGHT =
956+
;;
957+
;; The maximum number of requests that can be enqueued before new
958+
;; requests will be dropped.
959+
; MAX_WAITING = 100
960+
;;
961+
;; Target maximum wait time a request may be enqueued for. Requests
962+
;; that are enqueued for less than this amount of time will not be
963+
;; dropped. When wait times exceed this amount, a portion of requests
964+
;; will be dropped until wait times have decreased below this amount.
965+
; TARGET_WAIT_TIME = 250ms
944966

945967
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
946968
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1423,7 +1445,6 @@ LEVEL = Info
14231445
;; or use comma separated list: inline-dollar, inline-parentheses, block-dollar, block-square-brackets
14241446
;; Defaults to "inline-dollar,block-dollar" to follow GitHub's behavior.
14251447
;MATH_CODE_BLOCK_DETECTION =
1426-
;;
14271448

14281449
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14291450
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docker/manifest.rootless.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ manifests:
2222
architecture: arm64
2323
os: linux
2424
variant: v8
25+
-
26+
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}nightly{{/if}}-linux-riscv64-rootless
27+
platform:
28+
architecture: riscv64
29+
os: linux

docker/manifest.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ manifests:
2222
architecture: arm64
2323
os: linux
2424
variant: v8
25+
-
26+
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}nightly{{/if}}-linux-riscv64
27+
platform:
28+
architecture: riscv64
29+
os: linux

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ require (
3232
github.com/aws/aws-sdk-go-v2/service/codecommit v1.28.1
3333
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
3434
github.com/blevesearch/bleve/v2 v2.4.2
35+
github.com/bohde/codel v0.2.0
3536
github.com/buildkite/terminal-to-html/v3 v3.16.8
3637
github.com/caddyserver/certmagic v0.22.0
3738
github.com/charmbracelet/git-lfs-transfer v0.2.0
@@ -119,7 +120,7 @@ require (
119120
gitlab.com/gitlab-org/api/client-go v0.126.0
120121
golang.org/x/crypto v0.36.0
121122
golang.org/x/image v0.25.0
122-
golang.org/x/net v0.37.0
123+
golang.org/x/net v0.38.0
123124
golang.org/x/oauth2 v0.28.0
124125
golang.org/x/sync v0.12.0
125126
golang.org/x/sys v0.31.0

go.sum

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ github.com/blevesearch/zapx/v16 v16.1.5 h1:b0sMcarqNFxuXvjoXsF8WtwVahnxyhEvBSRJi
179179
github.com/blevesearch/zapx/v16 v16.1.5/go.mod h1:J4mSF39w1QELc11EWRSBFkPeZuO7r/NPKkHzDCoiaI8=
180180
github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
181181
github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
182+
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q=
183+
github.com/bohde/codel v0.2.0 h1:fzF7ibgKmCfQbOzQCblmQcwzDRmV7WO7VMLm/hDvD3E=
184+
github.com/bohde/codel v0.2.0/go.mod h1:Idb1IRvTdwkRjIjguLIo+FXhIBhcpGl94o7xra6ggWk=
182185
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
183186
github.com/boombuler/barcode v1.0.2 h1:79yrbttoZrLGkL/oOI8hBrUKucwOL0oOjUgEguGMcJ4=
184187
github.com/boombuler/barcode v1.0.2/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
@@ -872,15 +875,16 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
872875
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
873876
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
874877
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
875-
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
876-
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
878+
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
879+
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
877880
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
878881
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
879882
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
880883
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
881884
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
882885
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
883886
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
887+
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
884888
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
885889
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
886890
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
@@ -1025,6 +1029,8 @@ modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
10251029
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
10261030
mvdan.cc/xurls/v2 v2.6.0 h1:3NTZpeTxYVWNSokW3MKeyVkz/j7uYXYiMtXRUfmjbgI=
10271031
mvdan.cc/xurls/v2 v2.6.0/go.mod h1:bCvEZ1XvdA6wDnxY7jPPjEmigDtvtvPXAD/Exa9IMSk=
1032+
pgregory.net/rapid v0.4.2 h1:lsi9jhvZTYvzVpeG93WWgimPRmiJQfGFRNTEZh1dtY0=
1033+
pgregory.net/rapid v0.4.2/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
10281034
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 h1:mUcz5b3FJbP5Cvdq7Khzn6J9OCUQJaBwgBkCR+MOwSs=
10291035
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:FJGmPh3vz9jSos1L/F91iAgnC/aejc0wIIrF2ZwJxdY=
10301036
xorm.io/builder v0.3.13 h1:a3jmiVVL19psGeXx8GIurTp7p0IIgqeDmwhcR6BAOAo=

modules/setting/packages.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ import (
1313
// Package registry settings
1414
var (
1515
Packages = struct {
16-
Storage *Storage
17-
Enabled bool
18-
ChunkedUploadPath string
16+
Storage *Storage
17+
Enabled bool
1918

2019
LimitTotalOwnerCount int64
2120
LimitTotalOwnerSize int64
@@ -65,13 +64,6 @@ func loadPackagesFrom(rootCfg ConfigProvider) (err error) {
6564
return err
6665
}
6766

68-
if HasInstallLock(rootCfg) {
69-
Packages.ChunkedUploadPath, err = AppDataTempDir("package-upload").MkdirAllSub("")
70-
if err != nil {
71-
return fmt.Errorf("unable to create chunked upload directory: %w", err)
72-
}
73-
}
74-
7567
Packages.LimitTotalOwnerSize = mustBytes(sec, "LIMIT_TOTAL_OWNER_SIZE")
7668
Packages.LimitSizeAlpine = mustBytes(sec, "LIMIT_SIZE_ALPINE")
7769
Packages.LimitSizeArch = mustBytes(sec, "LIMIT_SIZE_ARCH")

modules/setting/service.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package setting
55

66
import (
77
"regexp"
8+
"runtime"
89
"strings"
910
"time"
1011

@@ -98,6 +99,13 @@ var Service = struct {
9899
DisableOrganizationsPage bool `ini:"DISABLE_ORGANIZATIONS_PAGE"`
99100
DisableCodePage bool `ini:"DISABLE_CODE_PAGE"`
100101
} `ini:"service.explore"`
102+
103+
QoS struct {
104+
Enabled bool
105+
MaxInFlightRequests int
106+
MaxWaitingRequests int
107+
TargetWaitTime time.Duration
108+
}
101109
}{
102110
AllowedUserVisibilityModesSlice: []bool{true, true, true},
103111
}
@@ -255,6 +263,7 @@ func loadServiceFrom(rootCfg ConfigProvider) {
255263
mustMapSetting(rootCfg, "service.explore", &Service.Explore)
256264

257265
loadOpenIDSetting(rootCfg)
266+
loadQosSetting(rootCfg)
258267
}
259268

260269
func loadOpenIDSetting(rootCfg ConfigProvider) {
@@ -276,3 +285,11 @@ func loadOpenIDSetting(rootCfg ConfigProvider) {
276285
}
277286
}
278287
}
288+
289+
func loadQosSetting(rootCfg ConfigProvider) {
290+
sec := rootCfg.Section("qos")
291+
Service.QoS.Enabled = sec.Key("ENABLED").MustBool(false)
292+
Service.QoS.MaxInFlightRequests = sec.Key("MAX_INFLIGHT").MustInt(4 * runtime.NumCPU())
293+
Service.QoS.MaxWaitingRequests = sec.Key("MAX_WAITING").MustInt(100)
294+
Service.QoS.TargetWaitTime = sec.Key("TARGET_WAIT_TIME").MustDuration(250 * time.Millisecond)
295+
}

options/gitignore/Processing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
applet
33
application.linux-arm64
44
application.linux-armv6hf
5+
application.linux-riscv64
56
application.linux32
67
application.linux64
78
application.windows32

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ files = Files
117117

118118
error = Error
119119
error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it.
120+
error503 = The server was unable to complete your request. Please try again later.
120121
go_back = Go Back
121122
invalid_data = Invalid data: %v
122123

options/locale/locale_fr-FR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ files=Fichiers
117117

118118
error=Erreur
119119
error404=La page que vous essayez d'atteindre <strong>n'existe pas</strong> ou <strong>vous n'êtes pas autorisé</strong> à la voir.
120+
error503=Le serveur n’a pas pu répondre à votre requête. Veuillez réessayer plus tard.
120121
go_back=Retour
121122
invalid_data=Données invalides : %v
122123

options/locale/locale_pt-PT.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ files=Ficheiros
117117

118118
error=Erro
119119
error404=A página que pretende aceder <strong>não existe</strong> ou <strong>não tem autorização</strong> para a ver.
120+
error503=O servidor não conseguiu concluir o seu pedido. Tente novamente mais tarde.
120121
go_back=Voltar
121122
invalid_data=Dados inválidos: %v
122123

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

routers/api/v1/repo/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func Migrate(ctx *context.APIContext) {
181181
IsPrivate: opts.Private || setting.Repository.ForcePrivate,
182182
IsMirror: opts.Mirror,
183183
Status: repo_model.RepositoryBeingMigrated,
184-
})
184+
}, false)
185185
if err != nil {
186186
handleMigrateError(ctx, repoOwner, err)
187187
return

0 commit comments

Comments
 (0)