FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}

i get problem when i run following  cmd,anyone can help?
# ansible-playbook local_prepare.yml

PLAY [do local preparation] ********************************************************************************************************************************

TASK [local : Stop if ansible version is too low, make sure that the Ansible version is Ansible 2.4.2 or later, otherwise a compatibility issue occurs.] ***
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [local : create downloads and resources directories] **************************************************************************************************
changed: [localhost] => (item=/opt/tidb-ansible/downloads)
changed: [localhost] => (item=/opt/tidb-ansible/resources)
changed: [localhost] => (item=/opt/tidb-ansible/resources/bin)

TASK [local : create cert directory] ***********************************************************************************************************************

TASK [local : create packages.yml] *************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
	to retry, use: --limit @/opt/tidb-ansible/retry_files/local_prepare.retry

PLAY RECAP *************************************************************************************************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=1

ERROR MESSAGE SUMMARY **************************************************************************************************************************************
[localhost]: Ansible FAILED! => playbook: local_prepare.yml; TASK: local : create packages.yml; message: {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}

Ask for help:
Contact us<EMAIL_ADDRESS>It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

my inventory file
# cat inventory.ini
## TiDB Cluster Part
[tidb_servers]
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222

[tikv_servers]
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222

[pd_servers]
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222

## Monitoring Part
# prometheus and pushgateway servers
[monitoring_servers]
<IP_ADDRESS>:22222

[grafana_servers]
<IP_ADDRESS>:22222

# node_exporter and blackbox_exporter servers
[monitored_servers]
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222
<IP_ADDRESS>:22222

## Global variables
[all:vars]
deploy_dir = /data/deploy

# ssh via normal user
ansible_user = tidb

