mammoth-lion-71167
09/22/2022, 10:51 AMfrom flytekit import kwtypes, workflow
from flytekitplugins.snowflake import SnowflakeConfig, SnowflakeTask
snowflake_task_no_io = SnowflakeTask(
name="sql.snowflake.no_io",
inputs={},
query_template="select * from TEST_DEV.IDENTITY.TEST_123 ;",
output_schema_type=None,
task_config=SnowflakeConfig(
account="xxxxx.us-east-1",
database="TEST_DEV",
schema="IDENTITY",
warehouse="DEMO_WH",
),
)
@workflow
def no_io_wf():
return snowflake_task_no_io()
mammoth-lion-71167
09/22/2022, 11:18 AMfailed to execute handle for plugin [snowflake]: secrets not found - file [/etc/secrets/FLYTE_SNOWFLAKE_CLIENT_TOKEN], Env [FLYTE_SECRET_FLYTE_SNOWFLAKE_CLIENT_TOKEN]
victorious-park-53030
09/22/2022, 12:18 PMkubectl edit cm flyte-propeller-config
cc @glamorous-carpet-83516mammoth-lion-71167
09/22/2022, 1:11 PM# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
admin.yaml: |
admin:
clientId: 'flytepropeller'
clientSecretLocation: /etc/secrets/client_secret
endpoint: flyteadmin:81
insecure: true
event:
capacity: 1000
rate: 500
type: admin
cache.yaml: |
cache:
max_size_mbs: 1024
target_gc_percent: 70
catalog.yaml: |
catalog-cache:
endpoint: datacatalog:89
insecure: true
type: datacatalog
copilot.yaml: |
plugins:
k8s:
co-pilot:
image: <http://cr.flyte.org/flyteorg/flytecopilot:v0.0.24|cr.flyte.org/flyteorg/flytecopilot:v0.0.24>
name: flyte-copilot-
start-timeout: 30s
core.yaml: |
manager:
pod-application: flytepropeller
pod-template-container-name: flytepropeller
pod-template-name: flytepropeller-template
propeller:
downstream-eval-duration: 30s
enable-admin-launcher: true
gc-interval: 12h
kube-client-config:
burst: 25
qps: 100
timeout: 30s
leader-election:
enabled: true
lease-duration: 15s
lock-config-map:
name: propeller-leader
namespace: flyte
renew-deadline: 10s
retry-period: 2s
limit-namespace: all
max-workflow-retries: 50
metadata-prefix: metadata/propeller
metrics-prefix: flyte
prof-port: 10254
queue:
batch-size: -1
batching-interval: 2s
queue:
base-delay: 5s
capacity: 1000
max-delay: 120s
rate: 100
type: maxof
sub-queue:
capacity: 1000
rate: 100
type: bucket
type: batch
rawoutput-prefix: <s3://xxxxxxxxxx/>
workers: 40
workflow-reeval-duration: 30s
webhook:
certDir: /etc/webhook/certs
serviceName: flyte-pod-webhook
enabled_plugins.yaml: |
tasks:
task-plugins:
default-for-task-types:
container: container
container_array: k8s-array
sidecar: sidecar
spark: spark
enabled-plugins:
- container
- sidecar
- k8s-array
- snowflake
- spark
k8s.yaml: |
plugins:
k8s:
default-cpus: 100m
default-env-vars: []
default-memory: 100Mi
resource_manager.yaml: |
propeller:
resourcemanager:
type: noop
spark.yaml: |
plugins:
spark:
logs:
all-user:
cloudwatch-enabled: true
cloudwatch-template-uri: <https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=/aws/vpcflowLogs/dev-max-ml-flyte;prefix=test;streamFilter=typeLogStreamPrefix>
mixed:
cloudwatch-enabled: true
cloudwatch-template-uri: <https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=/aws/vpcflowLogs/dev-max-ml-flyte;prefix=test;streamFilter=typeLogStreamPrefix>
system:
cloudwatch-enabled: true
cloudwatch-template-uri: <https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=/aws/vpcflowLogs/dev-max-ml-flyte;prefix=test;streamFilter=typeLogStreamPrefix>
spark-config-default:
- spark.hadoop.fs.s3a.aws.credentials.provider: com.amazonaws.auth.DefaultAWSCredentialsProviderChain
- spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version: "2"
- spark.kubernetes.allocation.batch.size: "50"
- spark.hadoop.fs.s3a.acl.default: BucketOwnerFullControl
- spark.hadoop.fs.s3n.impl: org.apache.hadoop.fs.s3a.S3AFileSystem
- spark.hadoop.fs.AbstractFileSystem.s3n.impl: org.apache.hadoop.fs.s3a.S3A
- spark.hadoop.fs.s3.impl: org.apache.hadoop.fs.s3a.S3AFileSystem
- spark.hadoop.fs.AbstractFileSystem.s3.impl: org.apache.hadoop.fs.s3a.S3A
- spark.hadoop.fs.s3a.impl: org.apache.hadoop.fs.s3a.S3AFileSystem
- spark.hadoop.fs.AbstractFileSystem.s3n.impl: org.apache.hadoop.fs.s3a.S3A
- spark.hadoop.fs.s3.impl: org.apache.hadoop.fs.s3a.S3AFileSystem
- spark.hadoop.fs.AbstractFileSystem.s3.impl: org.apache.hadoop.fs.s3a.S3A
- spark.hadoop.fs.s3a.impl: org.apache.hadoop.fs.s3a.S3AFileSystem
- spark.hadoop.fs.AbstractFileSystem.s3a.impl: org.apache.hadoop.fs.s3a.S3A
- spark.hadoop.fs.s3a.multipart.threshold: "536870912"
- spark.blacklist.enabled: "true"
- spark.blacklist.timeout: 5m
- spark.task.maxfailures: "8"
storage.yaml: |
storage:
type: s3
container: "xxxxxxxxxx"
connection:
auth-type: iam
region: us-east-1
enable-multicontainer: false
limits:
maxDownloadMBs: 10
task_logs.yaml: |
plugins:
logs:
cloudwatch-enabled: true
cloudwatch-log-group: /aws/vpcflowLogs/dev-max-ml-flyte
cloudwatch-region: us-east-1
kubernetes-enabled: true
templates:
- displayName: logs_test
templateUris:
- <https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/aws/vpcflowLogs/dev-max-ml-flyte;stream=var.log.containers.__-.log>
kind: ConfigMap
kind: ConfigMap
metadata:
annotations:
<http://meta.helm.sh/release-name|meta.helm.sh/release-name>: max-ml-flyte
<http://meta.helm.sh/release-namespace|meta.helm.sh/release-namespace>: flyte
creationTimestamp: "2022-09-14T11:33:04Z"
labels:
<http://app.kubernetes.io/instance|app.kubernetes.io/instance>: max-ml-flyte
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
<http://app.kubernetes.io/name|app.kubernetes.io/name>: flyteadmin
<http://helm.sh/chart|helm.sh/chart>: flyte-core-v0.1.10
name: flyte-propeller-config
namespace: flyte
resourceVersion: "57800317"
uid: xxxxxxxxxxxxxx
freezing-airport-6809
freezing-airport-6809
mammoth-lion-71167
09/23/2022, 6:40 AMfreezing-airport-6809
freezing-airport-6809
freezing-airport-6809
glamorous-carpet-83516
09/23/2022, 3:17 PM...
volumeMounts:
- mountPath: /etc/flyte/config
name: config-volume
- mountPath: /etc/secrets/
name: snowflake-auth
...
volumes:
- configMap:
defaultMode: 420
name: flyte-propeller-config
name: config-volume
- name: snowflake-auth
secret:
defaultMode: 420
secretName: mysecret
mammoth-lion-71167
09/26/2022, 5:42 AMmammoth-lion-71167
09/26/2022, 7:14 AMcution phase [401].]","ts":"2022-09-26T07:15:38Z"}
{"json":{"exec_id":"f3f19081e615545ee8bc","ns":"cloudops-max-flyte-demo-development","res_ver":"67677691","routine":"worker-22","wf":"cloudops-max-flyte-demo:development:flyte.workflows.sf_execution_try_v1.full_snowflake_wf"},"level":"error","msg":"Error when trying to reconcile workflow. Error [failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [snowflake]: [SystemError] unknown execution phase [401].]. Error Type[*errors.NodeErrorWithCause]","ts":"2022-09-26T07:15:38Z"}
E0926 07:15:38.997857 1 workers.go:102] error syncing 'cloudops-max-flyte-demo-development/f3f19081e615545ee8bc': failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [snowflake]: [SystemError] unknown execution phase [401]
/ $ ls -lrt /etc/secrets/*
lrwxrwxrwx 1 root nobody 20 Sep 26 06:43 /etc/secrets/client_secret -> ..data/client_secret
lrwxrwxrwx 1 root nobody 35 Sep 26 06:43 /etc/secrets/FLYTE_SNOWFLAKE_CLIENT_TOKEN -> ..data/FLYTE_SNOWFLAKE_CLIENT_TOKENglamorous-carpet-83516
09/26/2022, 8:03 AMglamorous-carpet-83516
09/26/2022, 8:03 AMmammoth-lion-71167
09/26/2022, 8:05 AMmammoth-lion-71167
09/26/2022, 10:43 AM{"json":{"exec_id":"f2ac69ce6a7204aedbba","ns":"cloudops-max-flyte-demo-development","res_ver":"67767991","routine":"worker-37","wf":"cloudops-max-flyte-demo:development:flyte.workflows.sf_execution_try_v1.full_snowflake_wf"},"level":"error","msg":"Error when trying to reconcile workflow. Error [failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [snowflake]: [SystemError] unknown execution phase [404].]. Error Type[*errors.NodeErrorWithCause]","ts":"2022-09-26T09:58:54Z"}
E0926 09:58:54.581265 1 workers.go:102] error syncing 'cloudops-max-flyte-demo-development/f2ac69ce6a7204aedbba': failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [snowflake]: [SystemError] unknown execution phase [404]
glamorous-carpet-83516
09/26/2022, 11:18 AM/api/statements
in propeller. https://github.com/flyteorg/flyteplugins/blob/16370216a6fc34412870ff1e12ca2a44ffbf1986/go/tasks/plugins/webapi/snowflake/plugin.go#L212glamorous-carpet-83516
09/26/2022, 11:41 AMkubectl set image deployment flytepropeller flytepropeller=pingsutw/flytepropeller:2064b6a03361e5b3eb7d5a66340368fd13bde023 -n flyte
mammoth-lion-71167
09/26/2022, 11:55 AMmammoth-lion-71167
09/26/2022, 12:04 PMglamorous-carpet-83516
09/26/2022, 12:07 PMfreezing-airport-6809
mammoth-lion-71167
09/27/2022, 5:32 AMglamorous-carpet-83516
09/27/2022, 7:44 AMmammoth-lion-71167
09/28/2022, 6:14 AMglamorous-carpet-83516
09/28/2022, 9:27 AMmammoth-lion-71167
09/28/2022, 11:35 AME0928 11:34:01.227719 1 workers.go:102] error syncing 'cloudops-max-flyte-demo-development/fa396b5b859f64dc2a26': failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [snowflake]: [SystemError] unknown execution phase [400]
glamorous-carpet-83516
09/28/2022, 3:16 PMglamorous-carpet-83516
09/28/2022, 3:17 PMcurl -i -X POST \
-H "Authorization: Bearer ${JWT_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Snowflake-Authorization-Token-Type: KEYPAIR_JWT" \
-d "@request.json" \
"https://<account identifier>.<http://snowflakecomputing.com/api/v2/statements?async=true|snowflakecomputing.com/api/v2/statements?async=true>"
glamorous-carpet-83516
09/28/2022, 3:17 PM{
"statement": "SELECT * from CUSTOMER where C_NATIONKEY = 4 limit 100",
"timeout": 60,
"schema": "TPCH_SF1000",
"database": "SNOWFLAKE_SAMPLE_DATA",
"warehouse": "COMPUTE_WH"
}
glamorous-carpet-83516
09/28/2022, 3:18 PMmammoth-lion-71167
09/29/2022, 7:21 AMfreezing-airport-6809
mammoth-lion-71167
10/03/2022, 10:26 AMmammoth-lion-71167
10/04/2022, 11:13 AMfreezing-airport-6809
glamorous-carpet-83516
10/05/2022, 3:19 PMglamorous-carpet-83516
10/05/2022, 9:11 PMpip install git+<https://github.com/flyteorg/flytekit@snowflake-bug>
Flyte enables production-grade orchestration for machine learning workflows and data processing created to accelerate local workflows to production.
Powered by