diff --git a/flyteadmin_config.yaml b/flyteadmin_config.yaml index 6cef756f4..964f83a81 100644 --- a/flyteadmin_config.yaml +++ b/flyteadmin_config.yaml @@ -6,7 +6,7 @@ server: httpPort: 8088 grpcPort: 8089 grpcServerReflection: true - kube-config: /Users/ytong/.flyte/state/kubeconfig + kube-config: /Users/ytong/.flyte/sandbox/kubeconfig security: secure: false useAuth: false @@ -62,10 +62,11 @@ flyteadmin: useOffloadedWorkflowClosure: false database: postgres: - port: 5432 + port: 30001 username: postgres - host: localhost - dbname: flyteadmin + password: postgres + host: 127.0.0.1 + dbname: flyte options: "sslmode=disable" scheduler: eventScheduler: @@ -115,14 +116,17 @@ Logger: show-source: true level: 6 storage: - type: minio - connection: - access-key: minio - auth-type: accesskey - secret-key: miniostorage - disable-ssl: true - endpoint: "http://localhost:30084" - region: my-region + type: stow + stow: + kind: s3 + config: + region: us-east-1 + disable_ssl: true + v2_signing: true + endpoint: http://localhost:30002 + auth_type: accesskey + access_key_id: minio + secret_key: miniostorage signedUrl: stowConfigOverride: endpoint: http://localhost:30084 diff --git a/pkg/manager/impl/resources/resource_manager.go b/pkg/manager/impl/resources/resource_manager.go index a02cd024a..d65658991 100644 --- a/pkg/manager/impl/resources/resource_manager.go +++ b/pkg/manager/impl/resources/resource_manager.go @@ -213,9 +213,8 @@ func (m *ResourceManager) GetProjectAttributes(ctx context.Context, request admi configLevelDefaults := m.config.GetTopLevelConfig().GetAsWorkflowExecutionConfig() if err != nil { ec, ok := err.(errors.FlyteAdminError) - if ok && ec.Code() == codes.NotFound { + if ok && ec.Code() == codes.NotFound && request.ResourceType == admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG { // TODO: Will likely be removed after overarching settings project is done - // Proceed with the default CreateOrUpdate call since there's no existing model to update. return &admin.ProjectAttributesGetResponse{ Attributes: &admin.ProjectAttributes{ Project: request.Project, diff --git a/pkg/manager/impl/resources/resource_manager_test.go b/pkg/manager/impl/resources/resource_manager_test.go index ad886e52e..8c587937c 100644 --- a/pkg/manager/impl/resources/resource_manager_test.go +++ b/pkg/manager/impl/resources/resource_manager_test.go @@ -645,6 +645,26 @@ func TestGetProjectAttributes_ConfigLookup(t *testing.T) { }, }, response)) }) + + t.Run("config not merged if not wec", func(t *testing.T) { + appConfig := runtimeInterfaces.ApplicationConfig{ + MaxParallelism: 3, + K8SServiceAccount: "testserviceaccount", + Labels: map[string]string{"lab1": "name"}, + OutputLocationPrefix: "s3://test-bucket", + } + config.SetTopLevelConfig(appConfig) + request := admin.ProjectAttributesGetRequest{ + Project: project, + ResourceType: admin.MatchableResource_EXECUTION_QUEUE, + } + + _, err := manager.GetProjectAttributes(context.Background(), request) + assert.Error(t, err) + ec, ok := err.(errors.FlyteAdminError) + assert.True(t, ok) + assert.Equal(t, codes.NotFound, ec.Code()) + }) } func TestDeleteProjectAttributes(t *testing.T) {