Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
zeeshanakram3
left a comment
There was a problem hiding this comment.
I have tested the PR, works as expected. Just one comment the processor_events_log entity still exists and is being continuously populated. Shouldn't we just get rid of that?
It's still used by the processor to persist information about its state across runs. For example functions like |
Looks good then. I have merged the corresponding hydra PR and published the packages. Please update this PR now. |
|
The failing test should be ok after #4421 |
mnaamani
left a comment
There was a problem hiding this comment.
The implementation looks correct, based on the new hydra feature. To make use of the new endpoint through our deployment scripts its a simple update to the caddy config files, will need a slightly modified setup on our production nodes with linode load balancer.
| PROCESSOR_INDEXER_GATEWAY=http://hydra-indexer-gateway:4000/graphql | ||
|
|
||
| # State update endpoint used by prcessor (to send state updates) | ||
| STATE_UPDATE_ENDPOINT=http://graphql-server:8082/update-processor-state |
There was a problem hiding this comment.
Doesn't this need to be passed in env for the processor? (As in the e2e test setup in hydra repo)
Or is it being passed through .env file through use of the env_file directive ?
env_file:
# relative to working directory where docker-compose was run from
- .env
There was a problem hiding this comment.
the default using 'localhost' probably doesn't work on mac with docker desktop..
STATE_UPDATE_ENDPOINT: str({
devDefault: 'http://localhost:8082/update-processor-state',
}),
There was a problem hiding this comment.
Or is it being passed through .env file through use of the env_file directive ?
Yes, it should be passed because of this directive, it doesn't need to be explicitly named in environment
the default using 'localhost' probably doesn't work on mac with docker desktop..
I'm aware it doesn't work in some setups, but it's just the default. I followed the approach already used for indexer endpoint, ie.: INDEXER_ENDPOINT_URL: str({ devDefault: 'http://localhost:4001' }),
|
@Lezek123 How can I test the endpoint? When I do a simple |
This is an additional security measure, so that only the processor is allowed to send update requests to this endpoint. If you want to test pushing from localhost (via Postman app for example) you can set |
Thanks for clarification, I ran some tests and works as expected: configured $ nc -l 8090
POST / HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json
User-Agent: axios/1.1.3
Content-Length: 110
Accept-Encoding: gzip, deflate, br
Host: host.docker.internal:8090
Connection: close
{"state":{"indexerHead":8,"chainHead":14,"lastScannedBlock":1,"lastProcessedEvent":"0000000001-000002-c112c"}} |
Companion for: Joystream/hydra#511