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

Fix: remove caching poetry dependencies in CI workfows #1507

Merged
merged 16 commits into from
Sep 21, 2024

Conversation

linglp
Copy link
Contributor

@linglp linglp commented Sep 19, 2024

Problem

Relates to: https://sagebionetworks.jira.com/browse/FDS-2439
For some reasons, virtual environment was not created successfully in this step:

      - name: Install Poetry
        run: |
          curl -sSL https://install.python-poetry.org \
            | python3 - --version ${{ env.POETRY_VERSION }};
          poetry config virtualenvs.create true;
          poetry config virtualenvs.in-project true;

That caused poetry to show the following error:

The virtual environment found in /home/runner/work/schematic/schematic/.venv seems to be broken.
Recreating virtualenv schematicpy in /home/runner/work/schematic/schematic/.venv

I can confirm that the virtual env didn't get created successfully because when I did poetry env info, Path variable is showing as empty, and poetry env info --path didn't work when I ran that on GH remotely.

Since installing dependencies doesn't take that much time anyway, @BWMac, @jaymedina and I decided to remove the capacity of caching dependencies for now.

More context can be found here

Solution

Remove caching when installing dependencies.

Note: in the future, if there's a need to utilize cached dependencies, the documentation here: https://python-poetry.org/docs/configuration/#virtualenvsin-project and also looking at these two commit: 8339da7 and 7fee916 will be helpful.

@linglp linglp changed the title print out virtual env path Fix: remove caching poetry dependencies in CI workfows Sep 19, 2024
@linglp linglp marked this pull request as ready for review September 19, 2024 20:06
Copy link
Collaborator

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@linglp linglp merged commit 1e39a05 into develop Sep 21, 2024
7 checks passed
@linglp linglp deleted the develop-fix-gh-workflow branch September 21, 2024 18:50
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