NearBeach Logo

NearBeach Build Issues for 0.31

Back to Blogs

The Build Issues

Who is to blame?

In short - myself.

And How It Happened.

The Plan.

For the branch 0.30, we did 35 releases (not counting the release candidates). Each release took around 20 - 40 minutes to accomplish. That would place the number of hours deploying Nearbeach at between 11 to 24 hours. A lot of the procedure for doing a release was very repetitive, and could easily be automated.


NearBeach is also reliant on multiple different libraries, some of these are (but not limited too)

Sometimes there are security issues within these libraries, and we need to rerelease NearBeach with the updated libraries and security fixes. This is just a part of the code maintenance and deployment process. For example Django might do a security release - . In the branch 0.30, the deployment process was tangled in with the development process. This means I needed to quickly finish up any development and do a release. Small releases have solved this issue as we could release rather fast, however this was not ideal.


So we needed to implement the following to tackle these two issues;

  1. Automate the deployment process as much as possible. Utilising GitHub actions
  2. Have the deployment cycle separated from the development cycle. So we could do a deployment with the same NearBeach code for a different release, but with updated libraries. 


The Attack

We started writing this process in the 0.31 branch. The idea was simple. A GitHub release will trigger the GitHub actions for release.

The Issue

Image of the terminal output

The issue took time to debug, but we found the root cause. It turned out our wheel file was not being built correctly and it was in fact missing the whole NearBeach directory/application. You can see the size difference in the screen shot shown.

Our build system we were using was "setuptools" and was setup as follows

requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

After a lot of reading documentation and search stackoverflow, I decided to try another build system.

requires = ["hatchling"]
build-backend = ""

This was the fix we needed. The NearBeach directory/application was now being included into the wheel file.

The packaged NearBeach application, ready for Pypi. Notice the size difference

What happens now?

We need to think how we can improve the testing process around modifying the deployment cycle. I should have noticed that there was something wrong with the Pypi files a lot sooner.

We are still unsure why setuptools was not including NearBeach within the wheel, and think it has something to do with config. However we could not find anything around that.

If you have any information on what went wrong, or what could have gone wrong, we want to hear from you. Join our discord by clicking on "Community" under the Menu.