Skip to content

Fix issue where dependency caching was not done properly in the backend#108

Merged
Dref360 merged 2 commits intomainfrom
hotfix/caching_ci2
Jun 6, 2022
Merged

Fix issue where dependency caching was not done properly in the backend#108
Dref360 merged 2 commits intomainfrom
hotfix/caching_ci2

Conversation

@Dref360
Copy link
Copy Markdown
Contributor

@Dref360 Dref360 commented Jun 3, 2022

Description:

Fix issue where dependency caching was not done properly in the backend

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge
it.

  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • FRONTEND TYPES. Regenerate the front-ent types if you played with types and routes.
    Run cd webapp && yarn types while the back-end is running.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

@Dref360 Dref360 requested a review from JosephMarinier June 3, 2022 16:49
- run: poetry --version
- name: Install dependencies
run: |
poetry config virtualenvs.create false
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.

Can you explain how does that fix the issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This line would install dependencies outside of poetry, ie in the system python folder.
So the cache step didn't trigger as ~/.cache/poetry was always empty. Now it trigger correctly based on the MD5 of poetry.lock

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reran the CI and now the step that took ~8min took 8 seconds!

@Dref360 Dref360 requested a review from JosephMarinier June 6, 2022 17:00
@Dref360 Dref360 merged commit ee820a9 into main Jun 6, 2022
@Dref360 Dref360 deleted the hotfix/caching_ci2 branch June 6, 2022 20:01
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