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

Update HM land registry agent #1271

Open
markushofmeister opened this issue Jul 9, 2024 · 0 comments
Open

Update HM land registry agent #1271

markushofmeister opened this issue Jul 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@markushofmeister
Copy link
Collaborator

The HM Landregistry has updated some of its online services to remove support for a number of cipher suites which are known to be more vulnerable to attack. These changes took effect during/after May 2024.
Hence, the HM Land Registry Property Sales Instantiation Agent needs to be updated. Available test endpoints:

Transaction Engine External Test Service:
https://test-transaction-engine.tax.service.gov.uk/submission

API Platform Sandbox:
https://test-api.service.hmrc.gov.uk/

Exceptions:
HM Land Registry Property Sales Instantiation Agent:

2024-07-09 04:05:09,377 (derivation_markup.py:313)[ThreadPoolExecutor-0_0] ERROR - Failed to create sync derivation for new info, inputsIRI: ['https://www.theworldavatar.com/kg/ontobuiltenv/PropertyPriceIndex_fa1bceb0-6396-4ace-83a5-0fa1bf8a725e', 'https://www.theworldavatar.com/kg/ontobuiltenv/FloorArea_47f758e9-ae4f-4bab-bac7-a95c86804f07', 'https://www.theworldavatar.com/kg/ontobuiltenv/AveragePricePerSqm_95adda3e-c43f-4874-8eaa-d1e93d81c0a4']
2024-07-09 04:05:09,380 (STDOUT) Job "update_all_transaction_records (trigger: interval[28 days, 0:00:00], next run at: 2024-08-06 03:20:45 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/app/agent/datainstantiation/sales_instantiation.py", line 349, in update_all_transaction_records
    property_value_estimation_derivation_markup(
  File "/app/agent/datainstantiation/derivation_markup.py", line 314, in property_value_estimation_derivation_markup
    raise e
  File "/app/agent/datainstantiation/derivation_markup.py", line 303, in property_value_estimation_derivation_markup
    derivation = derivation_client.createSyncDerivationForNewInfo(
  File "/usr/local/lib/python3.9/site-packages/pyderivationagent/kg_operations/derivation_client.py", line 85, in createSyncDerivationForNewInfo
    derivation_java = self.derivation_client.createSyncDerivationForNewInfo(agentIRI, inputsIRI, derivationType)
  File "/usr/local/lib/python3.9/site-packages/py4j/java_gateway.py", line 1304, in __call__
    return_value = get_return_value(
  File "/usr/local/lib/python3.9/site-packages/py4j/protocol.py", line 326, in get_return_value
    raise Py4JJavaError(
py4j.protocol.Py4JJavaError: An error occurred while calling o18.createSyncDerivationForNewInfo.
: uk.ac.cam.cares.jps.base.exception.JPSRuntimeException: Failed to update derivation <https://www.theworldavatar.com/kg/derivation/Derivation_7cab9e59-e97e-4945-873a-4fb2a2401eba> with original request: http://host.docker.internal:5012/PropertyValueEstimation?query={"sync_new_info":true,"agent_service_iri":"https://www.theworldavatar.com/resource/agents/Service__KL_PropertyValueEstimation/Service","derivation_rdftype":"https://www.theworldavatar.com/kg/ontoderivation/Derivation","derivation":"https://www.theworldavatar.com/kg/derivation/Derivation_7cab9e59-e97e-4945-873a-4fb2a2401eba","agent_input":{"http://www.ontology-of-units-of-measure.org/resource/om-2/Area":["https://www.theworldavatar.com/kg/ontobuiltenv/FloorArea_47f758e9-ae4f-4bab-bac7-a95c86804f07"],"https://www.theworldavatar.com/kg/ontobuiltenv/PropertyPriceIndex":["https://www.theworldavatar.com/kg/ontobuiltenv/PropertyPriceIndex_fa1bceb0-6396-4ace-83a5-0fa1bf8a725e"]}}
        at uk.ac.cam.cares.jps.base.derivation.DerivationClient.createSyncDerivationForNewInfo(DerivationClient.java:261)
        at uk.ac.cam.cares.jps.base.derivation.DerivationClient.createSyncDerivationForNewInfo(DerivationClient.java:181)
        at jdk.internal.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
        at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
        at py4j.Gateway.invoke(Gateway.java:282)
        at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
        at py4j.commands.CallCommand.execute(CallCommand.java:79)
        at py4j.GatewayConnection.run(GatewayConnection.java:238)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: uk.ac.cam.cares.jps.base.exception.JPSRuntimeException: Failed to update derivation <https://www.theworldavatar.com/kg/derivation/Derivation_7cab9e59-e97e-4945-873a-4fb2a2401eba> with original request: http://host.docker.internal:5012/PropertyValueEstimation?query={"sync_new_info":true,"agent_service_iri":"https://www.theworldavatar.com/resource/agents/Service__KL_PropertyValueEstimation/Service","derivation_rdftype":"https://www.theworldavatar.com/kg/ontoderivation/Derivation","derivation":"https://www.theworldavatar.com/kg/derivation/Derivation_7cab9e59-e97e-4945-873a-4fb2a2401eba","agent_input":{"http://www.ontology-of-units-of-measure.org/resource/om-2/Area":["https://www.theworldavatar.com/kg/ontobuiltenv/FloorArea_47f758e9-ae4f-4bab-bac7-a95c86804f07"],"https://www.theworldavatar.com/kg/ontobuiltenv/PropertyPriceIndex":["https://www.theworldavatar.com/kg/ontobuiltenv/PropertyPriceIndex_fa1bceb0-6396-4ace-83a5-0fa1bf8a725e"]}} Error body: <!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

        at uk.ac.cam.cares.jps.base.derivation.DerivationClient.createSyncDerivationForNewInfo(DerivationClient.java:237)
        ... 11 more

Property Value Estimation Agent:

2024-07-09 04:05:09,353 (derivation_agent.py:184)[MainThread] ERROR - local variable 'res' referenced before assignment
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pyderivationagent/agent/derivation_agent.py", line 169, in inner
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pyderivationagent/agent/derivation_agent.py", line 491, in handle_sync_derivations
    self.process_request_parameters(derivation_inputs, derivation_outputs)
  File "/app/propertyvalueestimation/agent/value_estimation.py", line 126, in process_request_parameters
    g = self.estimate_property_market_value(transaction_iri=tx_iri,
  File "/app/propertyvalueestimation/agent/value_estimation.py", line 217, in estimate_property_market_value
    if not res.get('property_iri'):
UnboundLocalError: local variable 'res' referenced before assignment
2024-07-09 04:05:09,356 (STDOUT) Exception on /PropertyValueEstimation [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1526, in full_dispatch_request
    return self.finalize_request(rv)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1545, in finalize_request
    response = self.make_response(rv)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1701, in make_response
    raise TypeError(
TypeError: The view function for 'PropertyValueEstimation_handle_sync_derivations' did not return a valid response. The function either returned None or ended without a return statement.
@markushofmeister markushofmeister added bug Something isn't working enhancement New feature or request labels Jul 9, 2024
@ChungTingLao ChungTingLao self-assigned this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants