Skip to content

refactor(composer): refine Airflow timeline styles and path hierarchy - #871

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-xtxuwnmoxyny
Aug 6, 2026
Merged

refactor(composer): refine Airflow timeline styles and path hierarchy#871
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-xtxuwnmoxyny

Conversation

@kyasbal

@kyasbal kyasbal commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

Refactored the Airflow/Cloud Composer timeline hierarchy and updated timeline styling properties (icons, colors, priorities, and sort policies) to improve visual clarity on the UI. Also removed redundant GCP Project ID parameters from timeline path builders.

Key Changes

1. Timeline Styling and Registration

  • Updated timeline type registrations in pkg/task/inspection/googlecloudclustercomposer/contract/timeline_type.go:
    • Updated Material icons, colors, display priorities, and sort policies (AlphabeticalSortPolicy, ChronologicalSortPolicy) for Airflow timelines (TimelineTypeAirflowDAG, TimelineTypeAirflowDAGRun, TimelineTypeAirflowTaskInstance, etc.).
    • Updated display category names and timeline styles to make the timeline tree easier to read.

2. Timeline Path Hierarchy Simplification

  • Refactored timeline path helpers in pkg/task/inspection/googlecloudclustercomposer/contract/timeline_path.go:
    • Replaced MustComposerEnvironmentTimeline with MustAirflowTimeline, removing the unnecessary GCP Project ID parameter.
    • Standardized component timeline path creation via MustAirflowComponentTimeline.
    • Renamed the DAG Processor Manager timeline root to DAG files (MustAirflowDAGFilesTimeline).

3. Mapper Implementations and Test Updates

  • Updated mappers and their corresponding unit tests to use the simplified TimelinePath helpers, removing unused ClusterIdentityTaskID dependencies:
    • pkg/task/inspection/googlecloudclustercomposer/impl/dag_processor_manager_mapper.go
    • pkg/task/inspection/googlecloudclustercomposer/impl/scheduler.go
    • pkg/task/inspection/googlecloudclustercomposer/impl/worker.go
    • pkg/task/inspection/googlecloudclustercomposer/impl/other.go

Verification

  • Confirmed all package unit tests pass successfully:
    • go test ./pkg/task/inspection/googlecloudclustercomposer/...

@kyasbal kyasbal added the enhancement New feature or request label Aug 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the timeline path and style definitions for Google Cloud Composer / Airflow. It replaces the project-level timeline hierarchy with a root-level Airflow timeline, simplifies component timeline creation, and updates various timeline types and styles. Additionally, it removes the unnecessary dependency on ClusterIdentityTaskID across multiple mappers. The review feedback highlights that several timeline styles use raw style.Color with manual float values, which is inconsistent with the codebase and can lead to incorrect color rendering on the UI. It is recommended to use style.MustForceConvertSRGBHex instead to ensure proper color space conversion.

@kyasbal
kyasbal marked this pull request as ready for review August 6, 2026 03:01
@kyasbal
kyasbal merged commit 9ca2973 into GoogleCloudPlatform:main Aug 6, 2026
16 checks passed
@kyasbal
kyasbal deleted the push-xtxuwnmoxyny branch August 6, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant