[PR #1466] [MERGED] refactor: fix savestate in pre steps #1960

Closed
opened 2026-03-01 21:53:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1466
Author: @ChristopherHX
Created: 11/26/2022
Status: Merged
Merged: 12/15/2022
Merged by: @mergify[bot]

Base: masterHead: fix-savestate-pre-steps


📝 Commits (9)

📊 Changes

10 files changed (+90 additions, -102 deletions)

View changed files

📝 pkg/model/step_result.go (+0 -1)
📝 pkg/runner/action.go (+3 -3)
📝 pkg/runner/action_test.go (+4 -3)
📝 pkg/runner/command.go (+10 -7)
📝 pkg/runner/command_test.go (+2 -6)
📝 pkg/runner/run_context.go (+1 -0)
📝 pkg/runner/step.go (+16 -25)
📝 pkg/runner/step_action_local_test.go (+7 -24)
📝 pkg/runner/step_action_remote_test.go (+17 -29)
📝 pkg/runner/testdata/GITHUB_STATE/push.yml (+30 -4)

📄 Description

This now refactores the stepresult code

  • pre- and post- are no longer in stepresults
  • stepresults no longer has an invalid state property
  • IntraActionState now stores the GITHUB_STATE

This uncovers a design problem:
you can create steps with an id prefixed with pre-

Reduced the change to only fix a problem, tests in https://github.com/nektos/act/pull/1457 needs to be changed to enable checking this bug

Fixes: #1459


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1466 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 11/26/2022 **Status:** ✅ Merged **Merged:** 12/15/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `fix-savestate-pre-steps` --- ### 📝 Commits (9) - [`1405fc4`](https://github.com/nektos/act/commit/1405fc4ec57ac1b05cf73709c2ccd4c71ba896d8) refactor: fix savestate in pre steps - [`92882d0`](https://github.com/nektos/act/commit/92882d0725e0c0c549806bfc4c3f91836142db6c) fix pre steps collision - [`688125c`](https://github.com/nektos/act/commit/688125c7417f6a21fe443b1fd3856906ad9fa147) fix tests - [`7e1f66d`](https://github.com/nektos/act/commit/7e1f66da40b1e5512d955a58e1495f5b50beef35) remove - [`bae10f1`](https://github.com/nektos/act/commit/bae10f13ba14b6ff9dbba07e7c55b34ba946fde5) Merge branch 'master' of https://github.com/nektos/act into fix-pre-steps-v2 - [`442f071`](https://github.com/nektos/act/commit/442f0715cb4bd8d69a9b5624c5ab8a13b6077c4c) enable tests - [`476818c`](https://github.com/nektos/act/commit/476818cf26cf5a33a656cc45d5ef3414d7473ead) Update pkg/runner/action.go - [`1009f48`](https://github.com/nektos/act/commit/1009f4817dac7dc395ae7f588f8b9fc7a02c5773) Rename InterActionState to IntraActionState - [`6d651f0`](https://github.com/nektos/act/commit/6d651f05928a18e1834ea21fb7eebb328910fefe) Merge branch 'master' into fix-savestate-pre-steps ### 📊 Changes **10 files changed** (+90 additions, -102 deletions) <details> <summary>View changed files</summary> 📝 `pkg/model/step_result.go` (+0 -1) 📝 `pkg/runner/action.go` (+3 -3) 📝 `pkg/runner/action_test.go` (+4 -3) 📝 `pkg/runner/command.go` (+10 -7) 📝 `pkg/runner/command_test.go` (+2 -6) 📝 `pkg/runner/run_context.go` (+1 -0) 📝 `pkg/runner/step.go` (+16 -25) 📝 `pkg/runner/step_action_local_test.go` (+7 -24) 📝 `pkg/runner/step_action_remote_test.go` (+17 -29) 📝 `pkg/runner/testdata/GITHUB_STATE/push.yml` (+30 -4) </details> ### 📄 Description This now refactores the stepresult code - pre- and post- are no longer in stepresults - stepresults no longer has an invalid state property - IntraActionState now stores the GITHUB_STATE ~This uncovers a design problem:~ ~you can create steps with an id prefixed with pre-~ ~Reduced the change to only fix a problem, tests in https://github.com/nektos/act/pull/1457 needs to be changed to enable checking this bug~ Fixes: #1459 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1960
No description provided.