Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Validate SSH keys list before view/delete #448

Merged
merged 1 commit into from
Oct 2, 2019
Merged

Validate SSH keys list before view/delete #448

merged 1 commit into from
Oct 2, 2019

Conversation

vinokurig
Copy link
Contributor

Signed-off-by: Igor Vinokur ivinokur@redhat.com

What does this PR do?

Validate SSH key list in the view / delete actions of the SSH Plugin

What issues does this PR fix or reference?

eclipse-che/che#14218

Release Notes

Docs PR

@che-bot
Copy link
Contributor

che-bot commented Sep 24, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:

const getKeys = async (sshKeyManager: SshKeyManager): Promise<cheApi.ssh.SshPair[]> => {
const keys: cheApi.ssh.SshPair[] = await sshKeyManager.getAll('vcs');
if (!keys || keys.length < 1) {
throw new Error('No SSH key pairs has been defined.');
Copy link
Contributor

Choose a reason for hiding this comment

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

SSH Key Pair
or
SSH Key Pairs have

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

try {
keys = await getKeys(sshkeyManager);
} catch (error) {
theia.window.showWarningMessage(error.message);
Copy link
Contributor

Choose a reason for hiding this comment

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

should say that we're trying to delete in warning message

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

Comment on lines 167 to 175
let keys: cheApi.ssh.SshPair[];
try {
keys = await getKeys(sshkeyManager);
} catch (error) {
theia.window.showWarningMessage(error.message);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

we could move to a separate method as we're using twice

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

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

thx for the updates @vinokurig 👍

@che-bot
Copy link
Contributor

che-bot commented Oct 2, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:

@che-bot
Copy link
Contributor

che-bot commented Oct 2, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:

@vinokurig vinokurig merged commit cbc02a7 into master Oct 2, 2019
@vinokurig vinokurig deleted the CHE-14215 branch October 2, 2019 13:01
vinokurig pushed a commit that referenced this pull request Apr 6, 2021
* Buildah base dev plugin
* Buildah dev plugin 1.14.0
* Update reference to docker image
* Change memory limitation to 1gb

Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants