Closed Michaelhobo closed 1 year ago
I need to reproduce this on my own, but it looks like an error on Yaegi's side.
@Michaelhobo, I am sorry, but I cannot reproduce your issue. Can you provide a reproducible use case, using the docker-compose.yaml example file provided in the repository, for example ?
Here is the docker-compose.yml file I used
version: '3.9'
services:
traefik:
image: traefik:v2.7
command:
- --api.insecure=true
- --providers.docker
- --providers.file.filename=/rules-htransformation.yaml
- --log.level=DEBUG
- --experimental.plugins.htransformation.moduleName=github.com/tomMoulard/htransformation
- --experimental.plugins.htransformation.version=v0.2.7
ports:
- 9000:80
- 9001:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./rules-htransformation.yaml:/rules-htransformation.yaml
- .:/plugins-local/src/github.com/tomMoulard/htransformation/
tty: true
whoami:
image: traefik/whoami # https://github.com/traefik/whoami
command: -name whoami
labels:
traefik.http.routers.whoami.rule: Host(`whoami.localhost`)
traefik.http.routers.whoami.middlewares: htransformation@file
Here's the log from running docker compose up
: https://gist.github.com/Michaelhobo/b2dff45b9391168f7cb0bbf6db4eb801
Also to clarify, we haven't done the Traefik v3 migration yet, so what I mean by "v2.7+" is really "v2.7 <= x < v3.0".
I ran this again with traefik:v3.0, and it does not have that error.
It seems to be fixed in v2.9 by updating yaegi to include fixes (like this one: https://github.com/traefik/yaegi/issues/1447), so you might want to use traefik v2.9+.
I'm getting the following error when running htransformation plugin with Traefik v2.7+:
This looks pretty similar to the error in https://github.com/tomMoulard/htransformation/issues/39