Closed darkbtf closed 4 years ago
Deploying to production
gcs/2020-05-10-before-migration
16:59 ≎ ~/workspace/rumors-db ➠ npx babel-node db/migrations/202005-add-article-categories.js
ResponseError: Response Error
at IncomingMessage.<anonymous> (/Users/mrorz/workspace/rumors-db/node_modules/@elastic/elasticsearch/lib/Transport.js:296:25)
at IncomingMessage.emit (events.js:205:15)
at IncomingMessage.EventEmitter.emit (domain.js:471:20)
at endReadableNT (_stream_readable.js:1137:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9) {
name: 'ResponseError',
meta: {
body: {
took: 4641,
timed_out: false,
total: 36068,
updated: 3577,
deleted: 0,
batches: 4,
version_conflicts: 423,
noops: 0,
retries: [Object],
throttled_millis: 0,
requests_per_second: -1,
throttled_until_millis: 0,
failures: [Array]
},
statusCode: 409,
headers: {
'content-type': 'application/json; charset=UTF-8',
'content-length': '133674'
},
warnings: null,
meta: {
context: null,
request: [Object],
name: 'elasticsearch-js',
connection: [Object],
attempts: 1,
aborted: false
}
}
}
18:20 ≎ ~/workspace/rumors-db ➠ npx babel-node db/migrations/202005-add-article-categories.js
{
body: {
took: 3650,
timed_out: false,
total: 36068,
updated: 0,
deleted: 0,
batches: 37,
version_conflicts: 0,
noops: 36068,
retries: { bulk: 0, search: 0 },
throttled_millis: 0,
requests_per_second: -1,
throttled_until_millis: 0,
failures: []
},
statusCode: 200,
headers: {
'content-type': 'application/json; charset=UTF-8',
'content-length': '239'
},
warnings: null,
meta: {
context: null,
request: { params: [Object], options: [Object], id: 1 },
name: 'elasticsearch-js',
connection: {
url: 'http://localhost:62222/',
id: 'http://localhost:62222/',
headers: {},
deadCount: 0,
resurrectTimeout: 0,
_openRequests: 0,
status: 'alive',
roles: [Object]
},
attempts: 0,
aborted: false
}
}
Fix this error: old version of articleCategories is null, instead of being initialized to empty list.
which can be reproduced by this mutation: