From ba3647ffa20031c573a09a3c457a8e35ca8109f2 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Fri, 24 May 2024 10:49:33 -0700 Subject: [PATCH] Fix typos using codespell CI job (#5418) * Fix typos Signed-off-by: Eduardo Apolinario * Fix unification of codespell file Signed-off-by: Eduardo Apolinario * Alphabetize list of ignored words Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- .codespellrc | 6 -- .github/codespell-ignored-words | 11 +++ .github/workflows/codespell.yml | 4 +- Makefile | 4 ++ .../generated/datacatalog_config.rst | 2 +- .../generated/flyteadmin_config.rst | 2 +- .../generated/flytepropeller_config.rst | 2 +- .../generated/scheduler_config.rst | 2 +- flyteadmin/scheduler/doc.go | 4 +- flyteadmin/scheduler/snapshoter/doc.go | 2 +- flytectl/cmd/compile/compile_test.go | 2 +- flytectl/proposal/README.md | 2 +- flyteidl/clients/go/assets/admin.swagger.json | 67 +++++++++++++++++++ flytestdlib/otelutils/config.go | 2 +- flytestdlib/otelutils/config_flags.go | 2 +- 15 files changed, 95 insertions(+), 19 deletions(-) delete mode 100644 .codespellrc create mode 100644 .github/codespell-ignored-words diff --git a/.codespellrc b/.codespellrc deleted file mode 100644 index 0f0abe525b..0000000000 --- a/.codespellrc +++ /dev/null @@ -1,6 +0,0 @@ -[codespell] -skip = .git,*.pdf,*.svg,go.sum,go.mod,*requirements.txt,gen -# some strings with unicodes, constructs like [o]utput -ignore-regex = ".*\\0[0-9][0-9].*"|json:"[^"]*"|\b[a-z]*\[[a-z]\][a-z]*\b -# some ad-hoc variable names etc -ignore-words-list = te,nd,querys,ser diff --git a/.github/codespell-ignored-words b/.github/codespell-ignored-words new file mode 100644 index 0000000000..2947204bdd --- /dev/null +++ b/.github/codespell-ignored-words @@ -0,0 +1,11 @@ +ThirdParty +bootup +crate +fo +lightyear +nd +notin +querys +ser +te +updAt diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 9126234dce..f85048c674 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -25,5 +25,5 @@ jobs: - name: Codespell uses: codespell-project/actions-codespell@v2 with: - skip: "*.pb,monodocs-environment.lock.yaml" - ignore_words_list: crate,lightyear,fo + skip: "*.pb,monodocs-environment.lock.yaml,.git,*.pdf,*.svg,go.sum,go.mod,*requirements.txt,gen" + ignore_words_file: .github/codespell-ignored-words diff --git a/Makefile b/Makefile index 21bc2e847d..b3a37c85c4 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,10 @@ lint-helm-charts: # This pressuposes that you have act installed act pull_request -W .github/workflows/validate-helm-charts.yaml --container-architecture linux/amd64 -e charts/event.json +.PHONY: spellcheck +spellcheck: + act pull_request --container-architecture linux/amd64 -W .github/workflows/codespell.yml + .PHONY: clean clean: ## Remove the HTML files related to the Flyteconsole and Makefile rm -rf cmd/single/dist .tmp_build diff --git a/docs/deployment/configuration/generated/datacatalog_config.rst b/docs/deployment/configuration/generated/datacatalog_config.rst index fe79705c20..a68ad824e4 100644 --- a/docs/deployment/configuration/generated/datacatalog_config.rst +++ b/docs/deployment/configuration/generated/datacatalog_config.rst @@ -553,7 +553,7 @@ otelutils.JaegerConfig endpoint (string) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Endpoint for the jaeger telemtry trace ingestor +Endpoint for the jaeger telemetry trace ingestor **Default Value**: diff --git a/docs/deployment/configuration/generated/flyteadmin_config.rst b/docs/deployment/configuration/generated/flyteadmin_config.rst index e3973098b5..a52114090f 100644 --- a/docs/deployment/configuration/generated/flyteadmin_config.rst +++ b/docs/deployment/configuration/generated/flyteadmin_config.rst @@ -2557,7 +2557,7 @@ otelutils.JaegerConfig endpoint (string) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Endpoint for the jaeger telemtry trace ingestor +Endpoint for the jaeger telemetry trace ingestor **Default Value**: diff --git a/docs/deployment/configuration/generated/flytepropeller_config.rst b/docs/deployment/configuration/generated/flytepropeller_config.rst index 09bce3baea..4a69b4e90c 100644 --- a/docs/deployment/configuration/generated/flytepropeller_config.rst +++ b/docs/deployment/configuration/generated/flytepropeller_config.rst @@ -869,7 +869,7 @@ otelutils.JaegerConfig endpoint (string) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Endpoint for the jaeger telemtry trace ingestor +Endpoint for the jaeger telemetry trace ingestor **Default Value**: diff --git a/docs/deployment/configuration/generated/scheduler_config.rst b/docs/deployment/configuration/generated/scheduler_config.rst index 466193a3a3..47925cce6e 100644 --- a/docs/deployment/configuration/generated/scheduler_config.rst +++ b/docs/deployment/configuration/generated/scheduler_config.rst @@ -2557,7 +2557,7 @@ otelutils.JaegerConfig endpoint (string) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Endpoint for the jaeger telemtry trace ingestor +Endpoint for the jaeger telemetry trace ingestor **Default Value**: diff --git a/flyteadmin/scheduler/doc.go b/flyteadmin/scheduler/doc.go index ff3975d9f3..0210702c8b 100644 --- a/flyteadmin/scheduler/doc.go +++ b/flyteadmin/scheduler/doc.go @@ -7,7 +7,7 @@ // The above actions are exposed through launchplan activation/deactivation api's and do not have separate controls. // Whenever a launchplan with a schedule is activated, a new schedule entry is created in the datastore // On deactivation the created scheduled and launchplan is deactivated through a flag -// Atmost one launchplan is active at any moment across its various versions and same semantics apply for the +// At most one launchplan is active at any moment across its various versions and same semantics apply for the // schedules as well. // 2] Scheduler // This component is a singleton and has its source in the current folder and is responsible for reading the schedules @@ -78,7 +78,7 @@ // by the admin. i.e admin could execute the schedules in this order T2, T1. This is rare case though // // c) Case when the scheduler goes down then once it comes back up it will run catch up on all the schedules using -// the last snapshoted timestamp to time.Now() +// the last snapshotted timestamp to time.Now() // // d) Case when the snapshoter fails to record the last execution at T2 but has recorded at T1, where T1 < T2 , // then new schedules would be created from T1 -> time.Now() during catchup and the idempotency aspect of the admin diff --git a/flyteadmin/scheduler/snapshoter/doc.go b/flyteadmin/scheduler/snapshoter/doc.go index 654225eaaf..d0cefa864e 100644 --- a/flyteadmin/scheduler/snapshoter/doc.go +++ b/flyteadmin/scheduler/snapshoter/doc.go @@ -1,5 +1,5 @@ // Package snapshoter // This package provides the ability to snapshot all the schedules in the scheduler job store and persist them in the DB // in GOB binary format. Also it provides ability to bootstrap the scheduler from this snapshot so that the scheduler -// can run catchup for all the schedules from the snapshoted time. +// can run catchup for all the schedules from the snapshotted time. package snapshoter diff --git a/flytectl/cmd/compile/compile_test.go b/flytectl/cmd/compile/compile_test.go index fd32799ef4..4004ca897b 100644 --- a/flytectl/cmd/compile/compile_test.go +++ b/flytectl/cmd/compile/compile_test.go @@ -55,7 +55,7 @@ func TestCompilePackage(t *testing.T) { // invalid workflow, types do not match err = compileFromPackage("testdata/bad-workflow-package.tgz") - assert.NotNil(t, err, "compilin an invalid workflow returns no error") + assert.NotNil(t, err, "compiling an invalid workflow returns no error") // testing badly serialized task err = compileFromPackage("testdata/invalidtask.tgz") diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index 833f01d0bb..f567b74ee6 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -231,7 +231,7 @@ Support ## Install all examples -Today Flytesnacks houses a few examples for Flyte usage in python. When a user wants to get started with Flyte quickly, it would be preferable that all Flytesnacks examples are serialized and stored as artifacts in flytesnacks for every checkin. This can be done for python flytekit using `pyflyte serialize` command. Once they are posted as serialized blobs, flytectl could easily retrieve them and register them in a specific project as desired by the user. +Today Flytesnacks houses a few examples for Flyte usage in python. When a user wants to get started with Flyte quickly, it would be preferable that all Flytesnacks examples are serialized and stored as artifacts in flytesnacks for every commit to master. This can be done for python flytekit using `pyflyte serialize` command. Once they are posted as serialized blobs, flytectl could easily retrieve them and register them in a specific project as desired by the user. ```bash $ flytectl examples register-all [cookbook|plugins|--custom-path=remote-path] [--semver semantic-version-of-flytesnacks-examples] --target-project --target-domain diff --git a/flyteidl/clients/go/assets/admin.swagger.json b/flyteidl/clients/go/assets/admin.swagger.json index bcaf46928b..4e944181b5 100644 --- a/flyteidl/clients/go/assets/admin.swagger.json +++ b/flyteidl/clients/go/assets/admin.swagger.json @@ -5027,6 +5027,14 @@ "execution_cluster_label": { "$ref": "#/definitions/adminExecutionClusterLabel", "description": "Execution cluster label to be set for the execution." + }, + "execution_env_assignments": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/coreExecutionEnvAssignment" + }, + "description": "Execution environment assignments to be set for the execution." } }, "description": "An ExecutionSpec encompasses all data used to launch this execution. The Spec does not change over the lifetime\nof an execution as it progresses across phase changes." @@ -5295,6 +5303,14 @@ "envs": { "$ref": "#/definitions/adminEnvs", "description": "Environment variables to be set for the execution." + }, + "execution_env_assignments": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/coreExecutionEnvAssignment" + }, + "description": "Execution environment assignments to be set for the execution." } }, "description": "User-provided launch plan definition and configuration values." @@ -6357,6 +6373,14 @@ "envs": { "$ref": "#/definitions/adminEnvs", "description": "Environment variables to be set for the execution." + }, + "execution_env_assignments": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/coreExecutionEnvAssignment" + }, + "description": "Execution environment assignments to be set for the execution." } }, "description": "Adds defaults for customizable workflow-execution specifications and overrides." @@ -7014,6 +7038,49 @@ }, "description": "Represents an error thrown from a node." }, + "coreExecutionEnv": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id is a unique identifier for the execution environment." + }, + "type": { + "type": "string", + "description": "type is the type of the execution environment." + }, + "extant": { + "type": "object", + "description": "extant is a reference to an existing environment." + }, + "spec": { + "type": "object", + "description": "spec is a specification of the environment." + } + }, + "description": "ExecutionEnv is a message that is used to specify the execution environment." + }, + "coreExecutionEnvAssignment": { + "type": "object", + "properties": { + "node_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "node_ids is a list of node ids that are being assigned the execution environment." + }, + "task_type": { + "type": "string", + "description": "task_type is the type of task that is being assigned. This is used to override which Flyte\nplugin will be used during execution." + }, + "execution_env": { + "$ref": "#/definitions/coreExecutionEnv", + "description": "execution_env is the environment that is being assigned to the nodes." + } + }, + "description": "ExecutionEnvAssignment is a message that is used to assign an execution environment to a set of\nnodes." + }, "coreExecutionError": { "type": "object", "properties": { diff --git a/flytestdlib/otelutils/config.go b/flytestdlib/otelutils/config.go index 3f3fb20e14..e984eabff3 100644 --- a/flytestdlib/otelutils/config.go +++ b/flytestdlib/otelutils/config.go @@ -43,7 +43,7 @@ type FileConfig struct { } type JaegerConfig struct { - Endpoint string `json:"endpoint" pflag:",Endpoint for the jaeger telemtry trace ingestor"` + Endpoint string `json:"endpoint" pflag:",Endpoint for the jaeger telemetry trace ingestor"` } func GetConfig() *Config { diff --git a/flytestdlib/otelutils/config_flags.go b/flytestdlib/otelutils/config_flags.go index 6a9af7a906..2cef099f74 100755 --- a/flytestdlib/otelutils/config_flags.go +++ b/flytestdlib/otelutils/config_flags.go @@ -52,6 +52,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.String(fmt.Sprintf("%v%v", prefix, "type"), defaultConfig.ExporterType, "Sets the type of exporter to configure [noop/file/jaeger].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "file.filename"), defaultConfig.FileConfig.Filename, "Filename to store exported telemetry traces") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "jaeger.endpoint"), defaultConfig.JaegerConfig.Endpoint, "Endpoint for the jaeger telemtry trace ingestor") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "jaeger.endpoint"), defaultConfig.JaegerConfig.Endpoint, "Endpoint for the jaeger telemetry trace ingestor") return cmdFlags }