Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use correct REGEN_HOME env in regen sandbox #1789

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

paul121
Copy link
Contributor

@paul121 paul121 commented Feb 18, 2023

Description

I believe REGENHOME is a semi-incorrect env var for here. I was referenced this regen-sandbox Dockerfile and was getting inconsistent results. It's quite confusing because it seems like it works for some things but not others. Using REGEN_HOME is working much better, as seen in this PR: #1672


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@paul121 paul121 requested a review from a team February 18, 2023 03:11
Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @paul121!

It looks like bootstrap.sh and setup/utils.sh both use REGENHOME. Can you update?

@paul121 paul121 force-pushed the fix-sandbox-regen-env branch from 77a4d03 to e6ec5d4 Compare February 20, 2023 22:51
@paul121
Copy link
Contributor Author

paul121 commented Feb 20, 2023

Thanks @ryanchristo - I missed that. Now it makes more sense how this was working :-)

I removed the regen() function because it shouldn't be necessary. Here is a simple test, demonstrating that running the container the first time creates a localnet + node. Stopping and restarting the container starts where it left off.

$ docker run -v $(pwd):/regen regen-sandbox:latest
Created genesis. chain-id: regen-sandbox, moniker: test_moniker

No $REGEN_MNEMONIC provided, using generated mnemonic:
    ...........removed

Adding key to keyring for account name: addr1
Adding key to keyring for account name: addr2
Adding key to keyring for account name: addr3
Adding key to keyring for account name: addr4
Adding key to keyring for account name: addr5
Setting up validator (from addr1)...
Genesis transaction written to "/regen/.regen/config/gentx/gentx-cb93edeb49841d6c68fabde235f00b9461ea56c3.json"
Collecting gentxs from /regen/.regen/config/gentx into genesis.json
Starting up regen node...
Node started & state inialized!
^C
$ docker run -v $(pwd):/regen regen-sandbox:latest
Regen home (/regen/.regen) already exists, skipping bootstrap...
Starting up regen node...
Node started & state inialized!

Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK. Thanks again @paul121!

@ryanchristo ryanchristo merged commit 489200c into regen-network:main Feb 21, 2023
@paul121 paul121 deleted the fix-sandbox-regen-env branch February 21, 2023 19:18
@ryanchristo
Copy link
Member

@Mergifyio backport release/v5.0.x

@mergify
Copy link
Contributor

mergify bot commented Feb 22, 2023

backport release/v5.0.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 22, 2023
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
(cherry picked from commit 489200c)
ryanchristo pushed a commit that referenced this pull request Feb 22, 2023
)

Co-authored-by: Paul Weidner <paul.weidner@gmail.com>
@ryanchristo ryanchristo mentioned this pull request Mar 23, 2023
27 tasks
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