From 978e844fd15d375809d134561ea280610dd53a98 Mon Sep 17 00:00:00 2001 From: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> Date: Wed, 13 Nov 2024 01:45:32 -0800 Subject: [PATCH 1/2] [Housekeeping] Enable lint flytecopilot Signed-off-by: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> --- .github/workflows/checks.yml | 3 +-- 1 file changed, 1 insertion(+), 2 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 From c73adda2573ad5e7130f4cea39b9e7436816008c Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 13 Nov 2024 23:53:53 -0500 Subject: [PATCH 2/2] Fix remaining lint warnings Signed-off-by: Eduardo Apolinario --- flytecopilot/data/download_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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}