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

Upgrade devfile on existing workspace no more working on 7.67.0 #22242

Closed
disaster37 opened this issue May 30, 2023 · 19 comments · Fixed by che-incubator/che-code#236
Closed
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@disaster37
Copy link

Describe the bug

Since we can't update devfile from eclipse che UI, we doesn't found the way to do that.
I read wome issue about the new way to do that. It seems to update the local devfile.yaml after starting workspace and then run task Eclipse Che: Restart workspace from local devfile. But the task failed with message:

Can not restart the workspace from the local devfile: Error: Request failed with status code 500

I doesn't found any log about this error on eclipse che server container...

Che version

7.67@latest

Steps to reproduce

Instal the eclipse che server on k8s.
Start new workspace from git repository with devfile.yaml on root on repo.
After workspace is started, run the task Eclipse Che: Restart workspace from local devfile.

Expected behavior

It restart the workspace with from new devfile.yaml

Runtime

Kubernetes (vanilla)

Screenshots

No response

Installation method

chectl/latest

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@disaster37 disaster37 added the kind/bug Outline of a bug - must adhere to the bug report template. label May 30, 2023
@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 May 30, 2023
@ibuziuk
Copy link
Member

ibuziuk commented May 30, 2023

@azatsarynnyy @RomanNikitenko folks, could you please take a look?

@RomanNikitenko
Copy link
Member

I tested it on 2 different instances and I was not able to reproduce the problem, so maybe there is something specific to an environment or a devfile...

@RomanNikitenko RomanNikitenko added the area/editor/vscode Issues related to the Code OSS editor of Che label May 30, 2023
@disaster37
Copy link
Author

Hum, ...

  1. we use kubernetes (rancher), not OCP
  2. You can try with this devfile : https://github.com/disaster37/developer-images.git
  3. We set proxy setting when deploy che, so workspace are HTTP_PROXY, HTPPS_PROXY and NO_PROXY set
apiVersion: org.eclipse.che/v2
kind: CheCluster
spec:
  components:
    cheServer:
      proxy:
        url: http://squid.squid.svc.cluster.local
        port: '8080'
        nonProxyHosts: 
          - 'localhost'
          - '10.0.0.0/8'
          - '.hm.dm.ad'
          - '.rancher-hpd.hm.dm.ad'
          - '.svc.cluster.local'

@disaster37
Copy link
Author

On console, I look this:
pWMo4cFDgs

@dkwon17 dkwon17 added severity/P1 Has a major impact to 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 May 30, 2023
@RomanNikitenko
Copy link
Member

@disaster37
thank you for the info
I have a guess about the cause of the problem, will investigate it more deeply.

@RomanNikitenko
Copy link
Member

RomanNikitenko commented May 31, 2023

I prepared a draft PR to check my guess: che-incubator/che-code#236

@disaster37
could you help me with testing?
fix-restart-from-devfile branch of this test-repo contains a reference to the image that was built for my draft pull request.

thanks in advance!

@disaster37
Copy link
Author

Hi,
How I can help you ? What I need to do to test you image ?

@RomanNikitenko
Copy link
Member

@disaster37
Copy link
Author

Same issue

workbench.web.main.js:94 [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: Error: Request failed with status code 500
y @ workbench.web.main.js:94
$logExtensionHostMessage @ workbench.web.main.js:1555
N @ workbench.web.main.js:1555
M @ workbench.web.main.js:1555
H @ workbench.web.main.js:1555
G @ workbench.web.main.js:1555
(anonymous) @ workbench.web.main.js:1555
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
fire @ workbench.web.main.js:561
E @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
acceptChunk @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:652
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
i.onload @ workbench.web.main.js:652
workbench.web.main.js:756 Can not restart the workspace from the local devfile: Error: Request failed with status code 500

@RomanNikitenko
Copy link
Member

OK, thank you for testing it, it looks like there is another cause of the problem...

@disaster37
Copy link
Author

Maybee you can add some trace on testing image to get the answere retuned by server (full payload more than only the return code) ?

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Jun 1, 2023

Maybee you can add some trace on testing image to get the answere retuned by server (full payload more than only the return code) ?

On the Che-Code side we use a library to generate a new Devfile context.
It's not easy process to add logs for that part if the cause of the problem on the lib side...

Anyway I've added additional logs on the Che-Code side: che-incubator/che-code@0d930e1
So, please try it again when you have a chance...

@disaster37
Copy link
Author

disaster37 commented Jun 1, 2023

I have recreated workspace with link: https://github.com/RomanNikitenko/web-nodejs-sample/tree/fix-restart-from-devfile
We get the same issue...

The new logs
[Extension Host] === Restart From Local Devfile === Starting to update Devfile process...
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === DevfileService was created successfully!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === DevWorkspaceGenerator was created successfully!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === devfile path: /projects/web-nodejs-sample/devfile.yaml
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === request for the current devfile was successful!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === using devfile /projects/web-nodejs-sample/devfile.yaml to generate a new Devfile context...
workbench.web.main.js:94 [Extension Host] No plug-in registry url. Setting to https://eclipse-che.github.io/che-plugin-registry/main/v3
workbench.web.main.js:621   ERR [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: Error: Request failed with status code 500
workbench.web.main.js:94 [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: Error: Request failed with status code 500
y @ workbench.web.main.js:94
$logExtensionHostMessage @ workbench.web.main.js:1555
N @ workbench.web.main.js:1555
M @ workbench.web.main.js:1555
H @ workbench.web.main.js:1555
G @ workbench.web.main.js:1555
(anonymous) @ workbench.web.main.js:1555
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
fire @ workbench.web.main.js:561
E @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
acceptChunk @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:652
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
i.onload @ workbench.web.main.js:652
workbench.web.main.js:756 Can not restart the workspace from the local devfile: Error: Request failed with status code 500
c @ workbench.web.main.js:756
(anonymous) @ workbench.web.main.js:756
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
addNotification @ workbench.web.main.js:756
notify @ workbench.web.main.js:1664
(anonymous) @ workbench.web.main.js:1548
d @ workbench.web.main.js:1548
$showMessage @ workbench.web.main.js:1548
N @ workbench.web.main.js:1555
M @ workbench.web.main.js:1555
H @ workbench.web.main.js:1555
G @ workbench.web.main.js:1555
(anonymous) @ workbench.web.main.js:1555
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
fire @ workbench.web.main.js:561
E @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
acceptChunk @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:652
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
i.onload @ workbench.web.main.js:652

@RomanNikitenko
Copy link
Member

thank you, I've updated the image, so, please try it again when you have a chance...

@disaster37
Copy link
Author

console log:

[Extension Host] === Restart From Local Devfile === Starting to update Devfile process...
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === DevfileService was created successfully!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === DevWorkspaceGenerator was created successfully!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === devfile path: /projects/web-nodejs-sample/devfile.yaml
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === request for the current devfile was successful!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === using devfile /projects/web-nodejs-sample/devfile.yaml to generate a new Devfile context...
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === using plugin registry URL https://che.rancher-hpd.hm.dm.ad/plugin-registry/v3 to generate a new Devfile context...
workbench.web.main.js:621   ERR [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: Error: unable to verify the first certificate
workbench.web.main.js:94 [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: Error: unable to verify the first certificate
y @ workbench.web.main.js:94
$logExtensionHostMessage @ workbench.web.main.js:1555
N @ workbench.web.main.js:1555
M @ workbench.web.main.js:1555
H @ workbench.web.main.js:1555
G @ workbench.web.main.js:1555
(anonymous) @ workbench.web.main.js:1555
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
fire @ workbench.web.main.js:561
E @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
acceptChunk @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:561
(anonymous) @ workbench.web.main.js:652
invoke @ workbench.web.main.js:90
deliver @ workbench.web.main.js:90
fire @ workbench.web.main.js:90
i.onload @ workbench.web.main.js:652
workbench.web.main.js:756 Can not restart the workspace from the local devfile: Error: unable to verify the first certificate

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Jun 1, 2023

thank you!
so the error now is: Error: unable to verify the first certificate.

When a workspace is started, before Restart Workspace From Local Devfile action is applied there are logs related to getCertificateAuthority should be available, something like:

image

It shows if a certificate is found.

@disaster37
Copy link
Author

I my case, I get

[Extension Host] === Restart From Local Devfile === getCertificateAuthority for the path /public-certs
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === getCertificateAuthority === CHE_SELF_SIGNED_MOUNT_PATH undefined
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === getCertificateAuthority === the path /public-certs exists!
workbench.web.main.js:94 [Extension Host] === Restart From Local Devfile === getCertificateAuthority === found 2

@RomanNikitenko
Copy link
Member

I asked different people who faces the problem to test the current potential fix.
I have got a positive feedback - the solution works for them.
But some of them still have the problem, like in the comment above.

@disaster37
As far as I understand the cause of the problem ^ is:

  • DevWorkspaceGenerator lib does request to the plugin registry to get editor's devfile.yaml
  • according to the logs there are two certificates, at least the first one is not suitable
  • the request fails => DevWorkspaceGenerator can not generate a new Devfile context

Yesterday I applied another approach within che-incubator/che-code#236. It should allow to avoid requests to the plugin registry for the new Devfile context generation.

@disaster37 could you please test my changes again - I committed it to the same PR - so you can use the same image with editor, the same test-repo.
thanks in advance!

@disaster37
Copy link
Author

It works. I have tested to modify the local devfile (the command name). After it reload workspace, I get the new command line.

On debug console, I look some error during process, but I haven't the time to get them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants