Skip to content

fix: persist inputs between the upload action and its post step#2557

Merged
NlightNFotis merged 6 commits into
mainfrom
persist-inputs
Oct 21, 2024
Merged

fix: persist inputs between the upload action and its post step#2557
NlightNFotis merged 6 commits into
mainfrom
persist-inputs

Conversation

@NlightNFotis

@NlightNFotis NlightNFotis commented Oct 21, 2024

Copy link
Copy Markdown
Member

Description

This PR is fixing an issue with persisting action inputs between steps of the runner. This is an issue that is downstream of a problem with the GitHub Actions runner, ref: actions/runner#3514

Closes #2553

Merge / deployment checklist

Acknowledgments

  • Thanks to @chrisgavin for the code that formed the basis of this PR, and @jsoref for the original issue report, a PR containing code leading us to a solution, and for helping us iterate on this PR by testing our changes and proposing further improvements.

@NlightNFotis NlightNFotis requested a review from a team as a code owner October 21, 2024 10:09
@NlightNFotis NlightNFotis changed the title Persist inputs between teh upload action and its post step. fix: persist inputs between the upload action and its post step Oct 21, 2024

@jsoref jsoref 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.

Looks good to me. Tested it https://github.com/check-spelling-sandbox/check-spelling/actions/runs/11439466596/job/31823193138 and it worked. (The patch partially failed to apply because the source map wasn't a match to the version included in the runner cache, but that isn't a requirement -- and when I was doing my testing, I didn't include the source map file.)

Note that there are four actions that use post:. If I were maintaining this repository, I'd patch all of them otherwise, there's a risk that someone else gets tripped up that this only works in some code paths...

@jsoref

jsoref commented Oct 21, 2024

Copy link
Copy Markdown
Contributor

@NlightNFotis can you cherry-pick d9886b8 ? VSCode automatically wanted to remove that whitespace...

Comment thread src/analyze-action-post.ts Fixed
Comment thread src/init-action-post.ts Fixed
Comment thread src/init-action-post.ts Fixed
@NlightNFotis

Copy link
Copy Markdown
Member Author

@NlightNFotis can you cherry-pick d9886b8 ? VSCode automatically wanted to remove that whitespace...

Hm, I want to do that, but I get

❯ git cherry-pick d9886b85848afc58f19094c760535a6dd1a8cf77
fatal: bad object d9886b85848afc58f19094c760535a6dd1a8cf77

I think the original branch with this change has been deleted, so it cannot find the commit. I also looked into your fork and I cannot find the branch there.

Would it be possible to extract it as a patch and post it here as a comment? @jsoref

@jsoref

jsoref commented Oct 21, 2024

Copy link
Copy Markdown
Contributor

You can grab it from https://github.com/github/codeql-action/commit/d9886b85848afc58f19094c760535a6dd1a8cf77.patch

@NlightNFotis

Copy link
Copy Markdown
Member Author

@jsoref Done! Thanks again for your time and effort helping us get to a good state in our code! Your input is greatly appreciated.

@henrymercer henrymercer 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.

I am not sure whether this is happening due to a bug or an intended omission in the mechanisms for passing inputs, but the fix LGTM.

Comment thread CHANGELOG.md Outdated
Comment thread src/actions-util.ts Outdated
Comment thread src/analyze-action.ts Outdated
Comment thread src/init-action-post.ts Outdated
Comment thread src/init-action.ts Outdated
Comment thread src/start-proxy-action-post.ts Outdated
Comment thread src/start-proxy-action.ts Outdated
Comment thread src/upload-sarif-action.ts
Comment thread src/upload-sarif-action-post.ts
…toreState callsites.

Co-authored-by: Henry Mercer <[email protected]>
Co-authored-by: Fotis Koutoulakis <[email protected]>
@NlightNFotis

Copy link
Copy Markdown
Member Author

@henrymercer Thank you for the review, I have integrated all of the changes in 9bc4ee1. Would you please have another look at this one?

@henrymercer henrymercer 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upload-sarif post-action step failed: Input required and not supplied: token

5 participants