Skip to content

Commit

Permalink
[Monorepo] - Fix single binary (#4015)
Browse files Browse the repository at this point in the history
* Fix single-binary

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix flyteplugins references in single-binary

Signed-off-by: Eduardo Apolinario <[email protected]>

* Point to local flyteidl in single-binary

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix flytecopilot references

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario authored Sep 13, 2023
1 parent 2d0bbc4 commit 6338b90
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 50 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ ENV GOARCH "${TARGETARCH}"
ENV GOOS linux

WORKDIR /flyteorg/build

COPY datacatalog datacatalog
COPY flyteadmin flyteadmin
COPY flytecopilot flytecopilot
COPY flyteidl flyteidl
COPY flyteplugins flyteplugins
COPY flytepropeller flytepropeller
COPY flytestdlib flytestdlib

COPY go.mod go.sum ./
RUN go mod download
COPY cmd cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"github.com/flyteorg/flyte/cmd/single"
_ "github.com/flyteorg/flytepropeller/plugins"
_ "github.com/flyteorg/flyte/flytepropeller/plugins"
"github.com/golang/glog"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/single/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package single

import "github.com/flyteorg/flytestdlib/config"
import "github.com/flyteorg/flyte/flytestdlib/config"

//go:generate pflags Config --default-var=DefaultConfig

Expand All @@ -21,9 +21,9 @@ type Propeller struct {
}

type Admin struct {
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
DisableClusterResourceManager bool `json:"disableClusterResourceManager" pflag:",Disables Cluster resource manager"`
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
DisableClusterResourceManager bool `json:"disableClusterResourceManager" pflag:",Disables Cluster resource manager"`
SeedProjects []string `json:"seedProjects" pflag:",flyte projects to create by default."`
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/single/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"os"

"github.com/flyteorg/flytestdlib/logger"
"github.com/flyteorg/flyte/flytestdlib/logger"

"github.com/flyteorg/flytestdlib/config"
"github.com/flyteorg/flytestdlib/config/viper"
"github.com/flyteorg/flyte/flytestdlib/config"
"github.com/flyteorg/flyte/flytestdlib/config/viper"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/single/secret.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package single

import (
"github.com/flyteorg/flyteadmin/auth"
"github.com/flyteorg/flyte/flyteadmin/auth"
"github.com/spf13/cobra"
)

Expand Down
44 changes: 22 additions & 22 deletions cmd/single/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ import (
"context"
"net/http"

datacatalogConfig "github.com/flyteorg/datacatalog/pkg/config"
datacatalogRepo "github.com/flyteorg/datacatalog/pkg/repositories"
datacatalog "github.com/flyteorg/datacatalog/pkg/rpc/datacatalogservice"
"github.com/flyteorg/flyteadmin/pkg/clusterresource"
"github.com/flyteorg/flyteadmin/pkg/common"
"github.com/flyteorg/flyteadmin/plugins"
"github.com/flyteorg/flyteadmin/pkg/runtime"
adminServer "github.com/flyteorg/flyteadmin/pkg/server"
adminScheduler "github.com/flyteorg/flyteadmin/scheduler"
propellerEntrypoint "github.com/flyteorg/flytepropeller/pkg/controller"
propellerConfig "github.com/flyteorg/flytepropeller/pkg/controller/config"
"github.com/flyteorg/flytepropeller/pkg/controller/executors"
"github.com/flyteorg/flytepropeller/pkg/signals"
webhookEntrypoint "github.com/flyteorg/flytepropeller/pkg/webhook"
webhookConfig "github.com/flyteorg/flytepropeller/pkg/webhook/config"
"github.com/flyteorg/flytestdlib/contextutils"
"github.com/flyteorg/flytestdlib/logger"
"github.com/flyteorg/flytestdlib/profutils"
"github.com/flyteorg/flytestdlib/promutils"
"github.com/flyteorg/flytestdlib/promutils/labeled"
"github.com/flyteorg/flytestdlib/storage"
datacatalogConfig "github.com/flyteorg/flyte/datacatalog/pkg/config"
datacatalogRepo "github.com/flyteorg/flyte/datacatalog/pkg/repositories"
datacatalog "github.com/flyteorg/flyte/datacatalog/pkg/rpc/datacatalogservice"
"github.com/flyteorg/flyte/flyteadmin/pkg/clusterresource"
"github.com/flyteorg/flyte/flyteadmin/pkg/common"
"github.com/flyteorg/flyte/flyteadmin/pkg/runtime"
adminServer "github.com/flyteorg/flyte/flyteadmin/pkg/server"
"github.com/flyteorg/flyte/flyteadmin/plugins"
adminScheduler "github.com/flyteorg/flyte/flyteadmin/scheduler"
propellerEntrypoint "github.com/flyteorg/flyte/flytepropeller/pkg/controller"
propellerConfig "github.com/flyteorg/flyte/flytepropeller/pkg/controller/config"
"github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors"
"github.com/flyteorg/flyte/flytepropeller/pkg/signals"
webhookEntrypoint "github.com/flyteorg/flyte/flytepropeller/pkg/webhook"
webhookConfig "github.com/flyteorg/flyte/flytepropeller/pkg/webhook/config"
"github.com/flyteorg/flyte/flytestdlib/contextutils"
"github.com/flyteorg/flyte/flytestdlib/logger"
"github.com/flyteorg/flyte/flytestdlib/profutils"
"github.com/flyteorg/flyte/flytestdlib/promutils"
"github.com/flyteorg/flyte/flytestdlib/promutils/labeled"
"github.com/flyteorg/flyte/flytestdlib/storage"
_ "github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -70,7 +70,7 @@ func startAdmin(ctx context.Context, cfg Admin) error {
if len(cfg.SeedProjects) != 0 {
projects = cfg.SeedProjects
}
logger.Infof(ctx, "Seeding default projects...",projects)
logger.Infof(ctx, "Seeding default projects...", projects)
if err := adminServer.SeedProjects(ctx, projects); err != nil {
return err
}
Expand Down
23 changes: 16 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/flyteorg/flyte
go 1.19

require (
github.com/flyteorg/datacatalog v1.0.53
github.com/flyteorg/flyteadmin v1.1.118
github.com/flyteorg/flytepropeller v1.1.116
github.com/flyteorg/flytestdlib v1.0.22
github.com/flyteorg/flyte/datacatalog v0.0.0-00010101000000-000000000000
github.com/flyteorg/flyte/flyteadmin v0.0.0-00010101000000-000000000000
github.com/flyteorg/flyte/flytepropeller v0.0.0-00010101000000-000000000000
github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000
github.com/golang/glog v1.1.0
github.com/prometheus/client_golang v1.12.1
github.com/spf13/cobra v1.4.0
Expand Down Expand Up @@ -71,8 +71,8 @@ require (
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/flyteorg/flyteidl v1.5.14 // indirect
github.com/flyteorg/flyteplugins v1.1.16 // indirect
github.com/flyteorg/flyte/flyteplugins v0.0.0-00010101000000-000000000000 // indirect
github.com/flyteorg/flyteidl v0.0.0-00010101000000-000000000000 // indirect
github.com/flyteorg/stow v0.3.7 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
Expand Down Expand Up @@ -216,4 +216,13 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/robfig/cron/v3 => github.com/unionai/cron/v3 v3.0.2-0.20220915080349-5790c370e63a
replace (
github.com/flyteorg/flyte/datacatalog => ./datacatalog
github.com/flyteorg/flyte/flyteadmin => ./flyteadmin
github.com/flyteorg/flyte/flytecopilot => ./flytecopilot
github.com/flyteorg/flyte/flyteplugins => ./flyteplugins
github.com/flyteorg/flyte/flytepropeller => ./flytepropeller
github.com/flyteorg/flyte/flytestdlib => ./flytestdlib
github.com/flyteorg/flyteidl => ./flyteidl
github.com/robfig/cron/v3 => github.com/unionai/cron/v3 v3.0.2-0.20220915080349-5790c370e63a
)
12 changes: 0 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,6 @@ github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flyteorg/datacatalog v1.0.53 h1:h06iGGTFFPGzMCowW+HHmYSYjOiSbv73quxoEFY7H1s=
github.com/flyteorg/datacatalog v1.0.53/go.mod h1:bTNS5x+IVNuwawEQMQCRsdnV2bt750nGq+dc6cmxF6w=
github.com/flyteorg/flyteadmin v1.1.118 h1:KBXC6DeDaTJze8aCu1CmFZmKMQOaXmLek43X09yg5sI=
github.com/flyteorg/flyteadmin v1.1.118/go.mod h1:FzjmBGA3Wc1X/l3sjHD6Kgy2LEe16KHm1Mx0JPqWdAg=
github.com/flyteorg/flyteidl v1.5.14 h1:+3ewipoOp82fPyIVgvvrMq1lorl5Kz3Lh6sh/a9+loI=
github.com/flyteorg/flyteidl v1.5.14/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og=
github.com/flyteorg/flyteplugins v1.1.16 h1:DIQxPERFMvTGnLTkkeG9R8STF3YMvxK1nPtFf+a6o5Q=
github.com/flyteorg/flyteplugins v1.1.16/go.mod h1:HEd4yf0H8XfxMcHFwrTdTIJ/9lEAz83OpgcFQe47L6I=
github.com/flyteorg/flytepropeller v1.1.116 h1:qe6wOfxceTN4eqmAAb1Pj8tTcFarTkBr0uphZPNF1aM=
github.com/flyteorg/flytepropeller v1.1.116/go.mod h1:qAzIN35Xihc2B9JoMukzIBID7ZDh8xgOf9aVe56mN8M=
github.com/flyteorg/flytestdlib v1.0.22 h1:8RAc+TmME54FInf4+t6+C7X8Z/dW6i6aTs6W8SEzpI8=
github.com/flyteorg/flytestdlib v1.0.22/go.mod h1:6nXa5g00qFIsgdvQ7jKQMJmDniqO0hG6Z5X5olfduqQ=
github.com/flyteorg/stow v0.3.7 h1:Cx7j8/Ux6+toD5hp5fy++927V+yAcAttDeQAlUD/864=
github.com/flyteorg/stow v0.3.7/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
Expand Down

0 comments on commit 6338b90

Please sign in to comment.