Extend the spo site remove command to support groupified sites.
skipRecycleBin or fromRecycleBin options with a groupified site, we should show a warning that these options don't apply, after determining the type of siteBig thanks to @arjunumenon for research for the spec
Hi Waldek, May I take this!
Please do! Thank you! 馃憦
Hey @ktskumar 馃憢馃徎
Are you still working on this command?
Please don't hesitate to reach out if you need some assistance.
Ping @ktskumar, just checking if you're still working on this
Settings as available for picking due to lack of response
Hey @waldekmastykarz - Do you mind if I take this enhancement up? I have couple of PR's in pipeline and hence I can squeeze myself for working on this if you are fine with this.
Appreciate your help @arjunumenon 馃憦
Hello @waldekmastykarz - Before I go ahead with the implementation, I have couple of questions.
We already have a command spo site remove which currently supports the deletion of all the sites except the O365 Group connected site. I am assuming we would be enhancing the same command with the support for deletion of site connected to O365 groups as well. Is that correct?
_Side Note: As per the issue #1494 remove commands for classic and modern were merged_
If my understanding is correct, do you mind updating the specs please?
Assuming we are going ahead with the above approach, we would be using Graph API Delete for the operation, is that correct?
It will be great if you can confirm the direction so that I can go ahead with the implementation.
Thanks @waldekmastykarz . No need to be sorry it all..
This is the least we can do from our side considering the major chunk which you already doing from your side. 馃挭馃挭
Hello @waldekmastykarz - Just want to confirm on the implementation design before I go ahead with development. It will be great if you can confirm that so that I can go ahead with the implementation.
GroupIdfield using client.svc which will fetch the needed field called GroupId for the entered siteThen we will check whether the GroupIdis valid?
Groupid would be valid if the returned
GroupIdIS NOT EQUAL TO 00000000-0000-0000-0000-000000000000
If it is valid GroupId, we will be initiating the deletion of the Group using Graph API Delete.
Groupid, currently implemented process will be continued.Another point to be noted here is that, If the entered site is groupified, operation will not respect the available parameters like, skipRecycleBin, fromRecycleBin.
If you agree to the above assumption, do you think it make sense to update current specs with these information. Especially over here, we are going ahead with enhancement of the current command rather than a new command.
Hopefully this would I hope this will be by last set of questions before I am done with the implementation 馃
Implementation plan is 馃憤
As for the parameters, ideally, we'd do it during validation, but at that stage we can't execute any requests, because auth has not set up yet. So for now, let's do it as a pre-check after determining the type of site. Also, like you mentioned, let's include it in the remarks so that users are aware of it.
I've update the spec like you suggested.
I'm starting to sound like a broken record, but I really appreciate your thoroughness 馃憦
Thanks @waldekmastykarz for the direction and the updates. Now everything is definitely on place.
ideally, we'd do it during validation, but at that stage we can't execute any requests, because auth has not set up yet.
I had not realized that part. Thanks for highlighting that part which I hadn't thought of...
I'm starting to sound like a broken record,
Not at all. Music which record plays is always amazing.. 馃憦
All I need is your high level guidance which is golden always. I will be more than happy to fill in the details for you.
Pleasure to be working with you, sir 馃憦
Pleasure to be working with you, sir 馃憦
馃挀. Like always, you are being humble. Pleasure is definitely mine... 馃暫
Hello @waldekmastykarz - Got couple of questions before I initiate the Pull Request _(though I had told there wouldn't be any more questions 馃槕. Couldn't keep up that word_.
WaitParameterThere is a parameter called wait which also is not relevant to the Group deletion since we use Graph API group deletion which does not follow the conventional site deletion API which we are using. Adding to that, as per my understanding even if the Office 365 Group is deleted, respective SharePoint site will be deleted later via timer jobs behind the scenes. Henceforth, the timeout feature which we use will nevertheless be relevant.
Can we give the similar instructions if we the parameter is entered for the Groupified site
I have also have done refactoring for the existing code by creating a new method so that code would be organized. It will be great if you can let us know whether it is not recommended during your review so that I can revert it back if that approach is not recommended.
Thanks again for patiently responding to all my questions.
You're absolutely right about wait. If it doesn't work in this case, it makes perfect sense to let the user know about it upfront in the docs.
Re refactoring: if it simplifies the code and maintenance, let's do it. Let's see what you have in mind and take it from there 馃憤
Most helpful comment
You're absolutely right about
wait. If it doesn't work in this case, it makes perfect sense to let the user know about it upfront in the docs.Re refactoring: if it simplifies the code and maintenance, let's do it. Let's see what you have in mind and take it from there 馃憤