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

Updating CONTRIBUTING.md for eclipse/che#21363 #2239

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

SDawley
Copy link
Contributor

@SDawley SDawley commented Sep 1, 2022

What does this PR do?

Removed Generate Devfile and Create Workspace sections and edited the command documentation to reflect how commands are currently run.

Signed-off-by: Samantha Dawley [email protected]

Screenshot/screencast of this PR

What issues does this PR fix or reference?

Addresses: eclipse-che/che#21363

How to test this PR?

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@openshift-ci
Copy link

openshift-ci bot commented Sep 1, 2022

Hi @SDawley. Thanks for your PR.

I'm waiting for a che-incubator member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tolusha
Copy link
Collaborator

tolusha commented Sep 2, 2022

Sounds good. What about putting sandbox url instead of <your-che-host> to have defined url to start a workspace ?

@SDawley
Copy link
Contributor Author

SDawley commented Sep 2, 2022

Sounds good. What about putting sandbox url instead of <your-che-host> to have defined url to start a workspace ?

OK, switched to the OpenShift Sandbox url.

Copy link

@max-cx max-cx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick, cursory review.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@SDawley
Copy link
Contributor Author

SDawley commented Sep 8, 2022

Updated including Max, Florent, and Nick's suggested fixes.

@tolusha
Copy link
Collaborator

tolusha commented Sep 8, 2022

  1. Remove Create Workspace and Generate Devfile task from the Devfile.
  2. I created a workspace on dogfooding instance https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/f?url=https://github.com/che-incubator/chectl with che-code as a default editor. After running che: build task I got:
yarn install v1.22.17
[1/5] Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=16.0.0". Got "14.19.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@nickboldt
Copy link
Collaborator

  1. Remove Create Workspace and Generate Devfile task from the Devfile.
  2. I created a workspace on dogfooding instance https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/f?url=https://github.com/che-incubator/chectl with che-code as a default editor. After running che: build task I got:
yarn install v1.22.17
[1/5] Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=16.0.0". Got "14.19.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Strange. The Che UDI image has 3 different vesions of node (12, 14, and 16) so you should be able to build it there using that image:

https://github.com/devfile/developer-images/blob/main/universal/ubi8/Dockerfile#L62-L71

@SDawley
Copy link
Contributor Author

SDawley commented Sep 13, 2022

I created a workspace and manually updated the image to 'quay.io/devfile/universal-developer-image:ubi8-latest'

The build command now works, as does run but package-binaries is failing so I am investigating.

@tolusha
Copy link
Collaborator

tolusha commented Sep 23, 2022

@SDawley
Pls, convert devfile from apiVersion: 1.0.0 to apiVersion: 2.1.0.

@nickboldt nickboldt self-requested a review September 23, 2022 21:49
Copy link
Collaborator

@nickboldt nickboldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are passing so if @tolusha is happy, then +1 to merge.

@openshift-ci openshift-ci bot added lgtm and removed lgtm labels Sep 23, 2022
@SDawley
Copy link
Contributor Author

SDawley commented Sep 26, 2022

@SDawley Pls, convert devfile from apiVersion: 1.0.0 to apiVersion: 2.1.0.

@tolusha
I've updated the devfile to 2.1.0 and added an extensions.json with redhat.vscode-yaml, I did not find che-incubator.typescript in open-vsx.org.

I'm able to create a factory link from this branch, but package-binaries still fails with:
/bin/sh: shasum: command not found Error: Command failed: /bin/sh -c grep node-v16.14.0-linux-x64.tar.xz /projects/chectl/tmp/cache/16.14.0/SHASUMS256.txt.asc | shasum -a 256 -c - Code: 127 error Command failed with exit code 1.
I'm fairly certain its oclif that's requiring shasum. So we can either find a new packaging method or add a symlink to the container from sha265sum to shasum.

Everything else seems to be working, though the tests take a lot longer to run in the workspace than they do locally

@tolusha
Copy link
Collaborator

tolusha commented Sep 27, 2022

I did not find che-incubator.typescript

Have a look. I think you can add both.
https://open-vsx.org/extension/vscode/typescript-language-features
https://open-vsx.org/extension/vscode/typescript

@tolusha
Copy link
Collaborator

tolusha commented Sep 27, 2022

Remove projects: from the devfile, otherwise it always clone the main branch from the che-incubator/chectl` repository

@tolusha
Copy link
Collaborator

tolusha commented Sep 27, 2022

Use '${PROJECT_SOURCE}' as workingDir

@tolusha
Copy link
Collaborator

tolusha commented Sep 27, 2022

Have a look at https://github.com/che-samples/react-web-app/blob/devfilev2/devfile.yaml
Pls add label and group to the commands.

@tolusha
Copy link
Collaborator

tolusha commented Sep 27, 2022

Use yarn lint:fix as format source command

.vscode/launch.json Outdated Show resolved Hide resolved
devfile.yaml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
"jest": "^26.6.3",
"ts-jest": "^26.5.6",
"jest": "^29.0.3",
"ts-jest": "^29.0.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jest tests were failing in the workspace at version 26 and updating to 29 fixed it. Enough else has changed that I can try reverting that and see if the issue comes back.

Copy link
Collaborator

@tolusha tolusha Sep 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried and did not face any issue with 26.x versions. Please revert and check.

@tolusha
Copy link
Collaborator

tolusha commented Sep 28, 2022

So we can either find a new packaging method or add a symlink to the container from sha265sum to shasum.

We definitely need to add shasum into a dev container
I spotted another problem: yarn test takes forever. To fix this issue, pls add for a dev container:

      cpuLimit: '2'
      cpuRequest: 500m
      memoryLimit: 5G
      memoryRequest: 1G

@SDawley
Copy link
Contributor Author

SDawley commented Sep 28, 2022

So we can either find a new packaging method or add a symlink to the container from sha265sum to shasum.

We definitely need to add shasum into a dev container I spotted another problem: yarn test takes forever. To fix this issue, pls add for a dev container:

      cpuLimit: '2'
      cpuRequest: 500m
      memoryLimit: 5G
      memoryRequest: 1G

I tried adding this to the devfile and restarting the workspace in RHOSDS and got the error:
Detected unrecoverable deployment condition: FailedCreate pods "workspace8fb0fe516e274bf6-6fbd749ff6-89695" is forbidden: exceeded quota: for-sdawley-compute, requested: limits.memory=6042653184, used: limits.memory=6042653184, limited: limits.memory=7Gi

@tolusha
Copy link
Collaborator

tolusha commented Sep 29, 2022

I tried adding this to the devfile and restarting the workspace in RHOSDS and got the error:

There is no much we can do here. If it requires at least 5G memory, then we have to use another cluster.
I personally use https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/dashboard/

Copy link
Collaborator

@l0rd l0rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SDawley that's great work. I have added some comments with suggestions.

.vscode/extensions.json Outdated Show resolved Hide resolved
devfile.yaml Outdated
- name: dev
container:
image: 'quay.io/devfile/universal-developer-image:ubi8-latest'
memoryLimit: 1G
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we didn't support it at the time this devfile was introdcued but it's better to specify the cpuLimit too:

Suggested change
memoryLimit: 1G
memoryLimit: 1G
cpuLimit: 500m

devfile.yaml Outdated Show resolved Hide resolved
devfile.yaml Outdated Show resolved Hide resolved
devfile.yaml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dkwon17 dkwon17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I was able to build, test and run chectl in my workspace. I just have some small suggestions

CONTRIBUTING.md Outdated Show resolved Hide resolved
@openshift-ci
Copy link

openshift-ci bot commented Oct 10, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: l0rd, nickboldt, SDawley

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@SDawley
Copy link
Contributor Author

SDawley commented Oct 12, 2022

I had to rebuild the universal image because it didn't use the new base image, but packaging binaries now works.
@tolusha

@tolusha
Copy link
Collaborator

tolusha commented Oct 12, 2022

I have another error now related to yarn pack-binaries command

oclif-dev: building target chectl-win32-x64.tar.gz
/bin/sh: 7z: command not found
 ›   Error: install 7-zip to package windows tarball
error Command failed with exit code 2.

@openshift-ci
Copy link

openshift-ci bot commented Oct 20, 2022

New changes are detected. LGTM label has been removed.

@SDawley
Copy link
Contributor Author

SDawley commented Oct 20, 2022

@tolusha
I've moved the commands from the devfile to the .vscode/tasks.json since that makes finding and executing them easier.
Package binaries is working now that 7zip is in ubi8.

@tolusha
Copy link
Collaborator

tolusha commented Oct 21, 2022

Sounds good!

@tolusha
Copy link
Collaborator

tolusha commented Oct 21, 2022

Pls, fix DCO issue.

Signed-off-by: Samantha Dawley <[email protected]>
@tolusha tolusha merged commit 30e845d into che-incubator:main Oct 24, 2022
@che-bot che-bot added this to the 7.56 milestone Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants