Closed aleksa-krolls closed 2 years ago
@aleksa-krolls , this looks good. we're using the new http agent as directed:
const options = {
hostname: 'encrypted.google.com',
port: 443,
path: '/',
method: 'GET',
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
options.agent = new https.Agent(options);
I'd recommend that, as we're testing anyway, we bump to http 4.0.0
for the newest patches but otherwise we need to wait for them to confirm that this all worked as expected in staging.
thanks @taylordowns2000. I've bumped the jobs up to http 4.0.0
. Closing for now as tests are passing, and will wait for any feedback from UNHCR.
Request
Job is currently failing with the below error when we send a
POST
request to DTP. See example run.Please test with the sample state below to try to successfully run the job and validate the http adaptor and
agentOptions
are working as expected... . OR see L215 in the run log for an exact payload to test posting to DTP.state.json
Primero - Job f2-1 (change cursor & run to generate state for Job 2)
configuration
: See LPPrimero Gambella - Get Referrals (PROD)
manualCursor: '2022-05-05T11:40:04.033Z'
DTP - Job f2-2 (to troubleshoot)
configuration
: See LPDTP - ReceiveIncomingReferral (PROD)
data
: output from Job 1adaptor
language-http v3.1.11
trigger
https://github.com/OpenFn/primero-progres/blob/master/jobs/PROD/f2-1.getCasesFromPrimero.js Run the Primero job f2-1 with the manual cursor provided above to generate state for the DTP job f2-2.
expression.js
https://github.com/OpenFn/primero-progres/blob/master/jobs/PROD/f2-2.sendReferralToDTP.js
output.json
See if you can successfully authenticate with DTP.