SOLVED: Middlewares and chains from @file handling changed in v3?

Hello. I recently tried upgrading from traefik v2.9 to v3 and I am getting an error that my middlewares chains defined in docker-compose.yml don't exist. I don't see anything in the migration documentation that shows these items would have changed. Can anyone help out?

One example:
docker-compose labels:

- traefik.http.routers.mycontainer.middlewares=chain-oauth@file

then in traefik/configurations/middlewares-chain.yml

          - middleware-ratelimit
          - middleware-default-headers
          - middleware-oauth

I have tried moving the config into traefik/configurations/middlewares.yml also but no luck. Any help would be greatly appreciated. Everything works fine on 2.9.


This is the mapping to the folder in docker-compose.yml along with the traefik.yml provider definition.

- $USERDIR/docker/traefik/configurations:/configurations:ro

    directory: /configurations/
    watch: true
    debugLogGeneratedTemplate: true

Edit 2:

I am seeing this in the traefik logs when I start:

ERR Cannot start the provider *file.Provider error="/configurations/middlewares.yml: field not found, node: featurePolicy"

This is followed by errors that all the middlewares do not exist.

Edit 3: it had to do with some deprecated definitions like featurePolicy to permissionsPolicy and a few other things I had set like sslForceHost and sslRedirect which should be handled by the RedirectRegex middleware apparently.

Leaving this here if anyone else runs into the same issues.