securefederatedai / openfl

An Open Framework for Federated Learning.
https://openfl.readthedocs.io/en/latest/index.html
Apache License 2.0
734 stars 207 forks source link

Set FQDN as env variable for pytest coverage #1137

Closed noopurintel closed 1 week ago

noopurintel commented 1 week ago

Problem - Pytest coverage is failing as part of Ubuntu and Windows nightly jobs. https://github.com/securefederatedai/openfl/actions/runs/11788591035/attempts/1

Reason - FQDN is missing in the environment section of above workflow yaml files.

After adding FQDN as localhost, it is working fine - https://github.com/payalcha/openfl/actions/runs/11792791416

rajithkrishnegowda commented 1 week ago

ubuntu.yaml pipeline was failed because of FAILED tests/openfl/interface/test_aggregator_api.py::test_aggregator_generate_cert_request - ValueError: Attribute's length must be >= 1 and <= 64, but it was 65 ======= 1 failed, 273 passed, 1 skipped, 2 warnings in 65.13s (0:01:05) ========

If we rerun pipeline(https://github.com/securefederatedai/openfl/actions/runs/11788591035) will be passed not sure if FQDN will help.

teoparvanov commented 1 week ago

ubuntu.yaml pipeline was failed because of FAILED tests/openfl/interface/test_aggregator_api.py::test_aggregator_generate_cert_request - ValueError: Attribute's length must be >= 1 and <= 64, but it was 65 ======= 1 failed, 273 passed, 1 skipped, 2 warnings in 65.13s (0:01:05) ========

If we rerun it pipeline will be passed not sure if FQDN will help.

It will, as the error is due to the excessively long FQDNs of GHA runners. The suggestion here is to use localhost as the (aggregator) FQDN instead.

noopurintel commented 1 week ago

@rajithkrishnegowda - This error actually comes when we do not pass the FQDN and system picks the default domain name of given runner machine. For Github runners - this is one example where I encountered the same error - fv-az1986-223.m0gpccztuiae5imzg12qvibqrh.bx.internal.cloudapp.net . It's clearly crossing the limit of 64 char.

Thus we have to explicitly provide the FQDN. It's already present in pytest_coverage.yaml file.

noopurintel commented 1 week ago

Triggered jobs after making FQDN as global env:

  1. Ubuntu - https://github.com/noopurintel/openfl/actions/runs/11793213643
  2. Windows - https://github.com/noopurintel/openfl/actions/runs/11793214547