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

Very long deployment times and logs when using appdir #175

Open
oswaldoacauan opened this issue Mar 5, 2024 · 3 comments
Open

Very long deployment times and logs when using appdir #175

oswaldoacauan opened this issue Mar 5, 2024 · 3 comments

Comments

@oswaldoacauan
Copy link

We are currently in the middle of a migration from some of our apps to a monorepo and we noticed that the deployments for those apps got infinitely slower.

It went from an average of 2min per deployment to over 5min.

The logs are also massive (8000+ lines)instead of just showing the heroku build log (< 50 lines).

BEFORE
image

AFTER
image

@avishnyak
Copy link

avishnyak commented May 18, 2024

I have run into this issue as well. The slowness is coming from the git subtree split command that is used whenever you provide an appdir. This runs through every commit of your repo to create a new version of your repo that ignores files outside of the appdir path.

appdir processes your entire git history one commit at a time for each release. With every commit, the time increases.

It is possible to speed this up! One option is to save a checkpoint every once in a while in your repo. I did so with this command: git subtree split --rejoin --squash --prefix=appdir master (important: do not add a ./ at the beginning of the appdir here). Once you commit this giant "special" commit, the subtree split command in this action will use that to speed up the process.

HOWEVER: You might run into another issue. If you run this action in a ubuntu-latest runner, it uses the dash shell with a configuration that limits recursion depth to 1000 by default. The git subtree split command seems to run into issues once you do the above procedure when run with this recursion limit.

Every action to speed up the git subtree split that I found made things even worse. The proper fix is to AVOID appdir at all costs and use a Buildpacks like https://github.com/timanovsky/subdir-heroku-buildpack instead. You push your whole repo to Heroku, then delete all but one folder. It's lightning fast in comparison to the appdir solution in this action.

@nicolasvienot
Copy link

nicolasvienot commented May 29, 2024

We have the same issue; it started to be slow last week. From 2min to 30+ min. No changes on our side, we're using akhileshns/[email protected]. We are indeed using the appdir option.

@hongbo-miao
Copy link

hongbo-miao commented Dec 1, 2024

I noticed mine is same, took ~ 2.5 hours as this repo has over 20,000 commits. 🥲

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

No branches or pull requests

4 participants