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

Add a script to run tasks locally in butler #4443

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vitorguidi
Copy link
Collaborator

@vitorguidi vitorguidi commented Nov 26, 2024

Motivation

Running a task locally is tribal knowledge for now. This PR intends to ventilate that knowledge.

Suggested vscode debug target:

{
            "name": "Debug a forced run command",
            "type": "debugpy",
            "request": "launch",
            "program": "${workspaceFolder}/butler.py",
            "console": "integratedTerminal",
            "justMyCode": false,
            "args": "run run_task --config-dir=$HOME/projects/clusterfuzz-config/configs/external --non-dry-run",
            "env": {
                "CONFIG_DIR_OVERRIDE": "/usr/local/google/home/vitorguidi/projects/clusterfuzz-config/configs/external",
                "BATCH_TEST_CONFIG_PATH": "/usr/local/google/home/vitorguidi/projects/clusterfuzz-config/configs/external",
                "DEBUG_TASK": "TRUE",
            },
        },


def execute(args):
"""Build keywords."""
environment.set_bot_environment()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add logs.configure('run_bot') then LOG_TO_CONSOLE=True causes logs to go stderr.
We should probably document other important env vars so tmp doesn't get wiped.
BOT_TMPDIR=/tmp/bot TMPDIR=/tmp/tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants