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

Improve the Devfile is not reachable warning for SSH urls #1259

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Nov 19, 2024

What does this PR do?

If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-7624

Is it tested? How?

  1. Add SSH keys to the user namespace: User Preferences -> SSH Keys
  2. Start a workspace from an SSH url of a private repository.

See: the workspace start interrupts with the warning:
screenshot-cluster-admin-che-dashboard-local-server_apps_rosa_yz5n8-rzhzt-sum_vjy8_p3_openshiftapps_com-2024_11_19-13_20_31

A new documentation link is added to the warning.

Release Notes

Docs PR

@che-bot
Copy link
Contributor

che-bot commented Nov 19, 2024

Click here to review and test in web IDE: Contribute

@akurinnoy
Copy link
Contributor

@vinokurig please take a look at the failed unit test

<ExpandableWarning
textBefore="Devfile resolve from a privatre repositry via an SSH url is not supported."
errorMessage="Could not reach devfile"
textAfter="You can apply a Personal Access Token to be able to fetch the devfile.yaml content."

Choose a reason for hiding this comment

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

if applying PAT solves the issue, I'd change the wording to this:

"Apply a Personal Access Token to fetch the devfile.yaml content."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done

@dmytro-ndp
Copy link
Contributor

@vinokurig : could you, please, take a look at the failing build https://github.com/eclipse-che/che-dashboard/actions/runs/11916044763/job/33207772337 ?

It prevents building dashboard image quay.io/eclipse/che-dashboard:pr-1259 needed to verify PR changes.

Copy link

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

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-1259", name: che-dashboard}]}}]"

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

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

Project coverage is 91.73%. Comparing base (20a2a8c) to head (4aa8c84).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...paceProgress/CreatingSteps/Fetch/Devfile/index.tsx 95.65% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1259      +/-   ##
==========================================
+ Coverage   91.65%   91.73%   +0.07%     
==========================================
  Files         497      497              
  Lines       45446    45494      +48     
  Branches     3169     3171       +2     
==========================================
+ Hits        41654    41734      +80     
+ Misses       3762     3729      -33     
- Partials       30       31       +1     

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


🚨 Try these New Features:

@@ -83,6 +84,8 @@ export const BRANDING_DEFAULT: BrandingData = {
'https://www.eclipse.org/che/docs/stable/end-user-guide/url-parameter-for-the-workspace-storage/',
webSocketTroubleshooting:
'https://www.eclipse.org/che/docs/stable/end-user-guide/troubleshooting-network-problems/',
startingAWorkspaceFromAGitRepositoryURL:
Copy link
Contributor

Choose a reason for hiding this comment

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

Few remarks:

  1. Variable name could be simplified and not linked to docs article name, which could be changed in future; e.g. startWorkspaceFromGit
  2. Don't forget to add downstream documentation URL for startingAWorkspaceFromAGitRepositoryURL into the product.json: https://github.com/redhat-developer/devspaces-images/blob/devspaces-3-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json#L21

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, pull request for the downstream: redhat-developer/devspaces-images#658

@openshift-ci openshift-ci bot removed the lgtm label Nov 20, 2024
Copy link

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

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-1259", name: che-dashboard}]}}]"

@dmytro-ndp
Copy link
Contributor

@vinokurig: the PR validated successfully using DS 3.17.0.RC-58 + dashboard deployed from quay.io/eclipse/che-dashboard:pr-1259.

Checked links by creating workspace using SSH URL of private repo having SSH key with and without passphrase added to the User Preferences:

  1. "Continue with default devfile" -> workspace opened successfully with default devfile, and project cloned
  2. "Reload" - showed the same page
  3. "Open Documentation page" -> lead to correct page
    Screenshot from 2024-11-20 14-08-08

Public repo opened successfully from SSH URL. There were no any warnings at start workspace page.

Well done!

Copy link

openshift-ci bot commented Nov 20, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dmytro-ndp, 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 d247944 into main Nov 20, 2024
21 checks passed
@vinokurig vinokurig deleted the CRW-7624 branch November 20, 2024 13:56
@devspacesbuild
Copy link

Build 3.18 :: dashboard_3.x/592: Console, Changes, Git Data

@devspacesbuild
Copy link

@devspacesbuild
Copy link

vinokurig added a commit that referenced this pull request Nov 20, 2024
If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
vinokurig added a commit that referenced this pull request Nov 20, 2024
If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
vinokurig added a commit that referenced this pull request Nov 20, 2024
If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
vinokurig added a commit that referenced this pull request Nov 20, 2024
If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
vinokurig added a commit that referenced this pull request Nov 20, 2024
If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
vinokurig added a commit that referenced this pull request Nov 20, 2024
If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
@devspacesbuild
Copy link

Build 3.18 :: get-sources-rhpkg-container-build_3.x/8196: FAILURE

dashboard : 3.x :: Failed in 65968155 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay

vinokurig added a commit that referenced this pull request Nov 20, 2024
)

If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
vinokurig added a commit that referenced this pull request Nov 20, 2024
)

If the devfile resolve request fails with the devfile not found error, check if the url is an SSH url. If so, interrupt the workspace start with a new warning that describes the problem of the devfile resolve via a private repository SSH url.
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.

7 participants