Repository navigation
Description
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
- Carry the provenance of the revision through
FactoryParams, for examplerevisionSource: 'param' | 'url'. - Treat
revision=likeremotes=: explicit intent that cannot be met is an error. - Keep the inferred case non-fatal, but surface the skip as a progress-step warning in the UI instead of a
console.warnnobody 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
- Take a repository whose devfile declares several Git projects, none of whose remotes match the repository you are opening.
- Open a factory URL for it with an explicit revision, for example
https://<che-host>/#https://github.com/<org>/<repo>?revision=feature-x. - 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
olexii4 commentedon Nov 23, 2026
@akurinnoy could you have a look and say whether the scope above matches what you had in mind.