review-comments: add more descriptive comments to various persist/restoreState callsites.
Co-authored-by: Henry Mercer <henrymercer@github.com> Co-authored-by: Fotis Koutoulakis <nlightnfotis@github.com>
This commit is contained in:
parent
cdceebcb88
commit
9bc4ee10c7
24 changed files with 24 additions and 28 deletions
|
|
@ -564,7 +564,7 @@ const persistedInputsKey = "persisted_inputs";
|
|||
|
||||
/**
|
||||
* Persists all inputs to the action as state that can be retrieved later in the post-action.
|
||||
* This is need due to a runner bug that can cause inputs to be lost in the post-action.
|
||||
* This would be simplified if actions/runner#3514 is addressed.
|
||||
* https://github.com/actions/runner/issues/3514
|
||||
*/
|
||||
export const persistInputs = function () {
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ async function run() {
|
|||
let didUploadTrapCaches = false;
|
||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||
|
||||
// Work around for issue in actions/runner, details at
|
||||
// Make inputs accessible in the `post` step, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
actionsUtil.persistInputs();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ async function runWrapper() {
|
|||
| initActionPostHelper.UploadFailedSarifResult
|
||||
| undefined;
|
||||
try {
|
||||
// Work around for issue in actions/runner, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
// Restore inputs from `init` Action.
|
||||
restoreInputs();
|
||||
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
|
|
|
|||
|
|
@ -251,8 +251,7 @@ async function run() {
|
|||
const logger = getActionsLogger();
|
||||
initializeEnvironment(getActionVersion());
|
||||
|
||||
// Work around for issue in actions/runner, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
// Make inputs accessible in the `post` step.
|
||||
persistInputs();
|
||||
|
||||
let config: configUtils.Config | undefined;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ import {
|
|||
|
||||
async function runWrapper() {
|
||||
try {
|
||||
// Work around for issue in actions/runner, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
// Restore inputs from `start-proxy` Action.
|
||||
actionsUtil.restoreInputs();
|
||||
const pid = core.getState("proxy-process-pid");
|
||||
if (pid) {
|
||||
|
|
|
|||
|
|
@ -91,8 +91,7 @@ function generateCertificateAuthority(): CertificateAuthority {
|
|||
}
|
||||
|
||||
async function runWrapper() {
|
||||
// Work around for issue in actions/runner, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
// Make inputs accessible in the `post` step.
|
||||
actionsUtil.persistInputs();
|
||||
|
||||
const logger = getActionsLogger();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import {
|
|||
|
||||
async function runWrapper() {
|
||||
try {
|
||||
// Restore inputs from `upload-sarif` Action.
|
||||
actionsUtil.restoreInputs();
|
||||
const logger = getActionsLogger();
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ async function run() {
|
|||
const gitHubVersion = await getGitHubVersion();
|
||||
checkActionVersion(getActionVersion(), gitHubVersion);
|
||||
|
||||
// Make inputs accessible in the `post` step.
|
||||
actionsUtil.persistInputs();
|
||||
|
||||
const repositoryNwo = parseRepositoryNwo(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue