Skip to content

🔧 CEL filters in datascience workbench pipelines watch wrong source directories #1383

@coderabbitai

Description

@coderabbitai

Problem Description

The CEL filter expressions in datascience workbench Tekton pipelines are incorrectly watching jupyter/minimal/ directories instead of jupyter/datascience/ directories. This causes the pipelines to fail to trigger when changes are made exclusively to datascience-specific files.

Root Cause

The pipelinesascode.tekton.dev/on-cel-expression annotations contain incorrect path references:

  • Current (incorrect): jupyter/minimal/ubi9-python-3.1X/**
  • Should be: jupyter/datascience/ubi9-python-3.1X/**

Affected Files

Python 3.11

  • .tekton/odh-workbench-jupyter-datascience-cpu-py311-ubi9-push.yaml
    • Lines 15-16: watching jupyter/minimal/ubi9-python-3.11/** and jupyter/minimal/ubi9-python-3.11/start-notebook.sh
    • Dockerfile target: jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu

Python 3.12

  • .tekton/odh-workbench-jupyter-datascience-cpu-py312-ubi9-push.yaml
    • Lines 15-16: watching jupyter/minimal/ubi9-python-3.12/** and jupyter/minimal/ubi9-python-3.12/start-notebook.sh
    • Dockerfile target: jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu

Impact Analysis

Pipeline Execution Failure

  • Commits that modify only datascience-specific files will NOT trigger the datascience pipelines
  • This breaks the CI/CD process for datascience workbench images
  • Developers may push changes thinking they will be tested, but pipelines won't execute

Examples of Missed Triggers

Changes to these files would not trigger datascience pipelines:

  • jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu
  • jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu
  • Any files in jupyter/datascience/ubi9-python-3.11/ directory
  • Any files in jupyter/datascience/ubi9-python-3.12/ directory

Solution

Update the CEL filter expressions to watch the correct datascience directories:

For Python 3.11 (.tekton/odh-workbench-jupyter-datascience-cpu-py311-ubi9-push.yaml)

# Current (incorrect)
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
  == "main"
  && !("manifests/base/params-latest.env".pathChanged())
  && ( ".tekton/odh-workbench-jupyter-datascience-cpu-py311-ubi9-push.yaml".pathChanged() ||
       "jupyter/utils/**".pathChanged() || 
       "jupyter/minimal/ubi9-python-3.11/**".pathChanged() || 
       "jupyter/minimal/ubi9-python-3.11/start-notebook.sh".pathChanged() )

# Corrected
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
  == "main"
  && !("manifests/base/params-latest.env".pathChanged())
  && ( ".tekton/odh-workbench-jupyter-datascience-cpu-py311-ubi9-push.yaml".pathChanged() ||
       "jupyter/utils/**".pathChanged() || 
       "jupyter/datascience/ubi9-python-3.11/**".pathChanged() || 
       "jupyter/datascience/ubi9-python-3.11/start-notebook.sh".pathChanged() )

For Python 3.12 (.tekton/odh-workbench-jupyter-datascience-cpu-py312-ubi9-push.yaml)

# Current (incorrect)
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
  == "main"
  && !("manifests/base/params-latest.env".pathChanged())
  && ( ".tekton/odh-workbench-jupyter-datascience-cpu-py312-ubi9-push.yaml".pathChanged() ||
       "jupyter/utils/**".pathChanged() ||
       "jupyter/minimal/ubi9-python-3.12/**".pathChanged() ||
       "jupyter/minimal/ubi9-python-3.12/start-notebook.sh".pathChanged() )

# Corrected
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
  == "main"
  && !("manifests/base/params-latest.env".pathChanged())
  && ( ".tekton/odh-workbench-jupyter-datascience-cpu-py312-ubi9-push.yaml".pathChanged() ||
       "jupyter/utils/**".pathChanged() ||
       "jupyter/datascience/ubi9-python-3.12/**".pathChanged() ||
       "jupyter/datascience/ubi9-python-3.12/start-notebook.sh".pathChanged() )

Acceptance Criteria

✅ Path References Updated

  • Update .tekton/odh-workbench-jupyter-datascience-cpu-py311-ubi9-push.yaml CEL filter paths
  • Update .tekton/odh-workbench-jupyter-datascience-cpu-py312-ubi9-push.yaml CEL filter paths
  • Verify all jupyter/minimal/ references are changed to jupyter/datascience/ in both files

✅ Pipeline Triggering Verification

  • Test that datascience-specific file changes trigger the correct pipelines
  • Verify that changes to jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu trigger py311 pipeline
  • Verify that changes to jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu trigger py312 pipeline
  • Confirm that changes to jupyter/utils/ still trigger both pipelines (shared dependency)

✅ Validation Tests

  • Create test commits that modify only datascience-specific files
  • Verify pipelines execute successfully with the corrected CEL filters
  • Ensure no regression in existing trigger behavior

Implementation Notes

Pattern Analysis

Other workbench types (tensorflow, pytorch, etc.) correctly reference datascience paths for their shared dependencies while maintaining their own specific paths. This issue is isolated to the datascience workbench pipelines themselves.

Repository Structure Alignment

The corrected paths align with the actual repository structure:

  • jupyter/datascience/ubi9-python-3.11/ contains Python 3.11 datascience workbench files
  • jupyter/datascience/ubi9-python-3.12/ contains Python 3.12 datascience workbench files
  • jupyter/minimal/ubi9-python-3.1X/ contains minimal workbench files (different image type)

Context


Related PR: #1379
Comment context: #1379 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions