[BUG] Azure China - opencensus-ext-azure causes Python3.9 function to be in a crash loop with "Azure Function Runtime is not Available"

Investigative information
Please provide the following:

Timestamp: 4.11.2023T22:00:00UTC
Function App name: avx-controller-functionapp
Function name(s) (as appropriate): testapp
Core Tools version: 4.0.5095

Repro steps
Provide the steps required to reproduce the problem:
Add "opencensus-ext-azure" to requirements.txt and publish the function. The function code is irrelevant and the module doesn't need to be called in the code, just by installing the module the function crashes.
I am trying to add instrumentation to an existing app I have deployed in an Azure Function in Azure China, the function is working fine but Azure China doesn't support codeless integration with Application Insights, after trying to instrument the function with opencensus extension for Azure monitor I noticed my function was constantly crashing so I trimmed down the code to understand what was causing it to crash, what I discovered is that just by adding the module "opencensus-ext-azure" to the requirements file and publishing the function app it crashes. My requirements.txt file looks like follows, and I didn't make any changes to the existing code (tested and working):
azure-functions
azure-common==1.1.23
azure-identity==1.7.1
azure-mgmt-compute==23.1.0
azure-mgmt-network==19.3.0
azure-mgmt-resource==20.0.0
azure-storage-blob==12.9.0
azure-keyvault-secrets==4.3.0
msrestazure==0.6.4
requests==2.26.0
retry==0.9.2
urllib3==1.26.7
opencensus-ext-azure

The other thing I tried is, with the working code deployed and function running, I SSH'ed into the function worker and manually created the requirements.txt file (same as above) and a func.py that is a copy of the working code but uses opencensus extension for Azure and AzureLogHandler and is run as a script directly from shell (no triggers and bindings):
import json
import logging
import os
import time
import azure.functions as func
import requests
import urllib3
from . import version
from msrestazure.azure_cloud import AZURE_CHINA_CLOUD as CLOUD
from azure.identity import ManagedIdentityCredential
from azure.keyvault.secrets import SecretClient
from azure.mgmt.compute import ComputeManagementClient
from azure.mgmt.network import NetworkManagementClient
from azure.mgmt.resource import SubscriptionClient
from azure.storage.blob import BlobServiceClient
from opencensus.ext.azure.log_exporter import AzureLogHandler
from urllib3.exceptions import InsecureRequestWarning

urllib3.disable_warnings(InsecureRequestWarning)

logger_ha = logging.getLogger('HALOG')
logger_ha.addHandler(
    AzureLogHandler(
        connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
    )
)
/// Some code here
def main():
    logging.basicConfig(
        format="%(asctime)s aviatrix-azure-function--- %(message)s",
        level=logging.INFO
    )
    logger_ha.info(
        f"invocation_id")

    event = {
        "aviatrix_api_version": "v1",
        "aviatrix_api_route": "api",
        "tenant_id": os.environ["avx_tenant_id"],
        "client_id": os.environ["avx_client_id"],
        "vault_uri": os.environ["keyvault_uri"],
        "vault_secret": os.environ["keyvault_secret"],
        "func_client_id": os.environ["func_client_id"],
        "storage_name": os.environ["storage_name"],
        "container_name": os.environ["container_name"],
        "lb_name": os.environ["lb_name"],
        "rg": os.environ["resource_group_name"]
    }

    try:
        function_handler(event)
    except Exception as err:
        logger_ha.exception(f"Error has occurred: {str(err)}")
    else:
        logger_ha.info("Aviatrix Controller has been initialized successfully")
        logger_ha.info("Loading function completed !!")
        return func.HttpResponse(
            "Failover event completed successfully")

if __name__ == "__main__":
    main()

Running pip install -r requirements.txt followed by phyton3.9 func.py directly from shell within the function worker works perfectly fine, the issue only seems to be when deploying using Azure Core tools with func azure functionapp publish avx-controller-functionapp --build remote --python
The function was deployed using Terraform as follows
resource "azurerm_linux_function_app" "controller_app" {
  name                       	 = var.function_app_name == "" ? "aviatrix-controller-app-${random_id.aviatrix.hex}" : var.function_app_name
  resource_group_name        	 = azurerm_resource_group.aviatrix_rg.name
  location                   	 = azurerm_resource_group.aviatrix_rg.location
  service_plan_id            	 = azurerm_service_plan.controller_app_service_plan.id
  storage_account_name       	 = azurerm_storage_account.aviatrix_controller_storage.name
  storage_account_access_key     = azurerm_storage_account.aviatrix_controller_storage.primary_access_key
  https_only                 	 = true

  identity {
    type = "UserAssigned"
    identity_ids = [
      azurerm_user_assigned_identity.aviatrix_identity.id
    ]
  }

  app_settings = {
    "APPLICATIONINSIGHTS_CONNECTION_STRING" = azurerm_application_insights.application_insights.connection_string,
    "BUILD_FLAGS"                     = "UseExpressBuild",
    "XDG_CACHE_HOME"                  = "/tmp/.cache",
    "func_client_id"                  = azurerm_user_assigned_identity.aviatrix_identity.client_id,
    "avx_tenant_id"                   = data.azurerm_subscription.current.tenant_id,
    "avx_client_id"                   = var.avtx_service_principal_appid,
    "keyvault_uri"                    = azurerm_key_vault.aviatrix_key_vault.vault_uri,
    "keyvault_secret"                 = azurerm_key_vault_secret.aviatrix_arm_secret.name,
    "storage_name"                    = azurerm_storage_account.aviatrix_controller_storage.name,
    "container_name"                  = azurerm_storage_container.aviatrix_backup_container.name,
    "scaleset_name"                   = var.scale_set_controller_name,
    "lb_name"                         = var.load_balancer_name,
    "resource_group_name"             = azurerm_resource_group.aviatrix_rg.name,
    "AzureWebJobs.Backup.Disabled"    = var.disable_periodic_backup,
    "PYTHON_ENABLE_WORKER_EXTENSIONS" = "1",
    "FUNCTIONS_WORKER_RUNTIME"        = "python"
  }

  lifecycle {
    ignore_changes = [
      app_settings
    ]
  }

  site_config {
    http2_enabled             = true
    use_32_bit_worker	      = false

    application_stack {
      python_version = "3.9"
    }

    app_service_logs {
      disk_quota_mb = 50
      retention_period_days = 1
    }
  }

  depends_on = [
    module.aviatrix_controller_initialize
  ]
}

Expected behavior
Provide a description of the expected behavior.
Function shouldn't be crashing and it can be invoked
Actual behavior
Provide a description of the actual behavior observed.
After publishing the function using Azure Core Tools func azure functionapp publish avx-controller-functionapp --build remote --python the function is constantly crashing with "Azure Function Runtime is not available"
Known workarounds
Provide a description of any known workarounds.
No workarounds
Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
azure-functions
azure-common==1.1.23
azure-identity==1.7.1
azure-mgmt-compute==23.1.0
azure-mgmt-network==19.3.0
azure-mgmt-resource==20.0.0
azure-storage-blob==12.9.0
azure-keyvault-secrets==4.3.0
msrestazure==0.6.4
requests==2.26.0
retry==0.9.2
urllib3==1.26.7
opencensus-ext-azure

Related information
Provide any related information

Links to source
Bindings used

Source
import json
import logging
import os
import time
import azure.functions as func
import requests
import urllib3
from . import version
from msrestazure.azure_cloud import AZURE_CHINA_CLOUD as CLOUD
from azure.identity import ManagedIdentityCredential
from azure.keyvault.secrets import SecretClient
from azure.mgmt.compute import ComputeManagementClient
from azure.mgmt.network import NetworkManagementClient
from azure.mgmt.resource import SubscriptionClient
from azure.storage.blob import BlobServiceClient
from opencensus.ext.azure.log_exporter import AzureLogHandler
from urllib3.exceptions import InsecureRequestWarning

urllib3.disable_warnings(InsecureRequestWarning)

logger_ha = logging.getLogger('HALOG')
logger_ha.addHandler(
    AzureLogHandler(
        connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
    )
)

default_wait_time_for_apache_wakeup = 300
WAIT_DELAY = 30
INITIAL_SETUP_DELAY = 10
MAXIMUM_BACKUP_AGE = 24 * 3600 * 3  # 3 days

class AviatrixException(Exception):
    def __init__(self, message="Aviatrix Error Message: ..."):
        super(AviatrixException, self).__init__(message)

def function_handler(event):
    aviatrix_api_version = event["aviatrix_api_version"]
    aviatrix_api_route = event["aviatrix_api_route"]
    tenant_id = event["tenant_id"]
    client_id = event["client_id"]
    vault_uri = event["vault_uri"]
    vault_secret = event["vault_secret"]
    func_client_id = event["func_client_id"]
    storage_name = event["storage_name"]
    container_name = event["container_name"]
    lb_name = event["lb_name"]
    rg = event["rg"]
    wait_time = default_wait_time_for_apache_wakeup

    credentials = ManagedIdentityCredential(client_id=func_client_id)
    subscription_client = SubscriptionClient(credentials, base_url=CLOUD.endpoints.resource_manager, credential_scopes=[CLOUD.endpoints.resource_manager + "/.default"])
    subscription = next(subscription_client.subscriptions.list())
    subscription_id = subscription.subscription_id
    network_client = NetworkManagementClient(credentials, subscription_id, base_url=CLOUD.endpoints.resource_manager, credential_scopes=[CLOUD.endpoints.resource_manager + "/.default"])
    compute_client = ComputeManagementClient(credentials, subscription_id, base_url=CLOUD.endpoints.resource_manager, credential_scopes=[CLOUD.endpoints.resource_manager + "/.default"])
    blob_service_client = BlobServiceClient(f"https://{storage_name}.blob.core.chinacloudapi.cn", credentials)
    container_client = blob_service_client.get_container_client(container_name)
    secret_client = SecretClient(vault_url=f"{vault_uri}", credential=credentials)
    retrieved_secret = secret_client.get_secret(vault_secret)

    cred = {
        'subscription_id': subscription_id,
        'tenant_id': tenant_id,
        'client_id': client_id,
        'client_secret': retrieved_secret.value
    }

    vm_scaleset_client = compute_client.virtual_machine_scale_sets
    vm_res_client = compute_client.virtual_machines
    lb_res_client = network_client.load_balancers
    lb_res_client.base_url = CLOUD.endpoints.resource_manager

    # Get Scaleset Name
    vmScaleSetName = os.environ["scaleset_name"]

    # Get Scaleset attributes
    vm_scale_set = VmScaleSet(vm_scaleset_client, rg, vmScaleSetName)

    # Get VM info in a Scaleset
    inst_name, private_nic_name = vm_scale_set_vm_info(
        vm_res_client, rg, vmScaleSetName)
    logger_ha.info(f'inst_name:{inst_name}')
    logger_ha.info(f'private_nic_name:{private_nic_name}')
    avx_int_conf = VmNetInt(rg, network_client, private_nic_name)
    logger_ha.info(f'avx_int_conf:{avx_int_conf}')
    old_pub_intf_id = avx_int_conf.AvxPubIntID
    logger_ha.info(f'old_pub_intf_id:{old_pub_intf_id}')
    logger_ha.info(avx_int_conf.AvxPubIntID)

    # Check if blob backup file is recent and able to access blob storage
    blob_file = f"CloudN_{avx_int_conf.AvxPrivIntIP}_save_cloudx_config.enc"

    if not is_backup_file_is_recent(blob_file, container_client):
        raise AviatrixException(f"HA event failed. Backup file does not exist "
                                f"or is older than {MAXIMUM_BACKUP_AGE}")

    version_file = (
        f"CloudN_{avx_int_conf.AvxPrivIntIP}_save_cloudx_version.txt")
    logger_ha.info(f"Controller version file name is {version_file}")
    ctrl_version = retrieve_controller_version(version_file, container_client)

    # Get LoadBalacer config prior to public ip removal
    lb = LbConf(lb_res_client, rg, network_client, lb_name)
    hostname = lb.lb_public_ip_prefix

    # Remove public ip Association
    avx_int_conf.rmPubIntIPAssoc()

    # Terminate unhealthy VM
    vm_detail = vm_res_client.get(rg, inst_name, expand='instanceView')

    try:
        terminate_vm(vm_res_client, rg, vm_detail.name)
    except Exception as err:
        logger_ha.warning(str(err))
        logger_ha.info("There are no running VM's in a scale set ")

    # Increasing sku capacity
    logger_ha.info("Increasing sku capacity -> 1")
    vm_scale_set.updateSku()

    # Needs to be dynamic wait time for scaleset to spin up 1 more instance
    time.sleep(WAIT_DELAY)

    # Get new VM info in a Scaleset
    N_inst_name, N_private_nic_name = vm_scale_set_vm_info(
        vm_res_client, rg, vmScaleSetName)
    N_avx_int_conf = VmNetInt(rg, network_client, N_private_nic_name)
    # Check if https access for functions exist

    # Remove new public ip Association with new instance
    N_avx_int_conf.rmPubIntIPAssoc()

    # Add old public ip Association to the new instance
    N_avx_int_conf.addPubIntIPAssoc(old_pub_intf_id)

    # Delete the detached public ip Association to the new instance
    N_avx_int_conf.deletePubIntIP()

    # Wait until the rest API service of Aviatrix Controller is up and running
    logger_ha.info(
        "START: Wait until API server of Aviatrix Controller is up and running"
    )

    api_endpoint_url = (
        f"https://{hostname}/{aviatrix_api_version}/{aviatrix_api_route}"
    )

    wait_until_controller_api_server_is_ready(
        hostname=hostname,
        api_version=aviatrix_api_version,
        api_route=aviatrix_api_route,
        total_wait_time=wait_time,
        interval_wait_time=10,
    )
    logger_ha.info(
        "ENDED: Wait until API server of controller is up and running")

    # Login Aviatrix Controller with username:
    # Admin and password: private ip address and verify login
    logger_ha.info(
        "START: Login Aviatrix Controller as admin using private ip address")
    response = login(
        api_endpoint_url=api_endpoint_url,
        username="admin",
        password=N_avx_int_conf.AvxPrivIntIP,
        hide_password=True,
    )

    verify_aviatrix_api_response_login(response=response)
    CID = response.json()["CID"]
    logger_ha.info(
        "END: Login Aviatrix Controller as admin using private ip address")

    # Check if the controller has been initialized or not
    logger_ha.info(
        "START: Check if Aviatrix Controller has already been initialized")
    is_controller_initialized = has_controller_initialized(
        api_endpoint_url=api_endpoint_url,
        CID=CID,
    )

    if is_controller_initialized:
        err_msg = "ERROR: Controller has already been initialized"
        logger_ha.error(err_msg)
        raise AviatrixException(message=err_msg)

    logger_ha.info(
        "END: Check if Aviatrix Controller has already been initialized")

    # Initial Setup for Aviatrix Controller by Invoking Aviatrix API
    logger_ha.info("Start: Aviatrix Controller initial setup")
    response = run_initial_setup(
        api_endpoint_url=api_endpoint_url,
        CID=CID,
        target_version=ctrl_version,
    )
    verify_aviatrix_api_run_initial_setup(response=response)
    logger_ha.info("End: Aviatrix Controller initial setup")

    # Wait until apache server of controller is up and running after
    # initial setup.
    logger_ha.info(
        ("START: Wait until API server of Aviatrix Controller "
         "is up and running after initial setup")
    )
    wait_until_controller_api_server_is_ready(
        hostname=hostname,
        api_version=aviatrix_api_version,
        api_route=aviatrix_api_route,
        total_wait_time=wait_time,
        interval_wait_time=10,
    )
    logger_ha.info(
        ("End: Wait until API server of Aviatrix Controller "
         "is up and running after initial setup")
    )

    # Re-login
    logger_ha.info("START: Re-login")
    response = login(
        api_endpoint_url=api_endpoint_url,
        username="admin",
        password=N_avx_int_conf.AvxPrivIntIP,
    )
    verify_aviatrix_api_response_login(response=response)
    CID = response.json()["CID"]
    logger_ha.info("END: Re-login")

    # Restore backup
    logger_ha.info("START: Restore-Backup")
    restore_ctrl_backup(cred, hostname, CID, storage_name,
                        container_name, blob_file)
    logger_ha.info("END: Restore-Backup")

def wait_until_controller_api_server_is_ready(
    hostname="<IP_ADDRESS>",
    api_version="v1",
    api_route="api",
    total_wait_time=300,
    interval_wait_time=10,
):
    payload = {"action": "login", "username": "test", "password": "test"}
    api_endpoint_url = f"https://{hostname}/{api_version}/{api_route}"

    # invoke the aviatrix api with a non-existed api
    # to resolve the issue where server status code is 200 but response
    # message is "Valid action required: login"
    # which means backend is not ready yet
    payload = {"action": "login", "username": "test", "password": "test"}
    remaining_wait_time = total_wait_time

    """ Variable Description: (time_spent_for_requests_lib_timeout)
    Description:
        * This value represents how many seconds for "requests" lib to timeout
          by default.
    Detail:
        * The value 20 seconds is actually a rough number
        * If there is a connection error and causing timeout when
          invoking--> requests.get(xxx), it takes about 20 seconds for
          requests.get(xxx) to throw timeout exception.
        * When calculating the remaining wait time, this value is considered.
    """
    time_spent_for_requests_lib_timeout = 20
    last_err_msg = ""
    while remaining_wait_time > 0:
        try:
            # Reset the checking flags
            response_status_code = -1
            is_apache_returned_200 = False
            is_api_service_ready = False

            # invoke a dummy REST API to Aviatrix controller
            response = requests.post(
                url=api_endpoint_url, data=payload, verify=False)

            # check response
            # if the server is ready, the response code should be 200.
            # there are two cases that the response code is 200
            #   case1 : return value is false and the reason message is
            #           "Valid action required: login",
            #           which means the server is not ready yet
            #   case2 : return value is false and the reason message is
            #           "username and password do not match",
            #           which means the server is ready
            if response is not None:
                response_status_code = response.status_code
                logger_ha.info(f"Server status code is: "
                             f"{str(response_status_code)}")
                py_dict = response.json()
                if 'CID' in py_dict:
                    py_dict["CID"] = "*********"
                if response.status_code == 200:
                    is_apache_returned_200 = True

                response_message = py_dict["reason"]
                response_msg_indicates_backend_not_ready = ("Valid action "
                                                            "required")
                response_msg_request_refused = "RequestRefused"
                # case1:
                if (
                    py_dict["return"] is False
                    and (
                        response_msg_indicates_backend_not_ready
                        in response_message
                        or response_msg_request_refused in response_message
                        )
                ):
                    is_api_service_ready = False
                    logger_ha.info(
                        f"Server is not ready, and the response is "
                        f":{response_message}")
                # case2:
                else:
                    is_api_service_ready = True
            # END outer if

            # if the response code is 200 and the server is ready
            if is_apache_returned_200 and is_api_service_ready:
                logger_ha.info("Server is ready")
                return True
        except Exception as e:
            logger_ha.exception(
                f"Aviatrix Controller {api_endpoint_url} is not available")
            last_err_msg = str(e)
            pass
            # END try-except

            # handle the response code is 404
            if response_status_code == 404:
                err_msg = (
                    f"Error: Aviatrix Controller returns error code: 404 for "
                    f"{api_endpoint_url}"
                )
                raise AviatrixException(
                    message=err_msg,
                )
            # END if

        # if server response code is neither 200 nor 404,
        # some other errors occurs
        # repeat the process till reaches case 2

        remaining_wait_time = (
            remaining_wait_time
            - interval_wait_time
            - time_spent_for_requests_lib_timeout
        )
        if remaining_wait_time > 0:
            time.sleep(interval_wait_time)
    # END while loop

    # if the server is still not ready after the default time
    # raise AviatrixException
    err_msg = (
        f"Aviatrix Controller {api_endpoint_url} is not available after "
        f"{str(total_wait_time)} seconds "
        f"Server status code is: {str(response_status_code)}. "
        f"The response message is: {last_err_msg}."
    )
    raise AviatrixException(
        message=err_msg,
    )

# END wait_until_controller_api_server_is_ready()

def verify_aviatrix_api_response_login(response=None):
    # if successfully login
    # response_code == 200
    # api_return_boolean == true
    # response_message = "authorized successfully"

    py_dict = response.json()
    if 'CID' in py_dict:
        py_dict["CID"] = "*********"
    logger_ha.info(f"Aviatrix API response is {str(py_dict)}")

    response_code = response.status_code
    if response_code != 200:
        err_msg = (
            f"Fail to login Aviatrix Controller. The response code is "
            f"{response_code}"
        )
        raise AviatrixException(message=err_msg)

    api_return_boolean = py_dict["return"]
    if api_return_boolean is not True:
        err_msg = (
            f"Fail to Login Aviatrix Controller. The Response is "
            f"{str(py_dict)}"
        )
        raise AviatrixException(
            message=err_msg,
        )

    api_return_msg = py_dict["results"]
    expected_string = "authorized successfully"
    if (expected_string in api_return_msg) is not True:
        err_msg = (
            f"Fail to Login Aviatrix Controller. The Response is "
            f"{str(py_dict)}"
        )
        raise AviatrixException(
            message=err_msg,
        )

# End def verify_aviatrix_api_response_login()

def login(
    api_endpoint_url="https://<IP_ADDRESS>/v1/api",
    username="admin",
    password="********",
    hide_password=True,
):
    request_method = "POST"
    data = {"action": "login", "username": username, "password": password}
    logger_ha.info(f"API endpoint url is : {api_endpoint_url}")
    logger_ha.info(f"Request method is : {request_method}")

    # handle if the hide_password is selected
    if hide_password:
        payload_with_hidden_password = dict(data)
        payload_with_hidden_password["password"] = "************"
        logger_ha.info(
            f"Request payload: "
            f"{str(json.dumps(obj=payload_with_hidden_password, indent=4))}")
    else:
        logger_ha.info(f"Request payload: "
                     f"{str(json.dumps(obj=data, indent=4))}")

    # send post request to the api endpoint
    response = send_aviatrix_api(
        api_endpoint_url=api_endpoint_url,
        request_method=request_method,
        payload=data,
    )
    return response

# End def login()

def send_aviatrix_api(
    api_endpoint_url="https://<IP_ADDRESS>/v1/api",
    request_method="POST",
    payload=dict(),
    retry_count=5,
    timeout=None,
):
    response = None
    responses = list()
    request_type = request_method.upper()
    response_status_code = -1

    for i in range(retry_count):
        try:
            if request_type == "GET":
                response = requests.get(
                    url=api_endpoint_url, params=payload, verify=False
                )
                response_status_code = response.status_code
            elif request_type == "POST":
                response = requests.post(
                    url=api_endpoint_url, data=payload,
                    verify=False, timeout=timeout
                )
                response_status_code = response.status_code
            else:
                failure_reason = (f"ERROR : Bad HTTPS request type: "
                                  f"{request_type}")
                logger_ha.error(failure_reason)
        except requests.exceptions.Timeout as e:
            logger_ha.warning(f"WARNING: Request timeout... {str(e)}")
            responses.append(str(e))
        except requests.exceptions.ConnectionError as e:
            logger_ha.warning(f"WARNING: Server is not responding... {str(e)}")
            responses.append(str(e))
        except Exception as e:
            logger_ha.warning(f"HTTP request failed {str(e)}")
            # For error message/debugging purposes

        finally:
            if response_status_code == 200:
                return response
            elif response_status_code == 404:
                failure_reason = "ERROR: 404 Not Found"
                logger_ha.error(failure_reason)

            # if the response code is neither 200 nor 404, retry process
            # the default retry count is 5, the wait for each retry is i
            # i           =  0  1  2  3  4
            # wait time   =     1  2  4  8

            if i + 1 < retry_count:
                logger_ha.info("START: retry")
                logger_ha.info("i == %d", i)
                wait_time_before_retry = pow(2, i)
                logger_ha.info("Wait for: %ds for the next retry",
                             wait_time_before_retry)
                time.sleep(wait_time_before_retry)
                logger_ha.info("ENDED: Wait until retry")
                # continue next iteration
            else:
                failure_reason = (
                    f"ERROR: Failed to invoke Aviatrix API. Exceed the max "
                    f"retry times. All responses are listed as follows: "
                    f"{str(responses)}"
                )
                raise AviatrixException(
                    message=failure_reason,
                )
            # END
    return response

# End def send_aviatrix_api()

def verify_aviatrix_api_run_initial_setup(response=None):
    if not response:
        return
    py_dict = response.json()
    if 'CID' in py_dict:
        py_dict["CID"] = "*********"
    logger_ha.info(f"Aviatrix API response is: {str(py_dict)}")

    response_code = response.status_code
    if response_code != 200:
        err_msg = (
            f"Fail to run initial setup for the Aviatrix Controller. "
            f"The actual response code is "
            f"{str(response_code)}, which is not 200"
        )
        raise AviatrixException(message=err_msg)

    api_return_boolean = py_dict["return"]
    if api_return_boolean is not True:
        err_msg = (
            f"Fail to run initial setup for the Aviatrix Controller. "
            f"The actual api response is "
            f"{str(py_dict)}"
        )
        raise AviatrixException(message=err_msg)
    pass

# End def verify_aviatrix_api_run_initial_setup()

def has_controller_initialized(
    api_endpoint_url="<IP_ADDRESS>/v1/api",
    CID="ABCD1234",
):
    request_method = "GET"
    data = {"action": "initial_setup", "subaction": "check", "CID": CID}
    payload_with_hidden_password = dict(data)
    payload_with_hidden_password["CID"] = "************"
    logger_ha.info(f"API endpoint url: {str(api_endpoint_url)}")
    logger_ha.info(f"Request method is: {str(request_method)}")
    logger_ha.info(
        f"Request payload is : "
        f"{str(json.dumps(obj=payload_with_hidden_password, indent=4))}")
    response = send_aviatrix_api(
        api_endpoint_url=api_endpoint_url,
        request_method=request_method,
        payload=data,
    )

    py_dict = response.json()
    if 'CID' in py_dict:
        py_dict["CID"] = "*********"
    logger_ha.info(f"Aviatrix API response is: {str(py_dict)}")

    if py_dict["return"] is False and "not run" in py_dict["reason"]:
        return False
    else:
        return True

# End def has_controller_initialized()

# End def send_aviatrix_api()
class VmScaleSet():
    def __init__(self, vm_ss_client, resource_group, scaleSetName):
        self.vm_ss_client = vm_ss_client
        self.resource_group = resource_group
        self.scaleSetName = scaleSetName
        self.vmScaleSet = vm_ss_client.get(resource_group, scaleSetName)
        self.sku = self.vmScaleSet.sku

    def getSku(self):
        return self.sku

    def updateSku(self):
        try:
            self.vmScaleSet.sku.capacity = 1
            response = self.vm_ss_client.begin_create_or_update(
                self.resource_group, self.scaleSetName, self.vmScaleSet)
            response.wait()
            if response.status() == 'Succeeded':
                logger_ha.info(f"Updated sku capacity: "
                             f"{str(self.vmScaleSet.sku.capacity)}\n")
                # returns {'additional_properties': {},
                # 'name': 'Standard_A4_v2',
                # 'tier': 'Standard',
                # 'capacity': 1}
                return self.sku
        except Exception as err:
            logger_ha.warning(str(err))

# As a prevalidation :
# 1. Make sure eip is asscosiated with controller
# 2. Make sure instance exists if N?A start from updating capacity
# 3. Make sure of using this class only if unhealthy instance exists
class VmNetInt():
    def __init__(self, resource_group, network_client, vm_intf_name):
        self.resource_group = resource_group
        self.network_client = network_client
        self.vm_intf_name = vm_intf_name
        self.Pri_intf_conf = self.network_client.network_interfaces.get(
            resource_group, vm_intf_name)
        self.sg_name = self.Pri_intf_conf.network_security_group.id.split(
            '/')[-1]
        self.ipConfName = self.Pri_intf_conf.name
        self.subnetID = self.Pri_intf_conf.ip_configurations[0].subnet.id
        self.location = self.Pri_intf_conf.location
        self.AvxPrivIntIP = (
            self.Pri_intf_conf.ip_configurations[0].private_ip_address)
        self.AvxPrivIntID = self.Pri_intf_conf.id
        self.AvxPubIntID = (
            self.Pri_intf_conf.ip_configurations[0].public_ip_address.id)
        self.AvxPubIntName = (
            self.Pri_intf_conf.ip_configurations[0].public_ip_address.id.split(
                '/')[-1])
        self.Pub_intf_conf = self.network_client.public_ip_addresses.get(
            self.resource_group, self.AvxPubIntName)
        self.AvxPubIntIP = self.Pub_intf_conf.ip_address

    def rmPubIntIPAssoc(self):
        """ Removes public IP association before vm termination """
        inf_conf_model = self.Pri_intf_conf
        inf_conf_model.ip_configurations[0].public_ip_address = None
        try:
            logger_ha.info(
                f"START: Dissociating {self.AvxPubIntName} : "
                f"{self.AvxPubIntIP} from {self.AvxPrivIntIP}")
            response = (
                self.network_client.network_interfaces.begin_create_or_update(
                    self.resource_group, self.vm_intf_name, inf_conf_model))
            response.wait()
            if response.status() == 'Succeeded':
                logger_ha.info("End: Dissociating completed successfully\n")
        except Exception as err:
            logger_ha.warning(str(err))

    def addPubIntIPAssoc(self, old_public_ip_name):
        """ Associates old public IP to the new vm """
        params = {'id': old_public_ip_name}
        inf_conf_model = self.Pri_intf_conf
        inf_conf_model.ip_configurations[0].public_ip_address = params
        try:
            logger_ha.info(f"START: Associating "
                         f"{old_public_ip_name.split('/')[-1]} "
                         f" with {self.AvxPrivIntIP}")
            response = (
                self.network_client.network_interfaces.begin_create_or_update(
                    self.resource_group, self.vm_intf_name, inf_conf_model))
            response.wait()
            if response.status() == 'Succeeded':
                logger_ha.info("End: Associating completed successfully\n")
        except Exception as err:
            logger_ha.warning(str(err))

    def deletePubIntIP(self):
        """ Deletes the public IP """
        try:
            logger_ha.info(
                f"START: Deleting newly created {self.AvxPubIntName} : "
                f"{self.AvxPubIntIP} from {self.resource_group}")
            response = self.network_client.public_ip_addresses.begin_delete(
                self.resource_group, self.AvxPubIntName)
            response.wait()
            if response.status() == 'Succeeded':
                logger_ha.info("End: Deleting public ip successfully\n")
        except Exception as err:
            logger_ha.warning(str(err))

class LbConf():
    def __init__(self, lb_client, resource_group, network_client, lb_name):
        self.resource_group = resource_group
        self.lb_name = lb_name
        self.network_client = network_client
        self.lb_client_get = lb_client.get(self.resource_group, self.lb_name)
        self.location = self.lb_client_get.location
        self.lb_fe_name = self.lb_client_get.frontend_ip_configurations[0].name
        self.lb_be_name = self.lb_client_get.backend_address_pools[0].name
        self.lb_be_id = self.lb_client_get.backend_address_pools[0].id
        self.lb_be_rules = (
            self.lb_client_get.backend_address_pools[0].load_balancing_rules)
        self.lb_be_type = self.lb_client_get.backend_address_pools[0].type
        self.lb_frontend_ip_config = (
            self.lb_client_get.frontend_ip_configurations[0])
        self.lb_public_ip_name = (
            self.lb_frontend_ip_config.public_ip_address.id.split(
                '/')[-1])
        self.lb_public_ip = self.network_client.public_ip_addresses.get(
            self.resource_group, self.lb_public_ip_name)
        self.lb_public_ip_prefix = self.lb_public_ip.ip_address
        self.lb_be_conf = (
            self.network_client.load_balancer_backend_address_pools.get(
                self.resource_group, self.lb_name, self.lb_be_name))

def terminate_vm(vm_client, resource_group, vm_name):
    """ Terminates a vm in the specified resource group """
    try:
        logger_ha.info(f"START: Terminating instance {vm_name} "
                     f"from resource group {resource_group}")
        response = vm_client.begin_delete(resource_group, vm_name)
        response.wait()
        if response.status() == 'Succeeded':
            logger_ha.info("End: Terminated instance successfully\n")
    except Exception as err:
        logger_ha.warning(str(err))

def vm_scale_set_vm_info(vm_client, resource_group, scaleSetName):
    vm_name = ''
    vm_nic_name = ''
    vmScaleSetVmsLst = vm_client.list(resource_group)
    for vmScaleSetVms in vmScaleSetVmsLst:
        # Searching the VM name by appending scaleset name + _
        if scaleSetName + '_' in vmScaleSetVms.name:
            vm_name = vmScaleSetVms.name
            vm_nic = vmScaleSetVms.network_profile.network_interfaces[0]
            vm_nic_name = vm_nic.id.split('/')[-1]
    return vm_name, vm_nic_name

def run_initial_setup(api_endpoint_url="<IP_ADDRESS>/v1/api",
                      CID="ABCD1234", target_version="latest"):

    # Step1 : Check if the controller has been already initialized
    #       --> yes
    #       --> no --> run init setup (upgrading to latest controller version)
    request_method = "POST"
    data = {"action": "initial_setup", "CID": CID, "subaction": "check"}
    logger_ha.info("Check if the initial setup has been already done or not")
    response = send_aviatrix_api(
        api_endpoint_url=api_endpoint_url,
        request_method=request_method,
        payload=data,
    )
    py_dict = response.json()
    if 'CID' in py_dict:
        py_dict["CID"] = "*********"
    # The initial setup has been done
    if py_dict["return"] is True:
        logger_ha.info(
            "Initial setup for Aviatrix Controller has been already done")
        return response

    # The initial setup has not been done yet
    data = {
        "action": "initial_setup",
        "CID": CID,
        "target_version": target_version,
        "subaction": "run",
    }
    payload_with_hidden_password = dict(data)
    payload_with_hidden_password["CID"] = "********"
    logger_ha.info(f"API endpoint url: {str(api_endpoint_url)}")
    logger_ha.info(f"Request method is: {str(request_method)}")
    logger_ha.info(
        f"Request payload is : "
        f"{str(json.dumps(obj=payload_with_hidden_password, indent=4))}")
    try:
        response = send_aviatrix_api(
            api_endpoint_url=api_endpoint_url,
            request_method=request_method,
            payload=data,
            retry_count=1,
            timeout=360,
        )
    except AviatrixException as ae:
        # Ignore timeout exception since it is expected
        if "Read timed out" in str(ae):
            return None
    except Exception as err:
        logger_ha.info(f"Error occurred during initial setup: {str(err)}")
        raise
    return response

# End def run_initial_setup()

def retrieve_controller_version(version_file, container_client):
    """ Get the controller version from backup file"""
    logger_ha.info(f"Retrieving version from file {str(version_file)}")
    s3c = container_client.get_blob_client(version_file)
    try:
        with open('/tmp/version_ctrlha.txt', 'wb') as data:
            s3c.download_blob().readinto(data)

    except Exception as err:
        logger_ha.warning(str(err))
        logger_ha.info("The object does not exist.")
        raise

    if not os.path.exists('/tmp/version_ctrlha.txt'):
        raise AviatrixException("Unable to open version file")

    with open("/tmp/version_ctrlha.txt") as fileh:
        buf = fileh.read()
    logger_ha.info(f"Retrieved version {str(buf)}")

    if not buf:
        raise AviatrixException("  Version file is empty")
    logger_ha.info("Parsing version")

    try:
        ctrl_version = ".".join((buf[12:]).split("."))
    except (KeyboardInterrupt, IndexError, ValueError) as err:
        raise AviatrixException("Could not decode version") from err
    else:
        logger_ha.info(f"Parsed version sucessfully {str(ctrl_version)}")
        logger_ha.warning("")
        return ctrl_version

def is_backup_file_is_recent(backup_file, container_client):
    """ Check if backup file is not older than MAXIMUM_BACKUP_AGE """
    try:
        s3c = container_client.get_blob_client(backup_file)
        try:
            file_obj = s3c.get_blob_properties()
        except Exception as err:
            logger_ha.warning(str(err))
            return False

        age = time.time() - file_obj.last_modified.timestamp()
        if age < MAXIMUM_BACKUP_AGE:
            logger_ha.info("Succesfully validated Backup file age\n")
            return True
        logger_ha.warning(
            f"File age {age} is older than the maximum allowed value of "
            f"{MAXIMUM_BACKUP_AGE}")
        return False
    except Exception as err:
        logger_ha.warning(f"  Checking backup file age failed due to {str(err)}")
        return False

def restore_ctrl_backup(creds, controller_ip, cid, storage, container, blob):
    base_url = f"https://{controller_ip}/v1/api"
    post_data = {"action": "restore_cloudx_config",
                 "cloud_type": "2048",
                 "storage_name": storage,
                 "container_name": container,
                 "file_name": blob,
                 "CID": cid,
                 "arm_application_client_secret": creds['client_secret'],
                 "arm_subscription_id": creds['subscription_id'],
                 "arm_application_endpoint": creds['tenant_id'],
                 "arm_application_client_id": creds['client_id']
                 }
    payload_with_hidden_password = dict(post_data)
    payload_with_hidden_password["CID"] = "********"
    payload_with_hidden_password["arm_application_client_secret"] = "********"
    logger_ha.info(
        f"Trying to restore backup account with data "
        f"{str(json.dumps(obj=payload_with_hidden_password, indent=4))}\n")

    try:
        response = requests.post(
            base_url, data=post_data, timeout=120, verify=False)
    except requests.Timeout:
        logger_ha.info("Restoring backup timed out. "
                     "Please check the controller for updated config.")
        pass
    except requests.exceptions.ConnectionError as err:
        if "Remote end closed connection without response" in str(err):
            logger_ha.info("Server closed the connection while executing "
                         "create account API. Ignoring response")
            output = {"return": True,
                      'reason': 'Warning!! Server closed the connection'}
            time.sleep(INITIAL_SETUP_DELAY)
        else:
            output = {"return": False, "reason": str(err)}
    except Exception as err:
        logger_ha.info(f"An Error has occurred: {str(err)}")
        raise
    else:
        output = response.json()
        logger_ha.info(output)
        return output

def main(req: func.HttpRequest, context: func.Context) -> func.HttpResponse:
    logging.basicConfig(
        format="%(asctime)s aviatrix-azure-function--- %(message)s",
        level=logging.INFO
    )
    logger_ha.info(
        f"Version : {version.VERSION} invocation_id : {context.invocation_id}")
    req_body = req.get_json()
    headers = {"invocation_id": context.invocation_id,
               "alert_status": req_body['data']['status']}
    if not req_body['data']['status'] == 'Activated':
        logger_ha.warning(f"Alert status type: {req_body['data']['status']}")
        return func.HttpResponse(
            "HA failover event is not triggered",
            headers=headers, status_code=501)

    event = {
        "aviatrix_api_version": "v1",
        "aviatrix_api_route": "api",
        "tenant_id": os.environ["avx_tenant_id"],
        "client_id": os.environ["avx_client_id"],
        "vault_uri": os.environ["keyvault_uri"],
        "vault_secret": os.environ["keyvault_secret"],
        "func_client_id": os.environ["func_client_id"],
        "storage_name": os.environ["storage_name"],
        "container_name": os.environ["container_name"],
        "lb_name": os.environ["lb_name"],
        "rg": os.environ["resource_group_name"]
    }

    try:
        function_handler(event)
    except Exception as err:
        logger_ha.exception(f"Error has occurred: {str(err)}")
    else:
        logger_ha.info("Aviatrix Controller has been initialized successfully")
        logger_ha.info("Loading function completed !!")
        return func.HttpResponse(
            "Failover event completed successfully",
            headers=headers, status_code=200)

azure-functions
azure-common==1.1.23
azure-identity==1.7.1
azure-mgmt-compute==23.1.0
azure-mgmt-network==19.3.0
azure-mgmt-resource==20.0.0
azure-storage-blob==12.9.0
azure-keyvault-secrets==4.3.0
msrestazure==0.6.4
requests==2.26.0
retry==0.9.2
urllib3==1.26.7
opencensus-ext-azure

-->

Thanks for informing will check and update you.

which doc you referring pls share the link

@bhagyshricompany I am referring to the Azure China Developer Guide - https://learn.microsoft.com/en-us/azure/china/resources-developer-guide#application-insights

Codeless agent/extension based monitoring for Azure App Services is currently not supported. Snapshot Debugger is also not currently available.

@bhagyshricompany @jeremydvoss, wanted to follow up on this and see if you've had a chance to test this in China.

@jeremydvoss  pls comment

"Running pip install -r requirements.txt followed by phyton3.9 func.py directly from shell within the function worker works perfectly fine, the issue only seems to be when deploying using Azure Core tools with func azure functionapp publish avx-controller-functionapp --build remote --python"
Given that our code is not being run and can also be installed successful, it seems that this is an issue on the function's side. Is functions doing something different than "pip install -r requirements.txt"?

I am having the same problem in West US.  I'm deploying the Azure function from Azure DevOps using this inline script: func azure functionapp publish chuckazfuncpocfaD01.  This is the deployment log when I included opencensus-ext-azure:
2023-07-12T08:38:16.7341246Z ##[section]Starting: Deploy Azure Function
2023-07-12T08:38:16.7346236Z ==============================================================================
2023-07-12T08:38:16.7346370Z Task         : Azure CLI
2023-07-12T08:38:16.7346438Z Description  : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell Core/Batch script when running on Windows agent.
2023-07-12T08:38:16.7346650Z Version      : 2.223.0
2023-07-12T08:38:16.7346712Z Author       : Microsoft Corporation
2023-07-12T08:38:16.7346785Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli
2023-07-12T08:38:16.7346892Z ==============================================================================
2023-07-12T08:38:17.1238913Z [command]/usr/bin/az --version
2023-07-12T08:38:18.7321003Z WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
2023-07-12T08:38:18.7321731Z azure-cli                         2.49.0 *
2023-07-12T08:38:18.7323282Z
2023-07-12T08:38:18.7323635Z core                              2.49.0 *
2023-07-12T08:38:18.7323924Z telemetry                          1.0.8
2023-07-12T08:38:18.7324155Z
2023-07-12T08:38:18.7372776Z Extensions:
2023-07-12T08:38:18.7373154Z azure-devops                      0.26.0
2023-07-12T08:38:18.7373224Z
2023-07-12T08:38:18.7373356Z Dependencies:
2023-07-12T08:38:18.7373488Z msal                              1.20.0
2023-07-12T08:38:18.7373701Z azure-mgmt-resource               22.0.0
2023-07-12T08:38:18.7373772Z
2023-07-12T08:38:18.7373972Z Python location '/opt/az/bin/python3'
2023-07-12T08:38:18.7374203Z Extensions directory '/opt/az/azcliextensions'
2023-07-12T08:38:18.7374301Z
2023-07-12T08:38:18.7374504Z Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0]
2023-07-12T08:38:18.7374626Z
2023-07-12T08:38:18.7374772Z Legal docs and information: aka.ms/AzureCliLegal
2023-07-12T08:38:18.7374890Z
2023-07-12T08:38:18.7374934Z
2023-07-12T08:38:18.7375983Z Setting AZURE_CONFIG_DIR env variable to: /home/vsts/work/_temp/.azclitask
2023-07-12T08:38:18.7376608Z Setting active cloud to: AzureCloud
2023-07-12T08:38:18.7380101Z [command]/usr/bin/az cloud set -n AzureCloud
2023-07-12T08:38:24.4512119Z [command]/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command . '/home/vsts/work/_temp/azureclitaskscript1689151097108.ps1'
2023-07-12T08:38:28.0422070Z Getting site publishing info...
2023-07-12T08:38:28.0453009Z Creating archive for current directory...
2023-07-12T08:38:28.0484022Z Performing remote build for functions project.
2023-07-12T08:38:29.6488156Z Uploading 7.15 KB []Remote build in progress, please wait...
2023-07-12T08:38:43.3239103Z Updating submodules.
2023-07-12T08:38:43.3239989Z Preparing deployment for commit id '3277beef-3'.
2023-07-12T08:38:43.3240332Z PreDeployment: context.CleanOutputPath False
2023-07-12T08:38:43.3241041Z PreDeployment: context.OutputPath /home/site/wwwroot
2023-07-12T08:38:43.3241378Z Repository path is /tmp/zipdeploy/extracted
2023-07-12T08:38:43.3241664Z Running oryx build...
2023-07-12T08:38:43.3242293Z Command: oryx build /tmp/zipdeploy/extracted -o /tmp/build/expressbuild --platform python --platform-version 3.10.4 -i /tmp/8db82b361ed0273 -p packagedir=.python_packages/lib/site-packages
2023-07-12T08:38:43.3242758Z Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
2023-07-12T08:38:43.3243110Z You can report issues at https://github.com/Microsoft/Oryx/issues
2023-07-12T08:38:43.3243307Z
2023-07-12T08:38:43.3243639Z Oryx Version: 0.2.20230508.1, Commit: 7fe2bf39b357dd68572b438a85ca50b5ecfb4592, ReleaseTagName: 20230508.1
2023-07-12T08:38:43.3243878Z
2023-07-12T08:38:43.3244136Z Build Operation ID: dc9a5bd25a4b913e
2023-07-12T08:38:43.3244548Z Repository Commit : 3277beef-3c5a-4fe4-a3cb-cd9349d1b3ce
2023-07-12T08:38:43.3244855Z OS Type           : bullseye
2023-07-12T08:38:43.3245128Z Image Type        : githubactions
2023-07-12T08:38:43.3245298Z
2023-07-12T08:38:43.3245539Z Detecting platforms...
2023-07-12T08:38:43.3245937Z Platform 'hugo' has been disabled, so skipping detection for it.
2023-07-12T08:38:43.3246250Z Detected following platforms:
2023-07-12T08:38:43.3246503Z   python: 3.10.4
2023-07-12T08:38:43.3246673Z
2023-07-12T08:38:43.3247012Z Using intermediate directory '/tmp/8db82b361ed0273'.
2023-07-12T08:38:43.3247217Z
2023-07-12T08:38:43.3247469Z Copying files to the intermediate directory...
2023-07-12T08:38:43.3247749Z Done in 0 sec(s).
2023-07-12T08:38:43.3247903Z
2023-07-12T08:38:43.3248168Z Source directory     : /tmp/8db82b361ed0273
2023-07-12T08:38:43.3248471Z Destination directory: /tmp/build/expressbuild
2023-07-12T08:38:43.3248652Z
2023-07-12T08:38:43.3248932Z Python Version: /tmp/oryx/platforms/python/3.10.4/bin/python3.10
2023-07-12T08:38:43.3249261Z Creating directory for command manifest file if it does not exist
2023-07-12T08:38:43.3249573Z Removing existing manifest file
2023-07-12T08:38:43.3249761Z
2023-07-12T08:38:43.3249989Z Running pip install...
2023-07-12T08:39:16.6856650Z Done in 32 sec(s).
2023-07-12T08:39:16.6857214Z [08:38:44+0000] Collecting azure-functions
2023-07-12T08:39:16.6857593Z [08:38:44+0000]   Using cached azure_functions-1.15.0-py3-none-any.whl (165 kB)
2023-07-12T08:39:16.6857929Z [08:38:44+0000] Collecting opencensus-ext-azure
2023-07-12T08:39:16.6858296Z [08:38:44+0000]   Using cached opencensus_ext_azure-1.1.9-py2.py3-none-any.whl (43 kB)
2023-07-12T08:39:16.6858654Z [08:38:44+0000] Collecting azure-identity<2.0.0,>=1.5.0
2023-07-12T08:39:16.6859026Z [08:38:44+0000]   Using cached azure_identity-1.13.0-py3-none-any.whl (151 kB)
2023-07-12T08:39:16.6859266Z [08:38:45+0000] Collecting requests>=2.19.0
2023-07-12T08:39:16.6859612Z [08:38:45+0000]   Using cached requests-2.31.0-py3-none-any.whl (62 kB)
2023-07-12T08:39:16.6859868Z [08:38:45+0000] Collecting opencensus<1.0.0,>=0.11.2
2023-07-12T08:39:16.6860251Z [08:38:45+0000]   Using cached opencensus-0.11.2-py2.py3-none-any.whl (128 kB)
2023-07-12T08:39:16.6860846Z [08:38:46+0000] Collecting psutil>=5.6.3
2023-07-12T08:39:16.6861369Z [08:38:46+0000]   Using cached psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
2023-07-12T08:39:16.6861782Z [08:38:46+0000] Collecting azure-core<2.0.0,>=1.12.0
2023-07-12T08:39:16.6862131Z [08:38:46+0000]   Using cached azure_core-1.28.0-py3-none-any.whl (185 kB)
2023-07-12T08:39:16.6862463Z [08:38:47+0000] Collecting typing-extensions>=4.3.0
2023-07-12T08:39:16.6862833Z [08:38:47+0000]   Using cached typing_extensions-4.7.1-py3-none-any.whl (33 kB)
2023-07-12T08:39:16.6863063Z [08:38:47+0000] Collecting six>=1.11.0
2023-07-12T08:39:16.6863401Z [08:38:47+0000]   Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
2023-07-12T08:39:16.6863648Z [08:38:47+0000] Collecting msal<2.0.0,>=1.20.0
2023-07-12T08:39:16.6863984Z [08:38:47+0000]   Using cached msal-1.22.0-py2.py3-none-any.whl (90 kB)
2023-07-12T08:39:16.6864452Z [08:38:47+0000] Collecting msal-extensions<2.0.0,>=0.3.0
2023-07-12T08:39:16.6864830Z [08:38:47+0000]   Using cached msal_extensions-1.0.0-py2.py3-none-any.whl (19 kB)
2023-07-12T08:39:16.6865075Z [08:38:50+0000] Collecting cryptography>=2.5
2023-07-12T08:39:16.6865474Z [08:38:50+0000]   Using cached cryptography-41.0.2-cp37-abi3-manylinux_2_28_x86_64.whl (4.3 MB)
2023-07-12T08:39:16.6865734Z [08:38:52+0000] Collecting cffi>=1.12
2023-07-12T08:39:16.6866154Z [08:38:52+0000]   Using cached cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
2023-07-12T08:39:16.6866433Z [08:38:52+0000] Collecting pycparser
2023-07-12T08:39:16.6866781Z [08:38:52+0000]   Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
2023-07-12T08:39:16.6867025Z [08:38:53+0000] Collecting PyJWT[crypto]<3,>=1.0.0
2023-07-12T08:39:16.6867371Z [08:38:53+0000]   Using cached PyJWT-2.7.0-py3-none-any.whl (22 kB)
2023-07-12T08:39:16.6867624Z [08:38:53+0000] Collecting portalocker<3,>=1.0
2023-07-12T08:39:16.6867985Z [08:38:53+0000]   Using cached portalocker-2.7.0-py2.py3-none-any.whl (15 kB)
2023-07-12T08:39:16.6868312Z [08:38:53+0000] Collecting opencensus-context>=0.1.3
2023-07-12T08:39:16.6868693Z [08:38:53+0000]   Using cached opencensus_context-0.1.3-py2.py3-none-any.whl (5.1 kB)
2023-07-12T08:39:16.6869052Z [08:38:54+0000] Collecting google-api-core<3.0.0,>=1.0.0
2023-07-12T08:39:16.6869410Z [08:38:54+0000]   Using cached google_api_core-2.11.1-py3-none-any.whl (120 kB)
2023-07-12T08:39:16.6869751Z [08:38:57+0000] Collecting protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0.dev0,>=3.19.5
2023-07-12T08:39:16.6870217Z [08:38:57+0000]   Using cached protobuf-4.23.4-cp37-abi3-manylinux2014_x86_64.whl (304 kB)
2023-07-12T08:39:16.6870588Z [08:38:57+0000] Collecting googleapis-common-protos<2.0.dev0,>=1.56.2
2023-07-12T08:39:16.6870998Z [08:38:57+0000]   Using cached googleapis_common_protos-1.59.1-py2.py3-none-any.whl (224 kB)
2023-07-12T08:39:16.6871442Z [08:38:58+0000] Collecting google-auth<3.0.dev0,>=2.14.1
2023-07-12T08:39:16.6871808Z [08:38:58+0000]   Using cached google_auth-2.22.0-py2.py3-none-any.whl (181 kB)
2023-07-12T08:39:16.6872106Z [08:38:58+0000] Collecting rsa<5,>=3.1.4
2023-07-12T08:39:16.6872507Z [08:38:58+0000]   Using cached rsa-4.9-py3-none-any.whl (34 kB)
2023-07-12T08:39:16.6872725Z [08:38:59+0000] Collecting urllib3<2.0
2023-07-12T08:39:16.6873129Z [08:38:59+0000]   Using cached urllib3-1.26.16-py2.py3-none-any.whl (143 kB)
2023-07-12T08:39:16.6873437Z [08:38:59+0000] Collecting cachetools<6.0,>=2.0.0
2023-07-12T08:39:16.6873777Z [08:38:59+0000]   Using cached cachetools-5.3.1-py3-none-any.whl (9.3 kB)
2023-07-12T08:39:16.6874153Z [08:38:59+0000] Collecting pyasn1-modules>=0.2.1
2023-07-12T08:39:16.6874574Z [08:38:59+0000]   Using cached pyasn1_modules-0.3.0-py2.py3-none-any.whl (181 kB)
2023-07-12T08:39:16.6874937Z [08:39:00+0000] Collecting pyasn1<0.6.0,>=0.4.6
2023-07-12T08:39:16.6875406Z [08:39:00+0000]   Using cached pyasn1-0.5.0-py2.py3-none-any.whl (83 kB)
2023-07-12T08:39:16.6875733Z [08:39:00+0000] Collecting certifi>=2017.4.17
2023-07-12T08:39:16.6876032Z [08:39:00+0000]   Using cached certifi-2023.5.7-py3-none-any.whl (156 kB)
2023-07-12T08:39:16.6876373Z [08:39:01+0000] Collecting charset-normalizer<4,>=2
2023-07-12T08:39:16.6876818Z [08:39:01+0000]   Using cached charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201 kB)
2023-07-12T08:39:16.6877063Z [08:39:01+0000] Collecting idna<4,>=2.5
2023-07-12T08:39:16.6877622Z [08:39:01+0000]   Using cached idna-3.4-py3-none-any.whl (61 kB)
2023-07-12T08:39:16.6878528Z [08:39:03+0000] Installing collected packages: pycparser, cffi, urllib3, PyJWT, pyasn1, idna, cryptography, charset-normalizer, certifi, six, rsa, requests, pyasn1-modules, protobuf, cachetools, typing-extensions, portalocker, msal, googleapis-common-protos, google-auth, opencensus-context, msal-extensions, google-api-core, azure-core, psutil, opencensus, azure-identity, opencensus-ext-azure, azure-functions
2023-07-12T08:39:20.9948748Z [08:39:13+0000] Successfully installed PyJWT-2.7.0 azure-core-1.28.0 azure-functions-1.15.0 azure-identity-1.13.0 cachetools-5.3.1 certifi-2023.5.7 cffi-1.15.1 charset-normalizer-3.2.0 cryptography-41.0.2 google-api-core-2.11.1 google-auth-2.22.0 googleapis-common-protos-1.59.1 idna-3.4 msal-1.22.0 msal-extensions-1.0.0 opencensus-0.11.2 opencensus-context-0.1.3 opencensus-ext-azure-1.1.9 portalocker-2.7.0 protobuf-4.23.4 psutil-5.9.5 pyasn1-0.5.0 pyasn1-modules-0.3.0 pycparser-2.21 requests-2.31.0 rsa-4.9 six-1.16.0 typing-extensions-4.7.1 urllib3-1.26.16
2023-07-12T08:39:20.9950074Z WARNING: You are using pip version 21.2.4; however, version 23.1.2 is available.
2023-07-12T08:39:20.9950795Z You should consider upgrading via the '/tmp/oryx/platforms/python/3.10.4/bin/python3.10 -m pip install --upgrade pip' command.
2023-07-12T08:39:20.9998647Z Not a vso image, so not writing build commands
2023-07-12T08:39:20.9999565Z Preparing output...
2023-07-12T08:39:20.9999717Z
2023-07-12T08:39:21.0000263Z Copying files to destination directory '/tmp/build/expressbuild'...
2023-07-12T08:39:21.0000587Z Done in 3 sec(s).
2023-07-12T08:39:21.0000660Z
2023-07-12T08:39:21.0000891Z Removing existing manifest file
2023-07-12T08:39:21.0001073Z Creating a manifest file...
2023-07-12T08:39:21.0001302Z Manifest file created.
2023-07-12T08:39:21.0001543Z Copying .ostype to manifest output directory.
2023-07-12T08:39:21.0001641Z
2023-07-12T08:39:21.0001776Z Done in 36 sec(s).
2023-07-12T08:39:21.0002003Z Writing the artifacts to a Zip file
2023-07-12T08:39:24.3539530Z Running post deployment command(s)...
2023-07-12T08:39:24.3539695Z
2023-07-12T08:39:24.3539858Z Generating summary of Oryx build
2023-07-12T08:39:24.3540537Z Deployment Log file does not exist in /tmp/oryx-build.log
2023-07-12T08:39:24.3540947Z The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
2023-07-12T08:39:24.3541211Z Triggering recycle (preview mode disabled).
2023-07-12T08:39:24.3541685Z Deployment successful. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
2023-07-12T08:39:27.3552458Z Remote build succeeded!
2023-07-12T08:39:28.4167140Z [command]/usr/bin/az account clear
2023-07-12T08:39:28.9696123Z ##[section]Finishing: Deploy Azure Function

This is from the default docker log:
2023-07-12T09:57:00.484247363Z Starting OpenBSD Secure Shell server: sshd.
2023-07-12T09:59:18.251969897Z Hosting environment: Production
2023-07-12T09:59:18.268409880Z Content root path: /azure-functions-host
2023-07-12T09:59:18.268892912Z Now listening on: http://[::]:80
2023-07-12T09:59:18.268907313Z Application started. Press Ctrl+C to shut down.

Here is the docker log:
2023-07-12T09:57:02.718Z INFO  - Initiating warmup request to container chuckazfuncpocfad01_1_451959e8 for site chuckazfuncpocfad01
2023-07-12T09:57:34.405Z INFO  - Waiting for response to warmup request for container chuckazfuncpocfad01_1_451959e8. Elapsed time = 31.6870666 sec
2023-07-12T09:57:51.337Z INFO  - Waiting for response to warmup request for container chuckazfuncpocfad01_1_451959e8. Elapsed time = 48.6194851 sec
2023-07-12T09:58:14.319Z INFO  - Waiting for response to warmup request for container chuckazfuncpocfad01_1_451959e8. Elapsed time = 71.6007311 sec
2023-07-12T09:58:31.684Z INFO  - Waiting for response to warmup request for container chuckazfuncpocfad01_1_451959e8. Elapsed time = 88.9662995 sec
2023-07-12T09:58:48.246Z INFO  - Waiting for response to warmup request for container chuckazfuncpocfad01_1_451959e8. Elapsed time =<PHONE_NUMBER> sec
2023-07-12T09:59:05.691Z INFO  - Waiting for response to warmup request for container chuckazfuncpocfad01_1_451959e8. Elapsed time =<PHONE_NUMBER> sec
2023-07-12T09:59:19.051Z ERROR - Container chuckazfuncpocfad01_1_451959e8 for site chuckazfuncpocfad01 has exited, failing site start
2023-07-12T09:59:19.070Z ERROR - Container chuckazfuncpocfad01_1_451959e8 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
2023-07-12T09:59:19.073Z INFO  - Stopping site chuckazfuncpocfad01 because it failed during startup.

I wasn't able to retrieve any container logs.

please create Support request on azure portal for this.

When I started to create a support request, I was directed to an error message: TypeError: Descriptors cannot not be created directly that was being generated somewhere in the function app.  This led me to the following stackoverflow article: https://stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directly. I added the configuration setting PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python, redeployed the function, and now I can trigger the function, even when opencensus-ext-azure is installed.  So my issue is fixed.


Update All Communication Links to Reference A Bitly Link

Overview
We'll want to use a TA controlled account to create the bit.ly link so that we can modify the link in the future. Currently, the bit.ly link will point at the current Slack channel sign-up link, but we'll have the flexibility to easily change this to a different Slack channel or even a Discord channel in the future.
Going forward, only this link should be published as the source for joining any communication channel.
Link Sources
This will require searching for old links in all of the following places:

Canvas Course
Canvas Blueprint course pages
Instruction Pages
Email Templates

Other Shortcut Links
We should consider creating shortcut links for other related documents at the same time as this issue. Candidates include:

TA Schedule
Help Queue

Perhaps we could solve this a different way. This came up because we keep creating a new slack server very semester. As an alternative, how about we just keep the same server. We should also create a single location where the link is found so that it is trivial to update.
I couldn't find anything in GitHub that pointed to the the TA schedule doc and so there is nothing to update there.
The TA schedule doc doesn't have a reference. So we don't need to worry about that.
Canvas has the following links for getting help:
Main bar

Help Central

So I changed the "Get Help from Others" Canvas info. It was already outdated with a reference to "discussions" that are available in the videos. The access your textbooks link was broken and so I removed that.
Main bar

Getting help

I then removed the main bar links. This only leaves a single place that needs to be updated each semester. If we decide to stop creating a new server every semester that will remove the need for an update entirely.


Get row count

Hello!
First, I would like to thank you for creating this library, it's great to have finally a library that works with XLSX files :)
I am only missing one keyword - get row count that would enable me to loop through the rows in an excel sheet. Would it be possible to implement it?
Thank you :)

@aleskarovadi , I think that _get_sheet should not be private.
Like this:
Open Excel Document    filename=file.xlsx    doc_id=docid
${sheet1}=   Get sheet    Sheet1
Comment    Print first row
Log    ${sheet1.rows}[1]

@lucietriskova, hello!
Method get_sheet is public now, so you can loop through the rows:
Open Excel Document    filename=file.xlsx    doc_id=docid
${sheet1}=    Get sheet    Sheet1
:FOR     ${row}    IN    @{sheet1.values}
\    Log     ${row}

See more information in openpyxl.worksheet documentation.
These changes are now availble on PyPi (version 1.1.0 of robotframework-excellib)


🐛 [firebase_database] No implementation found for method cancel

Firebase Crashlytics shows non-fatal issue
Non-fatal Exception: FlutterError
MissingPluginException(No implementation found for method cancel on channel clients/123456/-MSgn_H8m8_-IV05zNnC-[DEFAULT]-null-DatabaseEventType.value-[]#1). Error thrown Instance of 'faa'.

Non-fatal Exception: FlutterError
0  ???                            0x0 (null).    #00 abs 0 _kDartIsolateSnapshotInstructions+0x670cb
1  ???                            0x0 (null).    #01 abs 0 _kDartIsolateSnapshotInstructions+0x1f933b

Non-fatal Exception: FlutterError
MissingPluginException(No implementation found for method cancel on channel appointments/123456-[DEFAULT]-null-DatabaseEventType.value-[{type: orderBy, name: orderByChild, path: type_date}, {type: cursor, name: startAt, value: 0_}, {type: cursor, name: endAt, value: 0_202201042359}, {type: limit, name: limitToLast, limit: 1}]#1). Error thrown while de-activating platform stream on channel appointments/123456-[DEFAULT]-null-DatabaseEventType.value-[{type: orderBy, name: orderByChild, path: type_date}, {type: cursor, name: startAt, value: 0_}, {type: cursor, name: endAt, value: 0_202201042359}, {type: limit, name: limitToLast, limit: 1}]#1.

Non-fatal Exception: FlutterError
0  ???                            0x0 MethodChannel._invokeMethod + 165 (platform_channel.dart:165)
1  ???                            0x0 EventChannel.receiveBroadcastStream.<fn> + 518 (platform_channel.dart:518)

I don't know the steps to reproduce this issue.

I think this issue is similar to https://github.com/FirebaseExtended/flutterfire/issues/7618

@deepak786
Can you provide the entire crash log ?
Also is there a way for you to symbolicate the log that'll be helpful to debug further, otherwise it would be a bit tough to verify the issue.

@darshankawar Crashlytics shows only the above crash logs. There are no other logs.

Labeling it for further input from the team.

@deepak786 just to be clear, is this happening on all platforms?

@russellwheatley yes, it's happening on both android and ios. I haven't tested it on the web.

There is also another exception:
======== Exception caught by services library ======================================================
The following PlatformException was thrown while de-activating platform stream on channel clients/123456/-Mtbh5BnpmZzAmSr-EgZ-[DEFAULT]-null-DatabaseEventType.value-[]#3:
PlatformException(error, No active stream to cancel, null, null)
When the exception was thrown, this was the stack:
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
<asynchronous suspension>
#2      EventChannel.receiveBroadcastStream.<anonymous closure> (package:flutter/src/services/platform_channel.dart:518:9)
<asynchronous suspension>
====================================================================================================

With PR #7859, the above exception is also resolved.

Getting the same with firebase_performance:
No implementation found for method Trace#stop on channel plugins.flutter.io/firebase_performance
Any idea on when the fix will be pushed or which version it was introduced in?

I am having the same issue, apparently it is not yet fixed, I am using the latest firebase plugins, but still having random crashes. there is no reliable way to reproduce the issue.
sdk: '>=2.12.0 <3.0.0'
firebase_core: ^1.12.0
firebase_auth: ^3.3.6
firebase_database: ^9.0.6
firebase_storage: ^10.2.6
firebase_remote_config: ^2.0.0
firebase_analytics: ^9.1.0
firebase_crashlytics: ^2.5.0
firebase_app_check: ^0.0.6+5
======== Exception caught by services library ======================================================
The following MissingPluginException was thrown while de-activating platform stream on channel elements/German/tables/-MV_kxHs0GdvgoEWXK1--[DEFAULT]-null-DatabaseEventType.value-[]#35:
MissingPluginException(No implementation found for method cancel on channel elements/German/tables/-MV_kxHs0GdvgoEWXK1--[DEFAULT]-null-DatabaseEventType.value-[]#35)
When the exception was thrown, this was the stack:
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)

#1      EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:528:9)

Getting the same with firebase_performance:
No implementation found for method Trace#stop on channel plugins.flutter.io/firebase_performance
MissingPluginException (MissingPluginException(No implementation found for method Trace#stop on channel plugins.flutter.io/firebase_performance))

Any idea on when the fix will be pushed or which version it was introduced in?

@russellwheatley Still has the same issue. The Crashlytics shows the exception with firebase_database: 9.0.6
Non-fatal Exception: FlutterError
MissingPluginException(No implementation found for method cancel on channel jobs/123456/-MurQCirGd7FZcXCLvSL-[DEFAULT]-null-DatabaseEventType.value-[]#8). Error thrown Instance of 'Waa'.

Hey @deepak786, thanks for the report. Out of curiosity, does your app use firebase_database in any further isolates (i.e. other than the main isolate)?

@russellwheatley no

@deepak786  Is the previous reproducible sample still able to reliably produce this bug?

@russellwheatley no. I don't have the reproducible steps now.
This issue just appeared in Crashlytics again.

@deepak786 Ok, if you are able to provide a reproducible sample, please post here and I'll be happy to look into it.

sure

@russellwheatley please check the similar issue https://github.com/FirebaseExtended/flutterfire/issues/8015

Facing the same issue.
MissingPluginException(No implementation found for method cancel on channel state-[DEFAULT]-null-DatabaseEventType.childChanged-[]#4)

The issue is not fixed yet.

@deepak786 - if you have a repro, that would be great! Thanks.

Also still facing the issue. I have around 5% of users facing this issue.

is this issue fixed yet ?

I ran into this issue today on firebase_database: 9.0.18

also on 9.0.19

@deepak786 did you revert to a version to resolve this? If so, which one?

@robindijkhof no. I still have this random issue.

@darshankawar though not reproducible, I think I got a clue. I updated firebase_auth and got this issue as a result https://github.com/firebase/flutterfire/issues/9210. TLDR; fatal crash on app close.
Now, somehow the issue in this OP barely occurs now.  So I think the issue is related to closing the app.

This issue is still present and happening to a small yet significant amount of our users.

I am facing the same issue.
sdk: ">=2.15.1 <3.0.0"
firebase_core: ^2.1.0
firebase_database: ^10.0.2

Faced same issue

firebase_auth: ^4.5.0

We have seen this issue raised in Firestore when using some special unicode characters, would it happen to be the case for you (see https://github.com/flutter/flutter/issues/116652)


allow user to use custom view for Info section of the documentation

This will allow user to use custom view for Info section of the documentation.
It will be useful in case the documentation needs to explain various aspects of API, and not just the route definitions.
Also it would be nice to add some styling to visually distinguish the Info section and the Route Definition section, but AFAIK this has to be applied to documentarian library.

Nice work and thanks for contributing! However, I do not believe this is a scalable way to achieve this. Laravel provides a better alternative, which this package supports (publishing vendor assets), so I believe this is unneeded. Was going to share a link to the docs, but couldn't find a good one beyond this: https://laravel-apidoc-generator.readthedocs.io/en/latest/generating-documentation.html#specifying-language-for-examples. Seems we somehow removed that part. Could you instead send in a PR that adds a section on that to the "Generating Documentation" page?


[varLib] FeatureTableSubstitution.Version can be 0x00010001

I ran into this assert while running fontTools.varLib.mutator on the font posted in #1371.
Is this fix correct, @behdad?

Wait, I think this is surely not correct, looking at featureVars.py now.

Fixed by #1375.


Fixed the example wrong comment

Just fixed the wrong comment

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Anastasia Satonina seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


404 errors in MDN in-links

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details

We have a list of 20k in-links on MDN that lead to a 404, of those about 400 are on English pages that are not archived or under the /mozilla sub-tree. They still need filtering for relevancy, but using the number of in-links as a proxy, here's the prioritized list: https://docs.google.com/spreadsheets/d/13O8RGwk4gJVXruk3MChPhWHXiQfUWjoof9tldcGyMPw/edit#gid=1293202527

Thanks for your issue @atopal. I clicked on a few links in the sheet but I can't find the 404 links.
Can you explain how this spreadsheet works and what exactly is the task to be done? We can maybe ask the community to help here, please try to explain it for a contributor that has no context.

Sure thing, I removed irrelevant columns from the linked spreadsheet. There are two that are immediately relevant: "First found at" lists the pages that have links on them that are broken (404). "URL" has the broken URLs. So, what you have to do is look at the source of the "First found at" page for the URL in "URL".
So, for example, line 4 has the "First found at" page https://developer.mozilla.org/en-US/docs/Games/Anatomy. Looking at the source I search for "en-US/docs/Web/Apps/Fundamentals/User_notifications/Full_screen_api" (careful to leave out the https://developer.mozilla.org/ part, because the links on the page are relative). Now I can see that the broken link is in the sidebar under "APIs for game development". The next step would be to check out the macro and find out why it produces a broken link and ideally to fix it.


gtags hold 100% CPU forever

vim or neovim?

[ ] vim
[x] neovim

Output of vim --version or nvim --version:
0.5
Output of :echo has("python"):
Output of :echo has("python3"):
1
Output of :echo &pythondll(only vim, not neovim):
Output of :echo &pythonthreedll(only vim, not neovim):
Output of :py print(sys.version):
Output of :py3 print(sys.version):
Output of :echo g:Lf_Debug_Cmd:
Output of :echo g:Lf_FilesFromCache:
Operating system:

[x] Linux
[ ] Mac OS X
[ ] Windows
[ ] Etc.

Configurations related to LeaderF in vimrc:

let g:Lf_Gtagslabel = "native"

Describe your question, feature request, or bug.
Sometimes Leaderf gtags holds 100% CPU forever updating a single file. Sometimes It even hold all 48 cores of CPU on server using many thread.

gtags files may have some error, global -u will crash.
Does Leaderf gtags need some timeout mechanism to handler this error case?
Does Leaderf gtags use multi-threads to update tag files?
I don't know how to locate gtags issues, any suggestion?
what is the better parser front end for C project? gtags native or pygments?

Steps to reproduce
I don't know how to reproduce it.
Actual behaviour
Expected behaviour

I think it's better if you can provide more details about how it is reproduced.

what is the better parser front end for C project? gtags native or pygments?

gtags native

Does Leaderf gtags use multi-threads to update tag files?

Yes, I guess the root cause may be it. Perhaps gtags can not update the database in parallel.

I can keep watch this issue to find more details.
May be a option should be added for parallel behave. On the one hand, job number should be controlled to avoid hold all resources on shared server. On the other hand, It helps to locate if parallel way cause some error.

Hope the commit can fix the issue.


sfdx force:source:push pushes all files if source dir is symlink (ubuntu 22.04)

Summary
sfdx force:source:push pushes all files if source dir is symlink .
OS: ubuntu 22.04
Steps To Reproduce:

Make force-app to be a relative symlink to an another dir
sfdx force:source:push
Modify 1 file
sfdx force:source:push`

Expected result
First push pushes 2542 files.
Second push pushes 1 file.
Actual result
First push pushes 2542 files.
Second push pushes 2542 files.
System Information
OS: ubuntu 22.04
bash
$ sfdx -v
sfdx-cli/7.181.1 linux-x64 node-v18.12.1

I also have the same problem.
OS: Windows 10
SFDX version: sfdx-cli/7.178.0 win32-x64 node-v17.8.0

tldr; don't use symlinks

I've been tinkering with this.  Here's what I've found:
git treats a symlink like a file.  For example, git status won't show all the files in the symlinked directory.
the CLI uses git to manage tracking of local changes
there's a bug in the git implementation we're using that makes it follow symlinks when it shouldn't...for example, when running, git status to ask what to push
So the net result is that that push should have never deployed anything at all.  force:source:status shouldn't show files inside a symlinked directory.  When the bug is fixed, it won't.
I'd encourage you not to rely on symlink working in sfdx projects if you're using source tracking.

@mshanemc Symlinks are essential part on complicated projects, which uses multiple git repositories to construct a system.

Sysmlinks are way to include  3rd party code into the project without making mess in git.

@mshanemc Should I register feature request to be able to use symlinks with push/pull commands?
Use cases:

Company have project, which uses 42 external git repositories, like  amoss, fflib, Sobjectfabricator and etc. Some of external libraries contains  functiopnality or files we do not want to deploy to prod org, like examples of usage, not deployable files, bash scripts, documentation end etc.  So symlinks are used to refer directories Company want to have in prod org.

There's lots of people using multiple git repositories (and multiple sfdx-projects) to manage different "areas" of an org.  With symlinks, you're putting them all into 1 sfdx-project and 1 repository.
There's not an easy way to make this work the way you want it to because of how git works.
Can you elaborate on why symlinks are used instead of git submodules?

Can you elaborate on why symlinks are used instead of git submodules?

Purposes of submodules and symlinks are different.
Example of folder structure:
Libraries
-–> Git_repository1
---> scratch specific metadata 1
--> Prod specific metadata 1
---> Git repository 2
---> Feature 21
---> Feature 22
SandboxOrg1
---> symlink to  Prod specific metadata 1
----> symlink to  Feature 22
----> org specific metadata for Feature 22
Scratch org1
--->  symlink to scratch specific metadata 1
-->  symlink to Prod specific metadata 1
--->  symlink to Feature 21
--->  symlink to Feature 22
----> scratchorg specific metadata for Feature 22
So, when i  do  sfdx push in SandboxOrg1 dir, i do not want to push Feature 21 , when i do sfdx pull i expect thet ofg specific metadata will remain in SandboxOrg1 dir, but changes in Feature 22 will go to lib an will be shared with Scratch org1.


Compute shader example

Initial work on further implementing WebGPU Compute shaders and adding an example for it. This slightly changes the API to allow for more work to submitted in a simple pass and to allow for reading the storage texture for the result.
@mvaligursky could you have a look and let me know what you think?
Building on the work of https://github.com/playcanvas/engine/pull/5760
Kinda implements https://github.com/playcanvas/engine/issues/2974 for WebGPU.
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

I have rewritten the example to show how it can do some actual work with in and output. I have also added support for buffers as in and output, instead of just textures, as buffers allow for more useful work to be done using atomics.

And another update / building block: https://github.com/playcanvas/engine/pull/6186

Another related change: #6187

One more change, with different API to what you proposed here, but I believe it's simpler and more obvious. I'd appreciate your feedback @erikdubbelboer https://github.com/playcanvas/engine/pull/6201
I'll leave this PR opened as it still supports few additional buts I have not integrated yet. Your effort here is much appreciated.

@mvaligursky great that you have been working on this. All your changes look good and are in line with what I wrote as well.
One thing I'm wondering is, if compute shaders should be submitted with the normal render pass or if we should submit them right away. Like this: https://github.com/erikdubbelboer/engine/commit/19963f1f2643578bd9906fc5d21eadff6ddba531
I feel like this shouldn't work with the texture-gen example as that uses uniform buffers, which uses dynamic buffers, which are only submitted on WebgpuGraphicsDevice.submit(). Which then doesn't happen before we submit the compute shader. But I tested it and it does work, even when I only submit compute work before any call to WebgpuGraphicsDevice.submit(). Do you understand what is happening here?

UniformBuffers support both using dynamic buffers, but also it's own persistent buffer. I opted to use persistent buffers in this case, and so it works.
I thought about not submitting computes at the same time, but the most common use case we'd probably need is to integrate compute with render passes. For example the scene renders using render passes, then compute uses those textures to generates some buffers for postprocessing, and then render pass consumes it. In those cases it'd need to be submitted in order. So that's what I focused for now. Same for indirect drawing.
At some point we can relax this if there's no render pass dependency, but I have not solve this yet - what the simple API would be here.
At least that's my thinking currently, with not a large level of experience with all this.

But if you submit them right away they also get executed before the render commands are submitted. I tried various variations of calling computeDispatch in the texture-gen example and it all works. It will just finish earlier and make the render pass wait less.
The only way it doesn't work is if you call computeDispatch after the render pass, but that's always going to go wrong.

closing as all is now in the engine, thanks again @erikdubbelboer
Final PR: https://github.com/playcanvas/engine/pull/6233


Cannot change preset_mode

Checklist

[X] I have verified that the account and device works in the Comfort Cloud App.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..

What version of Home Assistant Core?
core-2024.11.1
Describe the issue
When I try to change the preset mode from +8/15 to none or anything else in the preset mode I get this message and nothing happens:
Failed to perform the action climate/set_preset_mode. 'int' object has no attribute 'value'
Error/Debug Logs
home-assistant_panasonic_cc_2024-11-17T07-43-33.155Z.log

This also applies to when the unit has been powered off from +8/15 preset, it cannot be turned back on. Only seems to happen when in +8/15 mode.

I'm going to take a look at the issue... the 8/15 mode is a bit buggy... I would have been better if Panasonic would have let us just go lower than 16C by default, instead of limit it to 8,10,15C on some devices

Hi, I ran into this same issue. Anything I can contribute with, such as logs. Applies both to automations as well as manual operations.

Any news regarding this topic? The integration is useless for me as it is now, since I need to swap between 8/15 and 20 degrees.I'm forced to use the app

I'm also facing this issue.
I had a look at the code and tried a simple fix for my local installation
I hard coded the stored values in
climate.py
async def _async_exit_summer_house_mode
    builder.set_hvac_mode(constants.OperationMode.Heat)
    builder.set_eco_mode(constants.EcoMode.Auto)
    builder.set_target_temperature(16)
    builder.set_fan_speed(constants.FanSpeed.Auto)

This way at least the issue is partially solved. The values get sent to the device correctly. However, in the ui the preset mode doesn't seem to get updated, until new data is fetched from the device.

Thanks, this works for me
_async_exit_summer_house_mode

    builder.set_hvac_mode(constants.OperationMode.Heat)
    builder.set_eco_mode(constants.EcoMode.Auto)
    builder.set_target_temperature(16)
    builder.set_fan_speed(constants.FanSpeed.Auto)


add example for Configured Bundles docs

I'd like to add an example to the docs to show the structure of a simple configured bundle. I recently did some work creating a configured bundle and I think this would have helped.

LGTM. Thanks for the your docs contribution!


question about the 'batch_mask'

Hi, your code has a nice abstraction, thanks for your share. But I have a question about the 'attentionLSTM', it seems that you didn' t use any 'ctx_mask' or 'trg_mask' in your code related to attention part, won't this cause error using for attention ? I'm new to pytorch, hope for your reply!

I have the same(similar) question. The mask computed by the get_minibatch() function in data_utils.py is never used at all. Doesn't this hamper training/testing?

You are absolutely right this means the decoder does indeed attend to the pad tokens in the input however the decoder should be able to learn to put no attention weight on the pad tokens. You can solve this by using using masked_fill with -float('inf') in this line - https://github.com/MaximumEntropy/Seq2Seq-PyTorch/blob/master/model.py#L327.


Make sure the mobile app supports new notification sounds

In https://github.com/zulip/zulip/pull/17120, we're adding a bunch of new audio files for the webapp; we should make sure the mobile app supports those.  (I'm sorta assuming the mobile app has a copy of the supported audio files, rather than downloading them from static/ on the server, and thus will need an update of that data structure).
It could make sense to do a preparatory refactor to move those sound files into the shared/ component?

Hey @timabbott 😄
I am new to Zulip and I'm willing to contribute! Can you assign this to me?

There's a ticket regarding iOS notification sounds where blocking issues are also mentioned:
https://github.com/zulip/zulip-mobile/issues/3101#issuecomment-724393052


NPM returned non-zero exit status 1

Hi, I have seen this question before but the solutions did not work. Here is my log, and also, I got something saying I should update something so I wouldn't be vulnerable to ReDoS, can anyone tell me what and how if needed?
\[INFO] Generating Closure dependencies...
/home/cyberia/shaka-player/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/home/cyberia/shaka-player/node_modules/wd/build'
    at Object.mkdirSync (fs.js:731:3)
    at sync (/home/cyberia/shaka-player/node_modules/mkdirp/index.js:71:13)
    at Object.<anonymous> (/home/cyberia/shaka-player/node_modules/wd/scripts/build-browser-scripts.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:279:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>install: `node scripts/build-browser-scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
cyberia@MainServer:~/shaka-player$ sudo python build/all.py
[INFO] Generating Closure dependencies...
/home/cyberia/shaka-player/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/home/cyberia/shaka-player/node_modules/wd/build'
    at Object.mkdirSync (fs.js:731:3)
    at sync (/home/cyberia/shaka-player/node_modules/mkdirp/index.js:71:13)
    at Object.<anonymous> (/home/cyberia/shaka-player/node_modules/wd/scripts/build-browser-scripts.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:279:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>install: `node scripts/build-browser-scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/cyberia/.npm/_logs/2018-09-11T02_56_07_199Z-debug.log
Traceback (most recent call last):
  File "build/all.py", line 98, in <module>
    shakaBuildHelpers.run_main(main)
  File "/home/cyberia/shaka-player/build/shakaBuildHelpers.py", line 301, in run_main
    sys.exit(main(sys.argv[1:]))
  File "build/all.py", line 62, in main
    code = check.main(check_args)
  File "/home/cyberia/shaka-player/build/check.py", line 198, in main
    if not shakaBuildHelpers.update_node_modules():
  File "/home/cyberia/shaka-player/build/shakaBuildHelpers.py", line 279, in update_node_modules
    execute_get_output([cmd, 'install'])
  File "/home/cyberia/shaka-player/build/shakaBuildHelpers.py", line 147, in execute_get_output
    raise subprocess.CalledProcessError(obj.returncode, args[0], stdout)
subprocess.CalledProcessError: Command 'npm' returned non-zero exit status 1```

What platform are you running on?  Did you try deleting everything and doing a clean git clone?  What is the output of ls -ld /home/cyberia/shaka-player/node_modules/wd/build?  What is the output of npm -v?

I got something saying I should update something so I wouldn't be vulnerable to ReDoS, can anyone tell me what and how if needed?

We don't use the NPM modules for anything except testing, so the versions of the packages we use are probably out of date, and we know that some packages have some really outdated dependencies.  So I don't think there is anything you can do to fix that.

Clean git clone does not work. No folder named wd/build apparently. NPM version is 6.4.1

Maybe caused by https://github.com/admc/wd/issues/483?  Try npm install --unsafe-perm.

You definitely shouldn't be using "sudo" for any of this.  Shaka Player doesn't require root, and it doesn't require global installation of any dependencies.  Try starting over without sudo.

Okay, didn't use sudo, and it started giving me a error about something "illegal" (cant remember the exact error message) haven't checked if it compiled yet though.

Knowing the exact error message would be helpful.

Here is the output:
``cyberia@MainServer:~/shaka-player/build$ python all.py
[INFO] Generating Closure dependencies...
[INFO] Running eslint...
[INFO] Running htmlhint...
Config loaded: /home/cyberia/shaka-player/.htmlhintrc
Config loaded: /home/cyberia/shaka-player/.htmlhintrc
Config loaded: /home/cyberia/shaka-player/.htmlhintrc
Scanned 3 files, no errors found (36 ms).
[INFO] Checking that the build files are complete...
[INFO] Checking the tests for type errors...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/cyberia/shaka-player/third_party/closure/compiler.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Checking the usability of generated externs...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/cyberia/shaka-player/third_party/closure/compiler.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Building the docs...
fs.js:115
throw err;
^
Error: EACCES: permission denied, open 'docs/api/fonts/OpenSans-Bold-webfont.eot'
at Object.openSync (fs.js:436:3)
at Object.exports.copyFileSync (/home/cyberia/shaka-player/node_modules/jsdoc/lib/jsdoc/fs.js:110:16)
at /home/cyberia/shaka-player/docs/jsdoc-template/publish.js:611:12
at Array.forEach ()
at Object.exports.publish (/home/cyberia/shaka-player/docs/jsdoc-template/publish.js:607:17)
at Object.module.exports.cli.generateDocs (/home/cyberia/shaka-player/node_modules/jsdoc/cli.js:446:35)
at Object.module.exports.cli.processParseResults (/home/cyberia/shaka-player/node_modules/jsdoc/cli.js:397:20)
at module.exports.cli.main (/home/cyberia/shaka-player/node_modules/jsdoc/cli.js:240:14)
at Object.module.exports.cli.runCommand (/home/cyberia/shaka-player/node_modules/jsdoc/cli.js:189:5)
at /home/cyberia/shaka-player/node_modules/jsdoc/jsdoc.js:105:9
at Object. (/home/cyberia/shaka-player/node_modules/jsdoc/jsdoc.js:106:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

WARNING: An illegal reflective access operation has occurred and related messages seem to be ignorable.  I suspect it has something to do with the version of Java you're running, which may dislike something the compiler (which is written in Java) is doing.
The only error here is in building the docs.  Jsdoc can't open a file in your sources.
I suspect you ran something with sudo before this point.  You should definitely not be using sudo at all in Shaka Player development.  It is unnecessary, and you may wind up with certain files only readable by root.
I can reproduce this by taking away my own access to docs/api:
$ sudo chown root docs/api
$ sudo chmod 700 docs/api
$ ./build/docs.py
[INFO] Building the docs...
/path/to/shaka/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/path/to/shaka/docs/api/fonts'

You must not have wiped everything out since you used sudo, or you may have used sudo in your working directory again since you re-cloned everything.  Please run the following commands to wipe out your broken Shaka Player folder and get a clean copy that is owned by you, the user, instead of root:
# go to your home directory:
cd

# use sudo to wipe out what you have,
# since some of your files are clearly owned by root already
sudo rm -rf shaka-player

# get a fresh copy, NOT with sudo
git clone https://github.com/google/shaka-player

# build NOT with sudo
cd shaka-player
./build/all.py

Does this help?

Okay, thanks so much, yea I think I did it with sudo or as root in the beginning.

I'm glad we were able to help.  Enjoy Shaka Player!


Japanese translation of restore dialog is incorrect.

Type: Bug

Azure Data Studio Version: 1.48
OS Version: Win10 Pro 22H2

Steps to Reproduce:

Install the Japanese Language Package for Azure Data Studio v1.48.0 extension in Azure Data Studio.
Display Database Restore Dialog.

'Options' translates as 'files'
Extension version: 1.48.0
Azure Data Studio version: azuredatastudio 1.48.0<PHONE_NUMBER>ef8254b7c22a5dc55af7f8a1dea93f, 2024-02-27T00:05:08.293Z)
OS version: Windows_NT x64 10.0.19045
Restricted Mode: No
Preview Features: Enabled
Modes:

Issue has been fixed in the latest language resource update on the internal side. The fix will be included on the next langpack release once it is created.

Was fixed here: https://github.com/microsoft/azuredatastudio/pull/25475/files Id for "Files" was shared with "Options"


Web Map Client Pro

Your system is very cool.
I would be very happy if you include Web Map Client Pro in docker.
It would be amazing.
Please.

Hey there,
thx, that's good to hear. The Pro version is not OpenSource and will therefore not be available as Docker image.
However, @Son-HNguyen is currently working on an full redesign of the Webclient and as far as I know, this new version will include features you may know from the pro Version, like queries on attribute values.
@Son-HNguyen is that correct?
The new version will be released as Docker when as soon as it is released.

Hi, thank you. The Webmap Client Pro is currently
non-functional, because Google has deactivated the older
versions of their GoogleDocs API.
We are currently planning a major rewrite of the
3DCityDB Webmap Client using the Angular framework
and will make that Open Source again. However, it may
take until next year before we can show something...
Best regards
Thomas Kolbe

Thank you very much for your work.
It's incredibly cool.
I will be very happy.