Skip to content

[raft/scd] Return result and error in TransactWithResult - #1651

Closed
MariemBaccari wants to merge 10 commits into
interuss:masterfrom
Orbitalize:fix_transactwithresult
Closed

[raft/scd] Return result and error in TransactWithResult#1651
MariemBaccari wants to merge 10 commits into
interuss:masterfrom
Orbitalize:fix_transactwithresult

Conversation

@MariemBaccari

@MariemBaccari MariemBaccari commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Chained PR: #1627 -> #1642 -> #1643 -> #1644 -> #1645 -> #1646 -> #1649 -> #1650 -> #1651 -> #1653 -> #1654 -> #1656 -> #1657 -> #1655 -> #1666 -> #1667 -> #1668 -> #1669

Fix TransactWithResult to return both the result and the error. This is needed by CreateOperationalIntentReference which returns both an error and a AirspaceConflictResponse result.

@mickmis mickmis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Have you considered instead introducing a new type containing both return values (ChangeOperationalIntentReferenceResponse and AirspaceConflictResponse)?
Because:

  • I'd say it's not very Go-idiomatic to return both a value and an error (although we already do that I agree)
  • But worse: the handler (#1655) is going to have to have to cast the same result to different types and this is to be avoided if possible

@MariemBaccari

Copy link
Copy Markdown
Contributor Author

@mickmis That's a great point ... I will close this PR and add the fix to #1655 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dss-raft Relating to the application-layer consensus implemenation based on raft

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants