Skip to content

Conversation

@mhaoli
Copy link
Collaborator

@mhaoli mhaoli commented Dec 8, 2025

This is to relax the check in snippet_management_service to allow loading same snippet package with different user IDs.

With this CL, I verified that the same snippet app installed to different users can be loaded and used at the same time.

@mhaoli mhaoli added this to the Mobly Release 1.13.1 milestone Dec 8, 2025
@mhaoli mhaoli requested a review from xpconanfan December 8, 2025 12:28
@mhaoli mhaoli self-assigned this Dec 8, 2025
@mhaoli mhaoli changed the title Allow loading same snippet package with different user IDs Allow loading snippets with the same package but different user IDs Dec 8, 2025
Raises:
Error, if a duplicated name or package is passed in.
Error: if a duplicated name or package is passed in.
Copy link
Collaborator

Choose a reason for hiding this comment

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

the error message here should be updated as package name alone is no longer a differentiating factor?


for snippet_name, client in self._snippet_clients.items():
if package == client.package:
if package == client.package and new_snippet_user_id == client.user_id:
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are essentially replacing [package name] with [package name] + [user id] as the identifier for avoiding dup registration,

Wouldn't you need to store the id just like we are storing the package name today? Or you probably have a bug somewhere, or you'd have overly complicated logic

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Created a separate PR #996 which adds a new property identifier for the snippet client and uses it for dup registration check. Could you help review it?

@mhaoli
Copy link
Collaborator Author

mhaoli commented Dec 10, 2025

I've created PR #996 to support the same feature by adding a client identifier property. So closing this.

@mhaoli mhaoli closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants