Skip to content

Conversation

@machichima
Copy link
Member

@machichima machichima commented Dec 29, 2025

Tracking issue

Why are the changes needed?

Based on the k8s api convention (here), it mentioned:

The pattern of using phase is deprecated. Newer API types should use conditions instead

It's better for us to remove Phase and Message and just use Conditions in our executor to follow the best practice.

What changes were proposed in this pull request?

Controller changes:

  • Use Conditions for the reconcile logic, following best practice mentioned in api-conventions
    • Use common top-level condition which summarizes more detailed conditions (Succeed, Failed, Progressing). Use Reason for status detail
  • Follow how k8s job controller did, check the terminate condition first, then going through others (link)
  • Add fields in Spec, and update sample YAML
  • Add more kubebuilder:printcolumn for observability

Development Changes:

  • Update go.mod, Dockerfile, and Makefile to build executor successfully
  • Add DEVELOPMENT.md to guide through setting up local development environment and apply examples
  • Update README to provide more descriptions

How was this patch tested?

  • Manual test, following DEVELOPMENT.md for setup and apply example with kubectl apply -k config/samples/. Ensure the conditions change correctly
❯ k describe taskactions taskaction-sample
Name:         taskaction-sample
Namespace:    default
Labels:       app.kubernetes.io/managed-by=kustomize
              app.kubernetes.io/name=executor
Annotations:  <none>
API Version:  flyte.org/v1
Kind:         TaskAction
Metadata:
  Creation Timestamp:  2025-12-30T02:22:35Z
  Generation:          1
  Resource Version:    991
  UID:                 12fa6800-91de-4b11-9501-66b4ebd43df6
Spec:
  Action Name:      sample-task
  Domain:           dev
  Input Uri:        /tmp/input
  Org:              demo
  Project:          default
  Run Name:         sample-run
  Run Output Base:  /tmp/output
Status:
  Conditions:
    Last Transition Time:  2025-12-30T02:26:47Z
    Message:               TaskAction has completed
    Reason:                Completed
    Status:                False
    Type:                  Progressing
    Last Transition Time:  2025-12-30T02:26:47Z
    Message:               TaskAction completed successfully
    Reason:                Completed
    Status:                True
    Type:                  Succeeded
  State Json:              {"actionId":"sample-run/sample-task","phase":"Succeeded","timestamp":"2025-12-30T02:26:47Z"}
Events:                    <none>

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

.PHONY: docker-build
docker-build: ## Build docker image with the manager.
$(CONTAINER_TOOL) build -t ${IMG} .
$(CONTAINER_TOOL) build -t ${IMG} -f Dockerfile ..
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set working dir to root so that we can copy all required things in Dockerfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant