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

How to build chectl outside Che #21367

Closed
ghost opened this issue Apr 30, 2022 · 14 comments
Closed

How to build chectl outside Che #21367

ghost opened this issue Apr 30, 2022 · 14 comments
Assignees
Labels
area/chectl Issues related to chectl, the CLI of Che area/ci CI build and releases, PR testing, & whitelabel/productization issues kind/question Questions that haven't been identified as being feature requests or bugs. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@ghost
Copy link

ghost commented Apr 30, 2022

Summary

Because of the situation with #21366, I'm now stuck in a situation where I don't have a Che cluster deployed and can't redeploy it. I planned to build the old version myself but found that the documentation expects me to develope chectl only from inside Che; is there any documentation on building it outside of itself?

Relevant information

I tried to run yarn as instructed, incase that would just work. Here's the output I got:

yarn install v1.22.18
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ npm run -s postinstall-repositories && npm run -s postinstall-operator && npm run -s postinstall-cleanup
yarn upgrade v1.22.18
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "eslint-config-oclif > [email protected]" has incorrect peer dependency "eslint@^5.3.0".
warning "eslint-config-oclif-typescript > @typescript-eslint/[email protected]" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
warning "eslint-config-oclif-typescript > @typescript-eslint/[email protected]" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
[5/5] Rebuilding all packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
Done in 7.76s.
internal/fs/utils.js:332
    throw err;
    ^

Error: ENOENT: no such file or directory, lstat '/home/yujiri/chectl/node_modules/eclipse-che-operator/config/samples/org_v1_chebackupserverconfiguration.yaml'
    at Object.lstatSync (fs.js:1119:3)
    at Object.lstatSync (/home/yujiri/chectl/node_modules/graceful-fs/polyfills.js:307:34)
    at statFunc (/home/yujiri/chectl/node_modules/fs-extra/lib/util/stat.js:24:20)
    at getStatsSync (/home/yujiri/chectl/node_modules/fs-extra/lib/util/stat.js:25:19)
    at Object.checkPathsSync (/home/yujiri/chectl/node_modules/fs-extra/lib/util/stat.js:67:33)
    at Object.copySync (/home/yujiri/chectl/node_modules/fs-extra/lib/copy-sync/copy-sync.js:24:38)
    at prepareTemplates (/home/yujiri/chectl/prepare-che-operator-templates.js:46:12)
    at Object.<anonymous> (/home/yujiri/chectl/prepare-che-operator-templates.js:55:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) {
  errno: -2,
  syscall: 'lstat',
  code: 'ENOENT',
  path: '/home/yujiri/chectl/node_modules/eclipse-che-operator/config/samples/org_v1_chebackupserverconfiguration.yaml'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command
@ghost ghost added the kind/question Questions that haven't been identified as being feature requests or bugs. label Apr 30, 2022
@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 Apr 30, 2022
@benoitf
Copy link
Contributor

benoitf commented Apr 30, 2022

What's your nodejs version ? Try with nodejs 16.x

@ghost
Copy link
Author

ghost commented May 1, 2022

I was running node 14.19, but after installing 16.15 the same output appears (and I recloned the repository so it can't be cached build files or anything).

@ghost
Copy link
Author

ghost commented May 1, 2022

I am running this on Artix Linux 5.17.4. npm is 8.5.5. Let me know if any other environment inforrmation would hlep.

@tolusha
Copy link
Contributor

tolusha commented May 2, 2022

@yujiri8
What is chectl version you tried to build?
Any changes in package.json ?

@ghost
Copy link
Author

ghost commented May 2, 2022

I checked out the tag v7.41.2. There are no changes in package.json, though yarn.lock did get modified after running yarn.

diff --git a/yarn.lock b/yarn.lock
index 44321fa..407bf99 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2579,7 +2579,7 @@ ecc-jsbn@~0.1.1:

 "eclipse-che-operator@https://github.com/eclipse-che/che-operator#main":
   version "0.0.0"
-  resolved "https://github.com/eclipse-che/che-operator#bb3c53cc6cba197ebab9d2889aa4fc0788c076e8"
+  resolved "https://github.com/eclipse-che/che-operator#73bbeaafeac5abdedbd9e7903fc2a305fb9bbdca"

 editorconfig@^0.15.0:
   version "0.15.3"

@tolusha
Copy link
Contributor

tolusha commented May 2, 2022

@yujiri8
Something strange, but to fix your problem pls set 7.41.2 instead of main here [1]

[1] https://github.com/che-incubator/chectl/blob/7.41.2/package.json#L25

@amisevsk amisevsk added severity/P2 Has a minor but important impact to the usage or development of the system. area/chectl Issues related to chectl, the CLI of Che and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels May 2, 2022
@amisevsk
Copy link
Contributor

amisevsk commented May 2, 2022

@tolusha is this issue present in other chectl release branches? Do we need a follow-up issue to fix it?

@amisevsk amisevsk added the area/doc Issues related to documentation label May 2, 2022
@ghost
Copy link
Author

ghost commented May 3, 2022

Ah, Tolusha's suggestion fixed it for me. Thank you.

@ghost ghost closed this as completed May 3, 2022
@tolusha tolusha reopened this May 3, 2022
@tolusha
Copy link
Contributor

tolusha commented May 3, 2022

Actually this issue helped me realize that our release actions behave incorrectly.
This action [1] is triggered once .x branch is created (even before release PR is merged). So, release sources won't have updated package.json file.

@mkuznyetsov pls have a look.

[1] https://github.com/che-incubator/chectl/blob/0a7174a56b1ce6902613be3243001e25347fa983/.github/workflows/release-build-and-push-to-GH-releases.yml#L18

@tolusha tolusha added kind/release Issue dedicated to a release (content, status, related PR, go/nogo/problem discussion, etc.) area/ci CI build and releases, PR testing, & whitelabel/productization issues and removed area/chectl Issues related to chectl, the CLI of Che area/doc Issues related to documentation kind/release Issue dedicated to a release (content, status, related PR, go/nogo/problem discussion, etc.) labels May 3, 2022
@amisevsk
Copy link
Contributor

amisevsk commented May 3, 2022

Thanks for catching this @yujiri8 👍

@che-bot
Copy link
Contributor

che-bot commented Oct 30, 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 Oct 30, 2022
@che-bot che-bot closed this as completed Nov 6, 2022
@amisevsk amisevsk reopened this Nov 7, 2022
@amisevsk
Copy link
Contributor

amisevsk commented Nov 7, 2022

/remove-lifecycle stale

@che-bot che-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 7, 2022
@tolusha tolusha added the area/chectl Issues related to chectl, the CLI of Che label Nov 9, 2022
@nickboldt
Copy link
Contributor

nickboldt commented Nov 24, 2022

well, this change has broken the release process because the GH action that creates the release PR needs the branch to exist :) will work on a fix...

https://github.com/che-incubator/chectl/actions/runs/3540932049/jobs/5944574155

@tolusha
Copy link
Contributor

tolusha commented Jan 9, 2023

Basically we can close this issue now.
package.json in .x branch contains correct che and devworkspace operators versions.

@tolusha tolusha closed this as completed Jan 9, 2023
@tolusha tolusha added this to the 7.57 milestone Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chectl Issues related to chectl, the CLI of Che area/ci CI build and releases, PR testing, & whitelabel/productization issues kind/question Questions that haven't been identified as being feature requests or bugs. 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

6 participants