-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat(#648): add --disable-users command for merge-contacts action #649
Conversation
@sugat009 I'm really sorry about this, but I just realised that the difference between this and #652 would technically be a breaking change because of an interface change. I need to bring some code from that change forward into this pull request. I think this work stands alone now and can evolve into #652 seamlessly. It is also possible that it might just make sense to review #652 against main. I'll let you decide how you want to proceed! Changes since your last review:
|
async function assertCoreVersion() { | ||
const actualCoreVersion = await getValidApiVersion(); | ||
if (semver.lt(actualCoreVersion, '4.7.0-dev')) { | ||
throw Error(`CHT Core Version 4.7.0 or newer is required to use --disable-users options. Version is ${actualCoreVersion}.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I've noticed an inconsistency in the command structure. The disable-users
argument was moved from the disable-users
command to the merge-contacts
command. However, after reviewing the merge-contacts
command, I don't see a direct invocation of upload-docs
.
Are we looking at a scenario where these commands should be combined, such as cht merge-contacts upload-docs --disable-users
?
My concern is that running this against a CHT 4.6.0 instance might result in an error, even if the --disable-users
flag isn't explicitly passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern is that running this against a CHT 4.6.0 instance might result in an error, even if the --disable-users flag isn't explicitly passed.
I guess we have a few options:
- Crash against < 4.6.0 but only if deleted docs have the
cht_disable_linked_users
. Keep--disable-users
flag onmerge-contacts
action and note that it is only supported by CHT Core 4.8 and above. - Add
--disable-users
flag to upload-docs. Remove it from merge-contacts and (delete-contacts added in feat(#650): delete-contacts action #652 ) - Have
--disable-users
flag on both upload-docs and merge-contacts.
I suspect 1 is the best option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, option 1 is the best option. Let's go with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Nice to confirm. That is what is in this PR now.
🎉 This PR is included in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
When
--disable-users
option is present duringmerge-contacts
json_docs
folder during upload-docs action#648
Base branch is #647
Code review items
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.