Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Python tools on self-hosted runners #618

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

edoardopirovano
Copy link
Contributor

This PR changes the init step to also install the Python packages that the Action requires when running on self-hosted runners, as we already do on GitHub ones. The rationale given in #155 for not doing this was that "we don't want our cli to be messing around with things in the system". On the one hand, this seems reasonable. However, I think we should try to make a best attempt to succeed with our analysis and in my opinion this means installing tools we require.

Notably, we are already messing around with things that are installed since the later step will install an arbitrary number of packages that are dependencies of the code so that we can analyse it. If we are happy to do this, I see no reason why we shouldn't also be happy to install the four Python packages that we need.

This PR was prompted by #615, where the user's workflow failed due to this (and one other issue).

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.

@edoardopirovano edoardopirovano requested a review from a team as a code owner July 13, 2021 07:34
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small suggestion. And looks like you need to fix some conflicts.

src/init.ts Outdated
@@ -237,7 +221,10 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
} catch (e) {
logger.endGroup();
logger.warning(
"We were unable to install your python dependencies. You can call this action with 'setup-python-dependencies: false' to disable this process."
"We were unable to automatically install your python dependencies. Please make sure any necessary " +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also want to log the error here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

@aliscco
Copy link

aliscco commented Jul 13, 2021

__

@edoardopirovano edoardopirovano merged commit 1137e7d into github:main Jul 13, 2021
@edoardopirovano edoardopirovano deleted the python-deps branch July 13, 2021 16:56
@github-actions github-actions bot mentioned this pull request Jul 19, 2021
5 tasks
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.

3 participants