and ansible log
2018-04-16 17:04:09,316 p=25703 u=root |  PLAY [do local preparation] ********************************************************************************************************************************
2018-04-16 17:04:09,356 p=25703 u=root |  TASK [local : Stop if ansible version is too low, make sure that the Ansible version is Ansible 2.4.2 or later, otherwise a compatibility issue occurs.] ***
2018-04-16 17:04:09,455 p=25703 u=root |  ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
2018-04-16 17:04:09,467 p=25703 u=root |  TASK [local : create downloads and resources directories] **************************************************************************************************
2018-04-16 17:04:10,575 p=25703 u=root |  changed: [localhost] => (item=/opt/tidb-ansible/downloads)
2018-04-16 17:04:11,358 p=25703 u=root |  changed: [localhost] => (item=/opt/tidb-ansible/resources)
2018-04-16 17:04:12,117 p=25703 u=root |  changed: [localhost] => (item=/opt/tidb-ansible/resources/bin)
2018-04-16 17:04:12,130 p=25703 u=root |  TASK [local : create cert directory] ***********************************************************************************************************************
2018-04-16 17:04:12,226 p=25703 u=root |  TASK [local : create packages.yml] *************************************************************************************************************************
2018-04-16 17:04:12,366 p=25703 u=root |  fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
2018-04-16 17:04:12,366 fail [localhost]: Ansible FAILED! => playbook: local_prepare.yml; TASK: local : create packages.yml; message: {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
2018-04-16 17:04:12,380 p=25703 u=root |        to retry, use: --limit @/opt/tidb-ansible/retry_files/local_prepare.retry

2018-04-16 17:04:12,380 p=25703 u=root |  PLAY RECAP *************************************************************************************************************************************************
2018-04-16 17:04:12,381 p=25703 u=root |  localhost                  : ok=2    changed=1    unreachable=0    failed=1
2018-04-16 17:04:12,382 p=25703 u=root |  ERROR MESSAGE SUMMARY **************************************************************************************************************************************
2018-04-16 17:04:12,382 p=25703 u=root |  [localhost]: Ansible FAILED! => playbook: local_prepare.yml; TASK: local : create packages.yml; message: {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}

2018-04-16 17:04:12,382 p=25703 u=root |  Ask for help:
2018-04-16 17:04:12,383 p=25703 u=root |  Contact us<EMAIL_ADDRESS>2018-04-16 17:04:12,383 p=25703 u=root |  It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

@justlooks You can't remove varaibes in inventory.ini file,  see https://github.com/pingcap/tidb-ansible/blob/master/inventory.ini#L58.

If you still have issues, please re-open or create a new issue.

I met the similar issue.  When i running the ansible-playbook local_prepare.yml i got the error of
PLAY [do local preparation] ******************************************************************************************************************************************************

TASK [local : Stop if ansible version is too low, make sure that the Ansible version is Ansible 2.4.2 or later, otherwise a compatibility issue occurs.] *************************
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|version_compare` instead use `result is version_compare`. This feature will be removed in
version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [local : create downloads and resources directories] ************************************************************************************************************************
ok: [localhost] => (item=/home/tidb-ansible/downloads)
ok: [localhost] => (item=/home/tidb-ansible/resources)
ok: [localhost] => (item=/home/tidb-ansible/resources/bin)
ok: [localhost] => (item=/home/tidb-ansible/resources/bin/binlog_kafka)

TASK [local : create cert directory] *********************************************************************************************************************************************
skipping: [localhost]

TASK [local : create packages.yml] ***********************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'tidb_version' is undefined"}
	to retry, use: --limit @/home/tidb-ansible/local_prepare.retry

PLAY RECAP ***********************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=1

And my inventory.ini as below:
## TiDB Cluster Part
[tidb_servers]
<IP_ADDRESS>

[tikv_servers]
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>

[pd_servers]
<IP_ADDRESS>

[spark_master]

[spark_slaves]

[lightning_server]

[importer_server]

## Monitoring Part
# prometheus and pushgateway servers
[monitoring_servers]
<IP_ADDRESS>

[grafana_servers]
<IP_ADDRESS>

# node_exporter and blackbox_exporter servers
[monitored_servers]
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>

[alertmanager_servers]
<IP_ADDRESS>

[kafka_exporter_servers]

## Binlog Part
[pump_servers]

[drainer_servers]

## Group variables
[pd_servers:vars]
# location_labels = ["zone","rack","host"]

## Global variables
[all:vars]
deploy_dir = /home/tidb/deploy

## Connection
# ssh via normal user
ansible_user = tidb

cluster_name = test-cluster

tidb_version = latest

# process supervision, [systemd, supervise]
process_supervision = systemd

timezone = Asia/Shanghai

enable_firewalld = False
# check NTP service
enable_ntpd = True
set_hostname = False

## binlog trigger
enable_binlog = False

# kafka cluster address for monitoring, example:
# kafka_addrs = "<IP_ADDRESS>:9092,<IP_ADDRESS>:9092,<IP_ADDRESS>:9092"
kafka_addrs = ""

# zookeeper address of kafka cluster for monitoring, example:
# zookeeper_addrs = "<IP_ADDRESS>:2181,<IP_ADDRESS>:2181,<IP_ADDRESS>:2181"
zookeeper_addrs = ""

# enable TLS authentication in the TiDB cluster
enable_tls = False

# KV mode
deploy_without_tidb = False

# Optional: Set if you already have a alertmanager server.
# Format: alertmanager_host:alertmanager_port
alertmanager_target = ""

grafana_admin_user = "admin"
grafana_admin_password = "admin"

### Collect diagnosis
collect_log_recent_hours = 2

enable_bandwidth_limit = True
# default: 10Mb/s, unit: Kbit/s
collect_bandwidth_limit = 10000

Seems my variables in inventory file are correct.

There was no problem with the local test, and I suspected that other configurations were modified, such as ansible.cfg.

If you still have issues, please re-open or create a new issue.

I met the similar issue when to run ansible-playbook local_prepare.yml
If I removed ansible_connection=local from inventory.ini, will be OK.

I have met the same problem with u.
You can find somewhere including "tidb_version*" in your playbook configuration files,possibly,it shows like "tidb_version.." and it conflict with the python rules,therefore,u can use "_" instead of ".".
That is my solution,hoping it will work.

Make sure that you are running ansible-playbook from within the tidb-ansible directory. Otherwise ansible will try to look for the inventory in the default location.


Appstudio update test-component-pac-dwco

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-dwco-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
8 seconds
init

✅ Succeeded
18 seconds
clone-repository

✅ Succeeded
36 seconds
build-container

✅ Succeeded
9 seconds
deprecated-base-image-check

✅ Succeeded
9 seconds
inspect-image

✅ Succeeded
34 seconds
clamav-scan

✅ Succeeded
12 seconds
clair-scan

✅ Succeeded
11 seconds
sbom-json-check

✅ Succeeded
17 seconds
label-check

✅ Succeeded
16 seconds
optional-label-check

✅ Succeeded
6 seconds
show-summary


New Feature: check internet connection when state and district list's spinner is clicked. .

Description:

In this app, you will find many sections where all the States' and Districts' list are fetching from an API (Cowin Public API) when user click it.
As It is fetching with the help of the internet, therefore, we need to make sure that when users will click the pop-up menu the internet connection should be activated. and If not then please show the dialog box.

Existing Demo :
https://user-images.githubusercontent.com/76570320/136094195-46df6809-64f9-4358-a9fd-c1998a1d9f9b.mp4
DialogBox warning should be like:

The UI already exists there in the app. Just use it.

PR Instruction:

Issue will be assigned on a first come first serve basis.
If you are thinking to make a pr then at first be sure to get assigned.
before pushing your PR please make sure to fetch upstream.
your pr should be pushed on the develop branch only.
try to complete your assigned task within 3 to 5 days and if you need more time then please let me know. As the program has limited time only so please try to complete as fast as you can.
With your PR try to send a screenshot or screen recording of your work

@ashgautamDev Any Updates?

@ashgautamDev  please join our group for discussion.
CLICK HERE TO JOIN.


On iOS, there is no audio when playing videos

I'm trying to use a package to select videos from the gallery and although the video itself plays fine, even if I set the volume to 1, 1.0, 100, etc., the audio is never heard. I even added a slider with the volume control and I didn't get any major results.

Facing the same issue, audio plays fine on Android.

Ah found the reason. Set Silent Mode to off.
The device was on Silent Mode and that's why audio was muted. Video plays fine with audio on Apple Photos and that is what I was using to check if audio is working for videos on the device.

I found a fix for my issue. Had to set AVAudioSession to playback on iOS for audio to work on silent mode.
Here's the code: https://github.com/ente-io/ente/pull/3037/files


Caliptra 2p0 spec updates (hardware architectural sections for Caliptra 2p0 and Subsystem)

There are some FIXMEs added, working on them but want to push this through for reviews and merge; and in parallel work on the additional FIXMEs

@varuns-nvidia - if there are no other opens, you want to mark this resolved?

@jhprabhu - you can merge this PR once @varuns-nvidia or @JohnTraverAmd approve


Containerd cannot pull image from insecure registry

Description
I deployed Harbor (<IP_ADDRESS>) in my Kubernetes cluster and pushed an image (<IP_ADDRESS>/library/alpine) into it. When I tried to manually pull the image from a worker node (it uses containerd as container runtime and there is no Docker on this node at all) of my Kubernetes cluster, it failed:
$ crictl pull <IP_ADDRESS>/library/alpine
FATA[0000] pulling image failed: rpc error: code = Unknown desc = failed to resolve image "<IP_ADDRESS>/library/alpine:latest": no available registry endpoint: failed to do request: Head https://<IP_ADDRESS>/v2/library/alpine/manifests/latest: x509: certificate signed by unknown authority

I have already setup <IP_ADDRESS> as an insecure registry of containerd, and restarted containerd.
    [plugins.cri.registry]
      [plugins.cri.registry.mirrors]
        [plugins.cri.registry.mirrors."<IP_ADDRESS>"]
          endpoint = ["http://<IP_ADDRESS>"]
        [plugins.cri.registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]

Steps to reproduce the issue:

Push an image into Harbor
Pull the image from Harbor

Describe the results you received:
Failed to pull image from Harbor.
Describe the results you expected:
Successfully pull image from Harbor.
Output of containerd --version:
containerd containerd.io 1.2.6 894b81a4b802e4eb2a91d1ce216b8817763c29fb

Any other relevant information:
$ crictl info
{
  "status": {
    "conditions": [
      {
        "type": "RuntimeReady",
        "status": true,
        "reason": "",
        "message": ""
      },
      {
        "type": "NetworkReady",
        "status": true,
        "reason": "",
        "message": ""
      }
    ]
  },
  "config": {
    "containerd": {
      "snapshotter": "overlayfs",
      "defaultRuntime": {
        "runtimeType": "io.containerd.runtime.v1.linux",
        "runtimeEngine": "",
        "runtimeRoot": "",
        "options": null
      },
      "untrustedWorkloadRuntime": {
        "runtimeType": "",
        "runtimeEngine": "",
        "runtimeRoot": "",
        "options": null
      },
      "runtimes": null,
      "noPivot": false
    },
    "cni": {
      "binDir": "/opt/cni/bin",
      "confDir": "/etc/cni/net.d",
      "confTemplate": ""
    },
    "registry": {
      "mirrors": {
        "<IP_ADDRESS>": {
          "endpoint": [
            "http://<IP_ADDRESS>"
          ]
        },
        "docker.io": {
          "endpoint": [
            "https://registry-1.docker.io"
          ]
        }
      },
      "auths": null
    },
    "streamServerAddress": "<IP_ADDRESS>",
    "streamServerPort": "0",
    "enableSelinux": false,
    "sandboxImage": "k8s.gcr.io/pause:3.1",
    "statsCollectPeriod": 10,
    "systemdCgroup": false,
    "enableTLSStreaming": false,
    "x509KeyPairStreaming": {
      "tlsCertFile": "",
      "tlsKeyFile": ""
    },
    "maxContainerLogSize": 16384,
    "containerdRootDir": "/var/lib/containerd",
    "containerdEndpoint": "/run/containerd/containerd.sock",
    "rootDir": "/var/lib/containerd/io.containerd.grpc.v1.cri",
    "stateDir": "/run/containerd/io.containerd.grpc.v1.cri"
  },
  "golang": "go1.11.8"
}

$ crictl version
Version:  0.1.0
RuntimeName:  containerd
RuntimeVersion:  1.2.6
RuntimeApiVersion:  v1alpha2

@qianzhangxa thanks for reporting. Could you show your whole containerd configuration, please? And could you retry it with upgrading to last version of containerd?  Thanks

@fuweid Here is the whole containerd configuration:
cat /etc/containerd/config.toml
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0

[grpc]
  address = "/run/containerd/containerd.sock"
  uid = 0
  gid = 0
  max_recv_message_size = 16777216
  max_send_message_size = 16777216

[debug]
  address = ""
  uid = 0
  gid = 0
  level = ""

[metrics]
  # Set the metrics TCP address
  address = "<IP_ADDRESS>:1338"
  grpc_histogram = false

[cgroup]
  path = ""

[plugins]
  [plugins.cgroups]
    no_prometheus = false
  [plugins.cri]
    stream_server_address = "<IP_ADDRESS>"
    stream_server_port = "0"
    enable_selinux = false
    sandbox_image = "k8s.gcr.io/pause:3.1"
    stats_collect_period = 10
    systemd_cgroup = false
    enable_tls_streaming = false
    max_container_log_line_size = 16384
    [plugins.cri.containerd]
      snapshotter = "overlayfs"
      no_pivot = false
      [plugins.cri.containerd.default_runtime]
        runtime_type = "io.containerd.runtime.v1.linux"
        runtime_engine = ""
        runtime_root = ""
      [plugins.cri.containerd.untrusted_workload_runtime]
        runtime_type = ""
        runtime_engine = ""
        runtime_root = ""
    [plugins.cri.cni]
      bin_dir = "/opt/cni/bin"
      conf_dir = "/etc/cni/net.d"
      conf_template = ""
    [plugins.cri.registry]
      [plugins.cri.registry.mirrors]
        [plugins.cri.registry.mirrors."<IP_ADDRESS>"]
          endpoint = ["http://<IP_ADDRESS>"]
        [plugins.cri.registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]
    [plugins.cri.x509_key_pair_streaming]
      tls_cert_file = ""
      tls_key_file = ""
  [plugins.diff-service]
    default = ["walking"]
  [plugins.linux]
    shim = "containerd-shim"
    runtime = "runc"
    runtime_root = ""
    no_shim = false
    shim_debug = false
  [plugins.opt]
    path = "/opt/containerd"
  [plugins.restart]
    interval = "10s"
  [plugins.scheduler]
    pause_threshold = 0.02
    deletion_threshold = 0
    mutation_threshold = 100
    schedule_delay = "0s"
    startup_delay = "100ms"

Do you mean there is no such issue with the latest version of containerd?

I have the same issue with the latest version of containerd (1.3.1). I have the following config:
state = "/opt/containerd/run"
root = "/opt/containerd/lib"

[grpc]
  address = "/opt/containerd/run/sock/containerd.sock"
  uid = 0
  gid = 0

[debug]
  address = "/opt/containerd/run/debug.sock"
  level = "info"

[metrics]
  address = ""

[plugins.cri]
  sandbox_image = "apps.domain.com/pause:3.1"

[plugins.cri.registry.mirrors]
  [plugins.cri.registry.mirrors."docker.io"]
    endpoint = ["https://registry-1.docker.io"]
  [plugins.cri.registry.mirrors."apps.domain.com"]
    endpoint = ["https://apps.domain.com"]

Further more, if I do crictl info, I can see the registry appearing in the output:
   "registry": {
      "mirrors": {
        "apps.domain.com": {
          "endpoint": [
            "https://apps.domain.com"
          ]
        },
        "docker.io": {
          "endpoint": [
            "https://registry-1.docker.io"
          ]
        }
      },

@nustiueudinastea I think they are different, what you are trying to pull from is a secure registry, right? But my issue is about insecure registry.

Yes, the premise is slightly different, but I get the same error. Will delete my comment in a bit, if it turns out to be my problem.

@qianzhangxa it seems your registry has certificates and cri-containerd will check the certificate presented by the server. You can retry it with adding certificate in your client side.

@fuweid What I want to try is the insecure registry feature of containerd, that's why I did not add Harbor's certificate to containerd.

ping @Random-Liu , @mikebrow and @dmcgowan
it is ok to set http.Client InsecureSkipVerify to true if mirror endpoint's scheme is http?
https://github.com/containerd/cri/blob/0dcaf6e98719b02ad9a1cf93aa3c7dcb4225f7fc/pkg/server/image_pull.go#L313
cc @qianzhangxa

it is ok to set http.Client InsecureSkipVerify to true if mirror endpoint's scheme is http?

no, this should be an explicit configuration

@fuweid @dmcgowan We can add an option for that.
Here is Docker's doc for insecure-registries:
With insecure registries enabled, Docker goes through the following steps:

First, try using HTTPS.
If HTTPS is available but the certificate is invalid, ignore the error about the certificate.
If HTTPS is not available, fall back to HTTP.

Not sure whether we want that.

@fuweid @dmcgowan @Random-Liu So containerd does not support insecure registry yet? I just followed the instructions here: https://github.com/containerd/cri/blob/master/docs/registry.md#configure-registry-endpoint, and it clearly mentioned an example for insecure registry:
  [plugins.cri.registry.mirrors."test.insecure-registry.io"]
    endpoint = ["http://HostIP2:Port2"]

So such insecure registry configuration in containerd actually cannot work as expected?

Yeah, I think we should fix it.
On Mon, Nov 25, 2019 at 5:34 PM Qian Zhang<EMAIL_ADDRESS>wrote:

@fuweid https://github.com/fuweid @dmcgowan
https://github.com/dmcgowan @Random-Liu https://github.com/Random-Liu
So containerd does not support insecure registry yet? I just followed the
instructions here:
https://github.com/containerd/cri/blob/master/docs/registry.md#configure-registry-endpoint,
and it clearly mentioned an example for insecure registry:
[plugins.cri.registry.mirrors."test.insecure-registry.io"]
endpoint = ["http://HostIP2:Port2"]
So such insecure registry configuration in containerd actually cannot work
as expected?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/containerd/containerd/issues/3847?email_source=notifications&email_token=ABMNLOZX6H6W7RLIQO7ECOTQVR4KVA5CNFSM4JRCIJJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFEMTNQ#issuecomment-558418358,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMNLO2CXDJFVXKQEDZ5QLLQVR4KVANCNFSM4JRCIJJQ
.

The fix: https://github.com/containerd/cri/pull/1345

The fix: containerd/cri#1345

Hi,
I followed the instructions https://github.com/containerd/cri/blob/master/docs/registry.md, to configure an insecure registry. I found the configuration of insecure registry did not work. Here is my containerd configuration.
$ cat /etc/containerd/config.toml
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
plugin_dir = ""
disabled_plugins = []
required_plugins = []
oom_score = 0
imports = ["/etc/containerd/config.toml"]

[grpc]
  address = "/run/containerd/containerd.sock"
  tcp_address = ""
  tcp_tls_cert = ""
  tcp_tls_key = ""
  uid = 0
  gid = 0
  max_recv_message_size = 16777216
  max_send_message_size = 16777216

[ttrpc]
  address = ""
  uid = 0
  gid = 0

[debug]
  address = ""
  uid = 0
  gid = 0
  level = ""

[metrics]
  address = ""
  grpc_histogram = false

[cgroup]
  path = ""

[timeouts]
  "io.containerd.timeout.shim.cleanup" = "5s"
  "io.containerd.timeout.shim.load" = "5s"
  "io.containerd.timeout.shim.shutdown" = "3s"
  "io.containerd.timeout.task.state" = "2s"

[plugins]
  [plugins."io.containerd.gc.v1.scheduler"]
    pause_threshold = 0.02
    deletion_threshold = 0
    mutation_threshold = 100
    schedule_delay = "0s"
    startup_delay = "100ms"
  [plugins."io.containerd.grpc.v1.cri"]
    disable_tcp_service = true
    stream_server_address = "<IP_ADDRESS>"
    stream_server_port = "0"
    stream_idle_timeout = "4h0m0s"
    enable_selinux = false
    sandbox_image = "gcr.azk8s.cn/google_containers/pause-amd64:3.1"
    stats_collect_period = 10
    systemd_cgroup = false
    enable_tls_streaming = false
    max_container_log_line_size = 16384
    disable_cgroup = false
    disable_apparmor = false
    restrict_oom_score_adj = false
    max_concurrent_downloads = 3
    disable_proc_mount = false
    [plugins."io.containerd.grpc.v1.cri".containerd]
      snapshotter = "overlayfs"
      default_runtime_name = "runc"
      no_pivot = false
      [plugins."io.containerd.grpc.v1.cri".containerd.default_runtime]
        runtime_type = "io.containerd.kata.v2"
        runtime_engine = ""
        runtime_root = ""
        privileged_without_host_devices = false
      [plugins."io.containerd.grpc.v1.cri".containerd.untrusted_workload_runtime]
        runtime_type = "io.containerd.kata.v2"
        runtime_engine = ""
        runtime_root = ""
        privileged_without_host_devices = false
      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata]
          runtime_type = "io.containerd.kata.v2"
          runtime_engine = ""
          runtime_root = ""
          privileged_without_host_devices = false
        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
          runtime_type = "io.containerd.runc.v1"
          runtime_engine = ""
          runtime_root = ""
          privileged_without_host_devices = false
    [plugins."io.containerd.grpc.v1.cri".cni]
      bin_dir = "/opt/cni/bin"
      conf_dir = "/etc/cni/net.d"
      max_conf_num = 1
      conf_template = ""
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."xxxx-yyy.com:7443"]
          endpoint = ["https://xxxx-yyy.com:7443"]
      [plugins."io.containerd.grpc.v1.cri".registry.configs]
        [plugins."io.containerd.grpc.v1.cri".registry.configs."xxxx-yyy.com:7443"]
          [plugins."io.containerd.grpc.v1.cri".registry.configs."xxx-yyy.com:7443".tls]
            insecure_skip_verify = true
    [plugins."io.containerd.grpc.v1.cri".x509_key_pair_streaming]
      tls_cert_file = ""
      tls_key_file = ""
  [plugins."io.containerd.internal.v1.opt"]
    path = "/opt/containerd"
  [plugins."io.containerd.internal.v1.restart"]
    interval = "10s"
  [plugins."io.containerd.metadata.v1.bolt"]
    content_sharing_policy = "shared"
  [plugins."io.containerd.monitor.v1.cgroups"]
    no_prometheus = false
  [plugins."io.containerd.runtime.v1.linux"]
    shim = "containerd-shim"
    runtime = "runc"
    runtime_root = ""
    no_shim = false
    shim_debug = false
  [plugins."io.containerd.runtime.v2.task"]
    platforms = ["linux/amd64"]
  [plugins."io.containerd.service.v1.diff-service"]
    default = ["walking"]
  [plugins."io.containerd.snapshotter.v1.devmapper"]
    root_path = ""
    pool_name = ""
    base_image_size = ""

I restarted containerd after configuration. But it seemed not work with  insecure_skip_verify = true, because I got the following output when I run containerd config dump.
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."xxx-yyy.com:7443"]
          endpoint = ["https://xxx-yyy.com:7443"]
      [plugins."io.containerd.grpc.v1.cri".registry.configs]
        [plugins."io.containerd.grpc.v1.cri".registry.configs."xxx-yyy.com:7443"]
          [plugins."io.containerd.grpc.v1.cri".registry.configs."xxx-yyy.com:7443".tls]
            ca_file = ""
            cert_file = ""
            key_file = ""

Output of containerd --version
containerd github.com/containerd/containerd v1.3.1 c7a4f874b3267c499484aae602d1257b12d69e40
When pulling an image using crictl pull xxx-yyy.com:7443/redis-test/nginx:latest, it outputs:
FATA[0000] pulling image failed: rpc error: code = Unknown desc = failed to pull and unpack image "xxx-yyy.com:7443/redis-test/nginx:latest": failed to resolve reference "xxx-yyy.com:7443/redis-test/nginx:latest": get TLSConfig for registry "https://xxx-yyy.com:7443": failed to load CA file: open : no such file or directory

The fix: containerd/cri#1345

Hi,
I followed the https://github.com/containerd/cri/blob/master/docs/registry.md to configure an insecure registry for my Harbor. I have set the insecure_skip_verify option. But it still failed to pull images from my Harbor registry.
Here is my containerd configuration.
$ cat /etc/containerd/config.toml
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
plugin_dir = ""
disabled_plugins = []
required_plugins = []
oom_score = 0
imports = ["/etc/containerd/config.toml"]

[grpc]
  address = "/run/containerd/containerd.sock"
  tcp_address = ""
  tcp_tls_cert = ""
  tcp_tls_key = ""
  uid = 0
  gid = 0
  max_recv_message_size = 16777216
  max_send_message_size = 16777216

[ttrpc]
  address = ""
  uid = 0
  gid = 0

[debug]
  address = ""
  uid = 0
  gid = 0
  level = ""

[metrics]
  address = ""
  grpc_histogram = false

[cgroup]
  path = ""

[timeouts]
  "io.containerd.timeout.shim.cleanup" = "5s"
  "io.containerd.timeout.shim.load" = "5s"
  "io.containerd.timeout.shim.shutdown" = "3s"
  "io.containerd.timeout.task.state" = "2s"

[plugins]
  [plugins."io.containerd.gc.v1.scheduler"]
    pause_threshold = 0.02
    deletion_threshold = 0
    mutation_threshold = 100
    schedule_delay = "0s"
    startup_delay = "100ms"
  [plugins."io.containerd.grpc.v1.cri"]
    disable_tcp_service = true
    stream_server_address = "<IP_ADDRESS>"
    stream_server_port = "0"
    stream_idle_timeout = "4h0m0s"
    enable_selinux = false
    sandbox_image = "gcr.azk8s.cn/google_containers/pause-amd64:3.1"
    stats_collect_period = 10
    systemd_cgroup = false
    enable_tls_streaming = false
    max_container_log_line_size = 16384
    disable_cgroup = false
    disable_apparmor = false
    restrict_oom_score_adj = false
    max_concurrent_downloads = 3
    disable_proc_mount = false
    [plugins."io.containerd.grpc.v1.cri".containerd]
      snapshotter = "overlayfs"
      default_runtime_name = "runc"
      no_pivot = false
      [plugins."io.containerd.grpc.v1.cri".containerd.default_runtime]
        runtime_type = "io.containerd.kata.v2"
        runtime_engine = ""
        runtime_root = ""
        privileged_without_host_devices = false
      [plugins."io.containerd.grpc.v1.cri".containerd.untrusted_workload_runtime]
        runtime_type = "io.containerd.kata.v2"
        runtime_engine = ""
        runtime_root = ""
        privileged_without_host_devices = false
      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata]
          runtime_type = "io.containerd.kata.v2"
          runtime_engine = ""
          runtime_root = ""
          privileged_without_host_devices = false
        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
          runtime_type = "io.containerd.runc.v1"
          runtime_engine = ""
          runtime_root = ""
          privileged_without_host_devices = false
    [plugins."io.containerd.grpc.v1.cri".cni]
      bin_dir = "/opt/cni/bin"
      conf_dir = "/etc/cni/net.d"
      max_conf_num = 1
      conf_template = ""
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."harbor.io"]
          endpoint = ["https://xxx-harbor.com:7443"]
      [plugins."io.containerd.grpc.v1.cri".registry.configs]
        [plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.io"]
          [plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.io".tls]
            insecure_skip_verify = true
          [plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.io".auth]
            username = "admin"
            password = "Harbor12345"
    [plugins."io.containerd.grpc.v1.cri".x509_key_pair_streaming]
      tls_cert_file = ""
      tls_key_file = ""
  [plugins."io.containerd.internal.v1.opt"]
    path = "/opt/containerd"
  [plugins."io.containerd.internal.v1.restart"]
    interval = "10s"
  [plugins."io.containerd.metadata.v1.bolt"]
    content_sharing_policy = "shared"
  [plugins."io.containerd.monitor.v1.cgroups"]
    no_prometheus = false
  [plugins."io.containerd.runtime.v1.linux"]
    shim = "containerd-shim"
    runtime = "runc"
    runtime_root = ""
    no_shim = false
    shim_debug = false
  [plugins."io.containerd.runtime.v2.task"]
    platforms = ["linux/amd64"]
  [plugins."io.containerd.service.v1.diff-service"]
    default = ["walking"]
  [plugins."io.containerd.snapshotter.v1.devmapper"]
    root_path = ""
    pool_name = ""
    base_image_size = ""

When pulling image, it outputs:
crictl pull harbor.io/redis-test/nginx:latest
FATA[0000] pulling image failed: rpc error: code = Unknown desc = failed to pull and unpack image "harbor.io/redis-test/nginx:latest": failed to resolve reference "harbor.io/redis-test/nginx:latest": failed to do request: Head https://xxx-harbor.com:7443/v2/redis-test/nginx/manifests/latest: x509: certificate is valid for test, not xxx-harbor.com
Containerd version:
containerd --version
containerd github.com/containerd/containerd v1.3.2 ff48f57fc83a8c44cf4ad5d672424a98ba37ded6

The containerd has been already updated to v1.3.2.

@fuweid @dmcgowan @Random-Liu So containerd does not support insecure registry yet? I just followed the instructions here: https://github.com/containerd/cri/blob/master/docs/registry.md#configure-registry-endpoint, and it clearly describes an example for insecure registry:
  [plugins.cri.registry.mirrors."test.insecure-registry.io"]
    endpoint = ["http://HostIP2:Port2"]

So such insecure registry configuration in containerd actually cannot work as expected?

@qianzhangxa
Have your issue been resolved?
If so, what is the solution?

Hi, i am facing similar issue. I added harbor as insecure registry in registries.conf , i am able to pull the images if i am using docker pull command but when i use the same image in kubernetes yaml file .. i am getting this "Failed to pull image "harbor.x.x.x.com/test/test-image:v1": rpc error: code = Unknown desc = failed to resolve image "harbor.x.x.x.com/test/test-image:v1": no available registry endpoint: failed to do request: Head https://harbor.x.x.x.com/v2/test/test-image/manifests/v1: x509: certificate signed by unknown authority"

This worked for me FYI
[plugins.cri.registry.mirrors."harbor.allbits.info"]
  endpoint = ["https://harbor.allbits.info"]
[plugins.cri.registry.configs."harbor.allbits.info".tls]
  insecure_skip_verify = true

I changed "io.containerd.grpc.v1.cri" to cri only

This worked for me FYI
[plugins.cri.registry.mirrors."harbor.example.com"]
  endpoint = ["https://harbor.example.com"]
[plugins.cri.registry.configs."harbor.example.com".tls]
  insecure_skip_verify = true

I changed "io.containerd.grpc.v1.cri" to cri instead, and then it worked.

@boeboe Is't this parameter? plugins."io.containerd.grpc.v1.cri".containerd  default_runtime_name = "cri"

I was looking for this problem for several days, but this worked for me, thanks !

This worked for me FYI
[plugins.cri.registry.mirrors."harbor.example.com"]
  endpoint = ["https://harbor.example.com"]
[plugins.cri.registry.configs."harbor.example.com".tls]
  insecure_skip_verify = true

I changed "io.containerd.grpc.v1.cri" to cri instead, and then it worked.

not work for me containerd just restart failed:
 containerd: failed to load TOML from /etc/containerd/config.toml: invalid plugin key URI "cri" expect io.containerd.x.vx

dev-control-plane containerd[6762]: containerd: failed to load TOML from /etc/containerd/config.toml: invalid plugin key URI "cri" expect io.containerd.x.vx

this worked for me:
cat < /etc/containerd/config.toml
version = 2
[plugins]
[plugins."io.containerd.grpc.v1.cri"]
restrict_oom_score_adj = false
sandbox_image = "registry.k8s.io/pause:3.7"
tolerate_missing_hugepages_controller = true
[plugins."io.containerd.grpc.v1.cri".containerd]
default_runtime_name = "runc"
discard_unpacked_layers = true
snapshotter = "overlayfs"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
base_runtime_spec = "/etc/containerd/cri-base.json"
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler]
base_runtime_spec = "/etc/containerd/cri-base.json"
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler.options]
SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".registry]
[plugins."io.containerd.grpc.v1.cri".registry.configs]
[plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.lab.com"]
[plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.lab.com".tls]
insecure_skip_verify = true
cert_file = "/etc/docker/certs.d/harbor.lab.com/harbor.lab.com.cert"
key_file = "/etc/docker/certs.d/harbor.lab.com/harbor.lab.com.key"
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."k8s.gcr.io"]
endpoint = ["https://registry.k8s.io", "https://k8s.gcr.io"]
[proxy_plugins]
[proxy_plugins.fuse-overlayfs]
address = "/run/containerd-fuse-overlayfs.sock"
type = "snapshot"
EOF

Hello everyone!
Could you please help me with the following containerd configuration? Here are the details:
containerd containerd.io 1.6.22 8165feabfdfe38c65b599c4993d227328c231fca
cat /etc/containerd/config.toml
oom_score = -999
[debug]
level = "info"
[plugins.linux]
shim = "/home/kubernetes/bin/containerd-shim"
runtime = "/home/kubernetes/bin/runc"
[plugins.cri]
stream_server_address = "<IP_ADDRESS>"
enable_tls_streaming = false
sandbox_image = "cr.yandex/crpsjg1coh47p81vh2lc/pause:3.9"
[plugins.cri.containerd]
snapshotter = "overlayfs"
[plugins.cri.cni]
bin_dir = "/home/kubernetes/cni/bin"
conf_dir = "/etc/cni/net.d"
conf_template = "/etc/cni/cni.template"
[plugins."io.containerd.grpc.v1.cri".registry]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."<IP_ADDRESS>:8083"]
endpoint = ["http://<IP_ADDRESS>:8083"]
[plugins."io.containerd.grpc.v1.cri".registry.configs]
[plugins."io.containerd.grpc.v1.cri".registry.configs."<IP_ADDRESS>:8083".tls]
insecure_skip_verify = true
ctr --debug  image pull <IP_ADDRESS>:8083/my-image:8.11.3
DEBU[0000] fetching                                      image="<IP_ADDRESS>:8083/my-image:8.11.3"
DEBU[0000] resolving                                     host="<IP_ADDRESS>:8083"
DEBU[0000] do request                                    host="<IP_ADDRESS>:8083" request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, /" request.header.user-agent=containerd/1.6.22 request.method=HEAD url="https://<IP_ADDRESS>:8083/v2/my-image/manifests/8.11.3"
INFO[0000] trying next host                              error="failed to do request: Head "https://<IP_ADDRESS>:8083/v2/my-image/manifests/8.11.3\": http: server gave HTTP response to HTTPS client" host="<IP_ADDRESS>:8083"
ctr: failed to resolve reference "<IP_ADDRESS>:8083/my-image:8.11.3": failed to do request: Head "https://<IP_ADDRESS>:8083/v2/my-image/manifests/8.11.3": http: server gave HTTP response to HTTPS client
Thank you in advance for your assistance!


Workflows

Make sure you add a rust-toolchains files like in Shotover or the clippy check will break when new rust releases happen


Typo in disk.xml

See https://github.com/poxet/Influx-Capacitor/blob/master/Samples/disk.xml#L75
avergae must be average

Allright. Fixed now. Will be deployed with next release. :)


Tell the author that this fails on your system: npm ERR!     node install.js

sudo python ./coco/scripts/devSetup/setup.py error!
npm ERR! Darwin 15.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--python=python"
npm ERR! node v0.10.35
npm ERR! npm  v3.3.9
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/licanlong/Desktop/coco/npm-debug.log
Traceback (most recent call last):
File "./coco/scripts/devSetup/setup.py", line 46, in
setup.setup()
File "/Users/licanlong/Desktop/coco/scripts/devSetup/factories.py", line 82, in setup
super(self.class, self).setup()
File "/Users/licanlong/Desktop/coco/scripts/devSetup/factories.py", line 51, in setup
self.repoCloner.install_node_packages()
File "/Users/licanlong/Desktop/coco/scripts/devSetup/repositoryInstaller.py", line 77, in install_node_packages
raise errors.CoCoError(u"Failed to install node packages")
errors.CoCoError: u'Failed to install node packages\n Please contact CodeCombat support, and include this error in your message.'
OS X EI Capitan 10.11 macbook air

We have a new method of installing the dev environment now; check the wiki for the latest.


Update broke the plugin

With the latest update, the AutoLogisticsDrone Setup is not working, I am not getting any of the drones or vessels assigned when placing the stations.

Thanks for the heads up. The latest version should fix this


Seeding problem

When seeding the application I get  the following error.
  file_get_contents(C:\Users\**\Desktop\CodeProjects\MoS\uploads/tables/settings/ntblschoolregion.sql): Failed to open stream: No such file or directory
Where is the uploads folder?

upon further use, much of the functionality advertised doesn't really work. You can't add schools, and everything is already hardcoded. Is this really used by the ministry of education in Uganda or was this just a concept application?


[DO NOT MERGE] Using AzDeploy for code deploymebt

Proposed changes:

...

Can we close this @uday31in as this has been solved in https://github.com/Azure/ai-hub/pull/157

Closing as discussed.
CC @uday31in


secret-handshake: use cases from x-common

This removes the string cases; the function-under-test is now only
obligated to accept integers.
Note that the now-deleted HINTS.md accepted that this API design was
bad, so it is good to get rid of it.

Reviewers: this is a bit of a shame, as we are getting rid of a unique request of students (to make a function take both a string and a number). But I also think that this problem might be a bit too early to make this request. Do you want to keep it and/or revive this concept in another problem?
The only other problem in which we request students to implement a typeclass is in Clock.

I feel sorry about the gone typeclass, too.
But then again, there are many more Haskell-specific constructs for which it would be nice to have especially designed exercises (just think of all the various Monads).
Sounds like true fun - for true Haskell aficionados.

Trying to think about how http://tinyletter.com/exercism/letters/what-exercism-is-and-isn-t and https://github.com/exercism/exercism.io/issues/3113 apply to us. Libraries seem to go a bit far (even the lens-person exercise is a bit dubious, but now many languages have adopted it - it's useful for immutable nested data). But typeclasses and introducing the various monads seem reasonable, since they are often seen when using the language?

If we do need to make some Haskell specific exercises, then https://github.com/exercism/trackler/issues/22

By the way, if we think we are not yet ready to remove the string cases, I can leave them in - then the only update will be to use the x-common cases.

Thanks for the links, interesting reads!
I also find it enticing to add language-specific (and then even library-specific) exercises, there is always so much more to learn. But I also see the danger to open this can of worms.
Now having said that, here is my opinion:
Those language-specific constructs or libraries do (or at least should) exist for a reason, namely to solve a concrete problem in an easier/more elegant/more fun way. If we can distill this concrete problem in an exercise it should become language-/library-independent and therefore suitable for x-common, too.
Let me be be more concrete:
In the Scala track we have added this topic of Function Overloading. Now I could imagine that this could be sold as almost language-independent? If so let's have a specific exercise for that and we have our typeclass (as used in secret-handshake) back.
Monads might be not so simple. Haskell's built-in support of the concept in the language itself is still exceptional. But it is at least mainstream in the FP community. So do we want to have "Monad" as a general topic, too? Most FP-capable languages have at least popular libraries. Is that enough?
If not then again we can at least pick or add some suitable exercises that can be solved so much easier with the respective monad (but can of course also be solved without it). And then either force the monad in the Haskell track by, say, having it as the exported function's return type. Or gently suggest it in the HINTS.md.

In the Scala track we have added this topic of Function Overloading. Now I could imagine that this could be sold as almost language-independent?

Could that be implemented in any programming language?
I would say "No". Anything that has to do with "how" is inherently language-dependent, including abstract programming concepts. To be truly language independent an exercise must restrict itself to describing inputs and outputs.
I'm not saying that I'm against language-specific problem...


(v2.4.8) Log output does not automatically create directory when it doesn't exist

Description
When running with -r=junit -o=reports/log.xml, if reports folder does not exist, no xml file will be actually generated. I am not sure what's behind this behavior, but gtest framework will create the folder if it doesn't exist.
Steps to reproduce
just run the exe with -r=junit -o=reports/log.xml
Extra information

doctest version: v2.4.8
Operating System: ubuntu 18.04
Compiler+version: gcc 7.5

this could be solved (I think relatively simple) with C++17 std::filesystem
afaik we still support C++11, which makes it a bit tedious as creating a folder is platform dependent.
Maybe this could be a feature enabled only when using C++17?
BTW gcc supports std::filesystem only from version 8 :/

I agree that it’s not very simply to automatically create the directory, but I find it very useful to be able to do so. Mainly because more and more people are doing out-of-source build now, when they do clean build, every sub folder is deleted. Sure, they just need to recreate the folder in their build system (that’s what I did in cmake) for every build regardless the existence of the directory.

Ok I understand, makes sense to me
Can you please provide a minimal working example?
I think I should be able to solve this

I suggest we close as a non-fix due to the following reasons

Easy workaround, just create the directory before running the tests
Implementation with C++ requires a recent standard. This implies that doctest will create or not create the output directory depending on which standard used when compiling the binary, which is frankly more confusing that saying that it does not create the output directory

I suggest we close as a non-fix due to the following reasons

Easy workaround, just create the directory before running the tests
Implementation with C++ requires a recent standard. This implies that doctest will create or not create the output directory depending on which standard used when compiling the binary, which is frankly more confusing that saying that it does not create the output directory

I totally agree on not fixing it. However, silently doing something user never expects is not an acceptable behavior. Simply add a "WARNING, log output directory does not exist, failed to create logs" or something like that should be sufficient. In fact, when users specific to output log to a file, it should immediately fail when directly does not exist. It can be done in many ways.
if such warning exists, it would have saved me at least 2 hours trying to debug the problem deep into our CI.


fix a typo at the singlediode function

[X] Closes #2177
[X] I am familiar with the contributing guidelines
[X] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
[X] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
[X] Pull request is nearly complete and ready for detailed review.
[x] Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Can any maintainer please approve workflows when possible? TIA.

Thanks @luizreiscver!  We hope to see more contributions from you :)


fix(optimizer): Fix nested pagination optimization for m2m relations

When annotating something from the relation into the prefetch queryset for a m2m relation, Django will mistakenly not reuse the existing join and end up resulting in the generation of spurious results.
There's an ongoing fix for this i this ticket: https://code.djangoproject.com/ticket/35677
This is monkey patching older versions of Django which doesn't contain the fix, and most likely won't (Django usually only backports security issues), to fix the issue.
Thanks @SupImDos for providing an MRE in the form of a test for this!
Fix #650
Summary by Sourcery
Fix nested pagination optimization for many-to-many relations in Django 5.1 or older by monkey-patching the _filter_prefetch_queryset and add_q methods to reuse existing aliases and joins.
Bug Fixes:

Fixed an issue where nested pagination with many-to-many relationships generated spurious results in older Django versions.

Enhancements:

Applied a monkey patch to improve pagination performance for nested many-to-many relations in Django 5.1 or older.

Tests:

Added a test case to verify the fix for nested pagination with many-to-many relationships.

Codecov Report
Attention: Patch coverage is 76.19048% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.84%. Comparing base (48b54fd) to head (49a8908).

Files with missing lines
Patch %
Lines

strawberry_django/utils/patches.py
73.68%
10 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #681      +/-   ##
==========================================
- Coverage   89.17%   88.84%   -0.33%
==========================================
  Files          41       42       +1
  Lines        3778     3820      +42
==========================================
+ Hits         3369     3394      +25
- Misses        409      426      +17

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Integration not loading on Home Assistant 2022.3.0

After update to Home Assistant 2022.3.0 I get the following error:
2022-03-03 14:24:01 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package requests==2.22.0: ERROR: Cannot install requests==2.22.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2022-03-03 14:24:01 ERROR (MainThread) [homeassistant.setup] Setup failed for novafos: Requirements for novafos not found: ['requests==2.22.0'].

Change requests==2.22.0 to 2.27.1 in manifest.json


Fix outdated Link

The old link returns a Github Pages 404 error.

Coverage remained the same at 96.793% when pulling 85bb9283fe3c97eadbc71abce0ef87188b1d7e83 on scurker:patch-1 into da6b3ce5b6eaed82350aee09a9a4b7c66322f523 on yannickcr:master.

Thanks.


Change pytest version

Update pytest version to pytest>=6.0 to work with clisops/xesmf  as flagged by @sol1105

@ellesmith88 should we also be less restricted for the other packages? They are only the dev packages ... we can add restrictions as needed (>= and <=)

@cehbrecht Yes, I'll sort that out 👍


Typescript not understand Promise than catch logic

    "typescript": "^2.7.2",
    "typescript-eslint-parser": "^14.0.0",

If I have promise like this:
export default function to<T>(promise: Promise<T>) {
    return promise
        .then((data: T) => {
            return { error: undefined, data };
        })
        .catch((error: Error) => {
            return { error, data: undefined };
        });
}

And after that I add async await with this logic:
public someMethod() {
const { error, data } = await to<SomeType>(SOME PROMISE HERE);

if(error) {
  return;
}

// HERE I WILL NOT BE ABLE TO GET SomeType because Typescript still recognise data as type:
// undefined | SomeType
data.
}

Maybe this is some bug with IDE I don't know. I am usigin Visual Code.

TypeScript doesn't have a way to correlate the types of error and data once you've destructured them into independent variables.
Otherwise, being able to discriminate on undefined or null on a property of an object is an open issue: #24479

That is bad because I need to hack data variable like this: (data as Website[]) to make it work

I think @DanielRosenwasser might have looked at it a bit too quickly... What you have written int TypeScript could easily be improved to accomplish your intent:
export interface ToReturn<T> {
    error: Error | undefined;
    data: T | undefined;
}

export default function to<T>(promise: Promise<T>): Promise<ToReturn<T>> {
    return promise
        .then((data: T) => {
            return { error: undefined, data };
        })
        .catch((error: Error) => {
            return { error, data: undefined };
        });
}

async function someMethod() {
    const { error, data } = await to(Promise.resolve('foo'));

    if(error) {
        return;
    }

    data; // typeof string
}

These sort of basic questions are best asked on StackOverflow or Gitter though.

Actually, @DanielRosenwasser is right, though I am not entirely sure you wanted/needed what Daniel was suggesting.  While it is mildly inconvenient, you can still access the type.  Your original code was still flawed though in representing the return of the function.  Here is a slightly better example which expresses what Daniel was talking about when run under --strictNullChecks:
export type ToReturn<T> = {
    error: Error;
    data: undefined;
} | {
    error: undefined;
    data: T
};

export default function to<T>(promise: Promise<T>): Promise<ToReturn<T>> {
    return promise
        .then((data: T) => {
            return { error: undefined, data };
        })
        .catch((error: Error) => {
            return { error, data: undefined };
        });
}

async function someMethod() {
    const { error, data } = await to(Promise.resolve('foo'));

    if (error) {
        return;
    }

    data; // typeof string | undefined

    if (data) {
        data; // string
    }
}

Yes, in this part
if (error) {
        return;
}

data; // typeof string | undefined

data should be just string but not string | undefined


Iroh node becomes undialable by peer and region id after some time

Not quite sure what the exact cause is, but here is the behaviour I see.
I start an iroh node serving some large test data set:
❯ cargo run --release start ../testdir_large_files
    Finished release [optimized + debuginfo] target(s) in 0.21s
     Running `target/release/iroh start ../testdir_large_files`
Listening addresses:
  xxxx:x
  xxxx:x
DERP Region: 2
PeerID: cytwbysn6cs6jbhdadk6ypmrbg2w3nrcrptl5xlts2yurk4mq5ca

Adding ../testdir_large_files as /Users/rklaehn/projects_git/testdir_large_files...
- /Users/rklaehn/projects_git/testdir_large_files/test1: 95.37 MiB bafkr4icd6acjdcbsb37rbebp5l4qlr5vdu6nwo7sn5ycy2vqe4adoo4dsq
- /Users/rklaehn/projects_git/testdir_large_files/test4: 95.37 MiB bafkr4ibxbyvtaav6hm4lcihxwo7fhwsm6zdicdrg7d2kkamci7ebrcxvwi
- /Users/rklaehn/projects_git/testdir_large_files/test3: 95.37 MiB bafkr4ihsu65eqvc52ac55npj7pazq3rbibxoqlfba6hc7oioswzk3qbfqy
- /Users/rklaehn/projects_git/testdir_large_files/test2: 95.37 MiB bafkr4iaxzds2od3j2keravkt36twebsortcx764tkxlwkchvk7rx54cr3m
Total: 381.47 MiB

Collection: bafkr4ie2r4qddlewwrs55katli6ixiy54fkj5ehtfvjdyucsycux4k7pse
All-in-one ticket: ealcoyhcjxyklzee4manl3b5see3k3nwekf6npw5oollcsflrsduiaicaiafm67fo7cfoagavaayprcxagni6ibrvsllizo6vajvupelumo6cve6sdzs2ur4kbjmbkl6fpxzcaa

Then I start a node that performs random probes to check that the data is still there in regular intervals. Initially the tracker can easily connect to the iroh node, using just peer id and region id (I have hardcoded that to 2, but it does not matter where it comes from).
random blob probe RangeSpecSeq([(0, [27176, 1]), (1, empty)])
random probe RangeSpecSeq([(2, [96217, 1]), (1, empty)])
random blob probe RangeSpecSeq([(0, [94764, 1]), (1, empty)])
random probe RangeSpecSeq([(2, [61393, 1]), (1, empty)])
...

After some time, when restarting the tracker, connecting times out. Only after restarting the server and the tracker does it work again.

Does this happen if you don't do anything with the node as well? eg just start up and let it sit there.

After some time,

what time frame are we talking here? minutes, hours?

5 to 10 minutes I think

I think this happens all the time. Here is an iroh instance serving some stuff. After sitting around for a while it produces this:
2023-10-16T12:06:09.026548Z  INFO magicsock{me=cytwbysn6cs6jbhd}:derp.actor: iroh_net::magicsock::derp_actor: adding connection to derp-2 for home-keep-alive
Listening addresses:
  <IP_ADDRESS>:11204
  <IP_ADDRESS>:11204
DERP Region: 2
PeerID: cytwbysn6cs6jbhdadk6ypmrbg2w3nrcrptl5xlts2yurk4mq5ca

Adding ../testdir_large_files as /Users/rklaehn/projects_git/testdir_large_files...

So, when I start the server and tracker and leave them both running, things work. But then after some time, when the tracker is restarted it can't connect by peer id anymore.

@rklaehn can we close this?


Ammonite not looking in ~/.ivy/cache

Today I updated ammonite to version 0.8.1 and now I have a problem I did not have before. When importing, ammonite used to look for ~/.ivy2/cache but it seems that this is not the case anymore.
iop-iop@ import $ivy.`mysql::mysql-connector-java:5.1.32`
:: resolving dependencies :: mysql#mysql-connector-java_2.12-caller;working
	confs: [default]

:: problems summary ::
:::: WARNINGS
		module not found: mysql#mysql-connector-java_2.12;5.1.32

	==== local: tried

	  /Users/iop/.ivy2/local/mysql/mysql-connector-java_2.12/5.1.32/ivys/ivy.xml

	  -- artifact mysql#mysql-connector-java_2.12;5.1.32!mysql-connector-java_2.12.jar:

	  /Users/iop/.ivy2/local/mysql/mysql-connector-java_2.12/5.1.32/jars/mysql-connector-java_2.12.jar

	==== m2: tried

	  /Users/iop/.m2/repository/mysql/mysql-connector-java_2.12/5.1.32/ivy-5.1.32.xml

	  -- artifact mysql#mysql-connector-java_2.12;5.1.32!mysql-connector-java_2.12.jar:

	  /Users/iop/.m2/repository/mysql/mysql-connector-java_2.12/5.1.32/mysql-connector-java_2.12-5.1.32.jar

	==== central: tried

	  http://repo1.maven.org/maven2/mysql/mysql-connector-java_2.12/5.1.32/mysql-connector-java_2.12-5.1.32.pom

	  -- artifact mysql#mysql-connector-java_2.12;5.1.32!mysql-connector-java_2.12.jar:

	  http://repo1.maven.org/maven2/mysql/mysql-connector-java_2.12/5.1.32/mysql-connector-java_2.12-5.1.32.jar

:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

@vascoosx try
import $ivy.`mysql:mysql-connector-java:5.1.32`

(note :: -> :)

@tkroman it works


Backported gmtpy from pyrocko

Included a modified test program to run without reference to pyrocko
code.  Left a commented section within for GMT test code that will run
on my work computer, in case others have the same issue.

Tim, excellent work! Thank you very very much!


Uncaught TypeError: Cannot set property 'innerHTML' of undefined

[Enter steps to reproduce:]

...
...

Atom: 2.4.0 x64
Electron: 1.3.13
OS: Mac OS X 10.10.5
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot set property 'innerHTML' of undefined
At /Users/natashakelly/Downloads/Learn IDE 2.app/Contents/Resources/app.asar/node_modules/learn-term.js/src/term.js:1413

TypeError: Cannot set property 'innerHTML' of undefined
    at TerminalWrapper.Terminal.refresh (/app.asar/node_modules/learn-term.js/src/term.js:1413:32)
    at TerminalWrapper.Terminal._cursorBlink (/app.asar/node_modules/learn-term.js/src/term.js:1422:8)
    at _blinker (/app.asar/node_modules/learn-term.js/src/term.js:1439:10)

Commands
     -0:44 learn-ide:focus (atom-workspace.workspace.scrollbars-visible-when-scrolling.compact-tab-bar.no-tab-min-width.panel-shadows.panel-contrast.use-animations.compact-tree-view.paint-cursor.theme-atom-material-syntax.theme-learn-ide-material-ui)

Non-Core Packages

Thanks for contributing!
It appears that this is being caused by the learn-ide package, not Atom itself. It may be that there is still a bug in Atom. If so, we'll need the maintainer of the package that is causing the problem to help track that down. You should file this issue on their repository so they can either fix the problem or tell us where the problem is coming from. The Atom FAQ has information on how to contact the maintainers of any Atom community package or theme.


Lamdas don't capture function scoped variables

Aim
Correctly compile constraints described in the body of a function, that are subsequently referenced in the body of a lamda.
Expected behavior
Circuit A (broken):
use dep::std;

fn do_lamda(x: Field) -> Field {
  let y = x + 1;
  let func = |z| {
    std::hash::pedersen([x, y, z])[0]
  };
  func(x)
}

fn main(x: pub Field) {
  constrain do_lamda(x) != 0;
}

The above code should describe a complete ACIR, with execution equivalent to this next program.
Circuit B (working):
use dep::std;

fn main(x: pub Field) {
  let y = x + 1;
  let func = |z| {
    std::hash::pedersen([x, y, z])[0]
  };
  constrain func(x) != 0;
}

Bug
The first code sample drops the constraints described by let y = x + 1; in the body of do_lamda. Here's the ACIR output:
current witness index : 7
public parameters indices : [1]
return value indices : []
BLACKBOX::PEDERSEN [(_1, num_bits: 254), (_2, num_bits: 254), (_1, num_bits: 254)] [ (_3,...,_4)]
DIR::INVERT (_3, out: _5)
EXPR [ (1, _3, _5) (-1, _6) 0 ]
EXPR [ (1, _3, _6) (-1, _3) 0 ]
EXPR [ (-1, _6) 1 ]

Note that the only references to Witness(2) appears in the pedersen input.
In contrast, here's the ACIR that's correctly generated from circuit B:
current witness index : 7
public parameters indices : [1]
return value indices : []
EXPR [ (1, _1) (-1, _2) 1 ]
BLACKBOX::PEDERSEN [(_1, num_bits: 254), (_2, num_bits: 254), (_1, num_bits: 254)] [ (_3,...,_4)]
DIR::INVERT (_3, out: _5)
EXPR [ (1, _3, _5) (-1, _6) 0 ]
EXPR [ (1, _3, _6) (-1, _3) 0 ]
EXPR [ (-1, _6) 1 ]

Note that the first expression decribes Witness(2).
To reproduce

nargo print-acir for Circuit A

Installation method
Compiled from source
Nargo version
nargo_cli 0.3.2 (git version hash: ad3e9fe201ee04215c405b89da8c14d289af3095, is dirty: true)
@noir-lang/noir_wasm version
No response
@noir-lang/barretenberg version
No response
@noir-lang/aztec_backend version
No response
Additional context
No response
Submission Checklist

[ ] Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.

This can be re-reviewed when closure conversion is implemented

@jfecher can this be closed?

Looks to be working now


SW-4728 Remove project filter if there are no projects within the accessions view

SW-4728 Remove project filter if there are no projects within the accessions view
Use projects from API versus seedbank fields within accessions filter multiselect

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #2096

PR #2097   👈

PR #2098

This stack of pull requests is managed by Graphite.

Merge activity

Jan 26, 5:35 PM: @nickgraz started a stack merge that includes this pull request via Graphite.


How to install pull to refresh library

Hi , first tnx from this library ,
I have a problem , and that is how and where i can install pull to refresh libraries like https://github.com/Yalantis/Phoenix and any library like this ?
I did it in rootlayout with id container , but it works with many bugs because these libraries should be used in top of RecyclerView or ListView not Layout
Many tnx

@shobayr Hi. I made a forked version of Phoenix example integrated with Advanced RecyclerView. Can you try this and please let me know if you found any issues. Thanks!
https://github.com/h6ah4i/Phoenix/tree/advrecyclerview_integration_demo


Sync preview-stage with master

Purpose
$subject.
Check List

[ ] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.14 out of 15 committers have signed the CLA.:white_check_mark: azinneera:white_check_mark: riyafa:white_check_mark: HindujaB:white_check_mark: niveathika:white_check_mark: warunalakshitha:white_check_mark: pcnfernando:white_check_mark: Ayodhya94:white_check_mark: nadeeshaan:white_check_mark: Dilhasha:white_check_mark: hevayo:white_check_mark: Kishanthan:white_check_mark: NipunaRanasinghe:white_check_mark: praneesha:white_check_mark: shehan360:x: anupama-pathirageYou have signed the CLA already but the status is still pending? Let us recheck it.


8413 bug - nexec doesn't start on first try

https://github.com/Shippable/pm/issues/8413
On a multi-box install, it doesn't come up
On onebox install locally, it doesn't come up. If you find the stopped nexec container and restart it, it works fine.
Log from stopped nexec container in onebox install:
Traceback (most recent call last):

  File "main.py", line 5, in <module>

    nexecListner = Listen()

  File "/home/shippable/nexec/listen.py", line 9, in __init__

    Base.__init__(self, __name__)

  File "/home/shippable/nexec/base.py", line 34, in __init__

    self.config = Config()

  File "/home/shippable/nexec/config.py", line 32, in __init__

    response = requests.get(url, headers=headers)

  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 71, in get

    return request('get', url, params=params, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 57, in request

    return session.request(method=method, url=url, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 475, in request

    resp = self.send(prep, **send_kwargs)

  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 585, in send

    r = adapter.send(request, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 467, in send

    raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=50000): Max retries exceeded with url: /systemSettings (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f0257796590>: Failed to establish a new connection: [Errno 111] Connection refused',))

It looks like this is because we start microservices before API is accepting connections and nexec doesn't retry as much as the other microservices.  We could either wait until can call API or update nexec to retry longer.


Support for Istio 1.8

Istio 1.8 is coming out soon, we should make sure we have support for filters in:

[x] C++
[x] AssemblyScript
[x] Rust
[x] TinyGo

Implemented by https://github.com/solo-io/wasm/pull/210


ML Features Discovery in Amundsen

RFC outlining the work needed for an MVP version of ML project discovery.

cc @dwarszawski  who created https://github.com/amundsen-io/rfcs/pull/8 , I wonder we should just close the initial RFC for this one.


Add append to gdbinit

Cost me a lot of time in CSAW trying to figure this out (sadly)...
Let my loss be your gain :)

lol, sorry about that :-)
Could you change it to not hardcode the ~/ctf-tools/peda/peda path? Maybe replace it with $PWD/peda?
Hope CSAW went well for you!

When I wake up - haven't slept!
On Monday, September 21, 2015, Yan<EMAIL_ADDRESS>wrote:

lol, sorry about that :-)
Could you change it to not hardcode the ~/ctf-tools/peda/peda path? Maybe
replace it with $PWD/peda?
Hope CSAW went well for you!
—
Reply to this email directly or view it on GitHub
https://github.com/zardus/ctf-tools/pull/22#issuecomment-141834926.

Done - works perfectly now.

Thanks!


Remove .toString('utf-8') for intercepting binary responses

Think if we need to add watermark on the outgoing images.
I think it is better to remove toString, in that the interceptors can decide how to decode the origin response body.
Currently, it can only intercept text body, right ?

any plans to merge this ?

@abualiNT
The owner seems inactive for a while.

Hi @fuminchao , sorry for the delay to get back about your PR.
Unfortunately the only projects we have using interceptor now don't have use case to intercept binary, and we'd rather not push any breaking changes.
If you'd like to publish your fork as an npm packaged we are happy to link your fork with the respective use case in the Similar to section of the README - let us know.

I will open another PR for compatible change


[SPARK-39111][CORE][SQL] Mark overridden methods with @Override annotation

What changes were proposed in this pull request?

This PR marks overridden methods with @Override annotation.
Why are the changes needed?

An overridden method from an interface or abstract class must be marked with @Override annotation. To accurately determine whether the overriding is successful, an @Override annotation is necessary. Meanwhile, once the method signature in the abstract class is changed, the implementation class will report a compile-time error immediately.
Does this PR introduce any user-facing change?

No.
How was this patch tested?

Pass the unit test.

@srowen Hi, I check it again and mark all overridden methods with @override annotation

Merged to master

Thank you @srowen @bjornjorgensen


Refactor/Rename validate commands

The command name was changed to diagnose so the files, variable and function names should reflect that as well. The files were moved under a new diagnose package which required exporting some vars/functions from the cmd package. A new ExecuteMultiCluster function was added to cmd to simplify handling multiple kube contexts.

Let's make sure to merge PRs requiring backports before this one

👍 We can hold off on this for a bit.

bump

Let's make sure to merge PRs requiring backports before this one

We can hold off on this for a bit.

Seems like a good time to merge this. Thanks @tpantelis !

Generally I find this PR very hard to review...
It's huge and has a lot of code change, and GitHub doesn't recognize most of the renames (not sure if you used git mv or it's a GH issue or what).
To compound things further, you did a lot of extra refactoring such as adding ExecuteMultiCluster which rewrites a lot of code in a non-trivial matter.
It would be better if you did the renames (and the necessary changes) in one commit, and extra refactoring (such as extracting ExecuteMultiCluster, EndWith* and others) in a commit on top of it. It could still be part of the same PR, but reviewing such iterative changes is usually easier than reviewing all the changes in one big flat commit.


Support users passing their own http client

for reference, already supported today https://docs.microsoft.com/en-us/graph/sdks/customize-client?tabs=Go


Threads

I understand you mentioned that the threads are currently not supported, but did you get a chance to implement it?

No, unfortunately not. Given my current research interests, I don't get to write a lot of C++ code these days.


"Ignore routes" how to implement??

I can't find any clear documentation on ignore routes.
Can you please give a reference or configuration for excluding routes for translation?
I won't have a pages/blog in my project want to exclude blog from translating.

https://i18n.nuxtjs.org/routing#ignore-routes


Cups attempts to probe, configure unsupported Canon CAPT USB printers

cups version: 2.3.3op1-7
Cups does not support Canon CAPT USB printers (this requires a proprietary
driver which uses /dev/usb/lp0), but these printers are not blacklisted, so
when one is plugged in, cups sets up a new, non-functional printer, and
probes the USB device, the kernel logs a USB disconnect, and disrupts
operation of the Canon driver. Running lpinfo/lpstat also seems to do some probe
and cause a USB device disconnect. The kernel logs:
Jan 23 23:45:29 debian kernel: usblp0: removed
It appears the fix would be to add Canon CAPT printers to
/usr/share/cups/usb/org.cups.usb-quirks as so:
# Canon, Inc. LBP810 Printer
0x04a9 0x260a blacklist

# Canon, Inc. LBP1120 Printer
0x04a9 0x262b blacklist

# Canon, Inc. LBP1210 Printer
0x04a9 0x2617 blacklist

# Canon, Inc. LBP2000 Printer
0x04a9 0x260e blacklist

# Canon, Inc. LBP2900/LBP2900B Printer
0x04a9 0x2676 blacklist

# Canon, Inc. LBP3000 Printer
0x04a9 0x266a blacklist

# Canon, Inc. LBP3010/LBP3018/LBP3050 Printer
0x04a9 0x26da blacklist

# Canon, Inc. LBP3100/LBP3108/LBP3150 Printer
0x04a9 0x26db blacklist

# Canon, Inc. LBP3200 Printer
0x04a9 0x2636 blacklist

# Canon, Inc. LBP3210 Printer
0x04a9 0x2657 blacklist

# Canon, Inc. LBP3250 Printer
# CAPT printer with unknown USB ID
# 0x04a9 0x???? blacklist

# Canon, Inc. LBP3300 Printer
0x04a9 0x267e blacklist

# Canon, Inc. LBP3310 Printer
0x04a9 0x26b9 blacklist

# Canon, Inc. LBP3500 Printer
0x04a9 0x268b blacklist

# Canon, Inc. LBP3600 Printer
0x04a9 0x2654 blacklist

# Canon, Inc. LBP5000 Printer
0x04a9 0x2679 blacklist

# Canon, Inc. LBP5050 Printer
0x04a9 0x26ba blacklist

# Canon, Inc. LBP5100 Printer
0x04a9 0x26a4 blacklist

# Canon, Inc. LBP5200 Printer
0x04a9 0x266e blacklist

# Canon, Inc. LBP5300 Printer
0x04a9 0x26a1 blacklist

# Canon, Inc. LBP6000/LBP6018 Printer
0x04a9 0x271a blacklist

# Canon, Inc. LBP6020 Printer
0x04a9 0x2771 blacklist

# Canon, Inc. LBP6230/LBP6240 Printer
0x04a9 0x2796 blacklist

# Canon, Inc. LBP6200 Printer
0x04a9 0x271b blacklist

# Canon, Inc. LBP6300 Printer
# Possibly also: LBP6300n LBP6310dn
0x04a9 0x26ff blacklist

# Canon, Inc. LBP7010C/7018C Printer
0x04a9 0x271c blacklist

# Canon, Inc. LBP7200C Printer
# Possibly also: LBP7200Cdn
0x04a9 0x26f1 blacklist

# Canon, Inc. LBP9100C Printer
0x04a9 0x26ea blacklist

(as originally reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980973)

@chrisbainbridge Blacklisting these Canon printers won’t help with keeping the kernel driver loaded. As soon as somebody has another USB printer connected it will cause the same problem since the legacy kernel driver cannot be loaded when the USB backend is being used - they both try to claim the same USB devices.
First, the Canon driver needs to be fixed to actually work with CUPS and not work around it.
Second, we should determine why the CUPS USB backend is not compatible with these Canon printers - in my experience the CUPS backend usually does a better job and is less problematic than the usblp driver. If they need quirk rules, then we should add them. But blacklisting in order to use usblp isn’t the reason for the blacklist - that “quirk” is meant for USB printers that don’t actually conform to the USB printer class specification but reuse the class number for their own purposes (and thus don’t work with the CUPS backend or usblp).

@chrisbainbridge Blacklisting these Canon printers won’t help with keeping the kernel driver loaded. As soon as somebody has another USB printer connected it will cause the same problem since the legacy kernel driver cannot be loaded when the USB backend is being used - they both try to claim the same USB devices.
First, the Canon driver needs to be fixed to actually work with CUPS and not work around it.
Second, we should determine why the CUPS USB backend is not compatible with these Canon printers - in my experience the CUPS backend usually does a better job and is less problematic than the usblp driver. If they need quirk rules, then we should add them. But blacklisting in order to use usblp isn’t the reason for the blacklist - that “quirk” is meant for USB printers that don’t actually conform to the USB printer class specification but reuse the class number for their own purposes (and thus don’t work with the CUPS backend or usblp).

@chrisbainbridge Blacklisting these Canon printers won’t help with keeping the kernel driver loaded. As soon as somebody has another USB printer connected it will cause the same problem since the legacy kernel driver cannot be loaded when the USB backend is being used - they both try to claim the same USB devices.

Ok, I had read that the legacy driver and libusb driver can coexist in this old comment from Till Kamppeter: "On one computer a printer using a proprietary kernel-module-based backend and a printer using the libusb-based standard backend can be used in parallel (they can even print at the same time)". Perhaps that is not the case anymore?
If /dev/usb/lp0 is being used by the Canon CAPT driver, and the USB IDs of Canon CAPT printers are blacklisted so cups won't touch a CAPT printer, wouldn't this prevent the issue of cups trying to take over the connection and claim the printer? If a second non-CAPT printer is connected, then wouldn't cups operate as normal, and take over the connection?

First, the Canon driver needs to be fixed to actually work with CUPS and not work around it.
Second, we should determine why the CUPS USB backend is not compatible with these Canon printers - in my experience the CUPS backend usually does a better job and is less problematic than the usblp driver. If they need quirk rules, then we should add them. But blacklisting in order to use usblp isn’t the reason for the blacklist - that “quirk” is meant for USB printers that don’t actually conform to the USB printer class specification but reuse the class number for their own purposes (and thus don’t work with the CUPS backend or usblp).

It would be good to have a better solution but it may not be possible/practical. As far as I know, CAPT printers are not functional without the Canon ccpd daemon which uses the legacy /dev/usb/lp0 type devices. The packages from Canon install a cups backend to /usr/lib/cups/backend/cnusb which forwards printer instructions over TCP to ccpd. ccpd is closed source so can't be modified to use libusb, and even if it could, it couldn't be integrated with cups due to the closed source libraries it requires.
There have been several attempts at creating a functional open source replacement for the CAPT driver (e.g. captdriver, surprisingly still ongoing after 8 years) but unfortunately these haven't been so successful.

@chrisbainbridge Blacklisting these Canon printers won’t help with keeping the kernel driver loaded. As soon as somebody has another USB printer connected it will cause the same problem since the legacy kernel driver cannot be loaded when the USB backend is being used - they both try to claim the same USB devices.

Ok, I had read that the legacy driver and libusb driver can coexist in this old comment from Till Kamppeter: "On one computer a printer using a proprietary kernel-module-based backend and a printer using the libusb-based standard backend can be used in parallel (they can even print at the same time)". Perhaps that is not the case anymore?
If /dev/usb/lp0 is being used by the Canon CAPT driver, and the USB IDs of Canon CAPT printers are blacklisted so cups won't touch a CAPT printer, wouldn't this prevent the issue of cups trying to take over the connection and claim the printer? If a second non-CAPT printer is connected, then wouldn't cups operate as normal, and take over the connection?

First, the Canon driver needs to be fixed to actually work with CUPS and not work around it.
Second, we should determine why the CUPS USB backend is not compatible with these Canon printers - in my experience the CUPS backend usually does a better job and is less problematic than the usblp driver. If they need quirk rules, then we should add them. But blacklisting in order to use usblp isn’t the reason for the blacklist - that “quirk” is meant for USB printers that don’t actually conform to the USB printer class specification but reuse the class number for their own purposes (and thus don’t work with the CUPS backend or usblp).

It would be good to have a better solution but it may not be possible/practical. As far as I know, CAPT printers are not functional without the Canon ccpd daemon which uses the legacy /dev/usb/lp0 type devices. The packages from Canon install a cups backend to /usr/lib/cups/backend/cnusb which forwards printer instructions over TCP to ccpd. ccpd is closed source so can't be modified to use libusb, and even if it could, it couldn't be integrated with cups due to the closed source libraries it requires.
There have been several attempts at creating a functional open source replacement for the CAPT driver (e.g. captdriver, surprisingly still ongoing after 8 years) but unfortunately these haven't been so successful.

@chrisbainbridge The functionality offered by libusb is to detach and re-attach kernel drivers from a particular USB device before claiming (using) the device, which theoretically allows usblp to co-exist but depends on the printers correctly supporting USB...
Anyways, as I mentioned before blacklisting is not the solution. If scanning the USB bus for printers is enough to break these printers, then basically every printer application on the system (be it CUPS with legacy printer drivers or the flood of new CUPS Printer Applications that will be coming out over the next year or so) is going to "break" them. As for the auto-add behavior, that is a question for the distributions not to eagerly try to setup anything that is connected to the USB bus but lacks a driver.
Printer applications may not support or be able to access the local CUPS USB quirks file (particularly once CUPS is shipped as a Snap or other "container" technologies that seem to be the way things are going), so we need to either determine which quirks are needed to make the CUPS USB backend cooperate with these printers or decide that these printers can simply not be supported on Linux. My hope is that there might be some common quirks that can be incorporated into the USB backend and PAPPL (a framework being used for the new CUPS Printer Applications that are replacing printer drivers) so that these old printers can coexist.

@chrisbainbridge The functionality offered by libusb is to detach and re-attach kernel drivers from a particular USB device before claiming (using) the device, which theoretically allows usblp to co-exist but depends on the printers correctly supporting USB...
Anyways, as I mentioned before blacklisting is not the solution. If scanning the USB bus for printers is enough to break these printers, then basically every printer application on the system (be it CUPS with legacy printer drivers or the flood of new CUPS Printer Applications that will be coming out over the next year or so) is going to "break" them. As for the auto-add behavior, that is a question for the distributions not to eagerly try to setup anything that is connected to the USB bus but lacks a driver.
Printer applications may not support or be able to access the local CUPS USB quirks file (particularly once CUPS is shipped as a Snap or other "container" technologies that seem to be the way things are going), so we need to either determine which quirks are needed to make the CUPS USB backend cooperate with these printers or decide that these printers can simply not be supported on Linux. My hope is that there might be some common quirks that can be incorporated into the USB backend and PAPPL (a framework being used for the new CUPS Printer Applications that are replacing printer drivers) so that these old printers can coexist.

Closing this - I don't think we came to a satisfactory solution in general, but those playing along at home with one of these printers can add a file to the /usr/share/cups/usb directory (name doesn't matter) with the above list of printers. No guarantees that this will solve the problem since CUPS isn't the only program that accesses USB printers...


Could GOTURN do multiple object tracking?

@davheld
Great  work!
And I 'm wandering if there is a  multiple object tracking version?

Not currently.  If you have an idea about how to do this, feel free to try it out!


Add support for [!TIP] and [!CAUTION]

Extension Name: marked-alert
Extension Version: 1.2.1

Use case
https://github.com/orgs/community/discussions/16925
Proposal
GitHub seems to have added support for rendering [!TIP] and [!CAUTION].
It would be greatly appreciated if marked-alert could follow suit.

I've released<EMAIL_ADDRESS>to support the current spec. Feel free to explore and let me know if you have any feedback.

Hi @bent10
Hmm, I use marked-alert to convert pdfs with md-to-pdf, and on v2.0.1, the color of the icon and the strings to the right of it, such as Note and Important, seems to be incorrect.
But I'm sorry, I don't know which library is responsible for this problem.

The problem above may be due to the outdated CSS file I am specifying as the base (I am specifying v5.4.0 which is available here).

For v5.4.0, you need to include the following CSS:
.markdown-body .markdown-alert.markdown-alert-tip {
  border-left-color: #57ab5a;
}

.markdown-body .markdown-alert.markdown-alert-caution {
  border-left-color: #e5534b;
}

.markdown-body .markdown-alert > .markdown-alert-title {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.markdown-alert-note > .markdown-alert-title {
  color: #539bf5;
}

.markdown-alert-tip > .markdown-alert-title {
  color: #57ab5a;
}

.markdown-alert-important > .markdown-alert-title {
  color: #986ee2;
}

.markdown-alert-warning > .markdown-alert-title {
  color: #c69026;
}

.markdown-alert-caution > .markdown-alert-title {
  color: #e5534b;
}

.mr-2 {
  margin-right: 0.5rem;
}

@bent10 Thanks for the correct CSS Style info!
I will also ask the auther of the github-markdown-css repo if he can update it.


Screenshots not being saved automatically.

Runelite hasn't been saving automatically taken screenshots.
Checked all settings and appears to be correct.
Taking a manual screenshot it gets saved.

You're not the first person who has reported this as being an issue, but as of now we don't have enough information to diagnose this issue. Can you please upload your client logs and describe some situations you would expect a screenshot to be taken but didn't get one?
Also, are you checking the new sub-folders in your screenshots folder? Our 1.6.9 release added screenshot sub-folders so you might need to check a slightly different location for most of the automatic screenshots.

Ah that is it didn't see those new sub folders.
Thanks for you help!


Added support for multiple externalDocs (#1034)

This allows for multiple external docs without breaking current API.
I will add another pull request containing breaking changes for future releases
Fixes #1034

I's just noticing that I worked on the V2.0 schema (because there is no V3.0 schema).
Is there a branch which containg a V3.1 schema that I can rebase onto?

@nirnir93 the 3.0 schema document wasn't finalised when we branched 3.1.0-dev so that's the historical reason this branch doesn't contain that file. For now please just ignore changes to the schema file, we can pick them up later.
It would also be helpful if you could cross-reference pre-existing requests for this change in the PR. Thanks.

How would this be processed by tooling?  What is the difference between the first doc link and the second one?  Are they additive? Are they alternative docs in different languages?
I don't see value that outweighs the additional complexity.

@darrelmiller that's up to the name. i.e. I can specify each doc's language, version, function and the functionality it refers. UI tools should just show all the docs, one by one.
Also #1: After the community starts using it, it may suggest changing the External Documentation Object itself (e.g. adding a labels/tags property to control visibility by some kind of logic such as language).
Also #2: The workaround suggested now (creating an external website for docs) will still work. This will only add power to it (e.g. I can refer multiple endpoints in the site, and handle logic in the site itself. I can also ignore this and just use a single externalDoc).

@nirnir93 When we add a new feature like this to the specification, we are asking many of the tools listed here https://openapi.tools/ to add support for that feature.  While it is only changing a few lines of text to the specification it represents hundreds of hours of work in total for tooling folk.
I would suggest reaching out to some of the people building the tools to ask them if they would be prepared to prioritize adding support for this feature.  When you get their buy in, it will be much easier to make a case for adding it to the specification.
In the meanwhile, I would encourage you to create an x- extension to track your additional documents.


Emoji files cannot be loaded

Hi I'm developing an Electron based application and use emojione-picker. However I soon noticed a serious issue that all emoji files (png and svg) couldn't be loaded since there's no specific schema defined. In the preview.js, the src is setup like src="//cdn.jsdelivr.net/emojione/assets/png/1f91e.png?v=2.2.6:1" which would be interpreted into ** file://** schema in Electron...
Is there a better way to override the src schema or how about specify the schema as http:// somewhere in the code?

Hey @EllisShen, I'd probably recommend downloading the assets into your Electron application and creating a modified css file that maps to their local location rather than reading from the network for a desktop app.


Binary Search in Dart

🚀 Feature
Implementation of Binary search algorithm in Dart.
Have you read the Contributing Guidelines on Pull Requests?
Yes

/assign


progress() and nprocs>1

Is it an idea to have progress() print only if pid=0? Printing progress for all procs does not give more info, right?

Fixed in b8e8e411.

thanks!


Eclipse crashes on pasting something in Editor.

Please provide a brief summary of the bug
It doesn't happen on each paste but it happens occasionally.
I experienced the same behavior on Eclipse 2022 and 2021.
Initially, I was using Eclipse 2022 but encountered this issue, so I did try to downgrade my Eclipse to 2021. But, some happens here as well.
My System:
Ubuntu 22.04 64bit
Processor: i5 11th Gen
Please provide steps to reproduce where possible
// I am working with two IDEs because of my requirements.
// Eclipse 2021 (Java) and Android Studio (Kotlin).
For my particular project, I am manually converting Kotlin code to Java.
I have a Java class.
So to reproduce the issue. Our cycle is copying code snippets from Android studio and pasting them into any method in Java class inside eclipse.
Steps to Reproduce the issue:
i. Copy any Kotlin code snippet (body of any method inside any Kotlin class) from the Android Studio editor.
ii. To reproduce the issue: go inside any function in the Java class.
iii. Paste it in the eclipse into any method.
iv. The crash will occur.
Note: This doesn't happen on each paste, but, occasionally, and frequently.
Expected Results
The content should have been pasted into the Eclipse editor.
Actual Results
Instead, Eclipse is crashing. No results.
What Java Version are you using?
java 17.0.1 2021-10-19 LTS Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39) Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
What is your operating system and platform?
Ubuntu 22.04 64bit
How did you install Java?
With Ubuntu's apt installer.
Did it work before?
No. I experienced the same issue on Eclipse 2021 as well as 2022.

Did you test with other Java versions?
No

Relevant log output
org.eclipse.m2e.logback.configuration: Activated before the state location was initialized. Retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: /home/vish/dev/eclipse/2021/projects/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.<IP_ADDRESS>11002-1029.xml
org.eclipse.m2e.logback.configuration: Initializing logback
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.eclipse.ant.internal.ui.model.AntModel (file:/home/vish/dev/eclipse/2021/plugins/org.eclipse.ant.ui_3.8.100.v20211011-0944.jar)
WARNING: Please consider reporting this to the maintainers of org.eclipse.ant.internal.ui.model.AntModel
WARNING: System::setSecurityManager will be removed in a future release
env: ‘/home/vish/dev/eclipse/2021/projects/processing-addon-for-artisan/src/artisan/brush/Dino.java’: Permission denied
org.eclipse.m2e.logback.configuration: Activated before the state location was initialized. Retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: /home/vish/dev/eclipse/2021/projects/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.<IP_ADDRESS>11002-1029.xml
org.eclipse.m2e.logback.configuration: Initializing logback
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.eclipse.ant.internal.ui.model.AntModel (file:/home/vish/dev/eclipse/2021/plugins/org.eclipse.ant.ui_3.8.100.v20211011-0944.jar)
WARNING: Please consider reporting this to the maintainers of org.eclipse.ant.internal.ui.model.AntModel
WARNING: System::setSecurityManager will be removed in a future release
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8847b3c3c4, pid=54325, tid=54327
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.1+12 (17.0.1+12) (build 17.0.1+12)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (17.0.1+12, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libcairo.so.2+0x643c4]  cairo_region_num_rectangles+0x4
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/vish/dev/eclipse/2021/core.54325)
#
# An error report file with more information is saved as:
# /home/vish/dev/eclipse/2021/hs_err_pid54325.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

@vishalbandre can you try with the latest 17.0.5 and report and crash log here?

Same issue here.  Happened twice today, so far. Some days does not happen at all. Happens with ctrl+v paste.
Version:
Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2022-12 (4.26.0)
Build id: 20221201-1913
OS: Linux, v.4.18.0-448.el8.x86_64, x86_64 / gtk 3.22.30
Java vendor: Oracle Corporation
Java runtime version: 18.0.2+9-61
Java version: 18.0.2
Crash terminal output showed:
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f6081baf654, pid=5080, tid=5081
JRE version: Java(TM) SE Runtime Environment (18.0.2+9) (build 18.0.2+9-61)
Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.2+9-61, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
Problematic frame:
C  [libcairo.so.2+0x65654]  cairo_region_num_rectangles+0x4
The crash happened outside the Java Virtual Machine in native code.
hs_err_pid5080.log

@ianbrown49 18.0.2 is no longer in support, please try latest 19.0.2

Did anyone resolve the issue.

@pegasus0021 This was resolved in the latest release of the Eclipse IDE

w której ? zainstalowałem java19, eclipse Version: 2023-09 (4.29.0) Build id: 20230907-1323 i nadal występuje

Same error happens with
Version: 2023-12 (4.30.0)
Build id: 20231201-2043
Copy paste crashes eclipse it is a blocker