Skip to content

xmlrpc client and server updates to make examples functional again - #595

Merged
jonasbardino merged 13 commits into
nextfrom
adjust/xmlrpc-client-and-server-updates
Jul 30, 2026
Merged

xmlrpc client and server updates to make examples functional again#595
jonasbardino merged 13 commits into
nextfrom
adjust/xmlrpc-client-and-server-updates

Conversation

@jonasbardino

Copy link
Copy Markdown
Contributor

Sync xmlrpc examples to use single shared setup from original example. Update to current xmlrpc API there.

Address some backend stub import issues (#594) when attempting to run the xmlrpc client examples.

```
Error 200:SYSTEM_ERROR
DEBUG: [{'object_type': 'error_text', 'text':
"Could not import module! shared.functionality.X: No module named 'shared'"}]
```
errors on attempted use.
…sting

with jsonrpc.
Reinsert recently pruned parse_qs helper in xmlrpcbackup example.
…n the

general xmlrpc client example. Add text-mode cat for symmetry with binary. Show
the actual error from jobstatus for sites where jobs are disabled.
…eported in

github actions. Bump at-job date to far future.
@jonasbardino
jonasbardino marked this pull request as ready for review July 16, 2026 09:19
@jonasbardino jonasbardino changed the title xmlrpc client and server updates xmlrpc client and server updates to make examples functional again Jul 16, 2026
@jonasbardino
jonasbardino requested a review from a team July 16, 2026 09:25
@jonasbardino jonasbardino added the battle-tested Code was tested to be fully functional in line with project code guidelines. label Jul 16, 2026
…rpcX examples relying

on the shared connection init from xmlrpcsslclient.
…d enable

reuse in the `xmlrpc.client.ServerProxy` calls.
jonasbardino added a commit that referenced this pull request Jul 16, 2026
…d enable

reuse in the `xmlrpc.client.ServerProxy` calls like we do in #595 now.
Comment thread mig/user/xmlrpcsslclient.py
Comment thread mig/user/xmlrpcsslclient.py
Comment thread mig/user/xmlrpcsslclient.py Outdated
Comment thread mig/user/xmlrpcsslclient.py

@Martin-Rehr Martin-Rehr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved with inline and final comments:

  1. Should 'Error calling function' return an output object ?

    return ('Error calling function: %s' % err, returnvalues.ERROR)

  2. force_utf8_rec is now an unused import ?

Comment thread mig/shared/rpcfunctions.py
Comment thread mig/shared/rpcfunctions.py
Comment thread mig/shared/rpcfunctions.py
Comment thread mig/shared/rpcfunctions.py
 * Change the `main` function calling error to use and return `output_object`.
 * Drop unused `force_utf8_rec` helper function along with a few bare `except`
   lint fixes.
@jonasbardino

Copy link
Copy Markdown
Contributor Author

Approved with inline and final comments:

1. Should 'Error calling function' return an output object ?
   https://github.com/ucphhpc/migrid-sync/blob/cff96851fb06672776de24d8c503918f8aa7f3d0/mig/shared/rpcfunctions.py#L129

2. force_utf8_rec is now an unused import ?

1: yes, good catch. Fixed.
2: yes. Applied lint fixes about this one and a few bare excepts.

…`cacert`

conf value with more care. Added a docstring line about it, too.
@jonasbardino

Copy link
Copy Markdown
Contributor Author

There is still some python2 cruft e.g. in the imports to address remaining make lint import warnings plus the shared conf tuning and the possibly clean up/removal of unsupported functions highlighted in comments by @Martin-Rehr . Yet, first priority and target for this PR is to get the existing code and examples functional again, so I'll add the follow-up tag and leave further improvements for anyone with time.

@jonasbardino jonasbardino added the follow-up pending Pending tasks to follow-up on after close label Jul 30, 2026
jonasbardino added a commit that referenced this pull request Jul 30, 2026
#595:

add more robust `cacert` conf handling and add missing retval unpacking.
jonasbardino added a commit that referenced this pull request Jul 30, 2026
…API (#596)

* Migrate jsonrpclib to maintained fork and sync iclient and server interfaces to
current API and reuse more from xmlrpcX example scripts.

* Pull in fixes and polish from #595 xmlrpc client.

* Pull in the rpcfunctions.py fixes from #595 also needed here.

* Drop the explicit jsonrpc protocol cap and let it use protocol 2.0 since it also just works now.

* Drop ancient python 2.6 compatibility.

* Refactor `SafeCertTransport` to handle `ssl_ctx` init consistently and enable
reuse in the `xmlrpc.client.ServerProxy` calls like we do in #595 now.

* Address a few review feedback suggestions (thanks @Martin-Rehr) like in #595:
add more robust `cacert` conf handling and add missing retval unpacking.
@jonasbardino
jonasbardino merged commit c5ff531 into next Jul 30, 2026
11 checks passed
@jonasbardino
jonasbardino deleted the adjust/xmlrpc-client-and-server-updates branch July 30, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

battle-tested Code was tested to be fully functional in line with project code guidelines. bug Something isn't working enhancement New feature or request follow-up pending Pending tasks to follow-up on after close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The mig/user/xmlrpcX.py examples fail with import errors when using stub functions

2 participants