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: catch exception to keep loop running #705

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

kstroobants
Copy link
Contributor

@kstroobants kstroobants commented Dec 9, 2024

Fixes #703

What

  • Added try except in _appeal_window so it won't stop running.
  • Print out the exception for further debug.
  • For the hardhat error. The appeal_window will execute normally when a connection is established.

Why

  • To fix a bug

Testing done

  • Tested the bug fix by rerunning the studio when there is a transaction that is still in the accepted state in the database.

Decisions made

Checks

  • I have tested this code
  • I have reviewed my own PR
  • I have created an issue for this PR
  • I have set a descriptive PR title compliant with conventional commits

Reviewing tips

User facing release notes

Keep appeal_window loop running when it has an exception

@kstroobants kstroobants linked an issue Dec 9, 2024 that may be closed by this pull request
@kstroobants kstroobants self-assigned this Dec 9, 2024
@kstroobants kstroobants merged commit b412609 into main Dec 10, 2024
17 checks passed
@kstroobants kstroobants deleted the 703-handle-errors-on-finality-window branch December 10, 2024 13:56
cristiam86 added a commit that referenced this pull request Dec 10, 2024
* chore(deps): update dependency @vue/eslint-config-prettier to v10

* fix: adding Hardhat Dockerfile in GitHub Workflow (#693)

* fix(hardhat): prevent race conditions in contract deployment (#704)

* fix(hardhat): Add contract deployment and healthcheck to prevent race conditions

- Added healthcheck to hardhat service in docker-compose.yml
- Modified Dockerfile.hardhat to deploy contracts after node is ready
- Added proper service dependency in docker-compose.yml to ensure jsonrpc waits for hardhat

This fixes the race condition where jsonrpc would try to access hardhat accounts before they were available, causing the finality window to crash.

* fix: use named volume for hardhat artifacts to fix permissions issue

- Changed hardhat artifacts from bind mount to named volume
- This ensures correct permissions are maintained
- Fixes CI/CD pipeline issues with hardhat compilation

* chore(docker): add curl to Dockerfile.hardhat and update healthcheck method

* chore(docker): merge RUN instructions and sort package names in Dockerfile

* fix: change health check command to nc instead of curl

* fix: healthcheck trying curl with increased retries

---------

Co-authored-by: kstroobants <[email protected]>

* fix: catch exception to keep loop running (#705)

Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: add BACKEND_BUILD_TARGET used in docker compose file in .env.example to run in debug (#707)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: Update reviewers for renovate (#694)

Co-authored-by: Cristiam Da Silva <[email protected]>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>
cristiam86 added a commit that referenced this pull request Dec 10, 2024
* chore(deps): update dependency @vue/eslint-config-prettier to v10

* fix: adding Hardhat Dockerfile in GitHub Workflow (#693)

* fix(hardhat): prevent race conditions in contract deployment (#704)

* fix(hardhat): Add contract deployment and healthcheck to prevent race conditions

- Added healthcheck to hardhat service in docker-compose.yml
- Modified Dockerfile.hardhat to deploy contracts after node is ready
- Added proper service dependency in docker-compose.yml to ensure jsonrpc waits for hardhat

This fixes the race condition where jsonrpc would try to access hardhat accounts before they were available, causing the finality window to crash.

* fix: use named volume for hardhat artifacts to fix permissions issue

- Changed hardhat artifacts from bind mount to named volume
- This ensures correct permissions are maintained
- Fixes CI/CD pipeline issues with hardhat compilation

* chore(docker): add curl to Dockerfile.hardhat and update healthcheck method

* chore(docker): merge RUN instructions and sort package names in Dockerfile

* fix: change health check command to nc instead of curl

* fix: healthcheck trying curl with increased retries

---------

Co-authored-by: kstroobants <[email protected]>

* fix: catch exception to keep loop running (#705)

Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: add BACKEND_BUILD_TARGET used in docker compose file in .env.example to run in debug (#707)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: Update reviewers for renovate (#694)

Co-authored-by: Cristiam Da Silva <[email protected]>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>
cristiam86 added a commit that referenced this pull request Dec 10, 2024
…698)

* chore(deps): update dependency @vue/eslint-config-typescript to v14

* fix: adding Hardhat Dockerfile in GitHub Workflow (#693)

* fix(hardhat): prevent race conditions in contract deployment (#704)

* fix(hardhat): Add contract deployment and healthcheck to prevent race conditions

- Added healthcheck to hardhat service in docker-compose.yml
- Modified Dockerfile.hardhat to deploy contracts after node is ready
- Added proper service dependency in docker-compose.yml to ensure jsonrpc waits for hardhat

This fixes the race condition where jsonrpc would try to access hardhat accounts before they were available, causing the finality window to crash.

* fix: use named volume for hardhat artifacts to fix permissions issue

- Changed hardhat artifacts from bind mount to named volume
- This ensures correct permissions are maintained
- Fixes CI/CD pipeline issues with hardhat compilation

* chore(docker): add curl to Dockerfile.hardhat and update healthcheck method

* chore(docker): merge RUN instructions and sort package names in Dockerfile

* fix: change health check command to nc instead of curl

* fix: healthcheck trying curl with increased retries

---------

Co-authored-by: kstroobants <[email protected]>

* fix: catch exception to keep loop running (#705)

Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: add BACKEND_BUILD_TARGET used in docker compose file in .env.example to run in debug (#707)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: Update reviewers for renovate (#694)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update dependency @vue/eslint-config-typescript to v14

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>
Copy link
Contributor

🎉 This PR is included in version 0.29.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

cristiam86 added a commit that referenced this pull request Dec 11, 2024
* chore(deps): update dependency @vue/eslint-config-prettier to v10 (#697)

* chore(deps): update dependency @vue/eslint-config-prettier to v10

* fix: adding Hardhat Dockerfile in GitHub Workflow (#693)

* fix(hardhat): prevent race conditions in contract deployment (#704)

* fix(hardhat): Add contract deployment and healthcheck to prevent race conditions

- Added healthcheck to hardhat service in docker-compose.yml
- Modified Dockerfile.hardhat to deploy contracts after node is ready
- Added proper service dependency in docker-compose.yml to ensure jsonrpc waits for hardhat

This fixes the race condition where jsonrpc would try to access hardhat accounts before they were available, causing the finality window to crash.

* fix: use named volume for hardhat artifacts to fix permissions issue

- Changed hardhat artifacts from bind mount to named volume
- This ensures correct permissions are maintained
- Fixes CI/CD pipeline issues with hardhat compilation

* chore(docker): add curl to Dockerfile.hardhat and update healthcheck method

* chore(docker): merge RUN instructions and sort package names in Dockerfile

* fix: change health check command to nc instead of curl

* fix: healthcheck trying curl with increased retries

---------

Co-authored-by: kstroobants <[email protected]>

* fix: catch exception to keep loop running (#705)

Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: add BACKEND_BUILD_TARGET used in docker compose file in .env.example to run in debug (#707)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: Update reviewers for renovate (#694)

Co-authored-by: Cristiam Da Silva <[email protected]>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>

* chore(deps): update sonarsource/sonarcloud-github-action action to v4 (#696)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update node.js to v22 (#695)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update codecov/codecov-action action to v5 (#660)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update dependency pre-commit to v4 (#557)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update dependency @types/chai to v5 (#551)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* fix(deps): update all non-major dependencies (#534)

* fix(deps): update all non-major dependencies

* remove trailing whitespace

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Den <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update dependency @vitejs/plugin-vue-jsx to v4 (#514)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: updated target branch to staging

* chore: update dependencies

* chore(deps): update dependency @vue/eslint-config-prettier to v10 (#716)

* chore(deps): update dependency @vue/eslint-config-prettier to v10

* fix: adding Hardhat Dockerfile in GitHub Workflow (#693)

* fix(hardhat): prevent race conditions in contract deployment (#704)

* fix(hardhat): Add contract deployment and healthcheck to prevent race conditions

- Added healthcheck to hardhat service in docker-compose.yml
- Modified Dockerfile.hardhat to deploy contracts after node is ready
- Added proper service dependency in docker-compose.yml to ensure jsonrpc waits for hardhat

This fixes the race condition where jsonrpc would try to access hardhat accounts before they were available, causing the finality window to crash.

* fix: use named volume for hardhat artifacts to fix permissions issue

- Changed hardhat artifacts from bind mount to named volume
- This ensures correct permissions are maintained
- Fixes CI/CD pipeline issues with hardhat compilation

* chore(docker): add curl to Dockerfile.hardhat and update healthcheck method

* chore(docker): merge RUN instructions and sort package names in Dockerfile

* fix: change health check command to nc instead of curl

* fix: healthcheck trying curl with increased retries

---------

Co-authored-by: kstroobants <[email protected]>

* fix: catch exception to keep loop running (#705)

Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: add BACKEND_BUILD_TARGET used in docker compose file in .env.example to run in debug (#707)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: Update reviewers for renovate (#694)

Co-authored-by: Cristiam Da Silva <[email protected]>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>

* chore(deps): update node.js to v22 (#717)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: updated frontend dependencies config

* fix: dependencies

* chore(deps): update dependency @vue/eslint-config-typescript to v14 (#698)

* chore(deps): update dependency @vue/eslint-config-typescript to v14

* fix: adding Hardhat Dockerfile in GitHub Workflow (#693)

* fix(hardhat): prevent race conditions in contract deployment (#704)

* fix(hardhat): Add contract deployment and healthcheck to prevent race conditions

- Added healthcheck to hardhat service in docker-compose.yml
- Modified Dockerfile.hardhat to deploy contracts after node is ready
- Added proper service dependency in docker-compose.yml to ensure jsonrpc waits for hardhat

This fixes the race condition where jsonrpc would try to access hardhat accounts before they were available, causing the finality window to crash.

* fix: use named volume for hardhat artifacts to fix permissions issue

- Changed hardhat artifacts from bind mount to named volume
- This ensures correct permissions are maintained
- Fixes CI/CD pipeline issues with hardhat compilation

* chore(docker): add curl to Dockerfile.hardhat and update healthcheck method

* chore(docker): merge RUN instructions and sort package names in Dockerfile

* fix: change health check command to nc instead of curl

* fix: healthcheck trying curl with increased retries

---------

Co-authored-by: kstroobants <[email protected]>

* fix: catch exception to keep loop running (#705)

Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: add BACKEND_BUILD_TARGET used in docker compose file in .env.example to run in debug (#707)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore: Update reviewers for renovate (#694)

Co-authored-by: Cristiam Da Silva <[email protected]>

* chore(deps): update dependency @vue/eslint-config-typescript to v14

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Cristiam Da Silva <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>

* chore(deps): update codecov/codecov-action action to v5 (#719)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cristiam Da Silva <[email protected]>

* fix: docker python images version

* fix: removed unused dependencies

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edinaldo Pereira da Silva Junior <[email protected]>
Co-authored-by: Miguel Paya <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: kstroobants <[email protected]>
Co-authored-by: Agustín Díaz <[email protected]>
Co-authored-by: Den <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle errors on finality window
2 participants