phetsims / perennial

Maintenance tools that won't change with different versions of chipper checked out
MIT License
2 stars 5 forks source link

MR Process: No clean exit process on error when applying patch with maintenance REPL #350

Closed Luisav1 closed 5 months ago

Luisav1 commented 6 months ago

When trying to apply a patch from scenery to AM sims, it resulted in the error below. I expected full error details but the cursor just remained blinking and the maintenance REPL prompt didn't reappear again. @zepumph said this should not happen and it should have a clean exit process and/or error details.

Release Branches in MR:
1. area-model-algebra 1.3 phet (unreleased)
    pushedMessages:
      https://github.com/phetsims/area-model-multiplication/issues/13
      https://github.com/phetsims/area-model-multiplication/issues/14
2. area-model-multiplication 1.3 phet (unreleased)
    pushedMessages:
      https://github.com/phetsims/area-model-multiplication/issues/13
      https://github.com/phetsims/area-model-multiplication/issues/14

Maintenance Patches in MR:
1.  [gameLevelBanner] (area-model-common) https://github.com/phetsims/area-model-multiplication/issues/13
      b51d78f90cb11538e3ff3b7574c811cdb33ca80b
2.  [textOffCenter] (area-model-common) https://github.com/phetsims/area-model-multiplication/issues/14
      12dd6b03572daeb4496c8cf679f6c8a49af969e8
3.  [memoryLeak] (scenery) https://github.com/phetsims/area-model-algebra/issues/9
      c33c9b9267aa00bd07db9b02dcf7b5562f2624ba
maintenance> m.applyPatches()
0 patches applied
maintenance> m.addNeededPatch( 'area-model-multiplication', '1.3', 'memoryLeak' );
Added patch memoryLeak as needed for area-model-multiplication 1.3
maintenance> m.applyPatches()
m.applyPatches()
^

Uncaught SyntaxError: Invalid or unexpected token
maintenance> Maintenance.applyPatches()
Checked out scenery SHA for area-model-multiplication 1.3
error: git cherry-pick --abort failed: c33c9b9267aa00bd07db9b02dcf7b5562f2624ba on scenery
Maintenance task failed:
Error: Failure applying patch scenery to area-model-multiplication 1.3: Error: git cherry-pick --abort in ../scenery failed with exit code 128
stderr:
error: no cherry-pick or revert in progress
fatal: cherry-pick failed

    at Maintenance.applyPatches (C:\Users\luisa\phetsims\perennial\js\common\Maintenance.js:794:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Full Error details:
{}

Based on the lack of error details @zepumph, suggested to try applying the commit before this one however that also resulted in the same error below for the earlier commit.

Release Branches in MR:
1. area-model-algebra 1.3 phet (unreleased)
    needs: memoryLeak0
    pushedMessages:
      https://github.com/phetsims/area-model-multiplication/issues/13
      https://github.com/phetsims/area-model-multiplication/issues/14
2. area-model-multiplication 1.3 phet (unreleased)
    needs: memoryLeak0
    pushedMessages:
      https://github.com/phetsims/area-model-multiplication/issues/13
      https://github.com/phetsims/area-model-multiplication/issues/14

Maintenance Patches in MR:
1.  [gameLevelBanner] (area-model-common) https://github.com/phetsims/area-model-multiplication/issues/13
      b51d78f90cb11538e3ff3b7574c811cdb33ca80b
2.  [textOffCenter] (area-model-common) https://github.com/phetsims/area-model-multiplication/issues/14
      12dd6b03572daeb4496c8cf679f6c8a49af969e8
3.  [memoryLeak] (scenery) https://github.com/phetsims/area-model-algebra/issues/9
      c33c9b9267aa00bd07db9b02dcf7b5562f2624ba
4.  [memoryLeak0] (scenery) https://github.com/phetsims/area-model-algebra/issues/9
      9a00e1e9863bb77b03b13abe0b9e17c7b701b1e9
        area-model-algebra 1.3 phet
        area-model-multiplication 1.3 phet
maintenance> m.applyPatches()
Checked out scenery SHA for area-model-algebra 1.3
error: git cherry-pick --abort failed: 9a00e1e9863bb77b03b13abe0b9e17c7b701b1e9 on scenery
Maintenance task failed:
Error: Failure applying patch scenery to area-model-algebra 1.3: Error: git cherry-pick --abort in ../scenery failed with exit code 128
stderr:
error: no cherry-pick or revert in progress
fatal: cherry-pick failed

    at Maintenance.applyPatches (C:\Users\luisa\phetsims\perennial\js\common\Maintenance.js:794:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Full Error details:
{}
zepumph commented 5 months ago

So to recap, the MR process has a hard error when trying to cherry pick a sha from sun into scenery. I believe this kind of error should be graceful. It is likely quite easy to reproduce. I'll take a look.

zepumph commented 5 months ago

Ok. I added an extra step to check on if the sha exists. It gives an error like this now if we make this mistake again (which I have definitely done).

Error: Failure applying patch chipper to area-model-algebra 1.2: Error: SHA not in chipper: 888641be39cd75bfdb87784ea360df28d216d472
    at Maintenance.applyPatches (C:\Users\mjkauzmann\PHET\git\perennial\js\common\Maintenance.js:801:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Anything else here @Luisav1?

Luisav1 commented 5 months ago

@zepumph Nope, that was all! Closing.