Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A single dogfooding devfile for che-theia #18763

Closed
sunix opened this issue Jan 8, 2021 · 3 comments
Closed

A single dogfooding devfile for che-theia #18763

sunix opened this issue Jan 8, 2021 · 3 comments
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@sunix
Copy link
Contributor

sunix commented Jan 8, 2021

Is your task related to a problem? Please describe.

We have too many devfiles there and there. We want a unique devfile to work on a che-theia plugin or a che-theia extension.

Describe the solution you'd like

  • a single devfile at the root folder of the che-theia repo with a contribute badge to devsandbox
  • a didact guide to explain how it works and how to contribute
  • the github pr plugin to commit/push and create an PR
  • we would remove all the devfiles located in the devfiles directory when this is done.

Maybe this tasks could be splitted in several steps:

  1. build/test watch
  • started the devfile, you can open and modify any .ts file
  • you could run yarn test watch current project command: that would run the test in watch mode of the yarn project you are currently working on
  • you could run yarn build current project command: that would build the yarn project you are currently working on
  1. run a plugin
  • started the devfile, you can open and modify a ts file of a plugin
  • you could run test watch command: that would run the test in watch mode of the plugin you are currently working on
  • you could run build current yarn project command: that would build the plugin you are currently working on
  • you could run run the plugin in che-theia next command that would run the plugin in a dedicated che-theia:next container.
  1. work with extensions (TODO)
@sunix sunix added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Jan 8, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jan 8, 2021
@amisevsk amisevsk added area/dev-experience severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jan 8, 2021
@tsmaeder
Copy link
Contributor

I have 4 commands in my che-theia devfile:

  1. Run back end
  2. Debug back end
  3. Run plugin container
  4. Debug plugin container

Plus two debug configs for the back-end and the plugin container

As for the build setup, I usually do that by hand. cd <plugin directory> && yarn'. Afterwards I do a rm -rf che/che-theia/node_modules. Otherwise the yarnin the theia directory usually fails. (https://github.com/eclipse/che-theia/pull/955 should fix that problem, IMO). When rebuilding a theia extension, I usually do ayarn` in the base directory in order to catch breakage from my changes.

my devfile
apiVersion: 1.0.0
metadata:
  name: che-theia-all
components:
  - id: redhat/vscode-yaml/latest
    type: chePlugin
  - id: eclipse/che-theia/next
    memoryLimit: 2Gi
    type: cheEditor
    alias: theia-editor
    env:
      - value: '0'
        name: NODE_TLS_REJECT_UNAUTHORIZED
  - id: vscode/typescript-language-features/latest
    memoryLimit: 1Gi
    type: chePlugin
  - id: ms-vscode/node-debug2/latest
    type: chePlugin
  - mountSources: true
    endpoints:
      - attributes:
          protocol: http
          public: 'true'
        name: theia-dev-flow
        port: 3010
    memoryLimit: 2Gi
    type: dockerimage
    alias: che-dev
    image: 'quay.io/eclipse/che-theia-dev:next'
    env:
      - value: '--max_old_space_size=1800'
        name: NODE_OPTIONS
      - value: 2504;
        name: THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT
  - mountSources: true
    memoryLimit: 1Gi
    type: dockerimage
    alias: plugin-host
    image: 'quay.io/eclipse/che-theia-dev:next'
    env:
      - value: 2504;
        name: THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT
      - value: 'local-dir:///projects/plugins1/'
        name: THEIA_PLUGINS
      - value: /projects/java-11-openjdk
        name: JAVA_HOME
commands:
  - name: Run plugin host
    actions:
      - workdir: /projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin-remote/lib/node
        type: exec
        command: node plugin-remote.js
        component: plugin-host
  - name: Debug plugin host
    actions:
      - workdir: /projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin-remote/lib/node
        type: exec
        command: node --inspect-brk=8888 plugin-remote.js
        component: plugin-host
  - name: Run back end
    actions:
      - workdir: /projects/theia/examples/assembly
        type: exec
        command: 'yarn run start --hostname=0.0.0.0 --port=3010 --plugins=local-dir:/projects/theia/plugins'
        component: che-dev
  - name: Debug back end
    actions:
      - workdir: /projects/theia/examples/assembly
        type: exec
        command: 'yarn run start --inspect-brk=9999 --hostname=0.0.0.0 --port=3010 --plugins=local-dir:/projects/theia/plugins'
        component: che-dev
  - name: Debug Configs
    actions:
      - referenceContent: |
          {
            "name": "Attach to Plugin Host",
            "type": "node",
            "request": "attach",
            "port": 8888,
            "outFiles": [
                "/projects/theia/**/*.js"
            ]
          }, {
            "name": "Attach to Back End",
            "type": "node",
            "request": "attach",
            "port": 9999,
            "outFiles": [
                "/projects/theia/**/*.js"
            ]
          }
        type: vscode-launch

@sunix sunix changed the title A unique dogfooding devfile for che-theia A single dogfooding devfile for che-theia Jan 12, 2021
@sunix
Copy link
Contributor Author

sunix commented Jan 12, 2021

@tsmaeder you don't clone the projects ? what about che-theia init ?

@svor svor mentioned this issue Aug 12, 2021
30 tasks
@svor svor removed the sprint/next label Aug 18, 2021
@nickboldt nickboldt modified the milestones: 7.35, 7.36 Aug 24, 2021
@svor svor mentioned this issue Sep 7, 2021
26 tasks
@svor svor modified the milestones: 7.36, 7.37 Sep 8, 2021
@svor svor removed this from the 7.37 milestone Sep 30, 2021
@sunix sunix removed their assignment Oct 8, 2021
@che-bot
Copy link
Contributor

che-bot commented Apr 6, 2022

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 6, 2022
@che-bot che-bot closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

7 participants