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

Split by timings for parallel run #230

Merged
merged 57 commits into from
Jul 21, 2022
Merged

Conversation

trangtran-enya
Copy link
Contributor

@trangtran-enya trangtran-enya commented Jul 2, 2022

📋 Add associated issues, tickets, docs URL here.

Overview

Currently, we already execute testcases in parallel. However, testcases are divided based on filename instead of execution time.
Issue 139

Changes

  • Add mocha-junit-reporter to collect timing data
  • Turn off hardhat-gas-reporter as it conflicts with mocha-junit-reporter. Need discussion?
  • Turn on split by timings
  • split the time it takes for all tests to run in half

Testing

  • integration tests

@trangtran-enya trangtran-enya linked an issue Jul 2, 2022 that may be closed by this pull request
ops/up_local.sh Outdated
Comment on lines 42 to 50
docker-compose build --parallel --no-cache -- builder l2geth l1_chain
docker-compose build --parallel --no-cache -- deployer dtl batch_submitter relayer integration_tests
docker-compose build --no-cache -- boba_message-relayer-fast
docker-compose build --no-cache -- gas_oracle
docker-compose build --no-cache -- boba_deployer
docker-compose build --no-cache -- fraud-detector
docker-compose build --no-cache -- monitor
docker-compose build --no-cache -- verifier
docker-compose build --no-cache -- replica
Copy link
Contributor

Choose a reason for hiding this comment

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

how come caches are disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Testcases in the beginning failed, so I tried to run with image built from latest code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the beginning, this worked. All testcases passed. Now, some testcases using cross-chain message failed.

@@ -5,7 +5,8 @@ import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import 'hardhat-gas-reporter'

const enableGasReport = !!process.env.ENABLE_GAS_REPORT
// const enableGasReport = !!process.env.ENABLE_GAS_REPORT
const enableGasReport = false
Copy link
Contributor

Choose a reason for hiding this comment

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

why doesn't this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the result from GasReport overwrite Timing result, which is used for future run.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@trangtran-enya trangtran-enya Jul 6, 2022

Choose a reason for hiding this comment

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

No, not yet. Let me try. Thanks Ino

The GasReporter is this one, configured through Hard-Hat. Maybe we will meet some problem. But I think I can figure out.

@InoMurko InoMurko force-pushed the 193-unreliable-integration-tests branch from 98bb7da to 6307e60 Compare July 6, 2022 09:58
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2022

Codecov Report

Merging #230 (2085687) into develop (9a5000e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #230   +/-   ##
========================================
  Coverage    47.22%   47.22%           
========================================
  Files           99       99           
  Lines         3867     3867           
  Branches       762      762           
========================================
  Hits          1826     1826           
  Misses        2041     2041           
Flag Coverage Δ
boba-contracts 20.39% <ø> (ø)
contracts 77.71% <ø> (ø)
core-utils 86.80% <ø> (ø)
data-transport-layer 31.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a5000e...2085687. Read the comment docs.

@InoMurko InoMurko force-pushed the 193-unreliable-integration-tests branch from 2085687 to 33309e2 Compare July 19, 2022 09:56
@InoMurko InoMurko marked this pull request as ready for review July 19, 2022 11:38
Copy link
Contributor

@souradeep-das souradeep-das left a comment

Choose a reason for hiding this comment

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

lgtm

@InoMurko InoMurko force-pushed the 193-unreliable-integration-tests branch 3 times, most recently from b2632a4 to 1128ea8 Compare July 19, 2022 14:25
@@ -1044,9 +1044,9 @@ describe('Boba Fee Payment Integration Tests', async () => {
bobaBalance
)
await transferBackTx.wait()
})
}).retries(3)
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we have a retry here? Just retry three times until we don't have enough Boba tokens anymore?

Copy link
Contributor

Choose a reason for hiding this comment

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

flaky test or flaky infra!

Copy link
Contributor

@wsdt wsdt left a comment

Choose a reason for hiding this comment

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

looks great! 🔥

@InoMurko InoMurko added bug Something isn't working enhancement New feature or request labels Jul 19, 2022
@InoMurko InoMurko force-pushed the 193-unreliable-integration-tests branch from 66b7d42 to 4537904 Compare July 21, 2022 09:32
@InoMurko InoMurko merged commit dc4c6d9 into develop Jul 21, 2022
@InoMurko InoMurko deleted the 193-unreliable-integration-tests branch July 21, 2022 11:28
InoMurko pushed a commit that referenced this pull request Aug 8, 2022
* try split by timings

* increase retries

* try to rebuild image

* add mocha options

* update folder

* expose docker volumes

* fix syntax error

* update config

* turn off gas report

* turn off gas report

* build no cache

* default time for missing cases

* try to reduce number of testcases

* try to reduce number of testcases

* change testcase path

* Rewrite file path for next run

* Adjust file path

* Fix typo

* Fix result

* Fix command

* Run full testcases

* Increase parallel

* try with existing images

* try split by timings

* try to rebuild image

* add mocha options

* update folder

* expose docker volumes

* try to reduce number of testcases

* try to reduce number of testcases

* change testcase path

* Rewrite file path for next run

* try mocha multi reporters

* config gas reporter through mocha

* try to remove hardhat reporter

* switch to eth-gas-reporter

* update l1 url for eth-gas-reporter

* fix contracts path

* Force console eth-gas-report

* remove output to file

* run whole testcase with both gas reporter and timing reporter

* run all tests

* retry

* remove no cache, enable gas report, parallel docker builds, parallelism 5

* fix tests

* reduce parallellism

* update yarn and add dependency ignores

* testing the same code twice

* increase timeout for turing tests

* shuf test files

* harden tests

* prevent parallel execution

* response logs

Co-authored-by: Ino Murko <[email protected]>
Co-authored-by: Ino Murko <[email protected]>
(cherry picked from commit dc4c6d9)
InoMurko added a commit that referenced this pull request Aug 9, 2022
* Add BOBA API README (#209)

(cherry picked from commit 5da8638)

* Add new API (#196)

(cherry picked from commit 5621463)

* boba support for faucet (#218)

* boba support for faucet

* withdraw boba

* Update deploy.sh

Co-authored-by: undefined <undefined>
(cherry picked from commit a37780f)

* Feature (Gateway): Ve-Boba Lock for Vote page. (#222)

* add ve endpoints

* changes:
 - fix for avoiding the GA call on local env.
 - create new page for lock for vote.
 - Area Chart as separate common component along with other components.

* changes:
- created separate component for createLock
- Populating the actual value of balance and connect to BOBA options.
- prepare the styles for lock records.

* chagnes:
 - Date picker on the create Lock screen
 - reading the value of radio button in datepicker.
 - redux setup for the lock for vote page
 - network service function schema for lock page.

* changes:
 - removed fetchrecords from interval call
 - calling fetch records for lock on page and creations of new records.
 - tested and populated the records on lock screen
 - create lock to be fixed

* changes- manage lock modals changes.

* changes:
 - create lock fixes
 - extend time of lock
 - increase lock amount fix
 - representation of ration and voting power fixes
 - manage boba locks.
 - static data on chart representation.
 - cleanup

* changes:
 - create lock fixes
 - extend time of lock
 - increase lock amount fix
 - representation of ration and voting power fixes
 - manage boba locks.
 - static data on chart representation.

* changes:  removed-address-rinkeby

* remove-lock-link-from-navigation

* change:
 - fix: pager on records listing
 - fix: disabled button when lock is creating
 - fix: disabled button when extend and increase already trigger.

* - comment cleanup
- added ENV var to show lock in option.

* Change:
 1. fix for the constants to separate file
 2. fix for the chart data to 3,9,12
 3. fix added env details in readme
 3. fix copyright to bobanetwork

* removed unused code.

* removed empty file along with copyright change

* Add contract address and import package

* change:
1. fetchrecords on completion of lock, increase, extends time tx.
2. fix button disabling on value getting empty
3. fix for the value to empty with placeholder as '0'

* rinkeby address for boba contracts

* change:
 - fix typo in ratio.
 - fix in month => this month
 - voting power label update in increase amount.

* fix: vpower calculation on increase lock

* added suggested change.

Co-authored-by: souradeep-das <[email protected]>
Co-authored-by: cby3149 <[email protected]>
(cherry picked from commit 7228802)

* update sentry sdk & Zendesk Integration. (#254)

1. Update Sentry SDK.
2. ZenDesk Integration on Gateway.

(cherry picked from commit 6140e5e)

* updated copyrights to bobanetwork (#252)

updated copyrights to bobanetwork

(cherry picked from commit aa06b5f)

* Update boba node for the community and remove release tag (#256)

(cherry picked from commit d9e6a4f)

* Add the link to community-built tools for Turing (#190)

* Add the link to community-built tools for Turing

* Update turing.md

(cherry picked from commit bd3dc5a)

* add veBoba contracts (#257)

* add veBoba contracts

* update deps

(cherry picked from commit 9a41eaf)

* Split by timings for parallel run (#230)

* try split by timings

* increase retries

* try to rebuild image

* add mocha options

* update folder

* expose docker volumes

* fix syntax error

* update config

* turn off gas report

* turn off gas report

* build no cache

* default time for missing cases

* try to reduce number of testcases

* try to reduce number of testcases

* change testcase path

* Rewrite file path for next run

* Adjust file path

* Fix typo

* Fix result

* Fix command

* Run full testcases

* Increase parallel

* try with existing images

* try split by timings

* try to rebuild image

* add mocha options

* update folder

* expose docker volumes

* try to reduce number of testcases

* try to reduce number of testcases

* change testcase path

* Rewrite file path for next run

* try mocha multi reporters

* config gas reporter through mocha

* try to remove hardhat reporter

* switch to eth-gas-reporter

* update l1 url for eth-gas-reporter

* fix contracts path

* Force console eth-gas-report

* remove output to file

* run whole testcase with both gas reporter and timing reporter

* run all tests

* retry

* remove no cache, enable gas report, parallel docker builds, parallelism 5

* fix tests

* reduce parallellism

* update yarn and add dependency ignores

* testing the same code twice

* increase timeout for turing tests

* shuf test files

* harden tests

* prevent parallel execution

* response logs

Co-authored-by: Ino Murko <[email protected]>
Co-authored-by: Ino Murko <[email protected]>
(cherry picked from commit dc4c6d9)

* Symptomatic Fix - Turing Examples Tests (#263)

* symptomatic fix

* lending fix

* Updated config.yml

* example tests spec refactoring

* Updated config.yml

* Updated config.yml

(cherry picked from commit fd7968f)

* Wsdt/erigon (#258)

* erigon

* submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Updated Erigon submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

* Updated Erigon submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

trigger

* submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Updated Erigon submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

* Updated Erigon submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

* Updated Erigon submodule

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

* Update sync-submodules.yml

Co-authored-by: Git bot <[email protected]>
Co-authored-by: Github bot <>
(cherry picked from commit dc23297)

* Wsdt/turing twitter (#238)

* init

* added tests, first draft

* twitter - debugging aws, ..

* twitter turing - seems to work

* twitter api integration

* clean up

* twitter turing works - first draft

* further twitter data preparation

* nft -> faucet, bytes debugging, twitter gates, etc.

* cooldown adapted to faucet logic

* clarify boba Bubble auth flow

* converted to regular claim

* ui integration & testing

* cleanup

* minor clean

* Wsdt/turing twitter meta (#157)

* oz way

* meta works

* withdraw

* ui

* debug

* clean

* clean git

* some fixes

* finally works

* clean

Co-authored-by: Boyuan-Chen <[email protected]>

* update wording

* Wsdt/turing twitter meta (#161)

* oz way

* meta works

* withdraw

* ui

* debug

* clean

* clean git

* some fixes

* finally works

* clean

* production ready, fresh deployments, etc.

Co-authored-by: Boyuan-Chen <[email protected]>

* move UI to token page

* adding constraints to view

* grammar

* add proper error messages

* Âease twitter constraints

* remove monsters.js faucet code

* test fix

* Add a function for loading contracts (#170)

* Wsdt/turing twitter pay (#171)

* first draft

* fe integration, registration done

* fe send funds

* Twitter Pay: First draft

* collision

* additional collision protection

* mv to core

* Delete build.toml

* rm unused function

* Turing TwitterPay tests

* Update boba-contracts-unit.yml

* Update boba-contracts-unit.yml

* Update boba-contracts-unit.yml

* Update boba-contracts-unit.yml

* Update boba-contracts-unit.yml

* Update boba-contracts-unit.yml

* Update boba-contracts-unit.yml

* cleanup

* python clean

* merge

* TwitterPay added to deployer

* adapted TwitterPay test (local, py, fixed pre-deploy, ..)

* undo deployer add, mv to boba_examples

* Update boba-contracts-unit.yml

* update yarn lock

Co-authored-by: CAPtheorem <[email protected]>
Co-authored-by: undefined <undefined>
Co-authored-by: Ino Murko <[email protected]>

* rm twitterpay from gateway

* Update README.md

* PR review fixes: clean up

Co-authored-by: CAPtheorem <[email protected]>
Co-authored-by: Boyuan-Chen <[email protected]>
Co-authored-by: Ino Murko <[email protected]>
(cherry picked from commit 15fcfe1)

* Adds reference-optimistic-geth submodule (#274)

* submodule

* adds new pr reviewers

* Update sync-submodules.yml

(cherry picked from commit bffbb93)

* auth faucet done (#282)

(cherry picked from commit e8f4286)

* Update sync-submodules.yml (#281)

Old branch replaced

(cherry picked from commit 5aae0c2)

* feat: modify community DAO to work with veBoba (#270)

* feat: modify dao to work with veNFTs

* add merge ve comment

* add tests

* update depl script to custom input ve addr

* remove unused params and update thresholds

(cherry picked from commit c80667c)

* ve: update to proxy compatible contracts (#287)

* update to proxy compatible contracts

* update tests

(cherry picked from commit 2ea7f7a)

* Updated submodules (#289)

Co-authored-by: Github bot <>
(cherry picked from commit 85b908d)

Co-authored-by: Boyuan-Chen <[email protected]>
Co-authored-by: Riedl Kevin, Bsc <[email protected]>
Co-authored-by: Sahil K <[email protected]>
Co-authored-by: 0xEstarriol <[email protected]>
Co-authored-by: Souradeep Das <[email protected]>
Co-authored-by: trangtran-enya <[email protected]>
Co-authored-by: Riedl Kevin, Bsc <[email protected]>
Co-authored-by: bobabot-enya-ai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-reviewers bug Something isn't working enhancement New feature or request M-integration M-ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unreliable integration tests
6 participants