Skip to content

[UD] explicit ?revision= is silently dropped when no Devfile project matches the factory URL #24031

Open

Description

@olexii4

Describe the bug

An explicit ?revision= that cannot be applied is dropped with nothing but a console.warn, and the workspace quietly starts on the default branch.

Since eclipse-che/che-dashboard#1695, configureProjectRemotes() tells an explicit request from an inferred one only by the remotes= parameter:

factory parameter no project matches the factory URL
remotes= Error, workspace creation fails loudly
revision= console.warn, workspace starts on the default branch

Someone who typed ?revision=feature-x asked for something specific and hears nothing when it is ignored. Before eclipse-che/che-dashboard#1695 this was a hard error, so it is a small regression in feedback.

The trade-off was deliberate and the warn path is the right call for the other half of the traffic: the same code carries revisions merely inferred from a /tree/<branch> link, where failing the whole workspace creation would be too harsh. The problem is that getGitProjectForConfiguringRemotes() cannot separate the two today. getRevision() in buildFactoryParams.ts returns the same string for the query parameter and for the branch parsed out of the URL path, so by the time the helper picks between throw and console.warn, the provenance is gone. Only hasExplicitRemotes survives.

Proposal

  1. Carry the provenance of the revision through FactoryParams, for example revisionSource: 'param' | 'url'.
  2. Treat revision= like remotes=: explicit intent that cannot be met is an error.
  3. Keep the inferred case non-fatal, but surface the skip as a progress-step warning in the UI instead of a console.warn nobody reads.

Point 1 changes the factory params contract rather than a single helper, which is why it was left out of eclipse-che/che-dashboard#1695.

Che version

next (development version)

Steps to reproduce

  1. Take a repository whose devfile declares several Git projects, none of whose remotes match the repository you are opening.
  2. Open a factory URL for it with an explicit revision, for example https://<che-host>/#https://github.com/<org>/<repo>?revision=feature-x.
  3. Watch the workspace start.

Actual: the workspace starts on the default branch. The only trace is No Devfile project matches '<url>'. Skipping the Git remotes configuration. in the browser console.

Expected: the explicitly requested revision either gets applied, or the user is told it could not be, the same way remotes= already fails loudly.

Expected behavior

An explicit ?revision= that cannot be honoured reports an error, matching the existing remotes= behaviour. A revision inferred from a /tree/<branch> link keeps starting the workspace, but surfaces the skip as a progress-step warning rather than a console message.

Runtime

OpenShift

Links

Raised by @svor during review of eclipse-che/che-dashboard#1695, follow-up agreed with @akurinnoy in eclipse-che/che-dashboard#1695 (comment).

Activity

  1. added
    kind/bug
    severity/P3
    on Nov 23, 2026
  2. olexii4 commented on Nov 23, 2026

    @olexii4
    ContributorAuthor

    @akurinnoy could you have a look and say whether the scope above matches what you had in mind.

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/P3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions