Skip to content

[Fix-176][Python] Resolve task_type "K8S" in YAML workflow loader and…#177

Open
initiallyqq wants to merge 1 commit into
apache:mainfrom
initiallyqq:fix-k8s-yaml-loader
Open

[Fix-176][Python] Resolve task_type "K8S" in YAML workflow loader and…#177
initiallyqq wants to merge 1 commit into
apache:mainfrom
initiallyqq:fix-k8s-yaml-loader

Conversation

@initiallyqq

Copy link
Copy Markdown

… fix Kubernetes.yaml example

The YAML workflow loader resolved task types by class name only, so task_type: K8S (TaskType.KUBERNETES) failed with
PyDSTaskNoFoundException: cant not find task K8S. The shipped Kubernetes.yaml example also used camelCase fields rejected by the Kubernetes task constructor, and was the only example excluded from CI.

  • yaml_workflow.py: add _TASK_TYPE_ALIAS fallback so K8S resolves to the Kubernetes class; class-name matching is still tried first.
  • Kubernetes.yaml: minCpuCores/minMemorySpace -> snake_case.
  • test_yaml_workflow.py: cover K8S/k8s/Kubernetes in test_get_task and add Kubernetes.yaml to test_get_create_workflow.

closes #176

Brief Summary of The Change

Pull Request checklist

I confirm that the following checklist has been completed.

  • Add/Change test cases for the changes.
  • Add/Change the related documentation, should also change docs/source/config.rst when you change file default_config.yaml.
  • (Optional) Add your change to UPDATING.md when it is an incompatible change.

… fix Kubernetes.yaml example

The YAML workflow loader resolved task types by class name only, so
task_type: K8S (TaskType.KUBERNETES) failed with
PyDSTaskNoFoundException: cant not find task K8S. The shipped
Kubernetes.yaml example also used camelCase fields rejected by the
Kubernetes task constructor, and was the only example excluded from CI.

- yaml_workflow.py: add _TASK_TYPE_ALIAS fallback so K8S resolves to
  the Kubernetes class; class-name matching is still tried first.
- Kubernetes.yaml: minCpuCores/minMemorySpace -> snake_case.
- test_yaml_workflow.py: cover K8S/k8s/Kubernetes in test_get_task and
  add Kubernetes.yaml to test_get_create_workflow.

closes apache#176
@zhongjiajie zhongjiajie added the bug Something isn't working label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][python] YAML workflow loader cannot resolve task_type "K8S" (Kubernetes.yaml example fails to parse)

2 participants