Skip to content

Fix path retrieval in pipeline/apply.py to read from Project CRD #941

@badcount

Description

@badcount

Describe the issue
apply.py uses heuristic/hardcoded path logic to find the pipeline source path instead of reading it from the Project CRD. There is commented-out code showing an incomplete attempt to use commit.branch and commit.git_ref. This means the path used during apply may not match the actual project source location, causing silent failures or applying the wrong pipeline config.

Steps to resolve

  1. Fetch the Project CRD for the given namespace/name via the API
  2. Read the pipeline source path from the project spec
  3. Remove the hardcoded/heuristic path logic
  4. Validate the retrieved path exists and is readable before proceeding
  5. Add a test that verifies path retrieval uses the Project CRD and not a hardcoded fallback

Additional context
See apply.py:25 and apply.py:42. The commented-out block at line 27–39 shows the intended direction but was never completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions