ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
488 stars 577 forks source link

azure-events-az: update to API versions, add retry functionality for metadata requests, update tests #1941

Closed HappyTobi closed 1 month ago

HappyTobi commented 1 month ago

Hi all,

we updated the azure-events resource agent with the following stuff:

  1. Add request timeout
  2. Add retry pattern (for all azure request)
  3. Add configuration parameters for all new introduces values
  4. Updated the tests at the ocf.py file.

Regards

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/1/input

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/2/input

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/3/input

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/4/input

HappyTobi commented 1 month ago

@oalbrigt is that normal that the integration test takes so much time?

oalbrigt commented 1 month ago

@oalbrigt is that normal that the integration test takes so much time?

No. Not sure what happened. I just tried running it again now.

It failed with the current error, so something wrong with the metadata https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/4/consoleText:


[2024-05-29T12:14:55.645Z] OCF_ROOT=/srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat OCF_FUNCTIONS_DIR=/srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat ./azure-events-az meta-data | xmllint --path /srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat --noout --relaxng /srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat/metadata.rng -
[2024-05-29T12:14:55.645Z] -:37: element content: Relax-NG validity error : Element content failed to validate content
[2024-05-29T12:14:55.645Z] -:42: element content: Relax-NG validity error : Element content failed to validate content
[2024-05-29T12:14:55.645Z] -:47: element content: Relax-NG validity error : Element content failed to validate content
[2024-05-29T12:14:55.645Z] - fails to validate
[2024-05-29T12:14:55.645Z] make[2]: *** [Makefile:1062: azure-events-az.check] Error 3
[2024-05-29T12:14:55.645Z] make[2]: *** Waiting for unfinished jobs....``` 
HappyTobi commented 1 month ago

@oalbrigt is that normal that the integration test takes so much time?

No. Not sure what happened. I just tried running it again now.

It failed with the current error, so something wrong with the metadata https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/4/consoleText:

[2024-05-29T12:14:55.645Z] OCF_ROOT=/srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat OCF_FUNCTIONS_DIR=/srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat ./azure-events-az meta-data | xmllint --path /srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat --noout --relaxng /srv/workspace/resource-agents-pipeline_PR-1941/resource-agents/heartbeat/metadata.rng -
[2024-05-29T12:14:55.645Z] -:37: element content: Relax-NG validity error : Element content failed to validate content
[2024-05-29T12:14:55.645Z] -:42: element content: Relax-NG validity error : Element content failed to validate content
[2024-05-29T12:14:55.645Z] -:47: element content: Relax-NG validity error : Element content failed to validate content
[2024-05-29T12:14:55.645Z] - fails to validate
[2024-05-29T12:14:55.645Z] make[2]: *** [Makefile:1062: azure-events-az.check] Error 3
[2024-05-29T12:14:55.645Z] make[2]: *** Waiting for unfinished jobs....``` 

Is that something you are responsible for?

oalbrigt commented 1 month ago
[2024-05-29T12:14:55.645Z] make[2]: *** [Makefile:1062: azure-events-az.check] Error 3
[2024-05-29T12:14:55.645Z] make[2]: *** Waiting for unfinished jobs....``` 

Is that something you are responsible for?

It's a test done by make check. I just tested locally, and you need to update content_type from "int" to "integer".

You can also squash the commits into 1 in the process.

HappyTobi commented 1 month ago

I fixed the issue and changed the parameters from int to integer

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/5/input

oalbrigt commented 1 month ago

Seems like you unsquashed by accident and got the camel-case parameter names back.

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/6/input

knet-jenkins[bot] commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/7/input

HappyTobi commented 1 month ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1941/6/input

@oalbrigt sorry about the mistake, now everything looks fine, I also rerun the tests locally again.

oalbrigt commented 1 month ago

@oalbrigt sorry about the mistake, now everything looks fine, I also rerun the tests locally again.

No worries. We all do mistakes from time to time

oalbrigt commented 1 month ago

Thanks.