FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Restore compatibility with GHES 3.1 by cklin · Pull Request #978 · github/codeql-action · GitHub

Restore compatibility with GHES 3.1 - #978

Merged
cklin merged 3 commits into
github:mainfrom
cklin:restore-ghes-compatibility
Mar 15, 2022
Merged

cklin merged 3 commits into
github:mainfrom
cklin:restore-ghes-compatibility

Conversation

cklin commented Mar 12, 2022

Copy link
Copy Markdown
Contributor

This PR fixes a few problems related to GHES compatibility.

  • Check whether the RUNNER_ARCH environment variable exists before accessing
  • Do not send status reports if the action is being used with GHES 3.1

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

cklin requested a review from a team as a code owner March 12, 2022 00:22

adityasharad 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Minor suggestions. Also did you mean to open this from your main branch?

Comment thread CHANGELOG.md Outdated
## [UNRELEASED]

No user facing changes.
- Fix a bug where actions would fail when used with GHES 3.3 or earlier. [#978](https://github.com/github/codeql-action/pull/978)

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think there are two bugs fixed here: one on 3.3 and earlier due to RUNNER_ARCH, and one on 3.1 and earlier due to unexpected telemetry fields. Could you expand this a little bit so that users know which errors will go away by updating?

Comment thread src/actions-util.ts
statusReport.matrix_vars = matrix;
}
if ("RUNNER_ARCH" in process.env) {
// RUNNER_ARCH is available only in GHES 3.4 and later

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Minor: worth commenting that the server will filter out unknown/unfamiliar values.

Comment thread src/api-client.ts Outdated
*
* @returns GitHub version
*/
export async function getGitHubVersion(): Promise<GitHubVersion> {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Minor: How about something like getGitHubVersionActionsOnly?

Comment thread src/api-client.ts Outdated
* Report the GitHub server version. This is a wrapper around
* util.getGitHubVersion() that automatically supplies GitHub API details using
* GitHub Action inputs. If you need to get the GitHub server version from the
* action runner, please call util.getGitHubVersion() instead.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
* action runner, please call util.getGitHubVersion() instead.
* Runner, please call util.getGitHubVersion() instead.

cklin commented Mar 14, 2022

Copy link
Copy Markdown
Contributor Author

Also did you mean to open this from your main branch?

Good catch! And no, it was a screw-up on my part.

I don't think there is a way to switch the source branch of a PR, so I will just have to learn my lesson and put the main branch of my fork back in order afterwards.

cklin commented Mar 14, 2022

Copy link
Copy Markdown
Contributor Author

@adityasharad
Thank you for your feedback; I think I addressed them all. Please take another look. Thank you!

cklin requested a review from adityasharad March 14, 2022 22:46
cklin merged commit 5b59d87 into github:main Mar 15, 2022
cklin deleted the restore-ghes-compatibility branch March 15, 2022 16:29
github-actions Bot mentioned this pull request Mar 15, 2022
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL