Skip to content

Factory URL subpath overrides devfile projects[].git.checkoutFrom.revision #23974

Closed

Description

@agiertli

Describe the bug

When creating a workspace via a factory URL that includes a subpath (e.g. https://github.com/org/repo/tree/main/subdir), the project-clone init container ignores the devfile's checkoutFrom.revision and instead attempts to check out main/subdir as the revision. Since that's not a valid branch, it falls back to the default branch.

Che version

7.122@latest

Steps to reproduce

Reproducer repository: https://github.com/agiertli/sparse-attribute

  • main branch contains PYTHON/2CPU/devfile.yaml and PYTHON/4CPU/devfile.yaml
  • Each devfile specifies projects[].git.checkoutFrom.revision: cloned
  • cloned branch is empty (single empty commit)

Steps to reproduce:

  1. Apply the getting-started-samples ConfigMap from the repo: kubectl apply -f getting-started-samples.yaml
  2. Open the Eclipse Che dashboard and click the "Python (2 CPU)" sample tile
  3. Check the project-clone init container logs

Actual: project-clone logs show Could not find revision main/PYTHON/2CPU in repository, using default branch — the URL subpath is injected as the revision, overriding the devfile's checkoutFrom.revision: cloned

Expected behavior

Expected: Workspace checks devfile's checkoutFrom.revision (i.e. 'cloned')

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

macOS

Eclipse Che Logs

project-clone container log:
Processing project python-2cpu
Cloning project python-2cpu to /projects/project-clone-990217814/python-2cpu
Cloned project python-2cpu to /projects/project-clone-990217814/python-2cpu
Setting up remotes for project python-2cpu
Fetched remote origin at https://github.com/agiertli/sparse-attribute.git
Could not find revision main/PYTHON/2CPU in repository, using default branch

Additional context

No response

Activity

  1. added
    kind/bug
    on Sep 29, 2026
  2. added
    status/need-triage
    on Sep 29, 2026
  3. added
    severity/P1
    and removed
    status/need-triage
    on Sep 29, 2026
  4. vinokurig commented on Oct 29, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dashboardkind/bugseverity/P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions