enough-notebook-15673
03/12/2023, 3:03 AMkubectl get po -n flyte
shall show scheduler pod, but for me I cannot find such pods. So I get stacked now. Could you give me some advice?
$ kubectl get po -n flyte
NAME READY STATUS RESTARTS AGE
flyte-sandbox-proxy-d95874857-m8hlt 1/1 Running 0 46m
flyte-sandbox-kubernetes-dashboard-6757db879c-867nz 1/1 Running 0 46m
flyte-sandbox-docker-registry-78686dccc-vd666 1/1 Running 0 46m
flyte-sandbox-postgresql-0 1/1 Running 0 46m
flyte-sandbox-c744b94c5-5mp68 1/1 Running 1 (45m ago) 46m
flyte-sandbox-minio-645c8ddf7c-4vwxr 1/1 Running 0 46m
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
enough-notebook-15673
03/12/2023, 3:38 AMDid you registerSorry I cannot get the meaning. How can I register? And what I should register?
freezing-airport-6809
freezing-airport-6809
enough-notebook-15673
03/12/2023, 4:07 AM# <https://docs.flyte.org/projects/cookbook/en/latest/auto/core/scheduled_workflows/lp_schedules.html#activating-a-schedule>
from datetime import datetime
from flytekit import task, workflow
@task
def format_date(run_date: datetime) -> str:
return run_date.strftime("%Y-%m-%d %H:%M")
@workflow
def date_formatter_wf(kickoff_time: datetime):
formatted_kickoff_time = format_date(run_date=kickoff_time)
print(formatted_kickoff_time)
from flytekit import CronSchedule, LaunchPlan # noqa: E402
# creates a launch plan that runs every minute.
cron_lp = LaunchPlan.get_or_create(
name="my_cron_scheduled_lp",
workflow=date_formatter_wf,
schedule=CronSchedule(
# Note that the ``kickoff_time_input_arg`` matches the workflow input we defined above: kickoff_time
# But in case you are using the AWS scheme of schedules and not using the native scheduler then switch over the schedule parameter with cron_expression
schedule="*/1 * * * *", # Following schedule runs every min
kickoff_time_input_arg="kickoff_time",
),
)
enough-notebook-15673
03/12/2023, 4:08 AM$ flytectl update launchplan -p flyteexamples -d development {{ cron_lp }} --version v1 --activate
INFO[0000] [0] Couldn't find a config file []. Relying on env vars and pflags.
Error: launch plan name wasn't passed
{"json":{},"level":"error","msg":"launch plan name wasn't passed\n","ts":"2023-03-12T13:08:28+09:00"}
freezing-airport-6809
freezing-airport-6809
enough-notebook-15673
03/12/2023, 5:37 AM$ pyflyte register
Usage: pyflyte register [OPTIONS] [PACKAGE_OR_MODULE]...
This command is similar to package but instead of producing a zip file, all
your Flyte entities are compiled, and then sent to the backend specified by
your config file. Think of this as combining the pyflyte package and the
flytectl register step in one command. This is why you see switches you'd
normally use with flytectl like service account here.
Note: This command runs "fast" register by default. This means that a zip is
created from the detected root of the packages given, and uploaded. Just
like with pyflyte run, tasks registered from this command will download and
unzip that code package before running.
Note: This command only works on regular Python packages, not namespace
packages. When determining the root of your project, it finds the
first folder that does not have an __init__.py file.
Options:
-p, --project TEXT Project to register and run this workflow in
-d, --domain TEXT Domain to register and run this workflow in
-i, --image TEXT A fully qualified tag for an docker image, e.g.
<http://somedocker.com/myimage:someversion123|somedocker.com/myimage:someversion123>. This is a
multi-option and can be of the form --image
<http://xyz.io/docker:latest|xyz.io/docker:latest> --image
my_image=<http://xyz.io/docker2:latest|xyz.io/docker2:latest>. Note, the
`name=image_uri`. The name is optional, if not
provided the image will be used as the default
image. All the names have to be unique, and thus
there can only be one --image option with no
name.
-o, --output DIRECTORY Directory to write the output zip file
containing the protobuf definitions
-D, --destination-dir TEXT Directory inside the image where the tar file
containing the code will be copied to
--service-account TEXT Service account used when creating launch plans
--raw-data-prefix TEXT Raw output data prefix when creating launch
plans, where offloaded data will be stored
-v, --version TEXT Version the package or module is registered with
--deref-symlinks Enables symlink dereferencing when packaging
files in fast registration
--non-fast Enables to skip zipping and uploading the
package
--dry-run Execute registration in dry-run mode. Skips
actual registration to remote
--help Show this message and exit.
freezing-airport-6809
enough-notebook-15673
03/12/2023, 5:51 AMThis launch plan has no fixed inputs
in the condole. I missed something?freezing-airport-6809
enough-notebook-15673
03/12/2023, 5:59 AMtall-lock-23197
tall-lock-23197
enough-notebook-15673
03/12/2023, 8:33 AM$ flytectl update launchplan -p flyteexamples -d development {{ my_cron_scheduled_lp }} --version v1 --activate
INFO[0000] [0] Couldn't find a config file []. Relying on env vars and pflags.
Error: launch plan name wasn't passed
{"json":{},"level":"error","msg":"launch plan name wasn't passed\n","ts":"2023-03-12T173152+09:00"}I got the error. From the error message, I missed something?
tall-lock-23197
my_cron_scheduled_lp
, the command would be
flytectl update launchplan -p flyteexamples -d development my_cron_scheduled_lp --version v1 --activate
enough-notebook-15673
03/13/2023, 1:29 PMenough-notebook-15673
03/13/2023, 1:29 PM$ flytectl update launchplan -p flyteexamples -d development my_cron_scheduled_lp --version v1 --activate
INFO[0000] [0] Couldn't find a config file []. Relying on env vars and pflags.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1ade323]
goroutine 1 [running]:
<http://github.com/flyteorg/flytectl/cmd/core.CommandContext.AdminClient(...)|github.com/flyteorg/flytectl/cmd/core.CommandContext.AdminClient(...)>
/home/runner/work/flytectl/flytectl/cmd/core/cmd_ctx.go:57
<http://github.com/flyteorg/flytectl/cmd/update.updateLPFunc({0x2561ab8|github.com/flyteorg/flytectl/cmd/update.updateLPFunc({0x2561ab8>, 0xc0000540d0}, {0xc0000e1200, 0x1, 0x2561760?}, {0x0, {0x0, 0x0}, {0x0, 0x0}, ...})
/home/runner/work/flytectl/flytectl/cmd/update/launch_plan.go:60 +0x1e3
<http://github.com/flyteorg/flytectl/cmd/core.generateCommandFunc.func1(0xc0009c3180|github.com/flyteorg/flytectl/cmd/core.generateCommandFunc.func1(0xc0009c3180>?, {0xc0000e1200, 0x1, 0x8})
/home/runner/work/flytectl/flytectl/cmd/core/cmd.go:70 +0x93d
<http://github.com/spf13/cobra.(*Command).execute(0xc0009c3180|github.com/spf13/cobra.(*Command).execute(0xc0009c3180>, {0xc0000e1180, 0x8, 0x8})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:856 +0x67c
<http://github.com/spf13/cobra.(*Command).ExecuteC(0xc000922a00)|github.com/spf13/cobra.(*Command).ExecuteC(0xc000922a00)>
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bd
<http://github.com/spf13/cobra.(*Command).Execute(...)|github.com/spf13/cobra.(*Command).Execute(...)>
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
<http://github.com/flyteorg/flytectl/cmd.ExecuteCmd()|github.com/flyteorg/flytectl/cmd.ExecuteCmd()>
/home/runner/work/flytectl/flytectl/cmd/root.go:137 +0x1e
main.main()
/home/runner/work/flytectl/flytectl/main.go:12 +0x1d
tall-lock-23197
average-finland-92144
03/13/2023, 4:19 PM$HOME/.flyte/
enough-notebook-15673
03/14/2023, 11:01 AMCan you share the flyte config.yaml config?
ryo@ryo:~/.flyte$ cat config-sandbox.yaml
admin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
endpoint: localhost:30080
authType: Pkce
insecure: true
console:
endpoint: <http://localhost:30080>
logger:
show-source: true
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809