Skip to content

feat(cosmos): propagate $chain.env when calling scripts#703

Merged
Anmol1696 merged 5 commits intohyperweb-io:v1from
agoric-labs:mfig/propagate-chain-env
Jun 22, 2025
Merged

feat(cosmos): propagate $chain.env when calling scripts#703
Anmol1696 merged 5 commits intohyperweb-io:v1from
agoric-labs:mfig/propagate-chain-env

Conversation

@michaelfig
Copy link
Contributor

This PR allows parameterisation of a config.yaml's 'chain[*].scripts', by passing chain[*].env environment variables wherever those scripts are invoked. This apparently already worked for $CHAIN_ID, but not for any other of the config.yaml's environment variables. There may be an even simpler way to accomplish it, so I am happy for any feedback you can suggest, @Anmol1696.

Before this change, some scripts that we override (update-config.sh for our particular use in Agoric/agoric-sdk#11502) would have to be manually copied-and-pasted with modifications, or generated from a template in order to have different behaviour when used in different config.yaml files but also with the same $CHAIN_ID.

Credit to @Muneeb147 for intuitively attempting to use chain.env for this purpose, and being (rightfully!) surprised that it wasn't applied when running our custom update-config.sh.

@michaelfig michaelfig force-pushed the mfig/propagate-chain-env branch from 6799b0b to 902090e Compare June 20, 2025 19:34
@Anmol1696
Copy link
Collaborator

Anmol1696 commented Jun 21, 2025

Awesome work, we need to change the base of the branch to v1 from main, since main is now v2 dev where we wont have helm charts anymore.

Once merged into v1, i will make it portable to v2

@Anmol1696 Anmol1696 changed the base branch from main to v1 June 21, 2025 07:22
@Anmol1696 Anmol1696 changed the base branch from v1 to main June 21, 2025 07:22
@michaelfig michaelfig force-pushed the mfig/propagate-chain-env branch from ae2e1ef to 5043725 Compare June 21, 2025 20:51
@michaelfig michaelfig changed the base branch from main to v1 June 21, 2025 20:52
@Anmol1696 Anmol1696 merged commit 33f1339 into hyperweb-io:v1 Jun 22, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants