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

[TT-922] Universal concurrent executor #927

Merged
merged 14 commits into from
Apr 29, 2024
Merged

[TT-922] Universal concurrent executor #927

merged 14 commits into from
Apr 29, 2024

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Apr 25, 2024

I found myself repeating the same patter in chainlink repo, when migrating Automation tests that require concurrent deployment with Seth and decides to abstract it away and add to CTF for reuse.


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes improve the concurrency utilities by introducing a new ConcurrentExecutor class that handles tasks in parallel, enhancing error handling and task distribution. The addition of txpool, debug, trace modules to nethermind_eth2.go extends the JSON-RPC capabilities of the Nethermind client. Adjustments in reorg.go aim to standardize constants related to Ethereum Geth nodes, potentially simplifying configuration or deployment logic. The introduction of a DivideSlice utility function in slice.go facilitates more efficient division of workloads for concurrent processing.

What

  • concurrency/example.go introduces a new file demonstrating the deployment of contracts with configurable and identical settings in a concurrent manner.
  • concurrency/executor.go adds a new ConcurrentExecutor class to manage concurrent task execution with improved error handling and task distribution logic.
  • concurrency/executor_test.go provides tests for the ConcurrentExecutor class, ensuring functionality such as fail-fast behavior and task execution with varying concurrency levels.
  • docker/test_env/nethermind_eth2.go updates the --JsonRpc.EnabledModules parameter to include txpool, debug, trace modules, enhancing the JSON-RPC functionalities of the Nethermind Ethereum client.
  • k8s/pkg/helm/reorg/reorg.go defines new constants (URLsKey, TXNodesAppLabel, MinerNodesAppLabel) likely for more standardized handling or identification of Ethereum Geth nodes in Kubernetes deployments.
  • utils/slice/slice.go introduces a utility function DivideSlice for evenly dividing a slice into a specified number of parts, useful for distributing tasks among workers in concurrent operations.

Copy link
Contributor

@AnieeG AnieeG left a comment

Choose a reason for hiding this comment

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

Partial review

concurrency/executor.go Outdated Show resolved Hide resolved
concurrency/executor.go Show resolved Hide resolved
@Tofel Tofel marked this pull request as ready for review April 25, 2024 15:10
@Tofel Tofel requested review from sebawo and a team as code owners April 25, 2024 15:10
@kalverra kalverra self-requested a review April 25, 2024 15:38
concurrency/example.go Outdated Show resolved Hide resolved
concurrency/executor.go Outdated Show resolved Hide resolved
utils/slice/slice.go Show resolved Hide resolved
concurrency/executor_test.go Outdated Show resolved Hide resolved
concurrency/executor.go Show resolved Hide resolved
Tofel added 2 commits April 26, 2024 10:57
…chainlink-testing-framework into tt_922_automation_seth
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
4.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube

@Tofel Tofel merged commit a89f080 into main Apr 29, 2024
19 of 20 checks passed
@Tofel Tofel deleted the tt_922_automation_seth branch April 29, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants