aws-deadline / deadline-cloud-for-houdini

AWS Deadline Cloud for Houdini
Apache License 2.0
12 stars 10 forks source link

fix: fail when mantra license error is seen #164

Closed epmog closed 3 months ago

epmog commented 4 months ago

What was the problem/requirement? (What/Why)

Houdini jobs weren't failing properly if a license error occurred when launching hython:

INFO: Running command: hython "/Users/morgane/Library/Application Support/hatch/env/virtual/deadline-cloud-for-houdini/Bp-p5MaR/deadline-cloud-for-houdini/lib/python3.10/site-packages/deadline/houdini_adaptor/HoudiniClient/houdini_client.py"
STDERR: No licenses could be found to run this application.
STDERR:     Please check for a valid license server host
STDERR: Details: http://localhost:1715: No server found running. Please start the server before retrying.

What was the solution? (How)

capture the license error and fail the job

What is the impact of this change?

Jobs properly fail!

How was this change tested?

Ran hython locally without a license connection and added a unit test

$ houdini-openjd run --init-data "{'scene_file': 'C:/asdfasdf', 'render_node': 'mantra1', 'version': '19.5'}"
INFO: Applying user-level configuration: /Users/morgane/.openjd/adaptors/runtime/configuration.json
INFO: Applying user-level configuration: /Users/morgane/.openjd/adaptors/HoudiniAdaptor/HoudiniAdaptor.json
INFO: Loading 'init_data' schema from /Users/morgane/Library/Application Support/hatch/env/virtual/deadline-cloud-for-houdini/Bp-p5MaR/deadline-cloud-for-houdini/lib/python3.10/site-packages/deadline/houdini_adaptor/HoudiniAdaptor/schemas/init_data.schema.json
INFO: Loading 'run_data' schema from /Users/morgane/Library/Application Support/hatch/env/virtual/deadline-cloud-for-houdini/Bp-p5MaR/deadline-cloud-for-houdini/lib/python3.10/site-packages/deadline/houdini_adaptor/HoudiniAdaptor/schemas/run_data.schema.json
openjd_progress: 0
openjd_status: Initializing Houdini
INFO: Setting HOUDINI_PATHMAP to: 
INFO: Running command: hython "/Users/morgane/Library/Application Support/hatch/env/virtual/deadline-cloud-for-houdini/Bp-p5MaR/deadline-cloud-for-houdini/lib/python3.10/site-packages/deadline/houdini_adaptor/HoudiniClient/houdini_client.py"
STDERR: No licenses could be found to run this application.
STDERR:     Please check for a valid license server host
STDERR: Details: http://localhost:1715: No server found running. Please start the server before retrying.
STDERR: 
STDERR: 
openjd_fail: Error encountered while starting adaptor: Houdini encountered a license error: No licenses could be found to run this application.
ERROR: Error running the adaptor: Houdini encountered a license error: No licenses could be found to run this application.
ERROR: Entrypoint failed: Houdini encountered a license error: No licenses could be found to run this application.

Was this change documented?

N/A

Is this a breaking change?

Nope


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud