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(ci): easily point smoke tests to preview-env with env vars #1516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aajimal
Copy link
Contributor

@aajimal aajimal commented Sep 18, 2024

Summary

Point sequencer_rpc, eth_rpc, and eth_ws URLs to a PR preview environment based on environment variables. Env vars can be any of the following:

  • PR (sets sequencer_rpc_url, eth_rpc, and eth_ws to point to PR)
  • PR_SEQUENCER_RPC (sets only sequencer_rpc_url)
  • PR_ETH_RPC (sets only eth_rpc_url)
  • PR_ETH_WS (sets only eth_ws_url)

Background

Allow developers to point to pull-request preview environments based on setting environment variables before running just commands.

Changes

  • Update sequencer_rpc_url, eth_rpc_url, and eth_ws_url to check for an env var specifying a pull-request number prior to being set.

Testing

Manually by setting each environment variable to verify scripts properly point to the right value.

@aajimal aajimal added the docker-build used to trigger docker builds on PRs label Sep 18, 2024
@github-actions github-actions bot added the cd label Sep 18, 2024
@aajimal aajimal added evm pertains to EVM sequencer pertaining to the astria-sequencer crate cd and removed cd preview labels Sep 18, 2024
@aajimal aajimal added preview and removed preview labels Sep 23, 2024
@aajimal aajimal force-pushed the preview-env-vars branch 2 times, most recently from d58e937 to 39f7bb2 Compare September 24, 2024 21:15
@aajimal aajimal removed sequencer pertaining to the astria-sequencer crate evm pertains to EVM docker-build used to trigger docker builds on PRs preview labels Sep 24, 2024
@aajimal aajimal changed the title fix(ci): point smoke tests to preview-env with env vars fix(ci): easily point smoke tests to preview-env with env vars Sep 25, 2024
@aajimal aajimal marked this pull request as ready for review September 25, 2024 15:36
@aajimal aajimal requested a review from a team as a code owner September 25, 2024 15:36
Comment on lines +206 to +226
# Set env var: PR_SEQUENCER_RPC or PR to point to a remote preview environment
pr_sequencer_rpc := env("PR_SEQUENCER_RPC", env("PR", ""))
sequencer_rpc_url := if pr_sequencer_rpc == "" {"http://rpc.sequencer.localdev.me"} else {replace("http://rpc.sequencer.pr-#.dev.astria.org", "#", pr_sequencer_rpc)}

Choose a reason for hiding this comment

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

GRPC!!

@aajimal aajimal enabled auto-merge October 2, 2024 23:37
@aajimal aajimal added this pull request to the merge queue Oct 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 3, 2024
@aajimal aajimal added this pull request to the merge queue Oct 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants