Compare commits

..

6 Commits

Author SHA1 Message Date
Richard Holland
90cacbcb46 Merge branch 'dev' into fix-docker-cleanup-empty-path 2026-09-29 05:40:22 +10:00
tequ
a5163eeb50 Extract Transactor::finishApply from Transactor::operator() (#843)
Pure move of the post-apply pipeline (tec handling, invariants,
balance rewards, weak hooks, commit) into a helper so it can be
invoked more than once. No behaviour change.
2026-09-29 05:39:57 +10:00
Richard Holland
9cd9307dab Merge branch 'dev' into fix-docker-cleanup-empty-path 2026-09-29 05:35:50 +10:00
Richard Holland
3bc435864f disable onchainmanifests for this release (#845) 2026-09-29 05:35:30 +10:00
Nicholas Dudfield
086ffa5471 fix(ci): guard docker cleanup with one explicit empty-path check
Replace the job-level condition and the ${CHECKOUT_PATH:?} expansion with a
single shell if: an empty path logs why nothing was cleaned and exits 0.
2026-09-28 13:59:51 +07:00
Nicholas Dudfield
55b418d224 fix(ci): skip docker cleanup when the run has no checkout path
A run cancelled before its checkout job started never sets checkout_path,
but cleanup runs under always(), so its rm -rf targeted the workspace root
and deleted every in-flight run's checkout on the shared runner. Skip
cleanup without a path, and make the shell refuse an empty one.

Fixes #838
2026-09-28 13:17:02 +07:00
3 changed files with 25 additions and 0 deletions

View File

@@ -91,5 +91,11 @@ jobs:
- name: Cleanup workspace
run: |
CHECKOUT_PATH="${{ needs.checkout.outputs.checkout_path }}"
# A run cancelled before checkout has no path; an empty one would
# make the rm below delete every run's checkout on the runner.
if [[ -z "${CHECKOUT_PATH}" ]]; then
echo "No checkout path (cancelled before checkout); nothing to clean"
exit 0
fi
echo "Cleaning workspace for ${CHECKOUT_PATH}"
rm -rf "${{ github.workspace }}/${CHECKOUT_PATH}"

View File

@@ -2050,6 +2050,16 @@ Transactor::operator()()
if (auto stream = j_.trace())
stream << "preclaim result: " << transToken(result);
return finishApply(result, hooksEnabled, aawMap, tsh);
}
ApplyResult
Transactor::finishApply(
TER result,
bool hooksEnabled,
std::map<AccountID, std::set<uint256>>& aawMap,
std::vector<std::pair<AccountID, bool>>& tsh)
{
bool applied = isTesSuccess(result);
auto fee = ctx_.tx.getFieldAmount(sfFee).xrp();

View File

@@ -228,6 +228,15 @@ protected:
// deduced until after apply i.e. pathing
// participants, crossed offers
// The post-apply pipeline of operator(): tec handling (reset),
// invariants, balance rewards, weak hooks and commit.
ApplyResult
finishApply(
TER result,
bool hooksEnabled,
std::map<AccountID, std::set<uint256>>& aawMap,
std::vector<std::pair<AccountID, bool>>& tsh);
///////////////////////////////////////////////////
TER