Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Self-hosted worker report can not have INIT_SCRIPT customized through env var #5269

Open
whollacsek opened this issue Feb 11, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@whollacsek
Copy link

Describe the bug

On self-host INIT_SCRIPT doesn't work for worker group reports. It will always be:

apt-get update
apt-get install -y chromium

To reproduce

Set INIT_SCRIPT on a self host instance and restart containers. Go to the runs and find the init_script tagged run. In the code tab it will be the predefined script instead of the content passed in env var.

Expected behavior

INIT_SCRIPT should be taken into account by the worker

Screenshots

No response

Browser information

No response

Application version

Windmill 1.459

Additional Context

No response

@whollacsek whollacsek added the bug Something isn't working label Feb 11, 2025
@jodiecunningham
Copy link

init_bash: config
            .init_bash
            .or_else(|| std::env::var("INIT_SCRIPT").ok())

It's because of the lines above. It has init_bash from the DB and the precedence takes the DB value.
Just don't make a reports workers group, make another group with a different name. I named mine "scrapers".

From my values:

        - name: scrapers
          replicas: 2
          resources:
            requests:
              memory: 512Mi
              cpu: 100m
            limits:
              memory: 1024Mi
          extraEnv:
            - name: "INIT_SCRIPT"
              value: "apt-get update\napt-get install -y chromium\npip install playwright\nexport PATH=$PATH:/tmp/.local/bin\nplaywright install\nplaywright install-deps"
            - name: "WORKER_TAGS"
              value: "chromium"

@whollacsek
Copy link
Author

whollacsek commented Feb 13, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants