From 3c7b88c5d75573f5d80a0bae210b32e0ce82fcb0 Mon Sep 17 00:00:00 2001 From: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:09:26 -0800 Subject: [PATCH] [Housekeeping] Enable lint flytecopilot (#6003) * [Housekeeping] Enable lint flytecopilot Signed-off-by: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> * Fix remaining lint warnings Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- .github/workflows/checks.yml | 3 +-- flytecopilot/data/download_test.go | 13 ++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2e61f36f47..b7a72457b9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -32,8 +32,7 @@ jobs: component: - datacatalog - flyteadmin - # TODO(monorepo): Enable lint flytecopilot - # - flytecopilot + - flytecopilot - flytectl - flyteidl - flyteplugins diff --git a/flytecopilot/data/download_test.go b/flytecopilot/data/download_test.go index 1f3b3a7be6..b4bee54fc5 100644 --- a/flytecopilot/data/download_test.go +++ b/flytecopilot/data/download_test.go @@ -7,11 +7,11 @@ import ( "path/filepath" "testing" + "github.com/stretchr/testify/assert" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/storage" - - "github.com/stretchr/testify/assert" ) func TestHandleBlobMultipart(t *testing.T) { @@ -19,9 +19,11 @@ func TestHandleBlobMultipart(t *testing.T) { s, err := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope()) assert.NoError(t, err) ref := storage.DataReference("s3://container/folder/file1") - s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{})) + err = s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) ref = storage.DataReference("s3://container/folder/file2") - s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{})) + err = s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) d := Downloader{store: s} @@ -87,7 +89,8 @@ func TestHandleBlobSinglePart(t *testing.T) { s, err := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope()) assert.NoError(t, err) ref := storage.DataReference("s3://container/file") - s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{})) + err = s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) d := Downloader{store: s}