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

cmd: add remotesource delete command #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camandel
Copy link
Contributor

@camandel camandel commented Aug 7, 2019

Add a subcommand to delete a remotesource:

agola remotesource delete --name <remotesource-name>

@sgotti
Copy link
Member

sgotti commented Aug 7, 2019

@camandel Thanks for the PR!

The command wasn't implemented by purpose (while as you can see there's already an api to do this) because deleting a remote source will invalidate all the user linked accounts and consequently all the projects connected with that linked account.

Deleting a remote source isn't usually an operation the should be done (usually an user wants to update the remote source, and this is already possible).

For the user the effects of deleting a remote source are that it won't be able to login anymore via oauth with the remote source: The solution to let the user continue logging in with local auth (#23) or external auth (#24).

For a project the effects of deleting a remote source are that its linked account will be invalidated and agola won't be able to update commit statuses or reconfigure the project deploy key and webhooks (if requested) making the project unusable (please note that it's already possible to update a project linked account but it requires the same remote source. One could think to add the ability
to change a project linked account using a different remote source but this doesn't makes a great sense since the projects is very tied to the remote source repository (remote repository id and path)).

In the end, my opinion is to currently add a big warning when doing a remote source deletion and adding a confirmation dialog (overridable with a -y flag) and document the effects on doing this operation in the doc at https://agola.io

@camandel
Copy link
Contributor Author

camandel commented Aug 7, 2019

@sgotti Thanks for the detailed explanation.
In reason of all potential problems that "remotesource delete" could create (compared to benefits), I think it safer to not include this PR.

@camandel camandel closed this Aug 7, 2019
@sgotti
Copy link
Member

sgotti commented Aug 7, 2019

@camandel I'm quite sure other users will ask for this. So the first step will be to better document the effects of removing a remotesource and think/implement possible solutions to improve users/projects management in case there's the need to delete a remotesource. I'll open a related issue. Then we could add the delete command.

@sgotti sgotti reopened this Aug 7, 2019
@camandel camandel changed the title add remotesource delete subcommand cmd: add remotesource delete command Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants