PowerLoom / snapshotter-lite-v2

Snapshotter Lite: New Protocol
Apache License 2.0
3 stars 1 forks source link

Override defaults feature does not work as expected #26

Closed anomit closed 3 months ago

anomit commented 3 months ago

Describe the bug

Release v1.1.0-final introduced a bug which led to the OVERRIDE_DEFAULTS flag not being parsed correctly.

This was caused by the check on the flag being moved to its own script and multiple loads of the .env file with source .env, once within the script and once outside it.

https://github.com/PowerLoom/snapshotter-lite-v2/blob/ffa7496056041e627533027a152c90bc6f9cd0f2/_override_defaults.sh#L1-L11

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Set OVERRIDE_DEAFULTS=true in .env
  2. Run ./build.sh or ./build-dev.sh

Expected behavior The following environment variables manually configured in .env should take precedence over the values supplied by the specific branch or image.

PROST_RPC_URL
PROTOCOL_STATE_CONTRACT
PROST_CHAIN_ID
SEQUENCER_ID
RELAYER_RENDEZVOUS_POINT
CLIENT_RENDEZVOUS_POINT

Proposed Solution Place the code block within build.sh or build-dev.sh instead of its own script file.

Caveats NA

Additional context NA