Skip to content

Commit

Permalink
Add --no-cache flag to poetry lock command in poetry:sync task
Browse files Browse the repository at this point in the history
The `poetry:sync` task is used to ensure the Poetry lockfile is in sync with the Python package dependencies specified
in pyproject.toml.

The "Check Poetry" GitHub Actions workflow runs this task and then checks for a diff in order to catch an out of sync
state between the two files.

I discovered that, even though I didn't get any diff after running the command on my machine, a diff was generated on
the machine of the GitHub Actions runner, causing the check to fail. I hypothesize the cause is the difference of mine
being a Windows machine, while the runner is a Linux machine. It is essential that the results be the same no matter
where the task is ran. I determined this can be accomplished by adding the `--no-cache` flag to the command.
  • Loading branch information
per1234 committed Oct 17, 2023
1 parent 00a54f6 commit 096674c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ tasks:
- |
poetry \
lock \
--no-cache \
--no-update
# Make a temporary file named according to the passed TEMPLATE variable and print the path passed to stdout
Expand Down
10 changes: 10 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 096674c

Please sign in to comment.