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

Add an SSH Factory parameter resolver for unsupported SCM providers #567

Merged
merged 17 commits into from
Sep 22, 2023

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Sep 20, 2023

What does this PR do?

  • Return the SSH factory resolver in order to handle SSH urls from unsupported SCM providers.
  • Add a priority value for all factory resolvers to be able to control resolver's priority.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#22488

How to test this PR?

  1. Deploy che from the pr image: quay.io/eclipse/che-server:pr-567
  2. Configure SSH keys for an unsupported SCM provider e.g. gitea.com.
  3. Start a workspace from SSH url of the repository.

See: workspace starts from the default devfile.

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.

@vinokurig vinokurig requested a review from artaleks9 September 20, 2023 11:59
@vinokurig vinokurig changed the title Che 22488 Add an SSH Factory parameter resolver for unsupported SCM providers Sep 20, 2023
@artaleks9
Copy link
Contributor

/retest

@artaleks9
Copy link
Contributor

  • Verified the functionality on Che deployed with specific image quay.io/eclipse/che-server:pr-567
    This works correctly, expected behaviior.
  • Looks good to merge.

@@ -183,6 +190,7 @@ protected void configure() {
scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class);
scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class);
scmFileResolverResolverMultibinder.addBinding().to(AzureDevOpsScmFileResolver.class);
scmFileResolverResolverMultibinder.addBinding().to(GitSshScmFileResolver.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add RawDevfileUrlFactoryParameterResolver here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

RawDevfileUrlFactoryParameterResolver does not implement ScmFileResolver

@openshift-ci
Copy link

openshift-ci bot commented Sep 21, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: artaleks9, tolusha, 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

@openshift-ci
Copy link

openshift-ci bot commented Sep 22, 2023

@vinokurig: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v12-git-no-pat-oauth-flow 0a43a5c link true /test v12-git-no-pat-oauth-flow
ci/prow/v12-gitea-no-pat-oauth-flow 0a43a5c link true /test v12-gitea-no-pat-oauth-flow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@vinokurig vinokurig merged commit b1da9ef into main Sep 22, 2023
@vinokurig vinokurig deleted the che-22488 branch September 22, 2023 14:09
@devstudio-release
Copy link

Build 3.10 :: server_3.x/240: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.10 :: server_3.x/241: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: get-sources-rhpkg-container-build_3.x/4522: FAILURE

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

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: server_3.x/241: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/4726 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: get-sources-rhpkg-container-build_3.x/4525: FAILURE

devspaces-operator-bundle : 3.x :: Failed in 55703502 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay

@devstudio-release
Copy link

Build 3.10 :: server_3.x/242: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: get-sources-rhpkg-container-build_3.x/4555: FAILURE

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

vinokurig added a commit that referenced this pull request Sep 25, 2023
…567)

Return the SSH factory resolver in order to handle SSH urls from unsupported SCM providers.
Add a priority value for all factory resolvers to be able to control resolver's priority.

---------

Co-authored-by: Aleksandr Shmaraiev <[email protected]>
vinokurig added a commit that referenced this pull request Sep 25, 2023
…567)

Return the SSH factory resolver in order to handle SSH urls from unsupported SCM providers.
Add a priority value for all factory resolvers to be able to control resolver's priority.

---------

Co-authored-by: Aleksandr Shmaraiev <[email protected]>
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.

4 participants