GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-setup: Don't allow Poetry to make venv in project by RasmusWL · Pull Request #1419 · github/codeql-action

Conversation

@RasmusWL

@RasmusWL RasmusWL commented Dec 6, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

As highlighted in the code comments, Projects that specify in-project = true in their poetry.toml would get the venv created inside the repo directory, which would cause CodeQL to consider it as user-written code. We don't want this to happen.

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.

I have not updated changelog or readme since I thought this was a small enough change, but let me know if you think that woudl be needed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@RasmusWL
python-setup: Don't allow Poetry to make venv in project
7fc528c
I mostly verified this works on my local machine, but did add a sample `poetry.toml` to the tests, so it can be verified from looking at the logs 🤷
@RasmusWL
RasmusWL requested review from a team as code owners December 6, 2022 09:42
angelapwen
angelapwen reviewed Dec 6, 2022
View reviewed changes

@angelapwen angelapwen left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I don't think we need to update the README for this change 😄

As for the CHANGELOG — do we expect the change to affect many users? If the venv was previously considered user-written code, and now isn't, it shouldn't affect any user's results (unless the venv itself had alerts), right?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread python-setup/auto_install_packages.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@RasmusWL

RasmusWL commented Dec 6, 2022

Copy link
Copy Markdown
Member Author

As for the CHANGELOG — do we expect the change to affect many users?

Many? that's not my expectation, but it's a gut feeling and not based on hard data.

If the venv was previously considered user-written code, and now isn't, it shouldn't affect any user's results (unless the venv itself had alerts), right?

spot on. I think there's a fair chance there would have been spurious alerts found within the in-project venv though.

Altogether, I have time defending not making adding anything to the changelog, so let me just do that 👍

angelapwen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RasmusWL added 3 commits December 6, 2022 11:32
@RasmusWL
python-setup: Apply suggestions from code review
27c1438
@RasmusWL
Update CHANGELOG.md
5566638
@RasmusWL
python-setup: Update comment with fully qualified configuration name
3b0a2f6
@RasmusWL
RasmusWL requested a review from angelapwen December 6, 2022 10:38
angelapwen
angelapwen approved these changes Dec 6, 2022
View reviewed changes

@angelapwen angelapwen left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for updating!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread CHANGELOG.md
## [UNRELEASED]

- Add a step that tries to upload a SARIF file for the workflow run when that workflow run fails. This will help better surface failed code scanning workflow runs. [#1393](https://github.com/github/codeql-action/pull/1393)
- Python automatic dependency installation will no longer consider dependecy code installed in venv as user-written, for projects using Poetry that specify `virtualenvs.in-project = true` in their `poetry.toml`. [#1419](https://github.com/github/codeql-action/pull/1419).

@angelapwen angelapwen Dec 6, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
- Python automatic dependency installation will no longer consider dependecy code installed in venv as user-written, for projects using Poetry that specify `virtualenvs.in-project = true` in their `poetry.toml`. [#1419](https://github.com/github/codeql-action/pull/1419).
- Python automatic dependency installation will no longer consider dependency code installed in `venv` as user-written, for projects using Poetry that specify `virtualenvs.in-project = true` in their `poetry.toml`. [#1419](https://github.com/github/codeql-action/pull/1419).

Quick typo suggestion

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@RasmusWL
RasmusWL merged commit 44ef9d9 into main Dec 6, 2022
@RasmusWL
RasmusWL deleted the rasmuswl/poetry-no-local-venv branch December 6, 2022 19:29
@felickz felickz mentioned this pull request Dec 7, 2022
autobuild + POETRY_VIRTUALENVS_IN_PROJECT: false testing-felickz/setupr#4
Open
This was referenced Dec 8, 2022
Merge main into releases/v2 #1428
Merged
Merge releases/v2 into releases/v1 #1430
Merged
@felickz felickz mentioned this pull request Dec 9, 2022
Restore initial CodeQL Workflow on with Python poetry venv fix testing-felickz/setupr#5
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@angelapwen angelapwen angelapwen approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@RasmusWL @angelapwen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.