-
Notifications
You must be signed in to change notification settings - Fork 14
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
int output value error upon callback to iRODS rule-language rule with remote block #209
Comments
I believe only strings can be passed across REP boundaries. We recently added documentation which demonstrates how to pass values between the NREP and PREP. See https://github.com/irods/irods_rule_engine_plugin_python?tab=readme-ov-file#how-do-i-pass-values-back-to-the-caller-across-rule-engine-plugin-boundaries. What happens if |
I'm very happy that both the example AND the documentation use 42. |
Well spotted Terrell! Now what was the question? This number seemed most appropriate for Python. |
It turns out that the Python exception in the server log only shows up when the remote block is used. Nevertheless the exception is a good indication of what actually seems to happen. Updated intfunction:
Updated myrule and irule output:
Where caller variable is an int, the variable is not updated with output from intfunction. Where caller variable is string, its content is updated by intfunction yet int values returned by intfunction get mangled (probably interpreted as a char). |
Server: iRODS 4.3.2
Preconditions:
We execute a Python rule "myrule" via irule, and the rule does a callback to an iRods rule language rule "intfunction".
The rule intfunction returns an integer value calculated within a remote block.
Expected:
No errors in server log, integer value returned from intfunction to myrule.
Actual:
The integer value is misinterpreted, and the server log shows an exception "no to_python (by value) converter found for C++ type: int"
Issue can be reproduced using below iRODS rule intfunction:
Example client rule myrule (executed via irule and Python rule engine) that shows issue:
iRule output: (note the asterisk as output instead of value 42)
RodsLog entry in syslog:
The text was updated successfully, but these errors were encountered: