Skip to content

Conversation

@acabarbaye
Copy link
Contributor

Description

  • SAGA orchestrator support for coordinated multi-step transactions with rollback handling
  • extended parallelisation groups

Test Coverage

  • This change is covered by existing or additional automated tests.
  • Manual testing has been performed (and evidence provided) as automated testing was not feasible.
  • Additional tests are not required for this change (e.g. documentation update).

// CopyFunctions copies the registered functions to group g
CopyFunctions(g IExecutionGroup[T])
Len() int
// Clone returns a new execution group with all the same functions being registered.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we provide some context on what happens if a group has already been executed.

Particularly in cases where you have used OnlyOnce as an option.

Should Execute be idempotent across clones? Or should it be like a context?

)

//go:generate go tool mockgen -destination=./mocks/mock_$GOPACKAGE.go -package=mocks io.Closer
////go:generate go tool mockgen -destination=./mocks/mock_$GOPACKAGE.go -package=mocks io.Closer
Copy link
Contributor

Choose a reason for hiding this comment

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

reason for this?

Copy link
Contributor Author

@acabarbaye acabarbaye Dec 15, 2025

Choose a reason for hiding this comment

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

mockgen now fails for some reason when it comes to use interfaces from a different package. This is so that we can still run go generate ./...

}
}

func (g *PriorityExecutionGroup[T]) RegisterFunctions(functionSeq iter.Seq[T]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the point of using iterators here?

Iterators are lazy but we will want to evaluate them all at once to register them right?

And it makes it harder to register from scratch because you have to have some function that returns an iterator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so this is an addition to the registerFunction(slice) so you don't have to use it.
the purpose of this is so that we can have a more functional API since we can provide something like collection.MapSequence(collection.RangeSequence(),i->func()...).

joshjennings98
joshjennings98 previously approved these changes Dec 15, 2025
Copy link
Contributor

@joshjennings98 joshjennings98 left a comment

Choose a reason for hiding this comment

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

Just a few comments but nothing big

Co-authored-by: Josh <josh.jennings@arm.com>
Co-authored-by: Adrien CABARBAYE <adrien.cabarbaye@arm.com>
@acabarbaye acabarbaye merged commit d40ccf3 into master Dec 15, 2025
10 of 12 checks passed
@acabarbaye acabarbaye deleted the transaction branch December 15, 2025 13:07
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