Monday, 29 April 2019

Optimizing build time for containerised microservices

In a continuous integration environment, an ideal build and deployment should be completed under 10 minutes. For microservices it should even be less.

Some common issues with build efficiency :

Docker file is inefficient

Make sure you're not building the same image multiple times and consider using multistage builds (see https://docs.docker.com/develop/develop-images/multistage-build/) to shrink the total image size. You should be able to reduce your images up to seven times smaller.

Too many end to end tests

Convert some of your test scenarios to either unit tests or component tests.   (see https://martinfowler.com/articles/microservice-testing/) Component tests mock your service's dependencies (other API's, databases, message queues etc) and they take milliseconds on average rather than seconds or even minutes that end to end tests take. Ideally I aim to have 1 to 5 end to end tests and 5-30 component tests per microservice.

End to end tests are slow

There is not much you can do here other then getting rid of some of them, as described in the previous step. If you really stuck, and need an easier solution start from:

  • Thread.Sleeps and introduce polling
  • Identify the slowest dependency and convert that to a mocked alternative.


Build agents are not fast enough

Usually Docker files and end to end tests are first places to check and build agents are rarely the bottleneck. However if you've identified an issue, scale up.

How to transfer ownership of an IOS app

Transfer:
  1. Find out the Apple ID (email address) and Team ID that you want to transfer the app to.
  2. Go to https://appstoreconnect.apple.com/ 
  3. Login with your existing account
  4. Backup your data
    • Downloads
    • Pricing
    • Usage analytics
  5. Click on the Transfer app button on the account overview page
  6. There are a few things you might need to configure or remove  from the account before you can submit the transfer request.  
  7. Once you submit the request the other party needs to accept the transfer.
  8. If you need to need access to the new account for any reason, you need to ask the new owner for a membership invite.