Steps to replicate the issue (include links if applicable):
So, I tried to deploy a sample golang server using toolforge build. I followed the rust tutorial here and ran the following commands
- become campwiz-bot
- toolforge build start https://github.com/nokibsarkar/campwiz-test.git
- toolforge webservice --mount=all buildservice start
- toolforge webservice buildservice logs -f
ProcFile
Lates
web:sh -c 'GIN_MODE=release ./campwiz-test'
Also tried with
web:GIN_MODE=release ./campwiz-test
What happens?:
I get the following outputs:
(venv) tools.campwiz-bot@tools-bastion-13:~$ toolforge webservice buildservice logs -f 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] Current Directory: /workspace 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached. 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] - using env: export GIN_MODE=release 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] - using code: gin.SetMode(gin.ReleaseMode) 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] [GIN-debug] GET / --> main.main.func1 (3 handlers) 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] [GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value. 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details. 2025-04-02T10:39:02+00:00 [campwiz-bot-7676ff486b-9cvqp] [GIN-debug] Listening and serving HTTP on 0.0.0.0:8000
Which says that it is running in debug mode
What should have happened instead?:
I expected the sofware be running on release mode since I specified GIN_MODE=release as hardcoded environment variable in ProcFile above.
N.B: I tried using toolforge envvars create GIN_MODE and specify release as value. Then it works. So, this is not an issue with my code.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
- My github commit hash as of this issue: 62b896e1acad01b229a3e2c5eded6665f0b61ac3