Skip to content

fix(tools): add actionable guidance when validate-urls is missing httpx#91

Open
shuofengzhang wants to merge 1 commit intoawslabs:mainfrom
shuofengzhang:fix/validate-urls-httpx-guidance
Open

fix(tools): add actionable guidance when validate-urls is missing httpx#91
shuofengzhang wants to merge 1 commit intoawslabs:mainfrom
shuofengzhang:fix/validate-urls-httpx-guidance

Conversation

@shuofengzhang
Copy link

What changed

  • Added a dependency guard in tools/validate-urls.py that catches ModuleNotFoundError for httpx.
  • Replaced the raw traceback with an actionable message telling contributors to run the script with uv run (or install httpx).
  • Returned exit code 2 for this missing-dependency case so CI/local tooling can detect setup issues clearly.

Why

  • Running python3 tools/validate-urls.py in an environment without httpx currently fails with a Python traceback.
  • This small change improves contributor UX by surfacing a clear, direct remediation path instead of an internal stack trace.
  • Behavior is unchanged when httpx is installed.

Testing

  • scripts/clone_and_test.sh awslabs/agent-plugins
    • Tests: not run (no tests found)
  • python3 tools/validate-urls.py
    • Verified graceful missing-dependency message and exit code 2 when httpx is not installed.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

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.

1 participant