Closed bbenligiray closed 3 years ago
Here is a more minimal script that demonstrates the problem on the same setup without adding any bridges.
Tracking here: https://www.pivotaltracker.com/story/show/170679043
Hi @bbenligiray. I'm having a crack at this with the caveat that I'm really new to the project. I wrote two tests to try to reproduce the error:
The big difference I can see is that the job you are creating has an initiator. I can't see why that would make a difference but I'll add the initiator to the test to make sure.
I added the initiator and I got the same result!
Hi @topliceanu , are you saying that you can't reproduce the error?
Closing due to merged PR to fix this issue
I use this script to add multiple bridges and job specs using the node API. After I add the job specs, I fetch them using
/v2/specs
to validate that they are added correctly. The returned tasks are sometimes randomly rotated (for exampleTask4->Task1->Task2->Task3
) or in some cases mirrored (Task4->Task3->Task2->Task1
). Browsing the database, the task orders look correct and everything seems fine on the node GUI.This is the setup that I can replicate the mirroring problem reliably but it is observed in a variety of setups, including AWS RDS (but not with larger instances for some reason) and a self-hosted database, but never with local sqlite.
Basic Information
docker run --name cl -p 6688:6688 -v ~/.chainlink-ropsten:/chainlink -it --env-file=.env smartcontract/chainlink local n -p /chainlink/.password -a /chainlink/.api
Environment Variables
Steps to Reproduce EDIT: See my comment below.
Set up a Chainlink node wherever and a default Digital Ocean postgresql database (1 GB RAM / 1vCPU / 10 GB Disk / Primary only / NYC1 - PostgreSQL 11). Use this script to add the bridges and specs attached (bridges-specs.zip). The script removes and re-adds the job specs with disordered tasks (we were using this workaround because we used to encounter this issue <1 in 1000 jobs in an apparently completely stochastic pattern). With the setup described above, the tasks are always returned in the mirrored order so the script should get stuck in an infinite loop of retries. Although the first task is an external adapter in the example, the same thing happens with jobs composed of only core adapters.