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

build test #16652

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

build test #16652

wants to merge 6 commits into from

Conversation

ettec
Copy link
Collaborator

@ettec ettec commented Mar 1, 2025

fix for https://smartcontract-it.atlassian.net/browse/CAPPL-607, executes the capabilities in parallel. Note, it doesn't use a threadpool as suggested on the call as threads in golang are cheap to instantiate, however it does limit the number of capability executions that can run in parallel which is the desired outcome.

Copy link
Contributor

github-actions bot commented Mar 1, 2025

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@ettec ettec marked this pull request as ready for review March 2, 2025 15:26
@ettec ettec requested review from a team as code owners March 2, 2025 15:26

// ExecuteTask executes a task in parallel, returning ErrMaxParallelExecutionLimitReached if the maximum number of
// parallel executing tasks has been reached. The task is executed with the given context.
func (t *parallelExecutionLimiter) ExecuteTask(ctx context.Context, task func(ctx context.Context)) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where are we calling this?

// parallel executing tasks has been reached. The task is executed with the given context.
func (t *parallelExecutionLimiter) ExecuteTask(ctx context.Context, task func(ctx context.Context)) error {
if !t.sem.TryAcquire(1) {
return ErrMaxParallelExecutionLimitReached
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of failing? What are we going to do if this starts failing in production?

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.

2 participants