diff --git a/.github/config.yml b/.github/config.yml index f99bcd78f1..7afe6111f5 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -3,6 +3,7 @@ newPRWelcomeComment: > Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). diff --git a/.github/workflows/sandbox.yaml b/.github/workflows/sandbox.yaml index 62ba9f783b..cb72047995 100644 --- a/.github/workflows/sandbox.yaml +++ b/.github/workflows/sandbox.yaml @@ -20,9 +20,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - name: Build Flytectl binary run: make compile - - name: Setup env - run: | - mkdir -p ~/.flyte/k3s && touch ~/.flyte/k3s/k3s.yaml && chmod 666 ~/.flyte/k3s/k3s.yaml - name: Create a sandbox cluster run: bin/flytectl sandbox start - name: Setup flytectl config diff --git a/boilerplate/flyte/welcome_bot/config.yml b/boilerplate/flyte/welcome_bot/config.yml index f99bcd78f1..7afe6111f5 100644 --- a/boilerplate/flyte/welcome_bot/config.yml +++ b/boilerplate/flyte/welcome_bot/config.yml @@ -3,6 +3,7 @@ newPRWelcomeComment: > Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). diff --git a/cmd/sandbox/start.go b/cmd/sandbox/start.go index b97c3c1dd2..c5559988fe 100644 --- a/cmd/sandbox/start.go +++ b/cmd/sandbox/start.go @@ -47,7 +47,7 @@ Mount your source code repository inside sandbox bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte, Only available after v0.14.0+ +Run specific version of flyte, Only available after v0.13.0+ :: bin/flytectl sandbox start --version=v0.14.0 @@ -55,7 +55,7 @@ Run specific version of flyte, Only available after v0.14.0+ Usage ` k8sEndpoint = "https://127.0.0.1:30086" - flyteMinimumVersionSupported = "v0.14.0" + flyteMinimumVersionSupported = "v0.13.0" generatedManifest = "/flyteorg/share/flyte_generated.yaml" flyteNamespace = "flyte" diskPressureTaint = "node.kubernetes.io/disk-pressure" diff --git a/cmd/upgrade/upgrade.go b/cmd/upgrade/upgrade.go index 84f79a915f..54686a1f76 100644 --- a/cmd/upgrade/upgrade.go +++ b/cmd/upgrade/upgrade.go @@ -32,6 +32,8 @@ Upgrade flytectl bin/flytectl upgrade +Note: Please use upgrade with sudo, Without sudo it will cause permission issue + Rollback flytectl binary :: diff --git a/pkg/util/util.go b/pkg/util/util.go index 99a2408458..416ad58c7f 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -32,7 +32,11 @@ func WriteIntoFile(data []byte, file string) error { // SetupFlyteDir will create .flyte dir if not exist func SetupFlyteDir() error { - if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), os.ModePerm); err != nil { + if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm); err != nil { + return err + } + // Created a empty file with right permission + if err := ioutil.WriteFile(docker.Kubeconfig, []byte(""), os.ModePerm); err != nil { return err } return nil @@ -48,7 +52,7 @@ func IsVersionGreaterThan(version1, version2 string) (bool, error) { if err != nil { return false, err } - return semanticVersion2.LessThanOrEqual(semanticVersion1), nil + return semanticVersion1.GreaterThan(semanticVersion2), nil } // PrintSandboxMessage will print sandbox success message diff --git a/pkg/util/util_test.go b/pkg/util/util_test.go index bbb84b3e33..c123683e86 100644 --- a/pkg/util/util_test.go +++ b/pkg/util/util_test.go @@ -33,6 +33,11 @@ func TestIsVersionGreaterThan(t *testing.T) { assert.Nil(t, err) assert.Equal(t, true, ok) }) + t.Run("Compare flytectl version greater then for equal value", func(t *testing.T) { + ok, err := IsVersionGreaterThan(testVersion, testVersion) + assert.Nil(t, err) + assert.Equal(t, false, ok) + }) t.Run("Compare flytectl version smaller then", func(t *testing.T) { ok, err := IsVersionGreaterThan("v0.1.19", testVersion) assert.Nil(t, err)