Skip to content

refactor: adapt wrong imports in tck and sample#948

Merged
guglielmo-san merged 6 commits into1.0-devfrom
guglielmoc/fix_wrong_import
Apr 8, 2026
Merged

refactor: adapt wrong imports in tck and sample#948
guglielmo-san merged 6 commits into1.0-devfrom
guglielmoc/fix_wrong_import

Conversation

@guglielmo-san
Copy link
Copy Markdown
Member

Description

This PR fixes the wrong imports after the introduction of new default_request_handler_V2

@guglielmo-san guglielmo-san requested review from a team and a2a-bot as code owners April 8, 2026 09:53
@guglielmo-san guglielmo-san changed the base branch from main to 1.0-dev April 8, 2026 09:54
@ishymko ishymko changed the title fix: adapt wrong imports in tck and sample refactor: adapt wrong imports in tck and sample Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant updates to the A2A SDK, including a transition to Protobuf-based serialization, the addition of a database migration CLI, and support for legacy v0.3 protocol compatibility. The changes include new migration scripts, updated transport implementations, and improved request handling. I have reviewed the changes and agree with the suggestion to replace the abrupt os._exit(0) call in the CLI sample with a graceful KeyboardInterrupt handler to ensure proper resource cleanup.

I am having trouble creating individual review comments. Click here to see my feedback.

samples/cli.py (124-125)

low

The use of os._exit(0) in the signal handler provides an abrupt termination of the program. This will prevent any cleanup code, such as the await client.close() call in your main function, from executing. This can lead to resource leaks, like open network connections.

A more graceful approach is to let asyncio handle SIGINT by raising a KeyboardInterrupt, which can then be caught to perform a clean shutdown.

I suggest removing the signal handler and wrapping the asyncio.run() call in a try...except KeyboardInterrupt block. This will ensure that client.close() is called when the user exits with Ctrl+C.

try:
    asyncio.run(main())
except KeyboardInterrupt:
    print('\nExiting gracefully...')

@guglielmo-san guglielmo-san enabled auto-merge (squash) April 8, 2026 10:27
@guglielmo-san guglielmo-san merged commit 617fdf3 into 1.0-dev Apr 8, 2026
17 checks passed
@guglielmo-san guglielmo-san deleted the guglielmoc/fix_wrong_import branch April 8, 2026 10:29
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