If the user uses a self-signed certificate, the alert-manager will be fail.

Organization Name:

Short summary about the issue/question:
If the user uses a self-signed certificate, the alert-manager will be fail.
Brief what process you are following:

config file:
pylon:
    port: 80
    uri: "http://<IP_ADDRESS>:80"
    ssl:
      port: 8443
      crt_name: <IP_ADDRESS>.crt
      crt_path: /cluster-configuration/ssl/<IP_ADDRESS>.crt
      key_name: <IP_ADDRESS>.key
      key_path: /cluster-configuration/ssl/<IP_ADDRESS>.key

alert-manager:
#   port: 9093 # optional, do not modify this if you do not want to change the port alert-manager is listening on
  pai-bearer-token: '*********************'
  alert-handler: # alert-handler will only be enabled when this field is not empty
#     port: 9095 # optional, do not modify this if you do not want to change the port alert-handler is listening on
#     log-level: "info" # optional
    email-configs: # email-notification will only be enabled when this field is not empty
      admin-receiver<EMAIL_ADDRESS>      smtp-host: smtp.163.com
      smtp-port: 465
      smtp-from<EMAIL_ADDRESS>      smtp-auth-username: *************
      smtp-auth-password: *****************
  cluster-utilization: # cluster-utilization is a k8s CronJob which reports the GPU utilization of the cluster
    # for schedule syntax, refer to https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax
    schedule: "* * * * *" # daily report at UTC 00:00

logs:
user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1636635840-s4lxj_default_559d12d2-a499-4327-9427-efadb0447901_3
2021-11-11 13:05:22,502 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-11 13:05:22,507 - DEBUG - connectionpool.py:943 - Starting new HTTPS connection (1): <IP_ADDRESS>:8443
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 371, in connect
    ssl_context=context,
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 399, in ssl_wrap_socket
    return context.wrap_socket(sock)
  File "/usr/local/lib/python3.7/ssl.py", line 423, in wrap_socket
    session=session
  File "/usr/local/lib/python3.7/ssl.py", line 870, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1076)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 446, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='<IP_ADDRESS>', port=8443): Max retries exceeded with url: /prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1076)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "send_alert.py", line 269, in <module>
    main()
  File "send_alert.py", line 258, in main
    cluster_usage, job_usage, user_usage = collect_metrics(PAI_URI)
  File "send_alert.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "send_alert.py", line 168, in collect_metrics
    resp = requests.get(query_url, params={"query": CLUSTER_QUERY_STRING})
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='<IP_ADDRESS>', port=8443): Max retries exceeded with url: /prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1076)')))

How to reproduce it:

OpenPAI Environment:

OpenPAI version: v1.8.0
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release): ubuntu 18.04 LTS
Kernel (e.g. uname -a):
Hardware (e.g. core number, memory size, storage size, GPU type etc.):
Others:

Anything else we need to know:
The error occurred in this line:
https://github.com/microsoft/pai/blob/48394053996bd042a8398fa5d4cfa1f85822a564/src/alert-manager/src/cluster-utilization/send_alert.py#L168
Maybe we should mount the public key to the cluster-utilization container, and then modify this line and other places with similar processes as follows:
    resp = requests.get(query_url, params={"query": CLUSTER_QUERY_STRING}, verify='/path/to/public_key.pem')

Solved by modifying PAI_URI to the DMZ host address and restarting the service.
https://github.com/microsoft/pai/blob/ea19af183e1a5e26ccd9fc2a410ffefd6ada9d52/src/alert-manager/deploy/alert-manager-cronjob.yaml.template#L35-39

Bug report: If there is no GPU in the cluster, the alert-manager will crash.
https://github.com/microsoft/pai/blob/48394053996bd042a8398fa5d4cfa1f85822a564/src/alert-manager/src/cluster-utilization/send_alert.py#L171
user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1636687020-bs2ml_default_3c1afdee-59b8-4c0d-b071-1f7c4131d9e3_5
2021-11-12 03:20:44,928 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-12 03:20:44,931 - DEBUG - connectionpool.py:943 - Starting new HTTPS connection (1): csip.fzu.edu.cn:443
2021-11-12 03:20:44,958 - DEBUG - connectionpool.py:442 - https://dmz.domain:443 "GET /openpaitestbed/prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 HTTP/1.1" 200 None
Traceback (most recent call last):
  File "send_alert.py", line 269, in <module>
    main()
  File "send_alert.py", line 258, in main
    cluster_usage, job_usage, user_usage = collect_metrics(PAI_URI)
  File "send_alert.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "send_alert.py", line 171, in collect_metrics
    cluster_usage = result["data"]["result"][0]["value"][1][:6] + "%"
IndexError: list index out of range

I used the following statement to replace the result with a legal one on the DMZ host, and the system turned into an unrecoverable unstable state.
sub_filter '{"status":"success","data":{"resultType":"vector","result":[]}}' '{"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[0,"00.000000000"]}]}}';

After this warning appeared, I tried to restore the alert-manager to its original state or even restart the entire system, but it couldn't be eliminated.

@Binyang2014 Any insights on this issue? thanks.

I used the following statement to replace the result with a legal one on the DMZ host, and the system turned into an unrecoverable unstable state.
sub_filter '{"status":"success","data":{"resultType":"vector","result":[]}}' '{"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[0,"00.000000000"]}]}}';

After this warning appeared, I tried to restore the alert-manager to its original state or even restart the entire system, but it couldn't be eliminated.

Removing sub_filter will solve this issue, I need to find another way to make alert-manager work for me.

Only removing the SSL configuration can solve this problem.

Bug report: If there is no GPU in the cluster, the alert-manager will crash.
https://github.com/microsoft/pai/blob/48394053996bd042a8398fa5d4cfa1f85822a564/src/alert-manager/src/cluster-utilization/send_alert.py#L171
user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1636687020-bs2ml_default_3c1afdee-59b8-4c0d-b071-1f7c4131d9e3_5
2021-11-12 03:20:44,928 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-12 03:20:44,931 - DEBUG - connectionpool.py:943 - Starting new HTTPS connection (1): csip.fzu.edu.cn:443
2021-11-12 03:20:44,958 - DEBUG - connectionpool.py:442 - https://dmz.domain:443 "GET /openpaitestbed/prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 HTTP/1.1" 200 None
Traceback (most recent call last):
  File "send_alert.py", line 269, in <module>
    main()
  File "send_alert.py", line 258, in main
    cluster_usage, job_usage, user_usage = collect_metrics(PAI_URI)
  File "send_alert.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "send_alert.py", line 171, in collect_metrics
    cluster_usage = result["data"]["result"][0]["value"][1][:6] + "%"
IndexError: list index out of range

Solved this problem by adding a legacy GPU to my test bed.

After solving the above problem, I thought it could work, but: 1. The mailbox did not receive the mail; 2. As shown in the figure, the alert pane cannot be opened.

user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1637236500-fxv2n_default_c0cd8a86-3648-4716-bad3-4954b5f307eb_0
2021-11-18 11:55:16,596 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-18 11:55:16,601 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,604 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 HTTP/1.1" 200 121
2021-11-18 11:55:16,605 - INFO - send_alert.py:174 - Collecting user usage info...
2021-11-18 11:55:16,607 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,610 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=%28sum+by+%28username%29+%28sum_over_time%28task_gpu_percent%5B7d%5D%29%29%29+%2F+%28sum+by+%28username%29+%28count_over_time%28task_gpu_percent%5B7d%5D%29%2A100%29%29+%2A+100 HTTP/1.1" 200 87
2021-11-18 11:55:16,611 - INFO - send_alert.py:180 - Collecting job usage info...
2021-11-18 11:55:16,613 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,616 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=avg+by+%28job_name%29+%28avg_over_time%28task_gpu_percent%5B7d%5D%29%29 HTTP/1.1" 200 87
2021-11-18 11:55:16,619 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,622 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=sum+by+%28job_name%29+%28count_over_time%28task_gpu_percent%5B7d%5D%29%29 HTTP/1.1" 200 87
2021-11-18 11:55:16,625 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,696 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /rest-server/api/v2/jobs?order=completionTime,DESClimit=5000&offset=0 HTTP/1.1" 200 30989
2021-11-18 11:55:16,698 - INFO - send_alert.py:249 - Sending alerts to alert-manager...
2021-11-18 11:55:16,701 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,704 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "POST /alert-manager/api/v1/alerts HTTP/1.1" 200 20
2021-11-18 11:55:16,705 - INFO - send_alert.py:252 - Alerts sent to alert-manager.

Bug report: If there is no GPU in the cluster, the alert-manager will crash.
https://github.com/microsoft/pai/blob/48394053996bd042a8398fa5d4cfa1f85822a564/src/alert-manager/src/cluster-utilization/send_alert.py#L171
user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1636687020-bs2ml_default_3c1afdee-59b8-4c0d-b071-1f7c4131d9e3_5
2021-11-12 03:20:44,928 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-12 03:20:44,931 - DEBUG - connectionpool.py:943 - Starting new HTTPS connection (1): <IP_ADDRESS>:80
2021-11-12 03:20:44,958 - DEBUG - connectionpool.py:442 - https://<IP_ADDRESS>:80 "GET /openpaitestbed/prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 HTTP/1.1" 200 None
Traceback (most recent call last):
  File "send_alert.py", line 269, in <module>
    main()
  File "send_alert.py", line 258, in main
    cluster_usage, job_usage, user_usage = collect_metrics(PAI_URI)
  File "send_alert.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "send_alert.py", line 171, in collect_metrics
    cluster_usage = result["data"]["result"][0]["value"][1][:6] + "%"
IndexError: list index out of range

Bug report: If there is no GPU in the cluster, the alert-manager will crash.
https://github.com/microsoft/pai/blob/48394053996bd042a8398fa5d4cfa1f85822a564/src/alert-manager/src/cluster-utilization/send_alert.py#L171
user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1636687020-bs2ml_default_3c1afdee-59b8-4c0d-b071-1f7c4131d9e3_5
2021-11-12 03:20:44,928 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-12 03:20:44,931 - DEBUG - connectionpool.py:943 - Starting new HTTPS connection (1): <IP_ADDRESS>:80
2021-11-12 03:20:44,958 - DEBUG - connectionpool.py:442 - https://<IP_ADDRESS>:80 "GET /openpaitestbed/prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 HTTP/1.1" 200 None
Traceback (most recent call last):
  File "send_alert.py", line 269, in <module>
    main()
  File "send_alert.py", line 258, in main
    cluster_usage, job_usage, user_usage = collect_metrics(PAI_URI)
  File "send_alert.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "send_alert.py", line 171, in collect_metrics
    cluster_usage = result["data"]["result"][0]["value"][1][:6] + "%"
IndexError: list index out of range

Solved this problem by adding a legacy GPU to my testbed.

After solving the above problem, I thought it could work, but: 1. The mailbox did not receive the mail; 2. As shown in the figure, the alert pane cannot be opened.

user@hostname:~$ sudo docker logs k8s_cluster-utilization_cluster-utilization-1637236500-fxv2n_default_c0cd8a86-3648-4716-bad3-4954b5f307eb_0
2021-11-18 11:55:16,596 - INFO - send_alert.py:167 - Collecting cluster usage info...
2021-11-18 11:55:16,601 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,604 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=avg%28avg_over_time%28nvidiasmi_utilization_gpu%5B7d%5D%29%29 HTTP/1.1" 200 121
2021-11-18 11:55:16,605 - INFO - send_alert.py:174 - Collecting user usage info...
2021-11-18 11:55:16,607 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,610 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=%28sum+by+%28username%29+%28sum_over_time%28task_gpu_percent%5B7d%5D%29%29%29+%2F+%28sum+by+%28username%29+%28count_over_time%28task_gpu_percent%5B7d%5D%29%2A100%29%29+%2A+100 HTTP/1.1" 200 87
2021-11-18 11:55:16,611 - INFO - send_alert.py:180 - Collecting job usage info...
2021-11-18 11:55:16,613 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,616 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=avg+by+%28job_name%29+%28avg_over_time%28task_gpu_percent%5B7d%5D%29%29 HTTP/1.1" 200 87
2021-11-18 11:55:16,619 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,622 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /prometheus/api/v1/query?query=sum+by+%28job_name%29+%28count_over_time%28task_gpu_percent%5B7d%5D%29%29 HTTP/1.1" 200 87
2021-11-18 11:55:16,625 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,696 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "GET /rest-server/api/v2/jobs?order=completionTime,DESClimit=5000&offset=0 HTTP/1.1" 200 30989
2021-11-18 11:55:16,698 - INFO - send_alert.py:249 - Sending alerts to alert-manager...
2021-11-18 11:55:16,701 - DEBUG - connectionpool.py:230 - Starting new HTTP connection (1): <IP_ADDRESS>:80
2021-11-18 11:55:16,704 - DEBUG - connectionpool.py:442 - http://<IP_ADDRESS>:80 "POST /alert-manager/api/v1/alerts HTTP/1.1" 200 20
2021-11-18 11:55:16,705 - INFO - send_alert.py:252 - Alerts sent to alert-manager.

@Binyang2014 @hzy46 Any experience on this issue? thank you.

user@hostname:~$ sudo docker logs k8s_alerthandler_alertmanager-584c4fcb59-7qft6_default_d47c392f-5a65-4905-b4b7-b0edf08ebb35_0

><EMAIL_ADDRESS>start /usr/src/app
> node index.js

2021-11-18T13:33:50.864Z [INFO] alert-handler listening at http://localhost:9095
2021-11-18T13:35:54.208Z [INFO] alert-handler received `send-email-to-admin` post request from alert-manager.
2021-11-18T13:36:15.388Z [ERROR] alert-handler failed to send email to admin
meta = {
  "message": "Unexpected socket close",
  "stack": "Error: Unexpected socket close\n    at Timeout.setTimeout (/usr/src/app/node_modules/nodemailer/lib/smtp-transport/index.js:189:31)\n    at ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n    at unrefdHandle (timers.js:520:7)\n    at Timer.processTimers (timers.js:222:12)"
}
2021-11-18T13:36:15.421Z [INFO] alert-handler received `send-email-to-admin` post request from alert-manager.
2021-11-18T13:36:36.544Z [ERROR] alert-handler failed to send email to admin
meta = {
  "message": "Unexpected socket close",
  "stack": "Error: Unexpected socket close\n    at Timeout.setTimeout (/usr/src/app/node_modules/nodemailer/lib/smtp-transport/index.js:189:31)\n    at ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n    at unrefdHandle (timers.js:520:7)\n    at Timer.processTimers (timers.js:222:12)"
}
2021-11-18T13:36:36.563Z [INFO] alert-handler received `send-email-to-admin` post request from alert-manager.
2021-11-18T13:36:57.662Z [ERROR] alert-handler failed to send email to admin
meta = {
  "message": "Unexpected socket close",
  "stack": "Error: Unexpected socket close\n    at Timeout.setTimeout (/usr/src/app/node_modules/nodemailer/lib/smtp-transport/index.js:189:31)\n    at ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n    at unrefdHandle (timers.js:520:7)\n    at Timer.processTimers (timers.js:222:12)"
}

..................

user@hostname:~$ sudo docker logs k8s_alertmanager_alertmanager-584c4fcb59-7qft6_default_d47c392f-5a65-4905-b4b7-b0edf08ebb35_0
level=info ts=2021-11-18T13:33:36.498027171Z caller=main.go:174 msg="Starting Alertmanager" version="(version=0.15.1, branch=HEAD, revision=8397de1830f154535a31150f9262da0072d8725d)"
level=info ts=2021-11-18T13:33:36.498138944Z caller=main.go:175 build_context="(go=go1.10.3, user=root@efde7f9485ae, date=20180712-18:25:27)"
level=info ts=2021-11-18T13:33:36.502742394Z caller=main.go:320 msg="Loading configuration file" file=/etc/alertmanager/config.yml
level=info ts=2021-11-18T13:33:36.502795015Z caller=cluster.go:570 component=cluster msg="Waiting for gossip to settle..." interval=10m0s
level=info ts=2021-11-18T13:33:36.507253095Z caller=main.go:396 msg=Listening address=:9093
level=info ts=2021-11-18T13:34:36.503018922Z caller=cluster.go:579 component=cluster msg="gossip not settled but continuing anyway" polls=0 elapsed=59.999830923s
level=error ts=2021-11-18T13:40:54.148278125Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T13:40:54.148414991Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T13:45:54.148770584Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T13:45:54.149099339Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T13:50:54.149736354Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T13:50:54.149844742Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T13:55:54.150229731Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="context deadline exceeded"
level=error ts=2021-11-18T13:55:54.15066462Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="context deadline exceeded"
level=error ts=2021-11-18T14:00:54.153040339Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:00:54.15318812Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:05:54.154146299Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="context deadline exceeded"
level=error ts=2021-11-18T14:05:54.15427601Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="context deadline exceeded"
level=error ts=2021-11-18T14:10:54.1547301Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:10:54.154926268Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:15:54.155759899Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:15:54.156007768Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:20:54.161624022Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="context deadline exceeded"
level=error ts=2021-11-18T14:20:54.161705591Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="context deadline exceeded"
level=error ts=2021-11-18T14:25:54.163332609Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:25:54.163504314Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:30:54.163803922Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:30:54.163926295Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:35:54.16701424Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:35:54.167138359Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:40:54.168756763Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:40:54.169085803Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage: dial tcp [::1]:9095: connect: cannot assign requested address"
level=error ts=2021-11-18T14:45:54.169611349Z caller=notify.go:332 component=dispatcher msg="Error on notify" err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"
level=error ts=2021-11-18T14:45:54.169830051Z caller=dispatch.go:280 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="unexpected status code 500 from http://localhost:9095/alert-handler/send-email-to-admin/?template=cluster-usage"

I found a timeout error in the log, however, I have used this configuration of smtp.163.com in other systems, and it has been verified to be usable.

https://github.com/microsoft/pai/blob/ea19af183e1a5e26ccd9fc2a410ffefd6ada9d52/src/alert-manager/src/alert-handler/controllers/mail.js#L28
It seems that PAI does not currently support the SSL protocol to send emails.
After I changed the port to 25, there was no timeout error in the container, but the issues of 1 and 2 above still exist.

@suiguoxin  This is related to the alert handler. Could you please have a look?

Maybe the k8s network plug-in did not correctly configure SNAT for all containers, which caused the data packets sent by the container (use containers IP not host IP) to the Internet to be dropped by the firewall of my organization.
After I added a iptables rule to the host, I can receive emails:
sudo iptables -t nat -A POSTROUTING -s <IP_ADDRESS>/16 -j SNAT --to-source <IP_ADDRESS>

Issues:

Will this rule affect the k8s cluster?
the alert pane cannot be opened yet as shown above.

@suiguoxin This is related to the alert handler. Could you please have a look?

Thank you very much for your reply.

The alert data is correctly obtained, so this issue may be webportal related.

If there is no GPU utilization item in the alert, it can be displayed correctly.

Because alerts[indexofusage]["annotations"] is null, webportal cannot parse the item correctly.
Use the following filter to replace the string on the DMZ host to fix it:
sub_filter ',"annotations":null,' ',"annotations":{"summary":"cluster usage reported!"},';

@suiguoxin

https://github.com/microsoft/pai/blob/ea19af183e1a5e26ccd9fc2a410ffefd6ada9d52/src/alert-manager/src/cluster-utilization/send_alert.py#L196-L252
Bug related to these lines.

@siaimes Hi, as there is no GPU in the cluster, this feature should not be enabled, please refer to https://github.com/microsoft/pai/blob/master/docs/manual/cluster-admin/how-to-use-alert-system.md#cluster-gpu-utilization-report

@siaimes Hi, as there is no GPU in the cluster, this feature should not be enabled, please refer to https://github.com/microsoft/pai/blob/master/docs/manual/cluster-admin/how-to-use-alert-system.md#cluster-gpu-utilization-report

@suiguoxin thank you for your reply, the original issue has been solved, but there should be a bug where webportal cannot be rendered successfully due to missing items.


Little bug on button (present demo tooltip)

Windows 7
10.0.0
Current on documentation
Yandex Browser 18.1
Yarn

@RALMAZ I think that problem is because the edge of the button is very narrow and it is not displayed well in some cases, with 2px it may improve I will review it thank you very much for the contribution

@RALMAZ Would you like to do a PR to solve this problem?

@luisDanielRoviraContreras Unfortunately i do not have enough time for this now :crying_cat_face:

I think its the overflow: hidden; of the button. Try to change it to overflow: visible; and see if that helps.

@fergardi if we change to overflow: visible; the clicking effect would overflow out of the button, look for another solution, would you like to address this problem? or do I? Thank you very much for the contribution

Ready already solved the problem was by backface-visibility: hidden; or that I think please try with the latest version to see if it works as it should thanks for the contribution.


let new_style be a superset of old_style?

test case:
import numpy as np
from numba import njit

dtype = np.dtype([("field1", np.float64), ("field2", np.int32)])

# old error style can give more informative error message
@njit
def sum_field1(records):
    total = 0.0
    for record in records:
        total += record.field0
    return total

records = np.array([(1.0, 2), (3.0, 4)], dtype=dtype)
result = sum_field1(records)

new error style:
  File "/home/dli/numba/numba/core/typing/templates.py", line 1033, in _resolve
    return fn(value, attr)
           ^^^^^^^^^^^^^^^
  File "/home/dli/numba/numba/core/typing/arraydecl.py", line 604, in generic_resolve
    ret = record.typeof(attr)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/dli/numba/numba/core/types/npytypes.py", line 189, in typeof
    return self.fields[key].type
           ~~~~~~~~~~~^^^^^
KeyError: 'field0'

old error style:
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Internal error at resolving type of attribute "field0" of "record".
'field0'
During: typing of get attribute at /home/dli/numba/local1.py (13)
Enable logging at debug level for details.

File "local1.py", line 13:
def sum_field1(records):
    <source elided>
    for record in records:
        total += record.field0
        ^

Can we also enable new_style to emit more info as Internal error at resolving type of attribute "field0" of "record".?
Ideally, I hope we can let new_style be a superset of old_style. always provide more info, and also quicker.

