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

Provide remote Pyro5 compatibility for multiple remote objects #138

Merged

Conversation

pevogam
Copy link
Contributor

@pevogam pevogam commented Nov 15, 2024

This is a more rarely used case that we could cover with Pyro5 support as well. The advertised method remains in retrieving multiple remote objects one by one using single remote object getter and this one remains more manual and requiring of control file implementation.

@pevogam
Copy link
Contributor Author

pevogam commented Nov 15, 2024

@ldoktor I hope you don't mind a small follow up, some corner cases had to be covered too even if they are not recommend and mostly backwards compatible.

@pevogam pevogam force-pushed the pyro5-for-multiple-remote-objects branch 3 times, most recently from c6e2c8e to fe4f431 Compare November 15, 2024 15:58
Copy link
Contributor

@ldoktor ldoktor left a comment

Choose a reason for hiding this comment

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

Thank you, @pevogam, for keeping this up to date. The change looks fine but TBH I don't much understand the commit message? IIUC the Pyro5.nameserver resp. Pyro4.naming are daemons that is used by the pyro package to lookup shared functions/methods? And IIUC the pyro4 has some limitations when working with pyro5 so you are adding a compat code to use 4 with 4 and 5 if available?

@pevogam
Copy link
Contributor Author

pevogam commented Nov 18, 2024

Thank you, @pevogam, for keeping this up to date. The change looks fine but TBH I don't much understand the commit message?

So far the commit message focuses on just the corner case we cover with the Pyro5 support we started earlier as this is the focus of the commit.

IIUC the Pyro5.nameserver resp. Pyro4.naming are daemons that is used by the pyro package to lookup shared functions/methods?

Yes, you get it pretty much. These are name servers that are used for resolving names of remote objects (for easier access than long hashes which are the unique default identifiers for these objects).

And IIUC the pyro4 has some limitations when working with pyro5 so you are adding a compat code to use 4 with 4 and 5 if available?

In this case we will use the correct name server in cases we have Pyro4 installed locally and Pyro4 installed remotely and resp. Pyro5 installed locally and Pyro5 installed remotely. The previous case would make something like Pyro4/Pyro5 locally work with Pyro4 remotely. Note that the current usage is more standard (expecting the same version) and is not a regression in functionality since many of the Pyro5 versions already have incompatible protocol with the latest (but no longer worked on) Pyro4 versions.

Regarding the compat mode, the reason we went for this was to introduce the minimal amount of changes to the various remote door functionality until everything is better tested over the longer term. "Tread lightly" so to say.

@ldoktor
Copy link
Contributor

ldoktor commented Nov 20, 2024

Thanks for the confirmation, would you please modify the commit message to describe what you just mentioned?...:

Why have I made these changes?
What effect have my changes made?
Why was the change needed?
What are the changes in reference to?

The Pyro5.nameserver resp. Pyro4.naming are name servers that are
used for resolving names of remote objects (for easier access than
long hashes which are the unique default identifiers for these
objects).

With this change we will use the correct name server if we have Pyro4
installed locally and Pyro4 installed remotely and resp. Pyro5
installed locally and Pyro5 installed remotely. Before this change
we would make something like Pyro4/Pyro5 locally work with Pyro4
remotely. Note that the current usage is more standard (expecting
the same version) and is not a regression in functionality since
many of the Pyro5 versions already have incompatible protocol
with the latest (but no longer worked on) Pyro4 versions.

Sharing multiple remote objects at the same time is a more rarely
used case that we now cover with Pyro5 support as well. The method
we recommend remains in retrieving multiple remote objects one by
one using single remote object getter and this one remains more
manual and still requires some control file implementation.

The changes this builds upon are 8f4c5cc where we provide compatibility
between Pyro5 and Pyro4. The reason we went for this was to introduce
the minimal amount of changes to the various remote door functionality
until everything is better tested over the longer term. The idea was
and still is to "tread lightly".

Signed-off-by: Plamen Dimitrov <[email protected]>
@pevogam pevogam force-pushed the pyro5-for-multiple-remote-objects branch from fe4f431 to b9563fc Compare November 23, 2024 17:41
@pevogam
Copy link
Contributor Author

pevogam commented Nov 23, 2024

Sure! Done and thanks for asking for clarifications.

Copy link
Contributor

@ldoktor ldoktor left a comment

Choose a reason for hiding this comment

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

Thanks, lgtm. Note to the future, the commit message doesn't need to be that exhaustive, but it does need to cover the basics (I don't want you to spend more time on commit message than on the code itself :D).

@ldoktor ldoktor merged commit 9febbe9 into avocado-framework:main Nov 25, 2024
3 checks passed
@pevogam pevogam deleted the pyro5-for-multiple-remote-objects branch November 25, 2024 13:37
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