Skip to content

handles precondition failed from the adapter errors - #13

Merged
ssmails merged 4 commits into
mainfrom
handle_adapter_precondition_failed
Oct 15, 2026
Merged

ssmails merged 4 commits into
mainfrom
handle_adapter_precondition_failed

Conversation

@ssmails

@ssmails ssmails commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
  1. Conformance tests check the HAL wire contract, not adapter functionality. FAILED_PRECONDITION could be returned by the adapter because of its own state and precondition checks; We treat FAILED_PRECONDITION as a contract , and if is returned by an adapter, we skip the particular test for that adapter (involving checking the response format as there is no response sent in these cases), so other third-party adapters with different sequences still pass.
    Adapters can either return FAILED_PRECONDITION or return a valid response incase of a precondition failing. Both cases will be handled by the tests.
    The adpater provider can chose the approach, depending on the level of observability the particular adapter wants to provide to the caller/controller.

  2. Pins versions in Makefile and proto-ci.yaml so make generate changes from local match the ones in CI for the CI checks to pass.

Conformance Test Results

ource/test_source.py::test_health_check PASSED [  8%]
source/test_source.py::TestSource::test_resource_health_check[CISCO] PASSED [ 16%]
source/test_source.py::TestSource::test_auto_recover[CISCO] PASSED [ 25%]
source/test_source.py::TestSource::test_tune[CISCO] PASSED [ 33%]
source/test_source.py::TestSource::test_get_product_info[CISCO] PASSED [ 41%]
source/test_source.py::TestSource::test_initialize[CISCO] SKIPPED [ 50%]
source/test_source.py::TestSource::test_deinitialize[CISCO] PASSED [ 58%]
source/test_source.py::TestSource::test_get_status[CISCO] PASSED [ 66%]
source/test_source.py::TestSource::test_set_config[CISCO] PASSED [ 75%]
source/test_source.py::TestSource::test_start_emission[CISCO] SKIPPED [ 83%]
source/test_source.py::TestSource::test_stop_emission[CISCO] PASSED [ 91%]
source/test_source.py::TestSource::test_trigger_event[CISCO] PASSED [100%]

============ 10 passed, 2 skipped in 0.12s ============
switch/test_switch.py::test_health_check PASSED [  2%]
switch/test_switch.py::TestSwitch::test_resource_health_check[POLATIS] PASSED [  4%]
switch/test_switch.py::TestSwitch::test_auto_recover[POLATIS] PASSED [  6%]
switch/test_switch.py::TestSwitch::test_tune[POLATIS] PASSED [  8%]
switch/test_switch.py::TestSwitch::test_get_product_info[POLATIS] PASSED [ 10%]
switch/test_switch.py::TestSwitch::test_initialize[POLATIS] PASSED [ 12%]
switch/test_switch.py::TestSwitch::test_deinitialize[POLATIS] PASSED [ 14%]
switch/test_switch.py::TestSwitch::test_get_status[POLATIS] PASSED [ 16%]
switch/test_switch.py::TestSwitch::test_set_config[POLATIS] PASSED [ 18%]
switch/test_switch.py::TestSwitch::test_commit_connection[POLATIS] PASSED [ 20%]
switch/test_switch.py::TestSwitch::test_clear_connections[POLATIS] PASSED [ 22%]
switch/test_switch.py::TestSwitch::test_execute_command[POLATIS] PASSED [ 24%]
switch/test_switch.py::TestSwitch::test_trigger_event[POLATIS] PASSED [ 26%]
switch/test_switch.py::TestSwitch::test_resource_health_check[JW] PASSED [ 28%]
switch/test_switch.py::TestSwitch::test_auto_recover[JW] PASSED [ 30%]
switch/test_switch.py::TestSwitch::test_tune[JW] PASSED [ 32%]
switch/test_switch.py::TestSwitch::test_get_product_info[JW] PASSED [ 34%]
switch/test_switch.py::TestSwitch::test_initialize[JW]PASSED [ 36%]
switch/test_switch.py::TestSwitch::test_deinitialize[JW] PASSED [ 38%]
switch/test_switch.py::TestSwitch::test_get_status[JW]PASSED [ 40%]
switch/test_switch.py::TestSwitch::test_set_config[JW]PASSED [ 42%]
switch/test_switch.py::TestSwitch::test_commit_connection[JW] PASSED [ 44%]
switch/test_switch.py::TestSwitch::test_clear_connections[JW] PASSED [ 46%]
switch/test_switch.py::TestSwitch::test_execute_command[JW] PASSED [ 48%]
switch/test_switch.py::TestSwitch::test_trigger_event[JW] PASSED [ 51%]
switch/test_switch.py::TestSwitch::test_resource_health_check[OSW] PASSED [ 53%]
switch/test_switch.py::TestSwitch::test_auto_recover[OSW] PASSED [ 55%]
switch/test_switch.py::TestSwitch::test_tune[OSW] PASSED [ 57%]
switch/test_switch.py::TestSwitch::test_get_product_info[OSW] PASSED [ 59%]
switch/test_switch.py::TestSwitch::test_initialize[OSW] PASSED [ 61%]
switch/test_switch.py::TestSwitch::test_deinitialize[OSW] PASSED [ 63%]
switch/test_switch.py::TestSwitch::test_get_status[OSW] PASSED [ 65%]
switch/test_switch.py::TestSwitch::test_set_config[OSW] PASSED [ 67%]
switch/test_switch.py::TestSwitch::test_commit_connection[OSW] PASSED [ 69%]
switch/test_switch.py::TestSwitch::test_clear_connections[OSW] PASSED [ 71%]
switch/test_switch.py::TestSwitch::test_execute_command[OSW] PASSED [ 73%]
switch/test_switch.py::TestSwitch::test_trigger_event[OSW] PASSED [ 75%]
switch/test_switch.py::TestSwitch::test_resource_health_check[QSWITCH] PASSED [ 77%]
switch/test_switch.py::TestSwitch::test_auto_recover[QSWITCH] PASSED [ 79%]
switch/test_switch.py::TestSwitch::test_tune[QSWITCH] PASSED [ 81%]
switch/test_switch.py::TestSwitch::test_get_product_info[QSWITCH] PASSED [ 83%]
switch/test_switch.py::TestSwitch::test_initialize[QSWITCH] PASSED [ 85%]
switch/test_switch.py::TestSwitch::test_deinitialize[QSWITCH] PASSED [ 87%]
switch/test_switch.py::TestSwitch::test_get_status[QSWITCH] PASSED [ 89%]
switch/test_switch.py::TestSwitch::test_set_config[QSWITCH] PASSED [ 91%]
switch/test_switch.py::TestSwitch::test_commit_connection[QSWITCH] PASSED [ 93%]
switch/test_switch.py::TestSwitch::test_clear_connections[QSWITCH] PASSED [ 95%]
switch/test_switch.py::TestSwitch::test_execute_command[QSWITCH] PASSED [ 97%]
switch/test_switch.py::TestSwitch::test_trigger_event[QSWITCH] PASSED [100%]

================= 49 passed in 0.26s ==================

@nishantapatil3 nishantapatil3 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.

Looks good

@ssmails
ssmails merged commit 273a76a into main Oct 15, 2026
8 checks passed
@ssmails
ssmails deleted the handle_adapter_precondition_failed branch October 15, 2026 17:19
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