I will be happy to see improvement to add contextual info for new style error to aid debugging.
Python3.11 introduced Exception.add_note (https://docs.python.org/3/library/exceptions.html#BaseException.add_note) which can be useful to add context.
That can replace the NumbaError.patch_message and NumbaError.add_context.
Note the old style converts builtin exceptions into NumbaError for the added functionality. There's no replacement for it until Python3.11, unless one monkeypatch the Exception object and modify sys.excepthook.
According NEP29, earliest date we can drop Python < 3.11 is Apr 04, 2025

Triage meeting discussion note:

better to wait until old_style error capturing is fully removed. Then, we do a clean up of those logic before we can implement the Exception.add_note. By then it will be close to 2025.


System Prompt Library

I use different models for different purpose. I realized that I would like to be able to switch quickly the "system prompt" for a model.
For example use one prompt for "Java Programming" and another one for "Flutter Programming", one for casual chatting and one to solve reasoning problems. With that you could give your models different personalities and switch between them.
My implementation idea is the following.
Add a feature to create a prompt library. Each of them should have a unique name and the "prompt text".
We could add a new page "Prompts" to manage these (create, edit, delete).
In the chat window next to the model selection we would then allow to select from a drop down list the "prompt" to use.
If none are in the library or nothing is selected we use the "default prompt" or if overriden the "model specific default prompt".

For documents I would see it like this.
You drag a document into your chat and it is indexed on the fly into a "in memory" or embedded vector database. Then it will be available in your current chat session (via RAG).
If you start a new session all images and additional documents should be removed and the vectory store should be cleared.
I do not want to index all my local files or documents or something like that. I would do this on the fly for documents I want to work with. Not sure how fast this is.


Return stack from wrapped functions

Pull Request Test Coverage Report for Build 25

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 96.875%

Totals

Change from base Build 24:
0.0%

Covered Lines:
217

Relevant Lines:
224

💛  - Coveralls


nb_bound_method: add introspection attributes and fix surprising behavior around wrapper descriptors

The introspection attributes __self__ and __func__ provide better interface compatibility with regular Python bound methods, and can be cheaply supported by adding new entries in the existing member list.
The previous wholesale forwarding of attribute accesses to the underlying nb_func produced surprising behavior when explicitly invoking dunder methods: obj.method() would work but obj.method.__call__() would not (it would need obj.method.__call__(obj)). Same thing for __repr__, __hash__, etc. Fix this by checking the 'normal' attribute path before delegating to the contained method, except for __doc__ and __module__ where we want nb_func's version even though the attribute does exist in nb_bound_method's class dict as well. This is necessary to support __self__ and __func__ but I think it's a good idea regardless.

CI failure is the usual windows stderr-capturing flake.


Release version, guzzle 6

Hello,
any plan to release a version with a composer.json updated? afaik the way to install php-cmis-client, with guzzle 6, is to composer require dev-master#1.0.1
Regards

Hello,
Any updates on this? I see it's more than a year old now, but it's quite important for this library users, having "dev-master" in a production env is quite risky.
Thanks!

Thank you @sascha-egerer i will look forward to


⚠ Bofrost.be has degraded performance

In b1df43d, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2567 ms

Resolved: Bofrost.be performance has improved in d1e08e5.


Plex Media player dependency not installing automatically !!

Home Assistant release (hass --version): 0.58.0
Python release (python3 --version): 3.4.2
Component/platform: Raspberry Pi running Debian
Description of problem: Plex media player component not loading anymore since at least release 0.57 of HA (was working perfectly previously ! Found that in logs at each restart:
2017-11-23 17:05:16 INFO (Thread-8) [homeassistant.util.package] Attempting install of plexapi==2.0.2
Expected: Update plex players status in HA but it doesn't anymore ! Looks to try to install a dependancy update but always fails !

As of 0.56 or 0.57 plexapi == 3.0.3

sure but how to check why HA is unable to update dependancy by itself ? as I found nothing out of that line in logs and it repeats each time I restart HA :(
Or way to install dependancy manually ? I run HA in a virtualenv !

$> source <venvdir>/bin/activate
$> pip install plexapi==3.0.3

Thanks it installed without any problems but still not working in HA, bunch of Python errors :(

What are the errors?
Did you try creating a new venv?

I get that in logs:
2017-11-24 17:05:12 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.plex 2017-11-24 17:05:12 INFO (Thread-6) [custom_components.media_player.plex] Connected to: http://<IP_ADDRESS>:32400 2017-11-24 17:05:12 WARNING (Thread-6) [plexapi] Reloading Episode 'Apocalypse 2014' for attr 'player' 2017-11-24 17:05:12 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform plex Traceback (most recent call last): File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=self.hass.loop) File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for return fut.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/media_player/plex.py", line 99, in setup_platform setup_plexserver(host, token, hass, config, add_devices_callback) File "/home/homeassistant/.homeassistant/custom_components/media_player/plex.py", line 203, in setup_plexserver update_devices() File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 306, in wrapper result = method(*args, **kwargs) File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 306, in wrapper result = method(*args, **kwargs) File "/home/homeassistant/.homeassistant/custom_components/media_player/plex.py", line 160, in update_devices update_sessions) File "/home/homeassistant/.homeassistant/custom_components/media_player/plex.py", line 244, in __init__ from plexapi.utils import NA ImportError: cannot import name 'NA' 2017-11-24 17:05:13 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform ups is taking over 10 seconds. 2017-11-24 17:05:13 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.samsungtv
Would prefer to avoid setup a new venv as I don't want to mess my Zwave configuration and everything else is working fine right now !

can you run
$> pip install home-assistant --upgrade
Those NA errors indicate you are using an old version of the plex.py from HA, for some reason..
HA may say it's up-to-date but NA is NOT imported in the latest plex code.

Also note the custom_component usage of plex, meaning you've copied an older version of the plex.py file to /home/homeassistant/.homeassistant/custom_components/media_player/plex.py, if you update this (or remove it if no changes were made to it) then it will use the latest plex script and hopefully resolve your issues.

@GenericStudent good eyes, didnt see that

We don't give support for custom component or platforms. Please use our help channels for this discussion.


[charts] Legend labels do not render correctly on RTL

Describe the bug

To Reproduce
Try to apply RTL to any chart with a legend
Expected behavior
Like all the other elements of charts, nothing should change when switching to RTL
PAL tracking issue

:tada: This issue has been resolved in version 2.55.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[CSM] Track image tags of syscalls in activity trees

What does this PR do?

This PR isolates syscalls entries in activity trees into their own SyscallNode struct. This is done so that we start tracking syscalls per image tags. This is a 2 step PR, next step is to update the protobuf to record these image tags.
Motivation

Make sure syscalls are tracked like any other resources.
Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

It would be great to add some functional tests too

/merge

/merge -c

/merge

/merge


Configure Babel

Deploy preview for codeglide failed.
Built with commit 78cbee6943f29988c66bd0063840a9144c725e63
https://app.netlify.com/sites/codeglide/deploys/5bb8d76e82d3f16089ec635c


Center align pivot table

How to align the table/chart to center screen horizontally? It is always left align.
I set margin to auto but it doesn't work:

I used this class & it works:
    .center-container {
	  display: flex;
	  justify-content: center;
	}

Thanks anyway.


[TextAnalytics] Rest API version 3.0 is not supported in China Cloud

We are running live Tests against other clouds like US Gov and Azure China Cloud. The goal is to check whether new azure sdk package work with other clouds or not.
When we test TextAnalytics service in Azure China cloud. All failed tests return 404 'The requested resource is not found'.
This is because TextAnalytics SDK is hard coded to use 3.0 Rest API, but Azure China TextAnalytics service only supports Rest API 2.1, 3.0 is not supported.
Request Uri send by test is https://.cognitiveservices.azure.com/text/analytics/v3.0/languages which's version is higher than the China cloud 's REST API version https://.cognitiveservices.azure.com/text/analytics/v2.1/languages.

The request version has been defined as v3.0 in azure-sdk-for-net/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClientOptions.cs.
internal string GetVersionString()
{
    switch (Version)
    {
        case ServiceVersion.V3_0:
            return "v3.0";

        default:
            throw new ArgumentException($"Version {Version.ToString()} not supported.");
    }
}

@XuGuang-Yao is your request that Azure China Cloud should accept newer service versions? or that the SDK should support lover versions?
Note that if you mean the later, the Azure.AI.TextAnalytics package is intended to support v3.0 and forward. For lower versions, use Microsoft.Azure.CognitiveServices.Language.TextAnalytics package.

@maririos - Here is the background:
We are running live Tests against other clouds like US Gov and Azure China Cloud. The goal is to check whether new azure sdk package work with other clouds or not.
Based on that, we don't think it is an option to switch live tests of Azure.AI.TextAnalytics to use Microsoft.Azure.CognitiveServices.Language.TextAnalytics package.
If Azure.AI.TextAnalytics not support lower versions, but Azure China Cloud not update to latest version. This would end up that Azure.AI.TextAnalytics not work with Azure China Cloud.

Thanks for the context @XuGuang-Yao .
@assafi do you know how/if TA v3.0 is going to be enable in other clouds, like Azure China Cloud?

Sorry for the late response. China clusters should become online very soon. China East 2 is ready but China North 2 is still pending.
I sent the platform team a note and should have an ETA soon.
USGov clusters are already available.

@tzhanl -- Please try the pipeline again and let us know if it's passing or failing.

3.0 still not supported in China Cloud.

FYI Disabled from CI for now

@v-xuto - Can you please re-run to see if it still fails?

@jongio - It still fails when running in Azure China Cloud.

This issue has not recurred, we will close this issue, thanks all!


Fixed up underline lengths

Ran a script to fix underline lengths to conform to the reStructuredText
spec. These changes will reduce the number of warnings in the doc build.
The script and tests are here: https://github.com/JeffSchering/rst

Looks like it was replaced by a line of backticks. That's because backticks are a valid title underline character, and it looks like I missed that case in the script. Argh.
I reverted that change manually.

Thanks! +1

Looks good! Much appreciated!


The term 'ssh' is not recognized even though openSSH is installed

Environment
ssh : The term 'ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ ssh
+ ~~~
    + CategoryInfo          : ObjectNotFound: (ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Steps to reproduce

Open windows terminal or PowerShell
run ssh

Expected behavior
As I have OpenSSH installed, The behavior should happen to be like this.
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]

Actual behavior
Even though I have OpenSSH installed on my pc, It shows this error which is unexpected. In my windows terminal ( PowerShell ) This annoying error comes not allowing me to connect to my server on the cloud.

I suspect you're using 32-bit (x86) PowerShell. Can you run gci env:/PROCESSOR*?

It says I use x86 PROCESSOR_ARCHITECTURE
PS C:\Users\Admin> gci env:/PROCESSOR*

Name                           Value
----                           -----
PROCESSOR_ARCHITEW6432         AMD64
PROCESSOR_REVISION             1801
PROCESSOR_LEVEL                23
PROCESSOR_IDENTIFIER           AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
PROCESSOR_ARCHITECTURE         x86

PS C:\Users\Admin>

This is a bug with how Windows automatically registers OpenSSH. Because it lives in “system32”, a folder which 32-bit processes redirect, it cannot be found by looking in the PATH. You should prefer to use a native/64-bit shell unless you have a specific reason not to, or use the full redirected path to OpenSSH, c:\windows\sysnative\openssh\ssh.exe.

If you are using openssh for windows you can go to this path and after run on the cmd on administrator It works!


Upgrade our issue templates to use GitHub issue forms ✍

Introduction
GitHub has recently rolled out a public beta for their issue forms feature. This would allow you to create interactive issue templates and validate them 🤯.
Appwrite currently uses the older issue template format. Your task is to create GitHub issue forms for this repository. Please use Appwrite's issue templates as a reference for this PR.
Tasks summary:

[ ] Fork & clone this repository
[ ] Prepare bug report issue form in .github/ISSUE_TEMPLATE/bug.yaml
[ ] Prepare documentation issue form in .github/ISSUE_TEMPLATE/documentation.yaml
[ ] Prepare feature request issue form in .github/ISSUE_TEMPLATE/feature.yaml
[ ] Push changes to master and test issue forms on your fork
[ ] Submit pull request

If you need any help, reach out to us on our Discord server.
Are you ready to work on this issue? 🤔 Let us know, and we will assign it to you 😊
Happy Appwriting!

I would like to work on this issue . Can i be assigned this issue?

@alceil Assigned it to you! All the best 🚀

Thanks @Meldiron


Ft front tests fixing 158532827

Branch
-Ft-front-tests-fixing-158532827
What does this PR do?

Add test for channel team access
Add tests to validate pushover priority
Resolve any merge conflicts arose

What are the relevant pivotal trackers stories?

https://www.pivotaltracker.com/story/show/158532827

I would like to get any feedback on this work done.

Closed this PR. I had to create a develop branch as advised by David.


Error Starting Polaris in a Nano Docker Container

I am getting an error when I try to Start Polaris in a nano docker container. I believe the issue is because the RequestQueue property is not set when a HttpListener object is created. I'm not sure if this is a bug with the nano powershell build, corefx, or Polaris. I do not believe it is a Polaris bug, because when I create the object in the console of the container, the parameter is still missing. I have included a couple screenshots below. I have created a repo for the docker image I was testing with. Docker Repo
The property 'RequestQueue' cannot be found on this object. Verify that the property exists and can be set.
At C:\temp\Polaris\lib\Polaris.Class.ps1:250 char:13
+             $this.Listener.TimeoutManager.RequestQueue = [timespan]:: ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound

Hey,
Thanks for posting up the issue and the Docker repo. I don't believe the timeoutmanager was ever added to the .net core version of HttpListener. My logic for using it was a bit flawed.
@tylerl0706 - Do you know if it's easy to add a nano image to run our tests in?

Once Tyler clears me on this one it should be available for testing - @jeremymcgee73

It is done 🎉
@Tiberriver256 PM me about nano server when you get a chance :)

Thanks for fixing that issue! I'm getting another error now. I believe it has something to do with windows networking in docker. I'm going to see if I can fix it.. Should I close this issue and open another?
Exception calling "Start" with "0" argument(s): "Cannot access a disposed object.
Object name: 'System.Net.HttpListener'."
At C:\temp\Polaris\lib\Polaris.Class.ps1:256 char:9
+         $this.Listener.Start()
+         ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ObjectDisposedException


add a timeout for the auth request

Adds a timeout to the authentication request to the freeipa server. Currently, if the server is unavailable or stopped, the request connection doesn't close until much longer than traditional uwsgi and nginx timeouts, causing 504s.

Ugh, can't count the number of times I've used requests and haven't set a timeout. I know it'd be difficult for them to pick a sane default, but it'd make my life so easy.

seriously... I wonder if maybe this would be an ok default and take a variable to up the timeout in the case that the server in question is slower than ours? 🤔


Feature Request: Missing helm repository on artifacthub.io

I tried to install the helm chart over a repository, but I can't found on artifacthub.io the right matching repository to the helm charts inside this git repository. Please provide the helm chart on artifacthub.io

@volker-raschek thanks for reporting this.


Allow users to search quotes with a certain term

A new API endpoint to allow users to get an array with all quotes containing a certain word or phrase

Hey @Aridez,
Really sorry I missed this! It got swallowed by a flurry of notifications. I'll take a look at this next week.

@Aridez Thanks for your contribution, and apologies once again for the delay. Please could you address the comment above, and then add the new endpoint to the OpenAPI Schema?

Hey @jamesseanwright, don't worry about the delay.
I got around fixing the two issues you mentioned.
Let me know if there's anything else :)

Thanks for the quick turnaround @Aridez. I'll merge this in now and then release it at some point next week :)

@Aridez this has now been deployed :) https://ron-swanson-quotes.herokuapp.com/v2/quotes/search/hate

That sounds great, thanks for keeping me posted!


Cleaner approach to HeaderMixin

This PR introduces a backwards-compatible change to the HeaderMixin. Our existing method works but feels kind of heavy-handed. This approach is more in-line with Django's design, IMO, and doesn't feel as blunt.
Unfortunately, it only works if render_to_response is ultimately called, so I had to leave in the old approach as well. Maybe we should split it up into a new mixin?

Codecov Report

Merging #285 (82c65d6) into main (b465915) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
+ Coverage   97.73%   97.78%   +0.05%
==========================================
  Files           8        8
  Lines         485      496      +11
  Branches       68       69       +1
==========================================
+ Hits          474      485      +11
  Misses          9        9
  Partials        2        2

Flag
Coverage Δ

unittests
97.78% <100.00%> (+0.05%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

braces/views/_other.py
100.00% <100.00%> (ø)

Codecov Report

Merging #285 (82c65d6) into main (df847c9) will increase coverage by 0.05%.
The diff coverage is 100.00%.

:exclamation: Current head 82c65d6 differs from pull request most recent head 2f1a4ec. Consider uploading reports for the commit 2f1a4ec to get more accurate results

@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
+ Coverage   97.72%   97.78%   +0.05%
==========================================
  Files           8        8
  Lines         484      496      +12
  Branches       68       69       +1
==========================================
+ Hits          473      485      +12
  Misses          9        9
  Partials        2        2

Flag
Coverage Δ

unittests
97.78% <100.00%> (+0.05%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

braces/views/_other.py
100.00% <100.00%> (ø)

braces/views/_ajax.py
100.00% <0.00%> (ø)

braces/views/_access.py
97.05% <0.00%> (ø)

braces/views/_queries.py
95.38% <0.00%> (ø)


spsc experiment.

https://github.com/0xCuteSocks/sequencer-client-rs/tree/spsc

single thread + spsc

Thinking of maybe using select! to race data b/w threads using spsc

single thread two client mpsc, no race.

Looks good, will add when i get back


Add more descriptive displayNames for ScrollToHOC

When using the ScrollToHOC, this is what my React debugger showed:

Notice the undefined display name.
I think we should update how we are handling the displayNames so that it looks like the below:

Notice how there is no more undefined display name. Also, we didn't lose the display name of the original component which I wrapped.
Let me know what you think, and I can create a Pull Request. I would use the same techniques shown in the React docs.

@newyork-anthonyng
The more we can get rid of the  components, the better. Feel free to create a PR!


Remove Rubinius

This issue will track the removal of Rubinius from ruby-build, as requested by @brixen, Rubinius’ maintainer, in https://github.com/rbenv/ruby-build/pull/860#issuecomment-168059883:

Honestly, given the amount of time I've wasted with rbenv, RVM, and chruby bugs and insisting on telling me how Rubinius should build and package, it would be better if none of them installed Rubinius.

[ ] Remove rbx-* definition files
[ ] Remove Rubinius support functions
[ ] Document the reasoning behind this change on the wiki

I’ve opened https://github.com/rbenv/ruby-build/pull/863, which should check the first two boxes.
As for the third, I don’t know what to say on wiki besides, “Support for Rubinius was removed at the request of its maintainer” with a link back to this comment. I guess I’ll start with that and others can edit it if they have more to say.

I’ve opened https://github.com/rbenv/ruby-build/pull/863, which should check the first two boxes.
As for the third, I don’t know what to say on wiki besides, “Support for Rubinius was removed at the request of its maintainer” with a link back to this comment. I guess I’ll start with that and others can edit it if they have more to say.

I'm a little bit sad that this would undo many hours or debugging, user support, and workarounds that I've invested in bringing easier Rubinius support to ruby-build and rbenv. Examples:

3e5c31f - Support Rubinius linking against Homebrew openssl
3b6f96d - Lookup LLVM 3.5 from Homebrew on require_llvm on OS X
9a5256e - Work around Rubinius LLVM incompatibilities on Yosemite
392679a - Fix irb, rake, rdoc, ri for rbx-2.2.1

However, even if after all this, our rbx support is deemed unwelcome, then I'm :+1: if someone is going to put in work to remove this, document it, and provide support to people who will undoubtedly come to the Issues section to ask about this.

I'm a little bit sad that this would undo many hours or debugging, user support, and workarounds that I've invested in bringing easier Rubinius support to ruby-build and rbenv. Examples:

3e5c31f - Support Rubinius linking against Homebrew openssl
3b6f96d - Lookup LLVM 3.5 from Homebrew on require_llvm on OS X
9a5256e - Work around Rubinius LLVM incompatibilities on Yosemite
392679a - Fix irb, rake, rdoc, ri for rbx-2.2.1

However, even if after all this, our rbx support is deemed unwelcome, then I'm :+1: if someone is going to put in work to remove this, document it, and provide support to people who will undoubtedly come to the Issues section to ask about this.

I didn't request that Rubinius be removed; that's @sstephenson's revisionism, just as this is https://twitter.com/sstephenson/status/682300372766068737.
What I said was, "given the amount of time I've wasted with rbenv, RVM, and chruby bugs and insisting on telling me how Rubinius should build and package, it would be better if none of them installed Rubinius."
You are welcome to choose to remove support for Rubinius, just as you are welcome to follow the repeated requests from me to follow my recommendations for the project. Take ownership for your decision.

Here's my suggestion, "The rbenv maintainers don't like how Rubinius chooses to run their project and we don't want to work with their recommendations for building because we think our way of doing things is more important, so we are removing support for installing Rubinius. Ultimately, we think our tool's 'philosophy' is more important than being useful to people."

@brixen in #860 you mentioned:

If a failure happens during building artifacts, we rebuild them. If something is borked when we label a release, we relabel it.

How absolute is this idea? If you release v2.10, then v2.11, then finally v2.12, would it be safe to assume that v2.10 and v2.11 won't change from a git tag and tarball hash perspective, since they're not the latest, and thus not subject to the same level of disruption that comes with releasing a potentially broken new version? Or does the tarball and git tag mutability also extend beyond the latest release?
I ask because, first, I can't see what problems would be solved by keeping historical release labels and tarballs mutable over time (scoped, perhaps, to within a MAJOR.x set of releases), and, second, perhaps there is some compromise here between rbenv and Rubinius. Rubinius would be able to keep its definition of a release label, and rbenv (and no doubt many others) might be able to retain its preference for reproducibility and identifiers themselves as the means for signalling.
(A separate thought would be to have a scheme like v2.10-1, v2.10-2, where MAJOR.MINOR-REL is such that the -REL indicates a release counter, and a MAJOR.MINOR release identifier would map to one or more MAJOR.MINOR-REL artifact identifiers. That doesn't really address git tag mutability, though.)

@sstephenson has always been my personal hero but from now on he will be my personal superhero (sorry, Chris Evans)

@aprescott see this comment and the following one.
A Rubinius release is a tuple of (version, SHA). A release is not mutable. The most current tuple of (version, SHA) is the correct one. The only version label whose SHA may change would likely be the most current one. But that doesn't actually matter at all. rbenv should not cache the version git SHA (or release tarball SHA), or it should provide a mechanism to update it.

You are welcome to choose to remove support for Rubinius, just as you are welcome to follow the repeated requests from me to follow my recommendations for the project. Take ownership for your decision.

Reaching a decision is what this tracking issue is all about. It's clear to me that, whilst opening this issue, @sstephenson acted out of emotion, reacting to your apparent thanklessness for the work we put in ruby-build to help bring Rubinius (among other Ruby versions) to developers.
I see perfectly valid arguments from both sides. I continue to frown upon republishing tagged tarballs and I'm fairly confident that most of the wider UNIX software-consuming community will back me on this. Earlier this year, you hinted that you will avoid republishing https://github.com/rubinius/rubinius/issues/3380#issuecomment-97307612, but I understand that it was in informal conversation and not a contract of any kind. I also believe ruby-build (tandem with rbenv), RVM, and ruby-install (tandem with chruby) deserve more credit for being on the front lines and catching a lot of build problems that eventually get reported upstream. On the other hand, none of us have a right to school you about how to manage releases of your own Ruby implementation, and you do have a point about HTTP protocol providing a mechanism for caching, even if support for that is not widely implemented by package managers.
We have several options here:

Remove rbx support from ruby-build. That's what was originally proposed here.

Less code to manage saves maintenance time in the long run.
Users might suffer from repercussions of such change.

Remove checksums from rbx definitions.

This will allow rbx tarballs getting republished.
It will disallow transparent mirroring service that ruby-build provides. (Not a big deal.)
There won't be a guard against corrupt downloads anymore. (Not a big deal.)
Optionally, provide a mechanism for installing the latest version of anything using ruby-build. This would address @brixen's desire to encourage always installing the latest version of rbx.

Change absolutely nothing about our approach.

When we notice a tarball was republished, we simply update the checksum.

Personally, I'm leaning towards (2) over (1).

@brixen sure, I know your stated definition of a Rubinius release means that it's not mutable. I was trying to open this issue up to a situation where the conflicting outcomes of different views on a release can lead to Rubinius remaining part of well-used toolchains.

A SHA is immutable and unique. I'm not sure I understand why a version number is even meaningful here when you can't have X.Y.[specific SHA] and also A.B.[the same SHA]. If a version number is not an immutable alias for an immutable SHA, then what good is it?

A Rubinius release is a tuple of (version, SHA).

To be more specific: a SHA is unique. Attaching a version number to it is redundant. It also makes version numbering totally irrelevant if you have to have the SHA to actually identify a specific version of a project. Again, if a version number is not immutably tied to a SHA, then it means nothing. Perhaps Rubinius should just abandon version numbers altogether? As it stands now, they're not useful for anything.
Of course, I subscribe to the hopelessly outdated idea that a version number refers to a specific version, which is in turn a specific immutable SHA in git. But I have old-fashioned ideals about reproducible deployments.

@mislav I'd prefer you not cache tarball digest SHAs and install the version the user requests, whatever that is at the time the user requests it.
You can curl http://releases.rubinius.com/index.txt for available versions and fetch them and their digests from https://rubinius-releases-rubinius-com.s3.amazonaws.com/
If you want to cache the digest SHA locally and notify the user that the local cache (ie installed version) is no longer current, you could do that.

@mislav as I commented here, there is no difference between the Rubinius scheme with (version, git SHA) and MRI's with X.Y.ZpN. Previously, MRI never included the pN in the version number, and you can in fact find multiple 1.8.7, etc. It appears to do so now, which is great, but all the hand-wringing about "how will a user know?" is really over-blown.
You can list the Rubinius installs in your index as X.Y-gitSHA, if that's what you prefer. In the end, a release is a definite, distinguishable entity. Most people will not care about the gitSHA, for those that do, it's visible in RUBY_DESCRIPTION:
$ ruby -e 'puts RUBY_DESCRIPTION'
rubinius 2.10 (2.1.0 14deac8c 2015-12-26 3.5.1 JI) [x86_64-darwin15.2.0]

so looking at a list of
rbx-2.1.5ba9674
rbx-2.1.5bd3523
rbx-2.1.9c5fae4

which would be the most up to date?

@mislav I just found this issue and maybe an hybrid approach between (2) and (3) could be possible.
Just an idea but, what if ruby-build checks the SHA but instead of rejecting the install, it could warn the user of the mismatch and ask him if he wants to proceed.
I believe you get pretty much all the benefits from both worlds with an ocasional warning that the user can manually check on Rubinius' website

@trinode there is zero confusion about what is current. At the time you install, there is only one version X.Y for any X and Y. The only problem here is that rbenv wants to cache which git SHA a particular X.Y refers to. There's no reason to cache them, and if rbenv insists on caching them for some reason, it should either 1. provide a mechanism to update the cache, or 2. automatically update the cache.
If you look at https://github.com/rubinius/rubinius/releases, there is only one 3.2, one 3.1, etc. You'll never have a case of not knowing which is the current one.

@brixen sometimes consistent / repeatable is more important than current in muti-server environments.

Just an idea but, what if ruby-build checks the SHA but instead of rejecting the install, it could warn the user of the mismatch and ask him if he wants to proceed.

@sagmor I think that would make the feature even more complex, both for users and to maintain code-wise. Generally, it's not a good idea for unix utilities to have an interactive (i.e. blocking) mode that kicks in unpredictably, especially ruby-build which is likely used in provisioning scripts. It's better for a command to fail than to ask on stdin for how to proceed.
Also, ruby-build has an option to take in a patch via stdin to be applied to Ruby source before it gets compiled, and it that case it wouldn't be possible to prompt for user input on stdin.

@trinode

sometimes consistent / repeatable is more important than current in muti-server environments

Sometimes? I'd say all the time. I'm yet to see a production system and engineers maintaining it that can tolerate variable versions because it's "current".

Personally, my vote is for (2).
Since rubinius doesn't appear to keep previous builds of the same version available for download, there really isn't any potential for repeatable installs without some kind of rubinius archive. As for users enabling rbenv to manage multiple same-version builds, this seems like a feature that could be resolved with an rbenv plugin. I would imagine it functioning very similarly to rbenv-aliases, but keeping a record of rubinius build checksums and/or install timestamps, and simply aliasing to the latest one.

this comment won't get much love but i think removing rubinius could be a good thing because:

the differences between rubinius and rbenv release process cannot find a compromise (thats how it appears)
the time and effort put into this issue and other rubinius issues could be spent more wisely on other problems related to ruby-build.
rubinius isn't used that much, i know 0 people who use it in production but i'm sure there's a few.
for a toy to people to try, this seems like a lot of effort.

What if, per @brixen's recommendation, we had a rbx-latest definition that figures out the latest Rubinius release, downloads and installs it, and in the process dereferences the version so the final install ends up in a directory named rbx-X.Y? We would have to add a feature to ruby-build that can dereference a version number mid-install.
There would be no checksums, no trying to catch up with Rubinius releases manually (now happening almost daily), and people would be always installing the latest version.

I suggest to use rbx-3 and rbx-2. rbx-3 reference to latest version of rubinius 3.x series. rbx-2 is same behaivior with rbx-3 ref. https://github.com/rbenv/ruby-build/pull/883#issuecomment-172417587

@mislav the rbx-latest idea is very nearly accomplished (by users) if the ruby-build-update-defs plugin is used.

user runs rbenv update-version-defs, which creates build defs for the latest versions of rbx (sans checksums)
user can then rbenv install rbx-X.Y

I like the idea in that it removes the need for frequent ruby-build releases. (Which was the same reason for node-build-update-defs in the first place) But I'm not excited about how much code would be added to ruby-build to support it. Would version derefencing code be added for other ruby runtimes as well? As a user, I'd expect it to be similar across the board. That could be a lot of code.

Short story :
As a (very) casual developper, if ruby-build does not support rubinius, I will never test it.
As a sysadmin, if rubinius releases are not reliable, I will never use it in production.
Long story :
After reading #860 and here, I'm not sure I understand why rubinius tarballs change over time.
It seems it goes through (Tag git) => (Lots of processing) => (Tarballs).
And, from what I read, the processing can fail but still produce tarballs. Am I right ?
As a temporary solution, I agree with hsbt, ruby-build should just provide latest version.

yeah i agree with the general sentiment of Mazwak, the process of downloading a file and computing a checksum is simple. there's nothing complicated about it, until you apply distributed computing theory to it(why?!). if a checksum does not match, the file has been tampered with in transit but with rubinius there's no reliable way to know, unless you follow a more complicated path. i vote for the simple solution, and the solution that doesn't break an old age tradition of how to verify the contents of a file.

If I could ask: does this mean that rubinius will not be supported in rbenv? (even for manually-installed setups)

@jf rubinius (or any other ruby) would still work in rbenv, if installed manually. rbenv makes no distinction how the ruby gets installed into $(rbenv root)/versions/. So long as it's in there, rbenv can use it.

Yeah, I would expect so too. I'm asking because I'm finding that rbenv rehash doesn't generate shims for binaries installed from gems when I use rubinius, and that's surprising to me. I've tried just pure rbenv, btw (so no gemset plugin), and the result is the same. Gems that come with binaries do not get recognized, and rbenv rehash does not generate shims for them.

Rubinius seems unmaintained. (FYI https://github.com/rubinius/rubinius/issues/3813)
There is no specific reason for removing rbx definitions and maintained them in the future. They are the same as REE and Ruby 1.8 and 1.9 definitions today.


BZ69355:  ExactRateLimiter

Original PR: https://github.com/apache/tomcat/pull/757

Accurate rate limiter.
exposeHeaders - disabled by default, for debugging purpose only.
Performance test shows (org.apache.catalina.filters.TesterRateLimitFilterPerformance):

Wed Oct 09 15:55:32 CST 2024	No Limiter TPS:	1046	Fast Limiter TPS:	1043	Exact Limiter TPS:	1049

Could the headers follow https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/ ?

The performance results look odd to me. I'd expect throughput to be significantly higher in all cases. I wonder if the request processing time is dominating the results rather than any overhead in Tomcat.

Could the headers follow https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/ ?

Great! Will look into the spec and implement it tomorrow.

The performance results look odd to me. I'd expect throughput to be significantly higher in all cases. I wonder if the request processing time is dominating the results rather than any overhead in Tomcat.

In Performance Test, request client threads have sleep ops.
Average cost of each rateLimiter is about 3500ns. The difference in time cost between Fast and Exact rate limiters is less than 0.001 milliseconds. @markt-asf  Shall we make ExactRateLimiter as a default implementation?
According to the performance test results, for FastRateLimiter, the configuration of 120/4s is actually converted to 123/4s. Then the number of requests passing through each IP is more than that of ExactRateLimiter, and the number of blocked requests is less than that of ExactRateLimiter, and the throughput will decrease.

In Performance Test, request client threads have sleep ops.

Why? Can those be removed?

Average cost of each rateLimiter is about 3500ns. The difference in time cost between Fast and Exact rate limiters is less than 0.001 milliseconds

How do you measure exactly?

Shall we make ExactRateLimiter as a default implementation?

I still prefer multiple implementation. For me the most important thing is DDoS mitigation, and under an attack every little bit helps.

According to the performance test results, for FastRateLimiter, the configuration of 120/4s is actually converted to 123/4s. Then the number of requests passing through each IP is more than that of ExactRateLimiter, and the number of blocked requests is less than that of ExactRateLimiter, and the throughput will decrease.

Can you test with a much higher value so that the number of requests allowed is not reached?

Oh, I see the code that you use to benchmark in the PR.  Have you tried to run an external tool like ab or wrk2?

Could the headers follow https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/ ?

Great! Will look into the spec and implement it tomorrow.

ratelimit-headers spec feature added. see RateLimiter#getPolicy() and RateLimitItem#toString()

Oh, I see the code that you use to benchmark in the PR. Have you tried to run an external tool like ab or wrk2?

@isapir thanks for your suggestion, will try run ab benchmark from another PC tomorrow.

Customize filter to skip remoteAddr obtain:
package filters;
...
public class RateLimiterPerformanceFilter extends RateLimitFilter {
    ....
    private Random random = new Random();
    @Override
    protected String parseQuotaIdentifier(ServletRequest request) {
        return "192.168.0."+(random.nextInt(20) + 1);
    }
}

Sets policy: q=1000;w=4
@isapir Runs tomcat standalone on my notebook, ab results as blow: no significant throughout decrease.

--Without rate limiter protection:
ab -n 10000 -c 10 http://localhost:8080/examples/ratelimiter/None/bytecounter.html
Document Path:          /examples/ratelimiter/None/bytecounter.html
Document Length:        1456 bytes
Concurrency Level:      10
Time taken for tests:   6.338 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      17300000 bytes
HTML transferred:       14560000 bytes
Requests per second:    1577.86 [#/sec] (mean)
Time per request:       6.338 [ms] (mean)
Time per request:       0.634 [ms] (mean, across all concurrent requests)
Transfer rate:          2665.72 [Kbytes/sec] received

Protected by FastRateLimiter
ab -n 10000 -c 10 http://localhost:8080/examples/ratelimiter/Fast/bytecounter.html
Document Path:          /examples/ratelimiter/Fast/bytecounter.html
Document Length:        1456 bytes
Concurrency Level:      10
Time taken for tests:   6.393 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      17300000 bytes
HTML transferred:       14560000 bytes
Requests per second:    1564.21 [#/sec] (mean)
Time per request:       6.393 [ms] (mean)
Time per request:       0.639 [ms] (mean, across all concurrent requests)
Transfer rate:          2642.66 [Kbytes/sec] received

Protected by ExactRateLimiter
ab -n 10000 -c 10 http://localhost:8080/examples/ratelimiter/Exact/bytecounter.html
Document Path:          /examples/ratelimiter/Exact/bytecounter.html
Document Length:        1456 bytes
Concurrency Level:      10
Time taken for tests:   6.464 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      17300000 bytes
HTML transferred:       14560000 bytes
Requests per second:    1547.12 [#/sec] (mean)
Time per request:       6.464 [ms] (mean)
Time per request:       0.646 [ms] (mean, across all concurrent requests)
Transfer rate:          2613.78 [Kbytes/sec] received

@markt-asf any news?


Do you have any related tutorials or blogs on how to realize this project? Thank you

I want to implement a c++ version by studying your project.If you have some tutorials or blogs , thank you very much. If not, thank you too

The specs section of the WalletConnect docs may be of use to you: https://specs.walletconnect.com/2.0/


user-agent?

i was looking at the examples on the repo, and tried some ways to add a "user-agent" header, but i wasn't able, does this feature exists on this API?

(ignore the malformed url)

The webview (wv) should have a customUserAgent property. Did you try wv.SetCustomUserAgent("My user agent")?

Hope this helped.


polaris: init at 0.13.5

Description of changes
This PR adds polaris, its sub-dependency polaris-web, and a nixos module to run it.

Polaris is a self-hosted music streaming server, with a web and android frontend. The web frontend is included in the official releases.
https://github.com/agersant/polaris
polaris-web lies in a separate github repository, and inspired by the packages jellyfin and jellyfin-web I chose to build polaris-web as a separate package.
polaris-web uses an odd versioning schema upstream: "build-X". I chose to reuse these tags. Official polaris releases (Github actions CI) automatically fetches and bundles the latest available version of polaris-web, however polaris has seen no new release since april 2021, while polaris-web has since had 5 version bumps. Currently I package the version of 'polaris-web' which is being bundled with the current polaris release on Github. Once I have properly tested the newer versions I might upgrade.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 178052 run on x86_64-linux 1

2 packages blacklisted:

nixos-install-tools
tests.nixos-functions.nixos-test

2 packages built:

polaris
polaris-web

Sorry for the delay, I've been having issues with the module 'actix-rt' raising a "Too many open files" error during cargo test.
This only seems to happen when I run nix-build as root on my server.
Running it with my normal user made it pass /shrug.
(Even though nix builds as nixbld1, it seems to inherit the ulimits of the initiating user?)
I decided to keep the separate webui package simply because there is a precedent for polaris-web receiving minor bugfixes without there being any version bumps in polaris.
This approach allows us to decouple their versions.
I commit now "fixup" commits for the sake of review, to be squashed when rebasing.
I also now added a nixos test for the nixos module.

This looks good to me.
Would you mind squashing these into 3 commits ?
(one fore the maintainer, one for the package, and one for the module and the test)
From the github UI I can only squash all into 1 commit.

Thanks again!


[Feature] Setup Github Pages

Feature Description
Set up GitHub pages so that it can host a statically generated website from Vite with a GitHub action.
Reason for Change
This makes the app accessible outside of localhost.
Where are the changes needed?
This would probably require the addition of a new file in workflows.
Code Snippets
No response
Anything Else?
No response

Yes, please.

Deployment is bugged

Still not fixed

Unfortunately, me on time pressure wasn't able to find the issue.
I believe I have found the fix and will leave this for the next group to work on.
Code was modified from https://vitejs.dev/guide/static-deploy.html
To fix deployment, the steps would be to:

Uncomment all the lines in .github/workflows/deploy.yml
Add the line base: '/typefaceoff/', underneath the plugins: [react()], line in vite.config.ts

Push and hopefully the deployment should work whenever someone pushes to main branch.


Access the module name on Loader function

I've been playing around with Webpack recently and I wanted to access the name of the module that is being loaded. So I could do something like this:
module.exports = function(source) {
  return source.replace(/(console.)(log|info|debug|warn)\(/g, '$1$2(' + MODULE_NAME + ', ');
}

This would replace all the console.log messages to prefix the filename. I've noticed that the context (this) returns me a few parameters, but never the file name. Is it possible to do something like this at all?

Maybe you’re looking for: this.resourcePath ?
It is the full path to the require()’d file. Also keep in mind, that loaders also preprocess the entry files - so this little source manipulation you have in mind, is litterally applied everywhere.

The this.resourcePath is always empty for me - it's worth mentioning that I'm not using the loader with the require hook, I'm setting on my webpack.config:
loaders: [{ test: /\.jsx?$/, loader: 'console', exclude: /(node_modules)/ }]

@lucasmotta When you are not using it with the require() hook, how else are you using it, then? Loaders are only triggered on either requiring a file, or using AMD-style define(...).

@IngwiePhoenix sorry if I was not clear before. I'm using require to... require my modules. But I'm not using the require(loader!file.js) approach. I'm using Loaders by Config instead.
If I just do a console.log(this); on the loader I'm building, this is the information I get:
{ data: undefined,
  inputValue: undefined,
  query: '',
  async: [Function: async],
  callback: [Function] }

As you can see, there's no details of the module itself besides the source code of the module.

Thats absolutely normal o.o
It doesnt matter if you use a loader by config or as a query within the require-call - the result is the same. You probably should look at this.prototype, or the docs on how to write a loader. Trust me, the properties are all given, but jsut trying to log the current object doesnt give all the variables that are really offered. I dont know why but its simply like that...

this._module.rawRequest

Closing as a solution was presented. If still relevant, feel free to re-open at Stack Overflow.


Add setting to display SHA256 of transaction script, fix testnetwork magic

Checklist

[x] App update process has been followed
[X] Target branch is develop
[X] Application version has been bumped

This PR brings 1 fix and 2 new features

Update testnetwork magic number (source)
Add a setting that will show the SHA256 hash of the transaction.script field when reviewing the transaction. The feature is disabled for nano-s because it causes a stack overflow. I'm short 28 bytes but did not find a place where to save it (lowering MAX_TRANSACTION_LEN was the obvious choice, but that's not backwards compatible and I'm afraid it will break for one of the projects on chain (like Flamingo).
Add a setting that will allow for specifying the Signer.account field display format. Default is as script hash (same as before), new is as NEO address

Creating new golden run files creates a lot of screenshots that seem unchanged. Unclear to me why, but let me know what to do with those.

https://ledgerhq.atlassian.net/browse/B2CA-1868


KNOX-843 - Client side HA

What changes were proposed in this pull request?
This PR introduces a way for Knox to load balance backend clients. This is done by introducing 3 parameters in HaProvider

enableStickySession - Enables sticky sessions
stickySessionCookieName - Customize sticky session cookie name, default is KNOX_BACKEND-{serviceName}
noFallback - when this flag is set, Knox will return a 502 (Bad Gateway) if a request comes with a cookie and the corresponding backend is unavailable. This is applicable only when stickySessionCookieName is enabled.
enableLoadBalancing - Enable loadbalancing, roundrobin requests to backend HA urls

     <provider>
            <role>ha</role>
            <name>HaProvider</name>
            <enabled>true</enabled>
            <param>
                <name>WHOAMI</name>
                <value>enabled=true;maxFailoverAttempts=3;failoverSleep=1000;enableStickySession=true;noFallback=true</value>
            </param>
        </provider>

When enabled, knox dispatch will round-robin requests to the URLs listed in the HA configuration unlike previously where knox only chooses other URL after a failover.
The sessions are sticky so same session requests will always end up dispatching to the same backend.
How was this patch tested?
This patch was manually tested using

curl for multiple different sessions

(base) ➜  temp curl -iku admin:admin-password  "https://localhost:8443/gateway/test/whoami/"
HTTP/1.1 200 OK
Date: Mon, 05 Oct 2020 19:20:03 GMT
Set-Cookie: KNOXSESSIONID=node0flaeprbtixj919ozympe23muc2.node0; Path=/gateway/test; Secure; HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/gateway/test; Max-Age=0; Expires=Sun, 04-Oct-2020 19:20:04 GMT
Set-Cookie: KNOX_BACKEND-WHOAMI=4336ad0a09ba5de5c19d294a6e1be4bd5b0aa62bc0537b2c1951ad50b1aca033; Path=/gateway/test; Secure; HttpOnly
Content-Length: 10

 SERVER 1
(base) ➜  temp curl -iku admin:admin-password  "https://localhost:8443/gateway/test/whoami/"
HTTP/1.1 200 OK
Date: Mon, 05 Oct 2020 19:20:05 GMT
Set-Cookie: KNOXSESSIONID=node01bynsokjpm43t1ag2zogir8wht3.node0; Path=/gateway/test; Secure; HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/gateway/test; Max-Age=0; Expires=Sun, 04-Oct-2020 19:20:05 GMT
Set-Cookie: KNOX_BACKEND-WHOAMI=d2eea4def3bbb002420943cc4d7983627cf7132b6154a400597c379a1254189b; Path=/gateway/test; Secure; HttpOnly
Content-Length: 10

 SERVER 2

curl for sticky sessions

(base) ➜  temp curl -iku admin:admin-password -c cookies.txt -b cookies.txt "https://localhost:8443/gateway/test/whoami/"

HTTP/1.1 200 OK
Date: Mon, 05 Oct 2020 19:22:05 GMT
Set-Cookie: KNOXSESSIONID=node0117mojjq6uevh1p1nl2v5iumgo5.node0; Path=/gateway/test; Secure; HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/gateway/test; Max-Age=0; Expires=Sun, 04-Oct-2020 19:22:06 GMT
Set-Cookie: KNOX_BACKEND-WHOAMI=d2eea4def3bbb002420943cc4d7983627cf7132b6154a400597c379a1254189b; Path=/gateway/test; Secure; HttpOnly
Content-Length: 10

 SERVER 2
(base) ➜  temp curl -iku admin:admin-password -c cookies.txt -b cookies.txt "https://localhost:8443/gateway/test/whoami/"

HTTP/1.1 200 OK
Date: Mon, 05 Oct 2020 19:22:06 GMT
Content-Length: 10

 SERVER 2
(base) ➜  temp curl -iku admin:admin-password -c cookies.txt -b cookies.txt "https://localhost:8443/gateway/test/whoami/"

HTTP/1.1 200 OK
Date: Mon, 05 Oct 2020 19:22:07 GMT
Content-Length: 10

 SERVER 2

curl with sticky sessions with fallback off

(base) ➜  temp curl  -iku admin:admin-password -c cookies.txt -b cookies.txt "https://localhost:8443/gateway/test/whoami/"
HTTP/1.1 502 Bad Gateway
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=iso-8859-1
Content-Length: 507

<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 502 Service connection error, HA failover disabled</title>

HTTP ERROR 502 Service connection error, HA failover disabled

URI:	/gateway/test/whoami/

STATUS:	502

MESSAGE:	Service connection error, HA failover disabled

SERVLET:	test-knox-gateway-servlet

Browser

@lmccay I updated the PR with requested changes go through it and let me know what you think. I had to do some refactoring because I realized that we have a ton of custom HA implementations (e.g. Atlas) which would not get this feature because of how they just extended DefaultHADispatch. I did some refactoring so that custom dispatches should be able to use these flags.


Update index.html

updated index.html

@RajSrinivasJena   thnx for contributing , try this year aswell with updated repo and make sure to follow me and star this repo so that you don't miss updates regarding the new changes and issues during Hacktoberfest 2020.


Updating PSSCriptAnalyzer Rules causes PowerShell session to terminate

Steps to Reproduce:

Command pallet, PowerShell: Select PSScriptAnalyzer Rules
Enable Rule
Click Confirm
1510161746669.log

Reproduces without extensions: No
Option is not available without PowerShell extension

Possibly resolved with build 1.18.0


[PORT] Add badges for Win functional tests and Linux functional tests

Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/3950

Fixes: https://github.com/microsoft/botbuilder-dotnet/issues/3917

This work has already been done.
https://github.com/microsoft/botbuilder-js/pull/2186


python dependency module version tweaks

If you're following the Get Started instructions, you should also add these just before the final call to python generate.py:
$ pip uninstall cryptography
$ pip install --upgrade cryptography==36.0.2
$ pip install --upgrade jinja2==3.1.2

Alternatively maybe update one of the requirements files.
HTH

Can you say why?  I have cryptography==42.0.5 and no issues.


Safari on Mac/iOS misreports upload speed by a factor of 10

Every time I test with a Safari instances on a current Mac or iOS device, the upload speed is roughly ten times higher than it should be. The download speed makes sense though.
For instance, I'm on a 1g network and running speed using Chrome seems to report correctly, but with Safari I get this:

My deployment is using version 0.1.2 of the helm chart.

https://github.com/openspeedtest/Speed-Test/issues/31#issuecomment-1235671004
https://github.com/openspeedtest/Speed-Test/issues/4#issuecomment-1229157193

whoops ..


add ajp max threads patrameter for server.xml.

I added ajp_max_threads parameter for server.xml.

Sorry. I'm mistaken when Re-create pull request.

First off I'm very sorry that it's taken so long to get back to you on this PR.  For a significant period of time there was no active Chef Software Inc. maintainer for this repository and things languished.  We're now actively maintaining this cookbook again, and as part of that I've rewritten the cookbook with new custom resources for installing Tomcat from Apache Org sources.  This will ship in an upcoming 2.0 release and then we'll remove the existing recipes and providers in a future 3.X release.  With those new providers I believe the need for this change goes away so I'm going to close this out.  I encourage you to give the new providers a try and let me know if we can tackle more Tomcat management without the attributes bloat the current code suffers from.  They're on the master branch and once the documentation and testing improves a bit they'll be released as a 2.0 cookbook.


feat(connect): network interface binding with bind_local_device

This PR adds interface/device binding just like in curl:
$ curl --interface wlan0 'https://api.ipify.org'
<IP_ADDRESS>

It's needed, because sometimes binding to local IP just doesn't work (for example raspberry pi wlan0).
Also, when DHCP IP changes, the program would have to update local IPv4 and IPv6.
Solution to that is binding to an interface name, which does not change.
Also, I've added a small fix for IPv6 which was I've found a few months ago - it was kinda annoying to debug on an IPv6 machine.
Unfortunatelly, 536b3a8 wasn't tested. As I remember there's something wrong with IP v4/v6 handling... not sure if that's IPv6 -> IPv4.

Please merge e8d523e579a262e5901a00e6248bd315f0352afe at least :kissing_heart: :stuck_out_tongue_winking_eye:


LibreOfficeWriter_DirectFormating.au3 Misspelled

Bug report
Bug Report Name:
**	|-->:
Brief Description:
**	|-->:

The file LibreOfficeWriter_DirectFormating.au3, is misspelled.
Should be named: LibreOfficeWriter_DirectFormatting.au3

Describe the bug
A clear and concise description of what the bug is.
**	|-->:
How to reproduce
Steps to reproduce the behavior (e.g.):

Go to '...'
Call function '...' with '...'
Wrong action occurred or error received

Expected behavior
A clear and concise description of what you expected to happen.
**	|-->:
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
**	|-->: Not sure if you want to rename it or not?
System under test
Please complete the following information.

OS: [e.g. Windows 10]
OS Arch.: [e.g. X64]
LibreOffice Component: [e.g. Writer, Calc]
LibreOffice version: [e.g. <IP_ADDRESS>]
Au3LibreOffice Version: [e.g. <IP_ADDRESS>]

I just merge: https://github.com/mlipok/Au3LibreOffice/pull/90
If no more issue here please close this issue.


[cmake] Only check HostCompatibilityLibs for bootstrapping builds

Locally I build debug builds without the standard library, using a copy of the stdlib in my release build. This hit a CMake error here since the HostCompatibilityLibs target isn't defined. Update to only access it when doing a bootstrapping build.

@edymtt Not sure if this is the best fix, let me know if you have any better ideas

@swift-ci please test

@swift-ci please test


Allow to get a diff from 2 versions of a module (component or application)

Top level issue: nuvla/nuvla#40

please provide a diagram of the desired rendering

Does our text editor component support diffing text?  If so we could start with a simple diff of the versions as json.

We use code-mirror:
Simple one git like - https://codemirror.net/mode/diff/index.html
Complex one which allow to merge lines: https://codemirror.net/demo/merge.html


feat: support agent memory

Record agent's QA messages into memory, sqlite-based memory implemented.

merged into wz/dev


android WebRTC Issue - Navigator.MediaDevice is not presented in your device

hi, when i trying to run the example "three.js/examples/dev.html" i got thr error: WebRTC Issue - Navigator.MediaDevice is not presented in your device
my device information is below
OS: android 12
Brower: chrome
i have granted the app the access to the camera.
can anyone give me some help? thanks a lot.
https://github.com/qianxifu/myImages/blob/main/arjs_20221207145341.jpg

Hi @qianxifu that's strange, what device type are you using?

@kalwalt i solved it. it must access with https


How change zoom widget position?

How change zoom widget position from default top-left to any other?

import { MapContainer, TileLayer, useMap, ZoomControl } from "react-leaflet";

<MapContainer zoomControl={false}>
    <TileLayer
         url={`http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}`}
         subdomains={["mt0", "mt1", "mt2", "mt3"]}
      />
    <ZoomControl position="bottomright" />
</MapContainer>

How change position without React?
Also, position attribute does not have effect.


Don't use cache for minted

Option clash ... \setminted ?

Fixed.

Is there any reason to not use the cache ?
Because the cache is designed to speed up the compilation.

I don't know the exact reasons, but in the case of ZdS, a PDF is compiled once an for all, so the cache makes little sense. But I let @Karnaj justify its reasons ;)

If this is the only reason, and even if this template is designed for ZdS, I think is a bad idea to "hardcode" the deactivation of the cache. Maybe a variable which can be set by the user is more relevant.
For example, I use this template has my LoadClass for my template for my university report. So I need to recompile many times my report, if this option is disabled, this will take a while (well, even more than usual) to (re)compile the report which contains many block of code.

It seems that the cache may cause some issues (probably cache issues when we got a PDF without the blocks of code). But you're right, an option is a better choice. @Heziode

I think we can merge now @pierre-24 @Heziode ?

Yes we can ;)