cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Command update - spo tenant settings set

Open ganesh-sanap opened this issue 2 years ago • 26 comments

Type

  • [ ] Bug Fix
  • [x] New Feature
  • [ ] Sample

Related Issues?

Closes #5034

What is in this Pull Request ?

Added around 33 new options/parameters to spo tenant settings set cmdlet as discussed in issue #5034.

ganesh-sanap avatar Jul 27 '23 13:07 ganesh-sanap

Amazing work @ganesh-sanap 👏 Looking forward in using these new options (especially IsLoopEnabled 🤭). You rock 🤩

nicodecleyre avatar Jul 28 '23 07:07 nicodecleyre

Thank you @ganesh-sanap, we'll try to review it ASAP!

milanholemans avatar Jul 28 '23 15:07 milanholemans

@milanholemans Any update on this PR?

ganesh-sanap avatar Aug 22 '23 10:08 ganesh-sanap

@ganesh-sanap not yet no. As you can see, we have quite some PRs to process at the moment and we only do this in our free time. Also, I haven't really had time for the past few days. We will try to process it ASAP.

Thank you for being so patient.

milanholemans avatar Aug 23 '23 06:08 milanholemans

Hi @milanholemans, Any updates on this PR? Thank you!

ganesh-sanap avatar Oct 01 '23 06:10 ganesh-sanap

Hi @ganesh-sanap we had a busy month to release the new major version of CLI. Because this PR is quite large I wasn't able to include it in that release. Will try my best in the coming weeks to review it. Sorry for the delay.

milanholemans avatar Oct 01 '23 09:10 milanholemans

Hi, @ganesh-sanap it's been a while since this PR was raised. The last couple of months were quite busy for me. During this time, some PRs were merged and changed stuff to CLI. Could you rebase with the latest main version and fix the few errors? This will speed up the review process which I'll try to complete in the coming weeks.

Thanks!

milanholemans avatar Dec 25 '23 12:12 milanholemans

@milanholemans Can you help with the steps or commands for rebasing with latest main branch to my local branch (spo-tenant-settings-set-bulk) without loosing changes made to my local branch?

ganesh-sanap avatar Dec 30 '23 11:12 ganesh-sanap

Hi @ganesh-sanap definitely!

The best way to do this is by syncing your fork on GitHub with the latest changes and pulling these changes locally on your main branch.

Then you switch back to your feature branch and:

# Rebase to main
git rebase main

# Fix merge conflicts in VS Code, when ready click 'Continue' in VS Code.

# When done, push to GitHub, force flag is important! Don't push using VS Code.
git push --force

You can add commits that are added later as usual.

milanholemans avatar Dec 30 '23 17:12 milanholemans

Thank you @milanholemans! I have done all the changes and marked this PR for your review.

ganesh-sanap avatar Dec 31 '23 10:12 ganesh-sanap

Thank you @ganesh-sanap! Will start reviewing in the coming days (looking at the size of the PR, it will take awhile).

milanholemans avatar Dec 31 '23 12:12 milanholemans

@milanholemans Pushed commit with required changes, thanks for review!

ganesh-sanap avatar Feb 08 '24 11:02 ganesh-sanap

@ganesh-sanap don't want to put any stress on you at all, but did you find some time to look at the comments I made? Maybe you have lost sight of this? I wouldn't want this valuable work to be lost.

milanholemans avatar Feb 23 '24 22:02 milanholemans

I will have a look and work on it @milanholemans.

ganesh-sanap avatar Feb 29 '24 17:02 ganesh-sanap

Hi @ganesh-sanap did you lose track of this? Don't want to put any pressure just double-checking.

milanholemans avatar Mar 13 '24 19:03 milanholemans

Hi @ganesh-sanap do you still want to work on this? No problem if you don't have enough time, we can always open it up for someone else.

milanholemans avatar Apr 01 '24 15:04 milanholemans

@milanholemans sorry for delay. I am working on it. I have few questions about changes requested, will ask separately. Thanks!

ganesh-sanap avatar Apr 02 '24 07:04 ganesh-sanap

@milanholemans sure, I will look into those options.

ganesh-sanap avatar Apr 19 '24 11:04 ganesh-sanap

@ganesh-sanap are you still willing to work on this? How do you see this issue? Is it too big/too much work? Is it unclear? Are you still interested in it? You are welcome to answer honestly so we can find a way out.

milanholemans avatar May 06 '24 21:05 milanholemans

Hi @milanholemans, I have completed all PR review changes except restricting enum values for ~LinkRole options, currently working on it. Hopefully I will complete it by this week and send it again for your review.

Regarding adding new options (ExpireVersionsAfterDays, MajorVersionLimit, EnableAutoExpirationVersionTrim), I checked the logic in PnP PowerShell code and I think these options requires checking existing tenant setting values & adding some rules/errors based on it - this will take more time. Shall we do this in separate issue/PR? Thanks!

ganesh-sanap avatar May 07 '24 17:05 ganesh-sanap

Regarding adding new options (ExpireVersionsAfterDays, MajorVersionLimit, EnableAutoExpirationVersionTrim), I checked the logic in PnP PowerShell code and I think these options requires checking existing tenant setting values & adding some rules/errors based on it - this will take more time. Shall we do this in separate issue/PR? Thanks!

Is it that complicated? Aren't these just number and boolean fields?

milanholemans avatar May 07 '24 21:05 milanholemans

@milanholemans while passing the options (ExpireVersionsAfterDays and MajorVersionLimit) to the command, first we have to check the existing value of EnableAutoExpirationVersionTrim tenant property. We have to allow updating ExpireVersionsAfterDays and MajorVersionLimit properties only when EnableAutoExpirationVersionTrim property is set to false.

I think we will have to do the GET call to tenant settings for adding these type of validation rules before updating the property values using this command. So, this will not be a simple change like other number and boolean fields.

ganesh-sanap avatar May 08 '24 17:05 ganesh-sanap

@milanholemans while passing the options (ExpireVersionsAfterDays and MajorVersionLimit) to the command, first we have to check the existing value of EnableAutoExpirationVersionTrim tenant property. We have to allow updating ExpireVersionsAfterDays and MajorVersionLimit properties only when EnableAutoExpirationVersionTrim property is set to false.

Technically speaking, we should indeed. But is this really limited by the API itself? Does it throw an error if you don't? This command is so gigantic that it's nearly impossible to build validations for every command. Also would it make it quite unclear in my opinion.

milanholemans avatar May 09 '24 13:05 milanholemans

Hi @ganesh-sanap. I know this PR is taking a while, but I haven't forgotten about it. We're currently preparing a V8 release with CLI which consumed quite some time from my side. I will try to find some time to do another review for this big PR. Maybe in the meantime you could rebase with the latest main and resolve the merge conflict to make it go a little bit faster?

milanholemans avatar Jul 20 '24 10:07 milanholemans