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

Start workspace from default devfile on private repository SSH url #1286

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jan 2, 2025

What does this PR do?

Remove the Devfile resolve from a privatre repositry via an SSH url is not supported warning and start workspace from the default devfile in this case.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#23277

Is it tested? How?

  1. Apply the che-dashboard pull request image: quay.io/eclipse/che-dashboard:pr-1286
  2. Add an SSH key via the user preferences page.
  3. Start a workspace from a private repository with a devfile, using SSH url.

See: workspace starts without interruption, local devfile is applied.

Release Notes

Docs PR

@che-bot
Copy link
Contributor

che-bot commented Jan 2, 2025

Click here to review and test in web IDE: Contribute

@vinokurig vinokurig marked this pull request as draft January 2, 2025 12:55
Copy link

github-actions bot commented Jan 2, 2025

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1286

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1286", name: che-dashboard}]}}]"

@vinokurig vinokurig marked this pull request as ready for review January 3, 2025 08:34
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.71%. Comparing base (e3d2d8d) to head (5dcdc38).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...paceProgress/CreatingSteps/Apply/Devfile/index.tsx 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1286      +/-   ##
==========================================
+ Coverage   91.58%   91.71%   +0.12%     
==========================================
  Files         498      498              
  Lines       45590    45512      -78     
  Branches     3171     3167       -4     
==========================================
- Hits        41754    41741      -13     
+ Misses       3803     3740      -63     
+ Partials       33       31       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ibuziuk ibuziuk left a comment

Choose a reason for hiding this comment

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

LGTM, could you please confirm that default devfile will be used not only for private SSH URL, but for every single case when devfile can not be resolved e.g. gerrit, gogs, gitea etc eclipse-che/che#21951

Copy link
Contributor

@olexii4 olexii4 left a comment

Choose a reason for hiding this comment

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

LGTM

@ibuziuk
Copy link
Member

ibuziuk commented Jan 3, 2025

@dmytro-ndp please, review once you have time
@mkuznyetsov once merged, I believe we can start the 7.97.0 release

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

Workspace created correctly using GitHub.com private repository SSH url in Eclipse Che with quay.io/eclipse/che-dashboard:pr-1286
Screencast: scrnli_GgaR048tsZvCNH.webm
SSH key was without pass phrase.

At the same time User Dashboard showed wrong default devfile content: eclipse-che/che#23301
This error reproduced with Dev Spaces 3.17.0 on Dev Sandbox and with Eclipse Che Next on Che dogfooding instance having configured GitHub OAuth.

@vinokurig
Copy link
Contributor Author

vinokurig commented Jan 6, 2025

@ibuziuk

could you please confirm that default devfile will be used not only for private SSH URL, but for every single case when devfile can not be resolved e.g. gerrit, gogs, gitea etc eclipse-che/che#21951

I reworked the pull request so now default devfile is applied not only for private SSH repo but for other cases when the devfile cannot be resolved.

Copy link

github-actions bot commented Jan 6, 2025

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1286

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1286", name: che-dashboard}]}}]"

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

Checked new changes with quay.io/eclipse/che-dashboard@sha256:ae9f5d50c4453ab133a74c271fd1c7ee39ace9410e10d1437a23277c33ceb96e

Test tun 1

Next workspaces have started successfully and devfile from test repo has applied correctly as well, having SSH key without passphrase added to the user preferences:

  • from GitHub private repo using factory with SSH URL
  • from GitHub public repo using factory with SSH URL
  • from GitHub public repo using factory with HTTPS URL
  • from in-build Maven Java sample
  • Empty workspace

Screenshot from 2025-01-06 17-46-33

The issue eclipse-che/che#23301 has been reproduced as well.

Test run 2

I had also faced the misleading warning message WARNING: The Bitbucket integration is not configured properly and cannot be used at this moment.Please refer to docs to check the Bitbucket integration instructions when tried to start workspace from the gogs public repo using HTTP URL, with the proposal to start workspace using default devfile.
After the clicking on "Continue with default devfile" link the workspace had started successfully, and devfile from the repo has been applied, instead of default devfile.
It looked unexpected, especially taking into account that User Dashboard showed wrong default devfile content of workspace.
In Eclipse Che Next I faced the same behavior, with the only difference - default devfile had been applied, not the actual devfile situated in the repo.

Screenshot from 2025-01-06 21-05-47

Screencast: scrnli_apfigF2g8ed08c.webm

I have opened a separate ticket: eclipse-che/che#23303

The issue eclipse-che/che#23301 has been reproduced.

Test run 3

Another test case - create workspace using factory SSH URL of gogs private repo ssh://[email protected]:10022/test/quarkus-api-example-private.git - demonstrated different warning message WARNING: Cannot build factory with any of the provided parameters. Please check parameters correctness, and resend query. this time without additional "Continue with default devfile" link:
Screenshot from 2025-01-07 02-02-09

Screencast: scrnli_D2FQdEJkQPkw2O.webm

I have opened a separate ticket: eclipse-che/che#23304

The issue eclipse-che/che#23301 has been reproduced.

@openshift-ci openshift-ci bot added the lgtm label Jan 6, 2025
Copy link

openshift-ci bot commented Jan 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dmytro-ndp, ibuziuk, olexii4, vinokurig

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

@vinokurig vinokurig merged commit c8ce7d9 into main Jan 7, 2025
19 of 21 checks passed
@vinokurig vinokurig deleted the che-23277 branch January 7, 2025 10:55
@vinokurig
Copy link
Contributor Author

vinokurig commented Jan 7, 2025

@dmytro-ndp Thank you for the meticulous testing.

Test run 2
I had also faced the misleading warning message WARNING: The Bitbucket integration is not configured properly and cannot be used at this moment.Please refer to docs to check the Bitbucket integration instructions when tried to start workspace from the gogs public repo using HTTP URL, with the proposal to start workspace using default devfile.
After the clicking on "Continue with default devfile" link the workspace had started successfully, and devfile from the repo has been applied, instead of default devfile.
It looked unexpected, especially taking into account that User Dashboard showed wrong default devfile content of workspace.
In Eclipse Che Next I faced the same behavior, with the only difference - default devfile had been applied, not the actual devfile situated in the repo.
Test run 3
Another test case - create workspace using factory SSH URL of gogs private repo ssh://[email protected]:10022/test/quarkus-api-example-private.git - demonstrated different warning message WARNING: Cannot build factory with any of the provided parameters. Please check parameters correctness, and resend query. this time without additional "Continue with default devfile" link:

If those cases are reproduced regardless the pull request changes, could you please create separate issues?

vinokurig added a commit that referenced this pull request Jan 7, 2025
…1286)

Remove the Devfile resolve from a privatre repositry via an SSH url is not supported warning and start workspace from the default devfile in this case.
vinokurig added a commit that referenced this pull request Jan 8, 2025
…1286) (#1290)

Remove the Devfile resolve from a privatre repositry via an SSH url is not supported warning and start workspace from the default devfile in this case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants