Skip to content

Create pipeline element status tables #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 9, 2025
Merged

Conversation

nguyent8
Copy link
Collaborator

@nguyent8 nguyent8 commented May 7, 2025

Problem & Solution Overview

Currently users can only see statuses of pipelines through the "k8s".pipelines metadata table but there are cases, such as debugging, where they would like to see more details of the elements deployed for the pipelines. As of now, they need do multiple Kubernetes queries directly to get those information.

This PR is to provide a more convenient way to get status of pipelines and their direct elements by:

  • adding new fields (ready, failed) to the existing new fields "k8s".pipelines
  • adding new tables:
    • "k8s".pipeline_elements table: provides statuses of the elements specified in the spec field of the pipeline K8s objects
    • "k8s".pipeline_element_map : provides n:n mapping between pipeline elements and their pipelines

In the future, the above tables can be expanded to provide statuses of indirect elements, i.e. the ones deployed based on spec fields of other elements.

Testing Done

  • Integration test: com.linkedin.hoptimator.k8s.TestSqlScripts.k8sMetadataTables

  • Manual verification with the hoptimator cli:

    • deploy dev environment

    • create a couple of pipelines

    • verify statuses of pipelines and their elements by querying "k8s".pipelines and the new tables "k8s".pipeline_elements and "k8s".pipeline_element_map, e.g.:

select pl.name as pipeline_name, pl.ready as pipeline_ready, pl.status as pipeline_status, pe.element_name, pe.ready as element_ready, pe.failed as element_failed, pe.status as element_status from "k8s".pipelines pl inner join (select t2.element_name, t1.ready, t1.failed, t1.status, t2.pipeline_name from "k8s".pipeline_elements t1 inner join "k8s".pipeline_element_map t2 on t1.name = t2.element_name) pe on pl.name = pe.pipeline_name;

These new tables supplement additional information about pipeline elements based on their K8s statuses.
@nguyent8 nguyent8 requested review from ryannedolan and jogrogan May 7, 2025 17:11
@nguyent8 nguyent8 force-pushed the trung/pipeline-status-table branch from dcb20e0 to a23d530 Compare May 7, 2025 23:02
@nguyent8 nguyent8 requested a review from jogrogan May 8, 2025 21:19
Copy link
Collaborator

@ryannedolan ryannedolan left a comment

Choose a reason for hiding this comment

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

🔥 🔥 🔥


!ok

select pl.name as pipeline_name, pl.status as pipeline_status, pe.element_name, pe.failed as element_failed from "k8s".pipelines pl inner join (select t2.element_name, t1.failed, t2.pipeline_name from "k8s".pipeline_elements t1 inner join "k8s".pipeline_element_map t2 on t1.name = t2.element_name) pe on pl.name = pe.pipeline_name;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is amazing!

@nguyent8 nguyent8 force-pushed the trung/pipeline-status-table branch from d504bcf to 4bf6896 Compare May 9, 2025 18:45
@nguyent8 nguyent8 merged commit 5e2e244 into main May 9, 2025
1 check passed
@nguyent8 nguyent8 deleted the trung/pipeline-status-table branch May 9, 2025 22:14
ryannedolan pushed a commit that referenced this pull request May 13, 2025
* Create pipeline element status tables

These new tables supplement additional information about pipeline elements based on their K8s statuses.
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.

3 participants