Getting started with nameko-examples and adding more gateway entrypoints it

Hello. Allow me to start by commending you guys for putting together nameko-examples repo and mention how great of an asset it has been to many, myself included, in getting started on a real world solution using Nameko.
I added this bit of code to gateway/services.py hoping to have an endpoint that lists all products so that subsequently, I’d also add delete and edit endpoints for the same.

         @http(
            "GET", "/products"
        )
        def get_products(self, request):
            """Gets all products
            """
            product = self.products_rpc.list()
            return Response(
                ProductSchema(many=True).dumps(product).data,
                mimetype='application/json'
            )

I’m a newbie to docker and using docker-compose to build and run multiple containers for each service so I stopped the running containers, force created a new build but my new code was not run as it still showed that GET method was not allowed for '/products'.
Any help on how I may go about this will be highly appreciated.

Your new method looks fine. It sounds like the image is not being rebuilt. Without seeing exactly what you did with Docker it’s hard to say what the problem is.

Can you post the steps to reproduce?

And if you edit one of the existing methods, is that change reflected after restarting the service?

No change even to existing methods is reflecting. Here are the commands I used for docker.
sudo docker-compose down
sudo docker-compose up --force-recreate --build
sudo docker image prune -f
When this didn’t work, I even went as far as deleting the
/var/lib/docker folder and running docker installation afresh followed by sudo docker-compose up having already made the changes to gateway/service.py as shown previously
I did not make any changes to any of the Dockerfiles

Ah – this is because the docker-compose file pulls pre-built images from docker hub.

To have your changes reflected you’ll need to build a new docker image locally, and then make sure docker-compose.yaml references it.