question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It should be easier to configure remotes in Devfile v2 flow

See original GitHub issue

Is your enhancement related to a problem? Please describe

By default, I set up repos I work in with remotes

  upstream: <the main repo -- e.g. github.com/eclipse/che>
  origin: <my fork of the repo -- e.g. github.com/amisevsk/che>

However, with the devfile v2 flow, only one repo can be specified and the devfile from that repo is used for the workspace. This can lead to issues if a fork is out of date, and requires adding remotes manually after the fact.

Describe the solution you’d like

Ideally it would be possible to specify a full list of remotes that the workspace should use. If not that, specifying (or automatically detecting) a fork + upstream set of remotes would be very useful

When cloning a new repo for the first time, I would like it to be configured so that

  1. The upstream remote is cloned, in order to pull the latest changes from main into the workspace and track upstream/main in the local main branch
  2. The origin remote is configured, allowing me to push branches to origin in order to open a PR

Describe alternatives you’ve considered

No response

Additional context

On a DevWorkspace level, the configuration looks like

projects:
  - name: che-docs
    git:
      remotes:
        upstream: 'https://github.com/eclipse-che/che-docs.git'
        origin: https://github.com/amisevsk/che-docs.git
      checkoutFrom:
        remote: upstream
        revision: master

(revision can be omitted if the default branch is to be used)

Related issue: Sometimes Che-Theia overwrites the DevWorkspace CR when adding remotes via UI: https://github.com/eclipse/che/issues/21244

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
amisevskcommented, Oct 26, 2022

Right, devfiles/devworkspaces support everything that would be needed to support this currently, and it’s possible to manually create a devfile that works as expected.

I’m not sure an ideal solution, and maybe a browser extension is the best option. Overall the outcome I would want is that when I start a workspace e.g. https://github.com/eclipse-che/che-operator, the remotes automatically get configured also include my fork (https://github.com/amisevsk/che-operator). Fully automating that may not work though, as there’s potentially different remote naming conventions (I use origin and upstream, for example). Ideally it wouldn’t require a browser extensions but I don’t know that I see an easy way to do it unless the GitHub/GitLab/Bitbucket apis provide easy ways of getting the current user’s fork.

0reactions
l0rdcommented, Oct 25, 2022

In this case, with the help of a browser extension, we could make it automatic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Devfile v2 and IDE plug-ins in Eclipse Che - Medium
DevWorkspaces are custom kubernetes resources and can be created/listed/deleted using k8s tools like kubectl. A devWorkspace will correspond to ...
Read more >
Chapter 3. Customizing the devfile and plug-in registries
To add a VS Code extension using the workspace configuration: Click the Workspaces tab on the Dashboard and select the workspace in which...
Read more >
Devfile v2 and the DevWorkspace Operator - Part 1
The DevWorkspace engine needs to be explicitly enabled. The following chectl command deploys Che on OpenShift configured with the ...
Read more >
Connect and work with JetBrains Gateway | IntelliJ IDEA ...
We recommend using machines with 2+ cores, 4GB+ of RAM, and 5GB+ of ... To connect to another remote project, you need to...
Read more >
sdd.shtml - Apple Open Source
The URI is of the form: <UL><PRE>serial:/dev/file?option[+option+. ... provide a simple command-line interface to CUPS to submit and control print jobs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found