Skip to content

Commit

Permalink
fix: use bigger runner for multichain (#370)
Browse files Browse the repository at this point in the history
* use bigger runner for multichain

* add extra logs

* do not build docker image for tests
  • Loading branch information
itegulov authored Nov 17, 2023
1 parent ac994c5 commit ccb9bf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/multichain-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
# FIXME: macos-latest-xl is disabled since colima is erroring out right now
os: [ubuntu-latest]
os: [ubuntu-22.04-4core]
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -46,19 +46,6 @@ jobs:
docker pull ghcr.io/near/near-lake-indexer:e6519c922435f3d18b5f2ddac5d1ec171ef4dd6b
docker pull localstack/localstack:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.multichain
tags: near/mpc-recovery-node
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down
12 changes: 6 additions & 6 deletions node/src/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ pub async fn message<U: IntoUrl>(
url: U,
message: MpcMessage,
) -> Result<(), SendError> {
let _span = tracing::info_span!("message_request");
let mut url = url.into_url().unwrap();
url.set_path("msg");
tracing::debug!(%url, "making http request");
let action = || async {
let response = client
.post(url.clone())
Expand Down Expand Up @@ -56,18 +58,16 @@ pub async fn message<U: IntoUrl>(
Retry::spawn(retry_strategy, action).await
}

pub async fn join<U: IntoUrl>(
client: &Client,
url: U,
participant: &Participant,
) -> Result<(), SendError> {
pub async fn join<U: IntoUrl>(client: &Client, url: U, me: &Participant) -> Result<(), SendError> {
let _span = tracing::info_span!("join_request", ?me);
let mut url = url.into_url().unwrap();
url.set_path("join");
tracing::debug!(%url, "making http request");
let action = || async {
let response = client
.post(url.clone())
.header("content-type", "application/json")
.json(&participant)
.json(&me)
.send()
.await
.map_err(SendError::ReqwestClientError)?;
Expand Down

0 comments on commit ccb9bf4

Please sign in to comment.