Skip to content

Conversation

@mmmavis
Copy link
Member

@mmmavis mmmavis commented Apr 21, 2025

To address the Heroku deployment issue seen in https://dashboard.heroku.com/apps/network-pulse-api-staging/activity/builds/55e531d0-2910-41b3-be70-1c0c23b6093e


Heroku installs a recent version of setuptools (70.x) before running pip install -r requirements.txt, which causes an import error in django-allauth==0.48.0. This is because newer versions of setuptools have removed convert_path, which allauth's setup.py still relies on.

Although setuptools==65.5.1 is already pinned in our requirements, Heroku doesn't respect that pin early enough during the build process.

To fix this, this PR introduces a .profile script that Heroku runs at dyno startup. It explicitly installs setuptools==65.5.1 before any other dependencies are installed.

This change has no effect on local environments. .profile is only executed by Heroku.

@mmmavis mmmavis requested a review from danielfmiranda April 21, 2025 20:03
Copy link
Contributor

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

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

Great find and great fix @mmmavis! Approved 🚀

@mmmavis mmmavis merged commit b82bdaf into master Apr 21, 2025
2 checks passed
@mmmavis mmmavis deleted the heroku-deployment-fix branch April 21, 2025 21: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.

3 participants