Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Remove lyft api dependency and migrate to lyft->flyteorg (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrina Rogan authored Mar 11, 2021
1 parent 0b778a9 commit c80c8d8
Show file tree
Hide file tree
Showing 317 changed files with 3,006 additions and 1,726 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
#
# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst

FROM golang:1.13.3-alpine3.10 as builder
FROM golang:1.16.0-alpine3.13 as builder
RUN apk add git openssh-client make curl

# COPY only the go mod files for efficient caching
COPY go.mod go.sum /go/src/github.com/lyft/flyteadmin/
WORKDIR /go/src/github.com/lyft/flyteadmin
COPY go.mod go.sum /go/src/github.com/flyteorg/flyteadmin/
WORKDIR /go/src/github.com/flyteorg/flyteadmin

# Pull dependencies
RUN go mod download

# COPY the rest of the source code
COPY . /go/src/github.com/lyft/flyteadmin/
COPY . /go/src/github.com/flyteorg/flyteadmin/

# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flyteadmin
Expand All @@ -24,8 +24,8 @@ RUN make linux_compile
ENV PATH="/artifacts:${PATH}"

# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.10
LABEL org.opencontainers.image.source https://github.com/lyft/flyteadmin
FROM alpine:3.13
LABEL org.opencontainers.image.source https://github.com/flyteorg/flyteadmin

COPY --from=builder /artifacts /bin

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ linux_compile:

.PHONY: server
server:
go run cmd/main.go --logtostderr --server.kube-config ~/.kube/config --config flyteadmin_config.yaml serve
go run cmd/main.go serve --server.kube-config ~/.kube/config --config flyteadmin_config.yaml

.PHONY: migrate
migrate:
go run cmd/main.go --logtostderr --server.kube-config ~/.kube/config --config flyteadmin_config.yaml migrate run
go run cmd/main.go migrate run --server.kube-config ~/.kube/config --config flyteadmin_config.yaml

.PHONY: seed_projects
seed_projects:
go run cmd/main.go --logtostderr --server.kube-config ~/.kube/config --config flyteadmin_config.yaml migrate seed-projects project admintests flytekit
go run cmd/main.go migrate seed-projects project admintests flytekit --server.kube-config ~/.kube/config --config flyteadmin_config.yaml

all: compile

Expand Down
8 changes: 5 additions & 3 deletions boilerplate/lyft/golang_support_tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module github.com/lyft/boilerplate
module github.com/flyteorg/boilerplate

go 1.13

require (
github.com/alvaroloes/enumer v1.1.2
github.com/golangci/golangci-lint v1.22.2
github.com/lyft/flytestdlib v0.2.31
github.com/flyteorg/flytestdlib v0.3.13
github.com/golangci/golangci-lint v1.38.0
github.com/pascaldekloe/name v1.0.1 // indirect
github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect
)

replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0
1,064 changes: 911 additions & 153 deletions boilerplate/lyft/golang_support_tools/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion boilerplate/lyft/golang_support_tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package tools

import (
_ "github.com/alvaroloes/enumer"
_ "github.com/flyteorg/flytestdlib/cli/pflags"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/lyft/flytestdlib/cli/pflags"
_ "github.com/vektra/mockery/cmd/mockery"
)
2 changes: 1 addition & 1 deletion boilerplate/lyft/golang_test_targets/download_tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set -e
# In the format of "<cli>:<package>" or ":<package>" if no cli
tools=(
"github.com/vektra/mockery/cmd/mockery"
"github.com/lyft/flytestdlib/cli/pflags"
"github.com/flyteorg/flytestdlib/cli/pflags"
"github.com/golangci/golangci-lint/cmd/golangci-lint"
"github.com/alvaroloes/enumer"
)
Expand Down
16 changes: 8 additions & 8 deletions cmd/entrypoints/clusterresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ package entrypoints
import (
"context"

"github.com/lyft/flyteadmin/pkg/clusterresource"
executioncluster "github.com/lyft/flyteadmin/pkg/executioncluster/impl"
"github.com/flyteorg/flyteadmin/pkg/clusterresource"
executioncluster "github.com/flyteorg/flyteadmin/pkg/executioncluster/impl"

"github.com/lyft/flyteadmin/pkg/runtime"
"github.com/flyteorg/flyteadmin/pkg/runtime"

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

"github.com/flyteorg/flyteadmin/pkg/config"
"github.com/flyteorg/flyteadmin/pkg/repositories"
repositoryConfig "github.com/flyteorg/flyteadmin/pkg/repositories/config"
"github.com/flyteorg/flytestdlib/promutils"
_ "github.com/jinzhu/gorm/dialects/postgres" // Required to import database driver.
"github.com/lyft/flyteadmin/pkg/config"
"github.com/lyft/flyteadmin/pkg/repositories"
repositoryConfig "github.com/lyft/flyteadmin/pkg/repositories/config"
"github.com/lyft/flytestdlib/promutils"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/entrypoints/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package entrypoints
import (
"context"

"github.com/lyft/flyteadmin/pkg/runtime"
"github.com/flyteorg/flyteadmin/pkg/runtime"

"github.com/lyft/flytestdlib/promutils"
"github.com/flyteorg/flytestdlib/promutils"

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

"github.com/flyteorg/flyteadmin/pkg/repositories/config"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres" // Required to import database driver.
"github.com/lyft/flyteadmin/pkg/repositories/config"
"github.com/spf13/cobra"
gormigrate "gopkg.in/gormigrate.v1"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/entrypoints/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"os"

"github.com/lyft/flytestdlib/config"
"github.com/lyft/flytestdlib/config/viper"
"github.com/flyteorg/flytestdlib/config"
"github.com/flyteorg/flytestdlib/config/viper"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down Expand Up @@ -71,7 +71,7 @@ func init() {

func initConfig(flags *pflag.FlagSet) error {
configAccessor = viper.NewAccessor(config.Options{
SearchPaths: []string{cfgFile, ".", "/etc/flyte/config", "$GOPATH/src/github.com/lyft/flyteadmin"},
SearchPaths: []string{cfgFile, ".", "/etc/flyte/config", "$GOPATH/src/github.com/flyteorg/flyteadmin"},
StrictMode: false,
})

Expand Down
22 changes: 11 additions & 11 deletions cmd/entrypoints/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ import (

"github.com/gorilla/handlers"

"github.com/flyteorg/flyteadmin/pkg/auth"
"github.com/flyteorg/flyteadmin/pkg/auth/interfaces"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpcauth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
"github.com/lyft/flyteadmin/pkg/auth"
"github.com/lyft/flyteadmin/pkg/auth/interfaces"

"net"
"net/http"
_ "net/http/pprof" // Required to serve application.
"strings"

"github.com/lyft/flyteadmin/pkg/server"
"github.com/flyteorg/flyteadmin/pkg/server"
"github.com/pkg/errors"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"

"github.com/flyteorg/flyteadmin/pkg/common"
flyteService "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
"github.com/flyteorg/flytestdlib/logger"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/lyft/flyteadmin/pkg/common"
flyteService "github.com/lyft/flyteidl/gen/pb-go/flyteidl/service"
"github.com/lyft/flytestdlib/logger"

"github.com/lyft/flyteadmin/pkg/config"
"github.com/lyft/flyteadmin/pkg/rpc/adminservice"
rpcConfig "github.com/lyft/flyteadmin/pkg/rpc/config"
"github.com/flyteorg/flyteadmin/pkg/config"
"github.com/flyteorg/flyteadmin/pkg/rpc/adminservice"
rpcConfig "github.com/flyteorg/flyteadmin/pkg/rpc/config"

"github.com/spf13/cobra"

"github.com/flyteorg/flytestdlib/contextutils"
"github.com/flyteorg/flytestdlib/promutils/labeled"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/lyft/flytestdlib/contextutils"
"github.com/lyft/flytestdlib/promutils/labeled"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/entrypoints/serve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"fmt"
"testing"

"github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin"
"github.com/lyft/flyteidl/gen/pb-go/flyteidl/service"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
"github.com/stretchr/testify/assert"
"golang.org/x/oauth2"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/flyteorg/flyteadmin/cmd/entrypoints"
"github.com/golang/glog"
"github.com/lyft/flyteadmin/cmd/entrypoints"
)

func main() {
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- "pkg/executioncluster"
- "pkg/clusterresource"
65 changes: 27 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,61 +1,50 @@
module github.com/lyft/flyteadmin
module github.com/flyteorg/flyteadmin

go 1.13
go 1.16

require (
cloud.google.com/go v0.56.0
cloud.google.com/go/storage v1.6.0
cloud.google.com/go v0.78.0
cloud.google.com/go/storage v1.12.0
github.com/NYTimes/gizmo v1.3.5
github.com/Selvatico/go-mocket v1.0.7
github.com/aws/aws-sdk-go v1.29.23
github.com/aws/aws-sdk-go v1.37.3
github.com/benbjohnson/clock v1.0.0
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/evanphx/json-patch v4.5.0+incompatible
github.com/gogo/protobuf v1.3.1
github.com/evanphx/json-patch v4.9.0+incompatible
github.com/flyteorg/flyteidl v0.18.15
github.com/flyteorg/flytepropeller v0.7.0
github.com/flyteorg/flytestdlib v0.3.14
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/gogo/protobuf v1.3.2
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.3.5
github.com/golang/protobuf v1.4.3
github.com/googleapis/gax-go/v2 v2.0.5
github.com/gorilla/handlers v1.4.2
github.com/gorilla/securecookie v1.1.1
github.com/graymeta/stow v0.2.5
github.com/graymeta/stow v0.2.7
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.14.3
github.com/jinzhu/gorm v1.9.12
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/lib/pq v1.3.0
github.com/lyft/flyteidl v0.18.14
github.com/lyft/flytepropeller v0.5.14
github.com/lyft/flytestdlib v0.3.9
github.com/magiconair/properties v1.8.1
github.com/mitchellh/mapstructure v1.1.2
github.com/magiconair/properties v1.8.4
github.com/mitchellh/mapstructure v1.4.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.5.0
github.com/spf13/cobra v0.0.6
github.com/prometheus/client_golang v1.9.0
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/tools v0.1.0 // indirect
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940
google.golang.org/grpc v1.28.0
github.com/stretchr/testify v1.7.0
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
google.golang.org/api v0.40.0
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c
google.golang.org/grpc v1.36.0
gopkg.in/gormigrate.v1 v1.6.0
k8s.io/api v0.17.3
k8s.io/apimachinery v0.17.3
k8s.io/client-go v11.0.1-0.20190918222721-c0e3722d5cf0+incompatible
sigs.k8s.io/controller-runtime v0.5.1
k8s.io/api v0.20.4
k8s.io/apimachinery v0.20.4
k8s.io/client-go v0.20.4
sigs.k8s.io/controller-runtime v0.8.2
)

// Pin the version of client-go to something that's compatible with katrogan's fork of api and apimachinery
// Type the following
// replace k8s.io/client-go => k8s.io/client-go kubernetes-1.16.2
// and it will be replaced with the 'sha' variant of the version

replace (
github.com/GoogleCloudPlatform/spark-on-k8s-operator => github.com/lyft/spark-on-k8s-operator v0.1.3
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.3.1
k8s.io/api => github.com/lyft/api v0.0.0-20191031200350-b49a72c274e0
k8s.io/apimachinery => github.com/lyft/apimachinery v0.0.0-20191031200210-047e3ea32d7f
k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48
)
replace github.com/GoogleCloudPlatform/spark-on-k8s-operator => github.com/lyft/spark-on-k8s-operator v0.1.3
Loading

0 comments on commit c80c8d8

Please sign in to comment.