infiniflow/ragflow · error · RuntimeError
Jira base URL must be provided via config or CLI arguments.
Error message
Jira base URL must be provided via config or CLI arguments.
What it means
A RuntimeError from the test/CLI entrypoint when the assembled config dict has no base_url after merging CLI args and any config source. base_url is mandatory because every Jira REST call (and the constructed jira client) is derived from it; without it the connector cannot even be built for a smoke test.
Source
Thrown at common/data_source/jira/connector.py:960
"jql_query": args.jql_query,
"batch_size": args.batch_size,
"start_ts": args.start_ts,
"end_ts": args.end_ts,
"include_comments": args.include_comments,
"include_attachments": args.include_attachments,
"attachment_size_limit": args.attachment_size_limit,
"credentials": {
"jira_user_email": args.user_email,
"jira_api_token": args.api_token,
"jira_password": args.password,
},
}
base_url = config.get("base_url")
credentials = config.get("credentials", {})
if not base_url:
raise RuntimeError("Jira base URL must be provided via config or CLI arguments.")
if not (credentials.get("jira_api_token") or ((credentials.get("jira_user_email") or credentials.get("jira_username")) and credentials.get("jira_password"))):
raise RuntimeError("Provide either an API token or both email/password for Jira authentication.")
connector_options = {
key: value
for key, value in (
("include_comments", config.get("include_comments")),
("include_attachments", config.get("include_attachments")),
("attachment_size_limit", config.get("attachment_size_limit")),
("labels_to_skip", config.get("labels_to_skip")),
("comment_email_blacklist", config.get("comment_email_blacklist")),
("scoped_token", config.get("scoped_token")),
("timezone_offset", config.get("timezone_offset")),
)
if value is not None
}
documents = test_jira(View on GitHub (pinned to 554fb1133a)
Solutions
- Pass the Jira instance URL, e.g. --base-url https://yourorg.atlassian.net (or set base_url in the config file consumed by the test entrypoint).
- If using a config file, verify the file is actually being read (path, JSON validity) and that the key is exactly 'base_url'.
- For Cloud, use the full https://<site>.atlassian.net origin with no /rest suffix; for Data Center use the server root.
Example fix
# before python -m common.data_source.jira.connector --project-key OPS ... # missing URL # after python -m common.data_source.jira.connector --base-url https://yourorg.atlassian.net --project-key OPS --user-email you@org.com --api-token XXXX
Defensive patterns
Strategy: validation
Validate before calling
if not (args.base_url or config.get("base_url")):
raise SystemExit("--base-url is required for the Jira test CLI") Prevention
- Fail fast in arg parsing with a clear usage message instead of deep RuntimeError.
- Keep one canonical config key ('base_url') shared by CLI and config file.
When it happens
Trigger: Invoking the test_jira CLI flow without --base-url (or the config-file equivalent) so config.get('base_url') returns None or an empty string.
Common situations: Running the CLI smoke test and forgetting the URL flag; config file path wrong so the JSON/YAML never loads and defaults are empty; typo in the config key (url vs base_url); CI script missing the argument.
Related errors
- Provide either an API token or both email/password for Jira
- Jira base URL must be provided.
- Invalid time_buffer_seconds value ({time_buffer_seconds!r});
- Jira resource not found (HTTP 404).
- Either project_key or jql_query must be provided for Jira co
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/270f0adef33c2105.
Report an issue: GitHub.