Skip to content

Commit

Permalink
chore: debug
Browse files Browse the repository at this point in the history
Signed-off-by: nikolay <[email protected]>
  • Loading branch information
natanasow committed Nov 15, 2024
1 parent d7a5131 commit 11b9e9f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
54 changes: 50 additions & 4 deletions .github/workflows/flow-pull-request-checks-on-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,22 @@ jobs:
node-version: [20.x]

steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Update Homebrew
run: |
echo "::group::Updating Homebrew"
brew update --preinstall
echo "::endgroup::"
shell: bash

- name: Install Lima
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -70,6 +80,7 @@ jobs:
curl -fsSL "https://github.com/lima-vm/lima/releases/download/${LIMA_VERSION}/lima-${LIMA_VERSION:1}-$(uname -s)-$(uname -m).tar.gz" | tar Cxzvm /usr/local
echo "::endgroup::"
shell: bash

- name: Install Colima
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -89,6 +100,7 @@ jobs:
install colima-$(uname)-$(uname -m) /usr/local/bin/colima
echo "::endgroup::"
shell: bash

- name: Workaround for Python conflicts in GHA Runners
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
Expand All @@ -99,6 +111,7 @@ jobs:
brew uninstall --ignore-dependencies python@3 || true
brew install --overwrite --force python@3
shell: bash

- name: Install QEMU, Docker client, and Docker Compose
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
Expand All @@ -112,6 +125,7 @@ jobs:
brew install qemu.rb 2>&1 | tee install.log
echo "::endgroup::"
shell: bash

- name: Configure Docker Compose plugin
run: |
mkdir -p ~/.docker/cli-plugins
Expand All @@ -123,11 +137,43 @@ jobs:
run: |
CPU_COUNT=$(sysctl -n hw.ncpu)
MEMORY=$(sysctl hw.memsize | awk '{print $2/1024/1024/1024}')
COLIMA_ARGS="--cpu 3 --memory 11 --arch x86_64 --network-address"
COLIMA_ARGS="--cpu 3 --memory 10 --arch x86_64 --network-address"
echo "::group::Starting Colima with args: $COLIMA_ARGS"
colima start $COLIMA_ARGS
echo "::endgroup::"
shell: bash

- name: Install deps
run: |
npm ci
cd test/smoke
npm ci
- name: Create temp folders
run: |
mkdir -p /Users/runner/work/hedera-local-node/hedera-local-node/hedera-local-node/network-logs/node/logs
mkdir -p /Users/runner/work/hedera-local-node/hedera-local-node/hedera-local-node/network-logs/node/stats
mkdir -p /Users/runner/work/hedera-local-node/hedera-local-node/hedera-local-node/network-logs/node/accountBalances/balance0.0.3
mkdir -p /Users/runner/work/hedera-local-node/hedera-local-node/hedera-local-node/network-logs/node/recordStreams/record0.0.3/sidecar
chmod -R 777 /Users/runner/work/hedera-local-node/hedera-local-node/hedera-local-node/
- name: Pull docker images
run: |
docker compose pull
# - name: Run the local node
# uses: step-security/retry@2ab886c0de89f68f146c9b43f53e61abc59c46dc # v3.0.1
# with:
# max_attempts: 3
# timeout_minutes: 30
# command: npm run restart -- --workdir /Users/runner/work/hedera-local-node/hedera-local-node/hedera-local-node
#
# - name: Run smoke test
# uses: step-security/retry@2ab886c0de89f68f146c9b43f53e61abc59c46dc # v3.0.1
# with:
# max_attempts: 5
# timeout_minutes: 3
# command: npm run test:smoke

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
uses: mxschmitt/action-tmate@v3
4 changes: 2 additions & 2 deletions src/services/ConnectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ConnectionService implements IService{
const { host } = this.cliService.getCurrentArgv();
let isReady = false;
// this means that we wait around 100 seconds, normal consensus node startup takes around 60 seconds
let retries = 100;
let retries = parseInt(process.env.FIRING_UP_RETRY_ATTEMPTS ?? '20');
while (!isReady) {
net
.createConnection(port, host)
Expand All @@ -102,7 +102,7 @@ export class ConnectionService implements IService{
});

retries--;
await new Promise((r) => setTimeout(r, 100));
await new Promise((r) => setTimeout(r, 500));
if (retries < 0) {
throw Errors.CONNECTION_ERROR(port);
}
Expand Down

0 comments on commit 11b9e9f

Please sign in to comment.