Skip to content

Commit 0c78b5c

Browse files
phantom-rabbitdependabot[bot]HaiHui886Haihui.Wangpulltheflower
authored
* build(deps): bump github.com/argoproj/argo-workflows/v3 Bumps [github.com/argoproj/argo-workflows/v3](https://github.com/argoproj/argo-workflows) from 3.5.13 to 3.6.12. - [Release notes](https://github.com/argoproj/argo-workflows/releases) - [Changelog](https://github.com/argoproj/argo-workflows/blob/main/CHANGELOG.md) - [Commits](argoproj/argo-workflows@v3.5.13...v3.6.12) --- updated-dependencies: - dependency-name: github.com/argoproj/argo-workflows/v3 dependency-version: 3.6.12 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update header keys to be case-sensitive (#482) Co-authored-by: Haihui.Wang <hh.wang@opencsg.com> * Read clusterIP if no ingress IP found when server and runner are running in same cluster (#484) Co-authored-by: Haihui.Wang <hh.wang@opencsg.com> * > [rproxy] Wrong way to set svc host name in header for v1.12 release (#485) Co-authored-by: Haihui.Wang <hh.wang@opencsg.com> * Fix lfs sync upload id cache bug (#489) * Add User-Email to request headers for dataflow and label studio (#492) Co-authored-by: Haihui.Wang <hh.wang@opencsg.com> * fix(imagebuilder): correct remote endpoint retrieval logic in stop function * Refactor Deploy Scheduler, Migrate to Temporal Workflow --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HaiHui <154984842+HaiHui886@users.noreply.github.com> Co-authored-by: Haihui.Wang <hh.wang@opencsg.com> Co-authored-by: vincent <pulltheflower@163.com> Co-authored-by: ruibo.qin <rb.qin@opencsg.com>
1 parent 098d7b0 commit 0c78b5c

File tree

29 files changed

+2540
-47
lines changed

29 files changed

+2540
-47
lines changed

_mocks/opencsg.com/csghub-server/builder/store/database/mock_ArgoWorkFlowStore.go

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

_mocks/opencsg.com/csghub-server/builder/store/database/mock_DeployTaskStore.go

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

api/handler/dataflow.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func (h *DataflowProxyHandler) Proxy(ctx *gin.Context) {
6060
ctx.Request.Header.Set("User-Id", fmt.Sprintf("%d", u.ID))
6161
ctx.Request.Header.Set("User-Name", u.Username)
6262
ctx.Request.Header.Set("User-Token", token)
63+
ctx.Request.Header.Set("User-Email", u.Email)
6364
ctx.Request.Header.Set("isadmin", fmt.Sprintf("%t", u.CanAdmin()))
6465
// Log the request URL and header
6566
slog.Debug("http request", slog.Any("request", ctx.Request.URL), slog.Any("header", ctx.Request.Header))

api/router/api.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,24 @@ import (
1919
"opencsg.com/csghub-server/api/handler/callback"
2020
"opencsg.com/csghub-server/api/httpbase"
2121
"opencsg.com/csghub-server/api/middleware"
22+
"opencsg.com/csghub-server/api/workflow"
23+
"opencsg.com/csghub-server/builder/deploy"
2224
"opencsg.com/csghub-server/builder/instrumentation"
2325
bldmq "opencsg.com/csghub-server/builder/mq"
2426
bldprometheus "opencsg.com/csghub-server/builder/prometheus"
27+
"opencsg.com/csghub-server/builder/store/database"
2528
"opencsg.com/csghub-server/builder/temporal"
2629
"opencsg.com/csghub-server/common/config"
2730
"opencsg.com/csghub-server/common/i18n"
2831
"opencsg.com/csghub-server/common/types"
2932
)
3033

3134
func RunServer(config *config.Config, enableSwagger bool) {
35+
deploy.DeployWorkflow = func(buildTask, runTask *database.DeployTask) {
36+
if err := workflow.StartNewDeployTaskWithCancelOld(buildTask, runTask); err != nil {
37+
slog.Error("start new deploy task failed", slog.Any("error", err))
38+
}
39+
}
3240
stopOtel, err := instrumentation.SetupOTelSDK(context.Background(), config, instrumentation.Server)
3341
if err != nil {
3442
panic(err)

0 commit comments

Comments
 (0)