-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Script to Update/Insert from CouchDB Backup #7501
base: master
Are you sure you want to change the base?
Script to Update/Insert from CouchDB Backup #7501
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7501 +/- ##
==========================================
- Coverage 59.75% 56.01% -3.75%
==========================================
Files 430 672 +242
Lines 13454 27108 +13654
Branches 0 2629 +2629
==========================================
+ Hits 8040 15185 +7145
- Misses 5414 11601 +6187
- Partials 0 322 +322
see 377 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@unlikelyzero there is a branch in the openmct-quickstart repo that defines two couch servers, one write only to an admin user. The two new users are described in the README.md. OpenMCT is configured to use both. |
@@ -37,15 +37,20 @@ async function main() { | |||
username, | |||
password | |||
}); | |||
if (!docsToDelete.length) { |
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.
That reminds me, we should test upserting with both scenarios: with and without annotations being saved
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.
Both worked locally for me.
_id: { $gt: null } | ||
}, | ||
fields: ['_id', '_rev'], | ||
limit: 1000 |
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.
What's significance of this limit
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.
Prevents couch trying to dump its entire db in one POST.
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7501 +/- ##
==========================================
+ Coverage 49.13% 49.98% +0.84%
==========================================
Files 671 672 +1
Lines 27116 27122 +6
Branches 2632 2632
==========================================
+ Hits 13324 13556 +232
+ Misses 13464 13238 -226
Partials 328 328
*This pull request uses carry forward flags. Click here to find out more. see 54 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Closes #7475
Describe your changes:
A script that given a CouchDB backup JSON file, will update/insert into an existing CouchDB installation.
All Submissions:
Author Checklist
type:
label? Note: this is not necessarily the same as the original issue.Reviewer Checklist