security/tinc: list_ciphers.py no longer parses correcly the output of the openssl command

Hello,
Describe the bug
When creating a network with tinc (VPN -> tinc -> Configuration -> new network), the "Cipher" menu show only "None".
After investing a bit (thanks to https://github.com/opnsense/plugins/issues/198), it seem that the python script "list_ciphers.py" (located at  /usr/local/opnsense/scripts/OPNsense/Tinc/list_ciphers.py  ) no longer parses correctly the output of /usr/bin/openssl enc -help .
What this command give me:
# /usr/bin/openssl enc -help
Usage: enc [options]
Valid options are:
 -help               Display this summary
 -ciphers            List ciphers
 -in infile          Input file
 -out outfile        Output file
 -pass val           Passphrase source
 -e                  Encrypt
 -d                  Decrypt
 -p                  Print the iv/key
 -P                  Print the iv/key and exit
 -v                  Verbose output
 -nopad              Disable standard block padding
 -salt               Use salt in the KDF (default)
 -nosalt             Do not use salt in the KDF
 -debug              Print debug info
 -a                  Base64 encode/decode, depending on encryption flag
 -base64             Same as option -a
 -A                  Used with -[base64|a] to specify base64 buffer as a single line -bufsize val        Buffer size
 -k val              Passphrase
 -kfile infile       Read passphrase from file
 -K val              Raw key, in hex
 -S val              Salt, in hex
 -iv val             IV in hex
 -md val             Use specified digest to create a key from the passphrase
 -iter +int          Specify the iteration count and force use of PBKDF2 -pbkdf2             Use password-based key derivation function 2
 -none               Don't encrypt
 -*                  Any supported cipher
 -rand val           Load the file(s) into the random number generator
 -writerand outfile  Write random data to the specified file
 -engine val         Use engine, possibly a hardware device

I changed a bit the python code to having something working, using the command /usr/bin/openssl enc -ciphers
# /usr/bin/openssl enc -ciphers
Supported ciphers:
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1
-aes-128-cfb8              -aes-128-ctr               -aes-128-ecb
-aes-128-ofb               -aes-192-cbc               -aes-192-cfb
-aes-192-cfb1              -aes-192-cfb8              -aes-192-ctr
-aes-192-ecb               -aes-192-ofb               -aes-256-cbc
-aes-256-cfb               -aes-256-cfb1              -aes-256-cfb8
-aes-256-ctr               -aes-256-ecb               -aes-256-ofb
-aes128                    -aes128-wrap               -aes192
-aes192-wrap               -aes256                    -aes256-wrap
-aria-128-cbc              -aria-128-cfb              -aria-128-cfb1
-aria-128-cfb8             -aria-128-ctr              -aria-128-ecb
-aria-128-ofb              -aria-192-cbc              -aria-192-cfb
-aria-192-cfb1             -aria-192-cfb8             -aria-192-ctr
-aria-192-ecb              -aria-192-ofb              -aria-256-cbc
-aria-256-cfb              -aria-256-cfb1             -aria-256-cfb8
-aria-256-ctr              -aria-256-ecb              -aria-256-ofb
-aria128                   -aria192                   -aria256
-bf                        -bf-cbc                    -bf-cfb
-bf-ecb                    -bf-ofb                    -blowfish
-camellia-128-cbc          -camellia-128-cfb          -camellia-128-cfb1
-camellia-128-cfb8         -camellia-128-ctr          -camellia-128-ecb
-camellia-128-ofb          -camellia-192-cbc          -camellia-192-cfb
-camellia-192-cfb1         -camellia-192-cfb8         -camellia-192-ctr
-camellia-192-ecb          -camellia-192-ofb          -camellia-256-cbc
-camellia-256-cfb          -camellia-256-cfb1         -camellia-256-cfb8
-camellia-256-ctr          -camellia-256-ecb          -camellia-256-ofb
-camellia128               -camellia192               -camellia256
-cast                      -cast-cbc                  -cast5-cbc
-cast5-cfb                 -cast5-ecb                 -cast5-ofb
-chacha20                  -des                       -des-cbc
-des-cfb                   -des-cfb1                  -des-cfb8
-des-ecb                   -des-ede                   -des-ede-cbc
-des-ede-cfb               -des-ede-ecb               -des-ede-ofb
-des-ede3                  -des-ede3-cbc              -des-ede3-cfb
-des-ede3-cfb1             -des-ede3-cfb8             -des-ede3-ecb
-des-ede3-ofb              -des-ofb                   -des3
-des3-wrap                 -desx                      -desx-cbc
-id-aes128-wrap            -id-aes128-wrap-pad        -id-aes192-wrap
-id-aes192-wrap-pad        -id-aes256-wrap            -id-aes256-wrap-pad
-id-smime-alg-CMS3DESwrap  -idea                      -idea-cbc
-idea-cfb                  -idea-ecb                  -idea-ofb
-rc2                       -rc2-128                   -rc2-40
-rc2-40-cbc                -rc2-64                    -rc2-64-cbc
-rc2-cbc                   -rc2-cfb                   -rc2-ecb
-rc2-ofb                   -rc4                       -rc4-40
-rc5-cbc                   -rc5-cfb                   -rc5-ecb
-rc5-ofb                   -seed                      -seed-cbc
-seed-cfb                  -seed-ecb                  -seed-ofb
-sm4                       -sm4-cbc                   -sm4-cfb
-sm4-ctr                   -sm4-ecb                   -sm4-ofb

I remplaced (l. 36)
p = Popen(['/usr/bin/openssl','enc', '-help'],stdin=PIPE, stdout=PIPE, stderr=PIPE, bufsize=-1)
output, error = p.communicate()

for line in error.decode().split('\n'):
    if line.find('Cipher Types') == 0:
        cipher_section = True
        continue
    if cipher_section:
        for item in line.split():
            if len(item) > 1:
                response[item[1:]] = item[1:]

by
import os
read = os.popen('/usr/bin/openssl enc -ciphers | tr -s " " | tr -s " " "\n"  | tail -n +3')

for line in read:
    line = line.rstrip("\n")
    response[line[1:]] = line[1:]

and it is working. That said I'm not sure it is the most beautiful fix.
To Reproduce
VPN -> tinc -> Configuration -> new network

# configctl tinc list ciphers
{"none":"None"}

#  /usr/local/opnsense/scripts/OPNsense/Tinc/list_ciphers.py
{"none":"None"}

Expected behavior
Having the list of ciphers supported by openssl
What it is looking after my little fix:

# configctl tinc list ciphers
{"aes-128-cbc":"aes-128-cbc","aes-128-cfb":"aes-128-cfb","aes-128-cfb1":"aes-128-cfb1","aes-128-cfb8":"aes-128-cfb8","aes-128-ctr":"aes-128-ctr","aes-128-ecb":"aes-128-ecb","aes-128-ofb":"aes-128-ofb","aes-192-cbc":"aes-192-cbc","aes-192-cfb":"aes-192-cfb","aes-192-cfb1":"aes-192-cfb1","aes-192-cfb8":"aes-192-cfb8","aes-192-ctr":"aes-192-ctr","aes-192-ecb":"aes-192-ecb","aes-192-ofb":"aes-192-ofb","aes-256-cbc":"aes-256-cbc","aes-256-cfb":"aes-256-cfb","aes-256-cfb1":"aes-256-cfb1","aes-256-cfb8":"aes-256-cfb8","aes-256-ctr":"aes-256-ctr","aes-256-ecb":"aes-256-ecb","aes-256-ofb":"aes-256-ofb","aes128":"aes128","aes128-wrap":"aes128-wrap","aes192":"aes192","aes192-wrap":"aes192-wrap","aes256":"aes256","aes256-wrap":"aes256-wrap","aria-128-cbc":"aria-128-cbc","aria-128-cfb":"aria-128-cfb","aria-128-cfb1":"aria-128-cfb1","aria-128-cfb8":"aria-128-cfb8","aria-128-ctr":"aria-128-ctr","aria-128-ecb":"aria-128-ecb","aria-128-ofb":"aria-128-ofb","aria-192-cbc":"aria-192-cbc","aria-192-cfb":"aria-192-cfb","aria-192-cfb1":"aria-192-cfb1","aria-192-cfb8":"aria-192-cfb8","aria-192-ctr":"aria-192-ctr","aria-192-ecb":"aria-192-ecb","aria-192-ofb":"aria-192-ofb","aria-256-cbc":"aria-256-cbc","aria-256-cfb":"aria-256-cfb","aria-256-cfb1":"aria-256-cfb1","aria-256-cfb8":"aria-256-cfb8","aria-256-ctr":"aria-256-ctr","aria-256-ecb":"aria-256-ecb","aria-256-ofb":"aria-256-ofb","aria128":"aria128","aria192":"aria192","aria256":"aria256","bf":"bf","bf-cbc":"bf-cbc","bf-cfb":"bf-cfb","bf-ecb":"bf-ecb","bf-ofb":"bf-ofb","blowfish":"blowfish","camellia-128-cbc":"camellia-128-cbc","camellia-128-cfb":"camellia-128-cfb","camellia-128-cfb1":"camellia-128-cfb1","camellia-128-cfb8":"camellia-128-cfb8","camellia-128-ctr":"camellia-128-ctr","camellia-128-ecb":"camellia-128-ecb","camellia-128-ofb":"camellia-128-ofb","camellia-192-cbc":"camellia-192-cbc","camellia-192-cfb":"camellia-192-cfb","camellia-192-cfb1":"camellia-192-cfb1","camellia-192-cfb8":"camellia-192-cfb8","camellia-192-ctr":"camellia-192-ctr","camellia-192-ecb":"camellia-192-ecb","camellia-192-ofb":"camellia-192-ofb","camellia-256-cbc":"camellia-256-cbc","camellia-256-cfb":"camellia-256-cfb","camellia-256-cfb1":"camellia-256-cfb1","camellia-256-cfb8":"camellia-256-cfb8","camellia-256-ctr":"camellia-256-ctr","camellia-256-ecb":"camellia-256-ecb","camellia-256-ofb":"camellia-256-ofb","camellia128":"camellia128","camellia192":"camellia192","camellia256":"camellia256","cast":"cast","cast-cbc":"cast-cbc","cast5-cbc":"cast5-cbc","cast5-cfb":"cast5-cfb","cast5-ecb":"cast5-ecb","cast5-ofb":"cast5-ofb","chacha20":"chacha20","des":"des","des-cbc":"des-cbc","des-cfb":"des-cfb","des-cfb1":"des-cfb1","des-cfb8":"des-cfb8","des-ecb":"des-ecb","des-ede":"des-ede","des-ede-cbc":"des-ede-cbc","des-ede-cfb":"des-ede-cfb","des-ede-ecb":"des-ede-ecb","des-ede-ofb":"des-ede-ofb","des-ede3":"des-ede3","des-ede3-cbc":"des-ede3-cbc","des-ede3-cfb":"des-ede3-cfb","des-ede3-cfb1":"des-ede3-cfb1","des-ede3-cfb8":"des-ede3-cfb8","des-ede3-ecb":"des-ede3-ecb","des-ede3-ofb":"des-ede3-ofb","des-ofb":"des-ofb","des3":"des3","des3-wrap":"des3-wrap","desx":"desx","desx-cbc":"desx-cbc","id-aes128-wrap":"id-aes128-wrap","id-aes128-wrap-pad":"id-aes128-wrap-pad","id-aes192-wrap":"id-aes192-wrap","id-aes192-wrap-pad":"id-aes192-wrap-pad","id-aes256-wrap":"id-aes256-wrap","id-aes256-wrap-pad":"id-aes256-wrap-pad","id-smime-alg-CMS3DESwrap":"id-smime-alg-CMS3DESwrap","idea":"idea","idea-cbc":"idea-cbc","idea-cfb":"idea-cfb","idea-ecb":"idea-ecb","idea-ofb":"idea-ofb","rc2":"rc2","rc2-128":"rc2-128","rc2-40":"rc2-40","rc2-40-cbc":"rc2-40-cbc","rc2-64":"rc2-64","rc2-64-cbc":"rc2-64-cbc","rc2-cbc":"rc2-cbc","rc2-cfb":"rc2-cfb","rc2-ecb":"rc2-ecb","rc2-ofb":"rc2-ofb","rc4":"rc4","rc4-40":"rc4-40","rc5-cbc":"rc5-cbc","rc5-cfb":"rc5-cfb","rc5-ecb":"rc5-ecb","rc5-ofb":"rc5-ofb","seed":"seed","seed-cbc":"seed-cbc","seed-cfb":"seed-cfb","seed-ecb":"seed-ecb","seed-ofb":"seed-ofb","sm4":"sm4","sm4-cbc":"sm4-cbc","sm4-cfb":"sm4-cfb","sm4-ctr":"sm4-ctr","sm4-ecb":"sm4-ecb","sm4-ofb":"sm4-ofb","none":"None"}

Environment
opnsense version:
OPNsense 20.7-amd64
FreeBSD 12.1-RELEASE-p7-HBSD
OpenSSL 1.1.1g 21 Apr 2020
os-tinc version: 1.5_1
I have no idea of the last version of opnsense / tinc plugin it was working last since it's a fresh installation of both.

The script should use /usr/local/bin/openssl and I guess there on LibreSSL it’s still working. 20.7 changes /usr/bin/openssl from 1.0.2 to 1.1.1 so that might be the issue.
On 20.1 OpenSSL flavour was already 1.1.1 at /usr/local/bin/openssl but then it didn’t matter because tinc just needed these values for itself. A bit confusing. 😊
@adschellvis will likely look into this soon. Thanks for the report!
Cheers,
Franco

On 12. Aug 2020, at 22:55, bergth<EMAIL_ADDRESS>wrote:

Hello,
Describe the bug
When creating a network with tinc (VPN -> tinc -> Configuration -> new network), the "Cipher" menu show only "None".
After investing a bit (thanks to #198), it seem that the python script "list_ciphers.py" (located at /usr/local/opnsense/scripts/OPNsense/Tinc/list_ciphers.py ) no longer parses correctly the output of /usr/bin/openssl enc -help .
What this command give me:
/usr/bin/openssl enc -help
Usage: enc [options]
Valid options are:
-help               Display this summary
-ciphers            List ciphers
-in infile          Input file
-out outfile        Output file
-pass val           Passphrase source
-e                  Encrypt
-d                  Decrypt
-p                  Print the iv/key
-P                  Print the iv/key and exit
-v                  Verbose output
-nopad              Disable standard block padding
-salt               Use salt in the KDF (default)
-nosalt             Do not use salt in the KDF
-debug              Print debug info
-a                  Base64 encode/decode, depending on encryption flag
-base64             Same as option -a
-A                  Used with -[base64|a] to specify base64 buffer as a single line -bufsize val        Buffer size
-k val              Passphrase
-kfile infile       Read passphrase from file
-K val              Raw key, in hex
-S val              Salt, in hex
-iv val             IV in hex
-md val             Use specified digest to create a key from the passphrase
-iter +int          Specify the iteration count and force use of PBKDF2 -pbkdf2             Use password-based key derivation function 2
-none               Don't encrypt
-*                  Any supported cipher
-rand val           Load the file(s) into the random number generator
-writerand outfile  Write random data to the specified file
-engine val         Use engine, possibly a hardware device
I changed a bit the python code to having something working, using the command /usr/bin/openssl enc -ciphers
/usr/bin/openssl enc -ciphers
Supported ciphers:
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1
-aes-128-cfb8              -aes-128-ctr               -aes-128-ecb
-aes-128-ofb               -aes-192-cbc               -aes-192-cfb
-aes-192-cfb1              -aes-192-cfb8              -aes-192-ctr
-aes-192-ecb               -aes-192-ofb               -aes-256-cbc
-aes-256-cfb               -aes-256-cfb1              -aes-256-cfb8
-aes-256-ctr               -aes-256-ecb               -aes-256-ofb
-aes128                    -aes128-wrap               -aes192
-aes192-wrap               -aes256                    -aes256-wrap
-aria-128-cbc              -aria-128-cfb              -aria-128-cfb1
-aria-128-cfb8             -aria-128-ctr              -aria-128-ecb
-aria-128-ofb              -aria-192-cbc              -aria-192-cfb
-aria-192-cfb1             -aria-192-cfb8             -aria-192-ctr
-aria-192-ecb              -aria-192-ofb              -aria-256-cbc
-aria-256-cfb              -aria-256-cfb1             -aria-256-cfb8
-aria-256-ctr              -aria-256-ecb              -aria-256-ofb
-aria128                   -aria192                   -aria256
-bf                        -bf-cbc                    -bf-cfb
-bf-ecb                    -bf-ofb                    -blowfish
-camellia-128-cbc          -camellia-128-cfb          -camellia-128-cfb1
-camellia-128-cfb8         -camellia-128-ctr          -camellia-128-ecb
-camellia-128-ofb          -camellia-192-cbc          -camellia-192-cfb
-camellia-192-cfb1         -camellia-192-cfb8         -camellia-192-ctr
-camellia-192-ecb          -camellia-192-ofb          -camellia-256-cbc
-camellia-256-cfb          -camellia-256-cfb1         -camellia-256-cfb8
-camellia-256-ctr          -camellia-256-ecb          -camellia-256-ofb
-camellia128               -camellia192               -camellia256
-cast                      -cast-cbc                  -cast5-cbc
-cast5-cfb                 -cast5-ecb                 -cast5-ofb
-chacha20                  -des                       -des-cbc
-des-cfb                   -des-cfb1                  -des-cfb8
-des-ecb                   -des-ede                   -des-ede-cbc
-des-ede-cfb               -des-ede-ecb               -des-ede-ofb
-des-ede3                  -des-ede3-cbc              -des-ede3-cfb
-des-ede3-cfb1             -des-ede3-cfb8             -des-ede3-ecb
-des-ede3-ofb              -des-ofb                   -des3
-des3-wrap                 -desx                      -desx-cbc
-id-aes128-wrap            -id-aes128-wrap-pad        -id-aes192-wrap
-id-aes192-wrap-pad        -id-aes256-wrap            -id-aes256-wrap-pad
-id-smime-alg-CMS3DESwrap  -idea                      -idea-cbc
-idea-cfb                  -idea-ecb                  -idea-ofb
-rc2                       -rc2-128                   -rc2-40
-rc2-40-cbc                -rc2-64                    -rc2-64-cbc
-rc2-cbc                   -rc2-cfb                   -rc2-ecb
-rc2-ofb                   -rc4                       -rc4-40
-rc5-cbc                   -rc5-cfb                   -rc5-ecb
-rc5-ofb                   -seed                      -seed-cbc
-seed-cfb                  -seed-ecb                  -seed-ofb
-sm4                       -sm4-cbc                   -sm4-cfb
-sm4-ctr                   -sm4-ecb                   -sm4-ofb
I remplaced (l. 36)
p = Popen(['/usr/bin/openssl','enc', '-help'],stdin=PIPE, stdout=PIPE, stderr=PIPE, bufsize=-1)
output, error = p.communicate()
for line in error.decode().split('\n'):
if line.find('Cipher Types') == 0:
cipher_section = True
continue
if cipher_section:
for item in line.split():
if len(item) > 1:
response[item[1:]] = item[1:]
by
import os
read = os.popen('/usr/bin/openssl enc -ciphers | tr -s " " | tr -s " " "\n"  | tail -n +3')
for line in read:
line = line.rstrip("\n")
response[line[1:]] = line[1:]
and it is working. That said I'm not sure it is the most beautiful fix.
To Reproduce
VPN -> tinc -> Configuration -> new network
configctl tinc list ciphers
{"none":"None"}
/usr/local/opnsense/scripts/OPNsense/Tinc/list_ciphers.py
{"none":"None"}
Expected behavior
Having the list of ciphers supported by openssl
What it is looking after my little fix:
configctl tinc list ciphers
{"aes-128-cbc":"aes-128-cbc","aes-128-cfb":"aes-128-cfb","aes-128-cfb1":"aes-128-cfb1","aes-128-cfb8":"aes-128-cfb8","aes-128-ctr":"aes-128-ctr","aes-128-ecb":"aes-128-ecb","aes-128-ofb":"aes-128-ofb","aes-192-cbc":"aes-192-cbc","aes-192-cfb":"aes-192-cfb","aes-192-cfb1":"aes-192-cfb1","aes-192-cfb8":"aes-192-cfb8","aes-192-ctr":"aes-192-ctr","aes-192-ecb":"aes-192-ecb","aes-192-ofb":"aes-192-ofb","aes-256-cbc":"aes-256-cbc","aes-256-cfb":"aes-256-cfb","aes-256-cfb1":"aes-256-cfb1","aes-256-cfb8":"aes-256-cfb8","aes-256-ctr":"aes-256-ctr","aes-256-ecb":"aes-256-ecb","aes-256-ofb":"aes-256-ofb","aes128":"aes128","aes128-wrap":"aes128-wrap","aes192":"aes192","aes192-wrap":"aes192-wrap","aes256":"aes256","aes256-wrap":"aes256-wrap","aria-128-cbc":"aria-128-cbc","aria-128-cfb":"aria-128-cfb","aria-128-cfb1":"aria-128-cfb1","aria-128-cfb8":"aria-128-cfb8","aria-128-ctr":"aria-128-ctr","aria-128-ecb":"aria-128-ecb","aria-128-ofb":"aria-128-ofb","aria-192-cbc":"aria-192-cbc","aria-192-cfb":"aria-192-cfb","aria-192-cfb1":"aria-192-cfb1","aria-192-cfb8":"aria-192-cfb8","aria-192-ctr":"aria-192-ctr","aria-192-ecb":"aria-192-ecb","aria-192-ofb":"aria-192-ofb","aria-256-cbc":"aria-256-cbc","aria-256-cfb":"aria-256-cfb","aria-256-cfb1":"aria-256-cfb1","aria-256-cfb8":"aria-256-cfb8","aria-256-ctr":"aria-256-ctr","aria-256-ecb":"aria-256-ecb","aria-256-ofb":"aria-256-ofb","aria128":"aria128","aria192":"aria192","aria256":"aria256","bf":"bf","bf-cbc":"bf-cbc","bf-cfb":"bf-cfb","bf-ecb":"bf-ecb","bf-ofb":"bf-ofb","blowfish":"blowfish","camellia-128-cbc":"camellia-128-cbc","camellia-128-cfb":"camellia-128-cfb","camellia-128-cfb1":"camellia-128-cfb1","camellia-128-cfb8":"camellia-128-cfb8","camellia-128-ctr":"camellia-128-ctr","camellia-128-ecb":"camellia-128-ecb","camellia-128-ofb":"camellia-128-ofb","camellia-192-cbc":"camellia-192-cbc","camellia-192-cfb":"camellia-192-cfb","camellia-192-cfb1":"camellia-192-cfb1","camellia-192-cfb8":"camellia-192-cfb8","camellia-192-ctr":"camellia-192-ctr","camellia-192-ecb":"camellia-192-ecb","camellia-192-ofb":"camellia-192-ofb","camellia-256-cbc":"camellia-256-cbc","camellia-256-cfb":"camellia-256-cfb","camellia-256-cfb1":"camellia-256-cfb1","camellia-256-cfb8":"camellia-256-cfb8","camellia-256-ctr":"camellia-256-ctr","camellia-256-ecb":"camellia-256-ecb","camellia-256-ofb":"camellia-256-ofb","camellia128":"camellia128","camellia192":"camellia192","camellia256":"camellia256","cast":"cast","cast-cbc":"cast-cbc","cast5-cbc":"cast5-cbc","cast5-cfb":"cast5-cfb","cast5-ecb":"cast5-ecb","cast5-ofb":"cast5-ofb","chacha20":"chacha20","des":"des","des-cbc":"des-cbc","des-cfb":"des-cfb","des-cfb1":"des-cfb1","des-cfb8":"des-cfb8","des-ecb":"des-ecb","des-ede":"des-ede","des-ede-cbc":"des-ede-cbc","des-ede-cfb":"des-ede-cfb","des-ede-ecb":"des-ede-ecb","des-ede-ofb":"des-ede-ofb","des-ede3":"des-ede3","des-ede3-cbc":"des-ede3-cbc","des-ede3-cfb":"des-ede3-cfb","des-ede3-cfb1":"des-ede3-cfb1","des-ede3-cfb8":"des-ede3-cfb8","des-ede3-ecb":"des-ede3-ecb","des-ede3-ofb":"des-ede3-ofb","des-ofb":"des-ofb","des3":"des3","des3-wrap":"des3-wrap","desx":"desx","desx-cbc":"desx-cbc","id-aes128-wrap":"id-aes128-wrap","id-aes128-wrap-pad":"id-aes128-wrap-pad","id-aes192-wrap":"id-aes192-wrap","id-aes192-wrap-pad":"id-aes192-wrap-pad","id-aes256-wrap":"id-aes256-wrap","id-aes256-wrap-pad":"id-aes256-wrap-pad","id-smime-alg-CMS3DESwrap":"id-smime-alg-CMS3DESwrap","idea":"idea","idea-cbc":"idea-cbc","idea-cfb":"idea-cfb","idea-ecb":"idea-ecb","idea-ofb":"idea-ofb","rc2":"rc2","rc2-128":"rc2-128","rc2-40":"rc2-40","rc2-40-cbc":"rc2-40-cbc","rc2-64":"rc2-64","rc2-64-cbc":"rc2-64-cbc","rc2-cbc":"rc2-cbc","rc2-cfb":"rc2-cfb","rc2-ecb":"rc2-ecb","rc2-ofb":"rc2-ofb","rc4":"rc4","rc4-40":"rc4-40","rc5-cbc":"rc5-cbc","rc5-cfb":"rc5-cfb","rc5-ecb":"rc5-ecb","rc5-ofb":"rc5-ofb","seed":"seed","seed-cbc":"seed-cbc","seed-cfb":"seed-cfb","seed-ecb":"seed-ecb","seed-ofb":"seed-ofb","sm4":"sm4","sm4-cbc":"sm4-cbc","sm4-cfb":"sm4-cfb","sm4-ctr":"sm4-ctr","sm4-ecb":"sm4-ecb","sm4-ofb":"sm4-ofb","none":"None"}
Environment
opnsense version:
OPNsense 20.7-amd64
FreeBSD 12.1-RELEASE-p7-HBSD
OpenSSL 1.1.1g 21 Apr 2020
os-tinc version: 1.5_1
I have no idea of the last version of opnsense / tinc plugin it was working last since it's a fresh installation of both.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@bergth can you try https://github.com/opnsense/plugins/commit/2071e23a61043524a603c6ce6e5b6691295db66c?

Does this also work on LibreSSL? I would suppose it uses the old syntax still.

I'm not 100% sure, I expect both support the -ciphers, the extended help seemed to be something of the past.

Just confirmed LibreSSL outputs no ciphers, probably using the old format still.


Serialization for System

Implements serialization for metatensor.torch.atomistic.System
Contributor (creator of pull-request) checklist

[x] Tests updated (for new features and bugfixes)?
[ ] Documentation updated (for new features)?
[ ] Issue referenced (for PRs that solve an issue)?

Reviewer checklist

[ ] CHANGELOG updated with public API or any other important changes?

📚 Download documentation preview for this pull-request

@Luthaf is this what you were thinking of?
If not, does torch provide something like Tensor to json and back?

I would rather not use JSON for this, or at the very least only use JSON for the container and use a binary serialization format for the data (i.e. the torch Tensor and the TensorBlock inside the system).
We should be able to access whatever format torch is using internally to save Tensor, and use serialization to a buffer to save metatensor data.
For the container format, JSON is fine, but not ideal. The overall thing might look like
{
    "positions": "VERY LONG BINARY STRING ...6251690352651719",
    "cell": "VERY LONG BINARY STRING ...6251690352651719",
    "types": "VERY LONG BINARY STRING ...6251690352651719",
    "neighbors": [
        {"options": "JSON_OF_OPTIONS", "values": "VERY LONG BINARY STRING ...6251690352651719"},
        {"options": "JSON_OF_OPTIONS", "values": "VERY LONG BINARY STRING ...6251690352651719"}
    ],
    "data": {
        "name-1": "VERY LONG BINARY STRING ...6251690352651719",
        "name-2": "VERY LONG BINARY STRING ...6251690352651719",
    }
}

The main problem then is that encoding a binary string to JSON might require some tranformations of the string to escape some of them.
An alternative would be to go for ubjson, which should be supported by our JSON library. We might need to be careful to make sure the serialization uses a proper binary format to store our binary data (they seem to use list of integers in this case). The main drawback here is that we would now have another, different serialization format.

Hmm ok, in that case I think it's better if you do it because it looks complicated to me.
Another possibility is to merge something like this for now and change it later. The main use of this would be loading from disk for a large dataset and, although this approach is potentially slow, I'm hoping that it will still be faster than the model that is being trained (data loading can happen asynchronously and in parallel, see num_workers and related for the torch Dataloader)

After thinking more about it, I think System serialization should use the same format as the rest of metatensor, i.e. npz (ZIP of npy files). There are a couple of implementation for both the ZIP and npy formats in C++, and we could even use a manual implementation for the NPY part.

Replaced by #797


fix: fixing e2e tests

Commit https://github.com/AmadeusITGroup/AgnosUI/commit/60bbb4a2a41958f6929fe6d162283ff75f8d2bf7 was integrated without
rebase and tests failed because they were not adapted after the change in
https://github.com/AmadeusITGroup/AgnosUI/commit/570275bbf0a516d45f2adeca0761277b41520eb4.

@quentinderoubaix Thank you for your review!


Added matrix tests for prepend() and identity()

Added matrix tests for prepend() and identity() functions.
Also added contains if-branch tests on Ellipse and Circle shapes for 100% coverage.

Thanks for the tests @JessicaNeary! We love more unit tests.
Looks like there's a small linting error, if you could fix that.

Ping @JessicaNeary

Ping @JessicaNeary


fetching index.html instead of env.js in non-root routes

Hi Jese, thank you for writing this package! I am teaching a coding bootcamp, and I am having my students use this to manage their env vars locally and on heroku. We are also using react-router-dom for routing and navigation. (I am not an experienced react or webpack developer, so please tell me if I am doing anything silly!)
I've noticed that when navigating to a route other than root, the <script id="react-dotenv" src="./env.js"></script> tag makes a request to the relative route hostname/yourCurrentRoute/env.js

And the server fulfills this request with index.html, which of course blows up

I've been working around it by adding "homepage": "" to my package.json, so that the #react-dotenv tag in my index.html gets a src of "/env.js" instead of "./env.js". This seem to fix the issue, as the request uses an absolute route and always goes to hostname/env.js, no matter the route of my react app. Should "" be the default for homepage instead  of "."?

Same issue

Same issue, thanks for the solution, this almost drove me mad this morning!

Since this project seems not be maintained at the moment, I created a fork of it some days ago: https://github.com/ludovicm67/react-dotenv, because I was facing the same issue.
Same way to use it, just need to install it using @ludovicm67/react-dotenv instead of react-dotenv.
It will try to load the value of the homepage field in the package.json file, and will fall back to %PUBLIC_URL%, so that it behaves the same way as the favicon and the manifest.
Other points to mention:

it uses ESM
dependencies are up-to-date

Just add the tag

https://www.w3schools.com/tags/tag_base.asp


app error: deadlock; recursive locking (ThreadError)

I get this problem while my app is polling for a result from the server:
https://gist.github.com/ngpestelos/ee858141c5d935d76ea3

same here, had to add it to application.rb


if poetry is installed into a virtualenv, it's installing my project into it too

[X] I am on the latest Poetry version.

[X] I have searched the issues of this repo and believe that this is not a duplicate.

[X] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

OS version and name: macOS 10.14

Poetry version: 0.12.3

Issue
I have installed poetry into a virtualenv, and poetry is using that virtualenv to install my project, despite it not being active. I would expect poetry to make a new virtualenv for this project.
$ python3 -m venv penv
$ penv/bin/pip install poetry
$ penv/bin/poetry install

Note that my project was installed into penv despite it not being activated. It looks like (possibly) https://github.com/sdispater/poetry/commit/fa4c116213557579b1596f2ff0148f7865759ac6 broke things. poetry debug:info displays the virtualenv as the penv that poetry is installed into but my shell has no VIRTUAL_ENV var set.

Since I prefer to manage my tools using virtualenv's using pip, I have a similar issue:
Riley:account-new xistence$ poetry debug:info

Poetry
======

 * Version: 0.12.3
 * Python:  3.7.0

Virtualenv
==========

 * Python:         3.7.0
 * Implementation: CPython
 * Path:           /Users/xistence/.ve/poetry

System
======

 * Platform: darwin
 * OS:       posix
 * Python:   /Users/xistence/.pyenv/versions/3.7.0

I have a virtualenv in the local directory named .venv that was created by poetry 0.11.5, with this setting:
settings.virtualenvs.in-project = true

This is how version 0.11.5 behaves installed into that same virtualenv:
Riley:account-new xistence$ poetry debug:info

Poetry
======

 * Version: 0.11.5
 * Python:  3.7.0

Virtualenv
==========

 * Python:         3.7.0
 * Implementation: CPython
 * Path:           /Users/xistence/Projects/APPA/account-new/.venv

System
======

 * Platform: darwin
 * OS:       posix```

The thing is there are multiple ways to detect a virtualenv and comparing sys.base_prefix and sys.prefix is one of them. This has been added to fix issues like #392.
Now, I understand that this might be problematic and I am not sure about the best approach here. Either we assume that Poetry is always installed independently and create a virtualenv anyway (unless there is a VIRTUAL_ENV set or Poetry is told otherwise) or keep the current behavior.

I can tell you that as a user my expectation was that it only used the VIRTUAL_ENV env var. This is how pipenv works and a lot of other tools I use that are installed into virtualenvs. The only other tool I can think of that does what poetry is doing right now is pip itself because it always operates on its own virtualenv unless opted out of via --user or sudo.
Unless I'm mistaken I don't see a way for poetry to opt-out of this behavior which may help if you don't want to go back to the old way where it doesn't ever use its venv.

Commit 30965bb should revert the changes and it should not reintroduce the #392 issue.

Can confirm, this fixes the issue for me! :-)

Release 0.12.4 is out with this fix included.

thanks @sdispater !

I am experiencing this issue with 0.12.17. The way to reproduce is slightly different than @mmerickel 's:
python3 -m venv penv
penv/bin/activate
. penv/bin/activate
pip install poetry
poetry install
# pip freeze output contains the project's requirements


Bigtable and float values

tried to store 0.73 as numeric value in bigtable cell and got this error:
TypeError: 0.67 could not be converted to bytes

Trace
/home/dmitry/Projects/demo/storm/libs/db/models.py in save(self, record, instance_id)
    205             for col in columns:
    206                 row.set_cell(
--> 207                     column_family, col, getattr(record, col, None)
    208                 )
    209         row.commit()
/home/dmitry/Projects/experiments/storm/petrel/chapter3/example1/petrel/lib/python2.7/site-packages/gcloud/bigtable/row.pyc in set_cell(self, column_family_id, column, value, timestamp)
    300         """
    301         self._set_cell(column_family_id, column, value, timestamp=timestamp,
--> 302                        state=None)
    303
    304     def delete(self):

/home/dmitry/Projects/experiments/storm/petrel/chapter3/example1/petrel/lib/python2.7/site-packages/gcloud/bigtable/row.pyc in _set_cell(self, column_family_id, column, value, timestamp, state)
    126         if isinstance(value, six.integer_types):
    127             value = _PACK_I64(value)
--> 128         value = _to_bytes(value)
    129         if timestamp is None:
    130             # Use -1 for current Bigtable server time.

/home/dmitry/Projects/experiments/storm/petrel/chapter3/example1/petrel/lib/python2.7/site-packages/gcloud/_helpers.pyc in _to_bytes(value, encoding)
    457         return result
    458     else:
--> 459         raise TypeError('%r could not be converted to bytes' % (value,))
    460
    461

Checked the source code and see that only int or bytes are allowed to be stored. Therefore I have to convert float value into INT *i.e. 0.63 *100 = 63 and store that as a value
Am I correct and why only ints/bytes are allowed?
thanks,
Dmitry

@dmitry-saritasa Thanks for filing.

Can you provide the code you used to trigger this error?
The backend allows only bytes but has special methods for counters, which are stored as >q (i.e. a long long / 64-bit signed integer in big-endian byte order).
If you'd like to store a Python float (double), you'd need to convert to bytes e.g. struct.pack('>d', 0.75)

@jonparrott WDYT of supporting types other than bytes or integers? It'd be easy enough to do, but may go against the spirit of the API.

clear - thanks @dhermes

@dhermes I think it affords discussion - Python's representation of other types may not work if the data is read in another language.

I am going to declare bankruptcy on this issue.


Add a callback which is called when Error objects are created

Thanks for the review, patch is updated.

Thanks for the review, patch is updated.


add readline-6.3 package

I've followed this guide
step by step carefully. Yes

I have submitted CI configs to https://github.com/ingenue/hunter targeting pkg.template branch,
see this merged pull request https://github.com/ingenue/hunter/pull/380

My change will resolve this "New package" request: https://github.com/ruslo/hunter/issues/1739

Testing:

https://travis-ci.org/ingenue/hunter/builds/555960398?utm_source=github_status&utm_medium=notification
https://ci.appveyor.com/project/ingenue/hunter/builds/25830122

Released: https://github.com/ruslo/hunter/releases/tag/v0.23.200


same issue with CUDA=10.0 CUDNN=7.4 Tensorflow=1.14.0

same issue with CUDA=10.0 CUDNN=7 Tensorflow=1.14.0
stuck at I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10

@YongyuG We see that the issue template has not been filled, could you please do so as it helps us analyse the issue.Thanks!


[POC] feat(cora): Update login page styles to match coral

What kind of change does this PR introduce?

[ ] Bug fix
[x] New feature
[ ] Refactor
[ ] Docs update
[ ] CI update

What is the current behavior?
Login page is quite jarring stylistically when used to log into coral
What is the new behavior?

delete all SAAS-like data from login page
change colors (bg white, main blue the same as the blue used by coral)
change font from Poppins to Inter (used by coral)
other changes related to provided design

https://github.com/Aiven-Open/klaw/assets/20607294/a5510c98-d031-4fde-9466-b900c251069c
Other information
Other login-related pages should be updated too :

https://github.com/Aiven-Open/klaw/issues/2211
https://github.com/Aiven-Open/klaw/issues/2212
oauth login (looginSaas)

Requirements (all must be checked before review)

[x] The pull request title follows our guidelines
[x] Tests for the changes have been added (if relevant)
[x] The latest changes from the main branch have been pulled
[x] pnpm lint has been run successfully

@mathieu-anderson  works well, I just checked locally all I found (not sure how I get to e.g. loginSaas 🤔 )
I noticed that I can register as a user even if I don't check the terms of service, that's probably something we should change?
I also noticed that other than some text inputs (not all), the elements don't have focus style, so it's not very friendly for keyboard users. I'm not sure if we should change that in this PR, because it's already big, but I think we can create a ticket for that for later? It's probably a small change and would be really nice for users.

I noticed that I can register as a user even if I don't check the terms of service, that's probably something we should change?

Probably, but you will notice that if you click on the terms link, nothing happens. It is definitely quite broken.
https://github.com/Aiven-Open/klaw/assets/20607294/ca305c4c-532f-4fda-9bd6-32ac8f2b086b

I also noticed that other than some text inputs (not all), the elements don't have focus style, so it's not very friendly for keyboard users. I'm not sure if we should change that in this PR, because it's already big, but I think we can create a ticket for that for later? It's probably a small change and would be really nice for users.

I would say this will be taken care of when we move the auth pages to coral for real.

Probably, but you will notice that if you click on the terms link, nothing happens. It is definitely quite broken.

^^
Then I would say we remove it if we don't need it or make it required and add something there if we need it? We don't have to do it in this PR, but I think the product looks a bit more professional if we fix it later.

I would say this will be taken care of when we move the auth pages to coral for real.

Sure! I may check later the week or so if it's a SUPER small change and throw in a PR, but very timeboxed 😇


support multi-sorted refinement

Currently, the syntax of signatures and the refiner itself assume that evidence for a synthesis of the proving procedure will be of sort EXP; however, eventually we want to support proving the truth of types that refine sorts other than EXP.

done.


Template documentation links with spaces are broken

Clicking on "Template documentation" in the "Choose column" step splits templates containing spaces. The result is two tabs, one with the each part of the URL.
Steps to reproduce:

Click "Generate Spreadsheet".
Add any directory and click "Next".
In the "Choose columns" pane under "Template", click "Art Photo".
Click "Template documentation".

Actual result
Two new tabs are opened, one with the URL https://commons.wikimedia.org/wiki/Template:Art and one with photo/doc.
Expected result
One tab opens with the URL https://commons.wikimedia.org/wiki/Template:Art Photo/doc.
More information
I have only tried this on Ubuntu 20.04 and with Forefox 97.0 as default browser. There is nothing in log about this. Maybe there should be an entry when opening a URL.

A fix (#164) will be available in the next release.


Write a new allocator for coreneuron

To replace the more C-style alloc_memory, calloc_memory, emalloc_align and ecalloc_align with C++ class construction and allocation (using new and delete) we need to provide a new allocator that handles:

default allocation (fallback to default allocators)
aligned allocation
allocation on the GPU

This was partially taken care of here: https://github.com/BlueBrain/CoreNeuron/commit/557f2566427908b68918403da87e3af2af65914c
But ultimately this will be part of our data-structure rewrite. For now we can keep it open, though.


Difference between hit count of WCSim and SKDetSim

The problem of difference between hit of WCSim and SKDetSim still not be solved.
The figure below shows the comparison of 10 MeV electron (kinetic energy) events between WCSim and SKDetSim simulation.

From this figure, there is 10 % difference between 2  software (Total charge difference was ~2%).
It will effect to low energy analysis

@YujiOkajima Could you please clarify a few things:
Which colour is WCSim and which is SKDetSim?
Are you using the SKI version of SKDetSim?
Is this with or without dark noise? From what I understand, in SKDetSim adds it before triggering, whereas WCSim adds it after (both add it before digitisation), therefore you need to be careful about specifying thresholds in order to compare like-for-like.

@tdealtry
Sorry for delayed responce.
The blue line shows distribution of WCSim and red line.
And it is SK-I version, and there is no dark noise in this simulation.
Because this SKDetSim events are generated by using ATMPD mode,
now I have been trying to compare WCSim MC output with SKDetSim LowE mode output .


Type
Bug report
What do you want to report?
The old docs had sections:

How to remove a user from an organization
How to remove a user who has created a project from an organization

These sections should be added as they are also heavily used by the support team.
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Pushed to prod
@ivanaur let me know what you think about the updated instructions, we can make corrections if needed: https://docs.semaphoreci.com/using-semaphore/organizations


Typecasting in batchInsert

I'm trying to insert data in the table
        Yii::$app->db->createCommand()->batchInsert(
            self::DB_CITY_TABLE_NAME,
            ['id', 'name', 'region_id', 'latitude', 'longitude'],
            $cities
        )->execute();

$cities is array
array (size=1012)
  1 =>
    array (size=5)
      0 => string '1' (length=1)
      1 => string 'Хмельницкий' (length=22)
      2 => int 1
      3 => string '49.416668' (length=9)
      4 => string '27.000000' (length=9)
  2 =>
    array (size=5)
      0 => string '2' (length=1)
      1 => string 'Каменец-Подольский' (length=35)
      2 => int 1
      3 => string '48.683334' (length=9)
      4 => string '26.583332' (length=9)
  3 =>
    array (size=5)
      0 => string '3' (length=1)
      1 => string 'Нетишин' (length=14)
      2 => int 1
      3 => string '50.346695' (length=9)
      4 => string '26.633587' (length=9)

DB column type is DOUBLE NOT NULL
And error is:

Related to #5977

QueryBuilder::batchInsert() does not use param binding.

I believe this is a reason of this issue as well as #5977.
What was the reason of not using bound params for batchInsert()?

What was the reason of not using bound params for batchInsert()?

looking at the code I asked myself the same question some days ago. I think it should use param binding.

first commit was https://github.com/yiisoft/yii2/commit/a39638515fe67fd27087a8a14f1266cf4c535e17 as far as I see, @qiangxue do you remember the reason for this implementation?

The main reason for not using parameter binding is because batch insert could potentially insert many rows of data. I'm not sure if PHP could support that many parameters (in the order of 1000+), and if so what is the performance impact. We should do some basic test to check it.

I've tried to test it out. Perfomance affected badly.
Using microtime() to measure running time of actual execute() on batch inserting 10000 rows in customer.
Took ~0.40 sec in current implementation and over 70 sec with placeholding in batchInsert() in the way it done in usual insert().

Sorry for the mess with references. Back to the original issue (not touching another escape problems). I've written the test and fix for the case. The other side of the fix is that all float\double on the way to db are strings now.


Fix compiling tensor–scalar comparison ops, such as ttnn.eq

Ticket
None
Problem description
The kernel can now handle tensor–scalar comparison.  We should remove the workaround and make the conversion simple.
What's changed
For all comparison ops, ttnn.{eq,ne,lt,le,gt,ge}, taking a tensor and a scalar

We no longer need the intermediate ttnn.full that broadcasts the scalar to a tensor.
The tensor shape is no longer required to be a multiple of tiles

This PR should unblock converting several input variations of tensor–scalar comparison.

I'm removing test_if.py.  We cannot really write an atomic test for if.  Model tests provide enough coverage in my opinion.

(Quote from 5182a9471f6ca649180bf319d23997dcc4dfeaac)

The test is highly dependent on other ops.
There is no known input variation of control flow yet.

In general, this test is more trouble than it's worth.

This error also occurs when merging other PRs.
/home/ubuntu/actions-runner/_work/_tool/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/config/__init__.py:329: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
ConftestImportFailure: ModuleNotFoundError: No module named 'cv2' (from /home/ubuntu/actions-runner/_work/pytorch2.0_ttnn/pytorch2.0_ttnn/tests/conftest.py)
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
  config = pluginmanager.hook.pytest_cmdline_parse(
ImportError while loading conftest '/home/ubuntu/actions-runner/_work/pytorch2.0_ttnn/pytorch2.0_ttnn/tests/conftest.py'.
tests/conftest.py:6: in <module>
    from tests.utils import calculate_accuracy
../../_tool/Python/3.8.18/x64/lib/python3.8/site-packages/tests/__init__.py:3: in <module>
    from ultralytics.utils import ASSETS, ROOT, WEIGHTS_DIR, checks, is_dir_writeable
../../_tool/Python/3.8.18/x64/lib/python3.8/site-packages/ultralytics/__init__.py:11: in <module>
    from ultralytics.data.explorer.explorer import Explorer
../../_tool/Python/3.8.18/x64/lib/python3.8/site-packages/ultralytics/data/__init__.py:3: in <module>
    from .base import BaseDataset
../../_tool/Python/3.8.18/x64/lib/python3.8/site-packages/ultralytics/data/base.py:12: in <module>
    import cv2
E   ModuleNotFoundError: No module named 'cv2'

I'm removing test_if.py. We cannot really write an atomic test for if. Model tests provide enough coverage in my opinion.

(Quote from 5182a94)

The test is highly dependent on other ops.
There is no known input variation of control flow yet.

In general, this test is more trouble than it's worth.

I think we might know why test_if is failing. It is because the torch.sum wrongly returns 0 for now, which is used in this test for the condition. @pschang-phy and I are looking into the problem of torch.sum

@jerrysky3 and @pschang-phy, I marked test_sum xfail at 3f5ec095858d5e0d06b259e9fc68eff74123602d so that we can work in parallel.


Train on multiple GPUs

hey,
Seems like the training is running only on one gpu despite given multiple gpus.

Hi, the models are all small enough to train in a single GPU, so we don't implement multi-gpu training.
BTW, if you need multi-gpu training, please refer to the following example to modify the code.
https://github.com/tensorflow/models/blob/adc271722e512c8a55ef18b46c666a031de77774/tutorials/image/cifar10/cifar10_multi_gpu_train.py#L66


Add configurability for the list of ignored owners

Description
Changes proposed in this pull request:

Add configurability for the list of ignored owners
Update README, and fix its structure
Fix typos

Related issue(s)
Fixes #54

As discussed f2f, the integration tests are not working on forked PRs (yet 🙏 ). This will be documented in a separate PR :)
🚀


TimberImage::aspect() generates Fatal Error if image doesn't exist

Expected behavior
Maybe false or -1?

Actual behavior

A PHP warning:
Fatal error: Uncaught DivisionByZeroError: Division by zero in /path/to/website/wp-content/plugins/timber-library/lib/Image.php on line 410

Steps to reproduce behavior

Create a post.
Add an featured image.
Save post.
Add this in Twig template of single post: {{ post.thumbnail.aspect }}.
View the post on the front end. You should see a number.
Remove the thumbnail from disk (not from  media library).
View the post on the front end.
The PHP warning is triggered.

What version of WordPress, PHP and Timber are you using?
WordPress 5.9, PHP 8.0, Timber 1.19.1

How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)

Using 'add new plugin' inside the WordPress admin.

Additional information: the problem also occurs in PHP 7.3.5, but only trigger a PHP warning:
Warning: Division by zero in /path/to/website/wp-content/plugins/timber-library/lib/Image.php on line 410

It happens because of step 6 - while you physically removed image from disk its metadata and attachment post type object itself still presents in database. You may check it if you call wp_get_attachment_metadata() function (if you know image id) - it will return array of data even if image doesn't exists anymore. When you're deleting image from Media uploader - post object will be deleted
So what causes the issue? The thing is while image is not present, its metadata is still "alive" and will return some value. At some point, when you are calling aspect method, Timber will call get_dimensions() method which will set image data ONLY if image is present. And if image is not present... Well Timber doesn't handle this so the method will return null
// lib/Image.php

protected function get_dimensions( $dim ) {
    if ( isset($this->_dimensions) ) {
        return $this->get_dimensions_loaded($dim);
    }

    if ( file_exists($this->file_loc) && filesize($this->file_loc) ) {
        if ( ImageHelper::is_svg( $this->file_loc ) ) {
            $svg_size             = $this->svgs_get_dimensions( $this->file_loc );
            $this->_dimensions    = array();
            $this->_dimensions[0] = $svg_size->width;
            $this->_dimensions[1] = $svg_size->height;
        } else {
            list($width, $height) = getimagesize($this->file_loc);
            $this->_dimensions = array();
            $this->_dimensions[0] = $width;
            $this->_dimensions[1] = $height;
        }
        return $this->get_dimensions_loaded($dim);
    }
}

This mean your width and height will be equal to 0 which causes PHP error division by zero
// lib/Image.php

public function aspect() {
    $w = intval($this->width());
    $h = intval($this->height());
    return $w / $h; // zero divided by zero
}

To fix this you may check width before returning division result something like
public function aspect() {
    $w = intval($this->width());
    if ( 0 === $w ) {
        return false; // or whatever
    }
    $h = intval($this->height());

    return $w / $h;
}

But I would prefer to throw some kind of exception at the end - like things are actually going wrong - despite you've been able to get post.thumbnail.src path, the image will not be shown on front as it is not present
protected function get_dimensions( $dim ) {
    // ...

    throw new \Exception( "Image file doesn't exists" ); // or something like this
}

Or maybe it's a good idea to check it earlier on init moment
To fix issue outside of library itself you may check within twig template does image file exists or not
{% if fn('file_exists', post.thumbnail.file_loc) %}
	// everything ok, file presents
{% endif %}

@czernika thanks for the analysis! Would love to check out a PR based on your explanation. As you note: there's a fair question here about the right place to throw an error. I can imagine that while a dev would want to know, you wouldn't necessarily want the failure of an image load to 500 the entire page generation

Shouldn't we just close this issue? It has already been resolved in https://github.com/timber/timber/pull/2695, as I understand it. The method now is:
public function aspect(): ?float
{
    $w = \intval($this->width());
    $h = \intval($this->height());

    if ($w and $h > 0) {
        return $w / $h;
    }

    return null;
}

You are right @expedition-robin-martijn . Closing this issue as well!


report should be comparable between test runs

So the reports should be an artifact in a good format that contains parameters (number of services, number of pods, version...) and a set of aggregated metrics (ok to start with just duration).
We should then be able to retrieve all the runs for a period of time and then plot them to compare.

We could easily push an artifact with something like: {"runId": "...", params: {"version": "..", "number_services": ...."}, [{"testName": "fewew", stats: {"duration": "fff", ....}}, ...]}
Then we have a make target that pulls all these artifacts and generate a set of graph locally to compare these.

After each run, we can push a log line to the datadog, so we can observe performance trends as Kong Mesh is getting updated


Xblock In-Video-Quiz

I'm unable to install xblock invideoquiz or maybe I am doing it wrong. please guide me step by step.

Following the sunset of the Lagunita project, this repo lives on under edx's stewardship at:

https://github.com/edx/xblock-free-text-response

This should have support through master/Juniper already.


bodyValidator can throw NullPointerException

Actual behavior (the bug)
Igrium reported on discord the following:

Is there a reason PostParams params = context.bodyValidator(PostParams.class).getOrThrow(e -> new BadRequestResponse("Improperly formatted json.")); could be throwing a NullPointerException?

Interesting... it only happens if I don't specify a body in the request. In that case, shouldn't the validator be invalid rather than throwing an exception?

Expected behavior
bodyValidator should check for nullity and throw the specified exception

Do you want to work on this @zugazagoitia?

On it

Let's close this then, thanks for having a look!


[Bug]: Switch group widget is crashed when selectedValues is undefined

Is there an existing issue for this?

[X] I have searched the existing issues

Description
When selectedValues is undefined, the app is crashed
Steps To Reproduce

Drop both of switch group widget and checkbox group widget on the canvas.
Let the checkbox group widget throw cyclic dependency error by passing a evaluation expression for an option value and clicking on JS toggle in Options property.
For example,  BLUE to {{BLUE}}
The app is crashed

Reference:

Public Sample App
No response
Version
Cloud

Though the app crash does not happen, once the steps as shown in the earlier loom video are followed, however the cyclic dependency error comes up after which the Switch Group fails to function properly.
The Switch Group widget should not be impacted if changes are made to Checkbox Group widget. Check the behaviour in the video below to understand -
https://www.loom.com/share/b817cc8f5a2f46d790845c50016ad259

Ideally, we should make sure that if users' application goes into a cyclic dependency issue. We still send correct values to dataTree and widgets do not crash but instead, stay in the older valid state.
@wmdev0808 Does the widget receives unexpected values in props?

@Rishabh-Rathod not sure about that, this is to do with some characters in the JS mode of switch group, it crashes the App, and post that the widgets do not function.

@ajinkyakulkarni FE-coders will need to do an RCA for this issue. Can we add a RACI metric here?

This is no longer reproducible


feat: use carat for dependencies

update all dependencies to latest version

:tada: This PR is included in version 1.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Adding report portal initialization OLS-592

Description

Type of change

[ ] Refactor
[ ] New feature
[ ] Bug fix
[ ] CVE fix
[ ] Optimization
[ ] Documentation Update
[ ] Configuration Update
[ ] Bump-up dependent library
[ ] Bump-up library or tool used for development (does not change the final image)

Related Tickets & Documents

Related Issue #
Closes #

Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] PR has passed all pre-merge test jobs.
[ ] If it is a core feature, I have added thorough tests.

Testing

Please provide detailed steps to perform tests related to this code change.
How were the fix/results from this change verified? Please provide relevant screenshots or results.

/lgtm
/approve

/retest

/override "Red Hat Konflux / ols-e2e-tests-rosa / lightspeed-service"

/override "Red Hat Konflux / ols-enterprise-contract / lightspeed-service"


Detect standards from implemented methods and events | #2kq0v7d

Summary or solution description
Standards will now be added to the supportedstandards field on the manifest event if it wasn't explicitly added on the MetadataInfo.
How to Reproduce
https://github.com/CityOfZion/neo3-boa/blob/5543e88cc9add8937000c50d9c28430b74495c40/boa3_test/test_sc/metadata_test/MetadataInfoSupportedStandardsNotExplicit.py#L1-L37
Tests
https://github.com/CityOfZion/neo3-boa/blob/5543e88cc9add8937000c50d9c28430b74495c40/boa3_test/tests/compiler_tests/test_metadata.py#L222-L230
Platform:

OS: Windows 10 x64
Python version: Python 3.7

Task linked: CU-2kq0v7d Detect standards from implemented methods and events


Customize different themes for different snackbar

Let's say I use snackbars for different purposes, one for showing success, one for error, etc
How can I customize different themes / colors for these snackbars in css?
Currently, I do this by
val errorNotify = JFXSnackbar(thisPane)
(thisPane.children[1] as Group).children[0].styleClass.add("error-toast")
Also, the above code doesn't work for the subsequent show of snackbar as now the children has been changed.
There should be an easier way I suppose.

Also, when I create an instance of JFXSnackbar it calls the registerSnackbarContainer.
Now when the snackbar is shown and given a timeout of say 5secs, why doesn't it call the unregisterSnackbarContainer after the snackbar closes.
Because of this my pane layouts keep changing everytime a snackbar is registered.
unregistering snackbars manually everytime in an event handler is a pain.

Hello,
you need to add the style class to JFXSnackbar instance not the Group node, this issue is related to #309.
the Group node style classes are bound to the snackbar instance so you can't change them directly.
Regards,

Yea it works now.
Btw I was trying this before itself
val errorNotify = JFXSnackbar(thisPane)
`errorNotify.styleClass.add("error-toast")'
But it didn't used work as I had a jfoenix version 1.2.0

Sorry, I closed the issue, but my second query still exists

regarding the unregister method, there is no need to call it you just need to change the style classes and the content of the snackbar before showing it.
Regards,

PFA a screenshot from the Javafx Layout Debugger:

As you can see in the screenshot, if I don't call the unregister method, there are a number of "Group" nodes lying around, even after all the snackbars are closed.
If I manually unregister, all these group nodes are removed.
As such it is not a big issue, but performance of the app might significantly reduce on a long term basis.
I am not sure why is it a problem to unregister after the snackbar closes; If we can have a flag which unregisters snackbars after their timeouts that would be great.

Please note that you can only use 1 JFXSnackbar instance and reuse it instead of creating multiple instances.


How to load a new world without having diverging views?

(Using Carla 0.9.11 on Ubuntu 18.04.2, python 3.7.9, with vulkan working)
How do I load a new world while Carla is running? I have tried a lot and nothing has worked, e.g the following, which results in a world that diverges from what is visible on the screen. It was the cause of #4013.
I need this because my model decides what map to use and so I need to be able to change the world on the fly.
def foo(client, world, ...):
    <Do stuff>
    world = client.load_world(new_map_name)
    world.tick()
    <Do more stuff>
    <Return this new world along with the other results and continue>

@Axel could you follow up on this please?

Hi @cinjon, I don't understand your problem. The function world = client.load_world(new_map_name) should do exactly what you need. The new_map_name needs to be one of the existing maps such as Town01, Town02, etc. Notice that we also offer Town01_opt versions of the maps which offer a small performance improvement.


Is there any compression?

Delta diffs maybe? Or anything else to support huge player counts.

I don't see delta diffs viable, since state and input properties are sent as unreliable, so at the time we receive a delta, we may or may not have the preceding state to use as reference.
However, an opportunity to reduce data usage is the properties. Currently, the full path of each property is included in the dictionary used to describe state. These names could be replaced with simple indices.
The other thing is channels - currently no channels are specified, the default ones are used. Using specific channels might improve performance.
Created issues for both. Let me know if you have any other ideas or concerns!

well, delta compression allows you to send diffs of data, that means, you don't have to send relatively big data all the time, but rather, small pieces of it reliably. sorry for the confusion, just making sure we talk about the same thing

theres a good article by valve about source engine networking. You may find it useful

@X64X32 our understanding's the same, and sending diffs is my issue with it. Properties are sent on an unreliable channel, meaning packets may arrive in order, out of order, or not at all. Trying to sort that out would be complicated. So for now I'm looking at other opportunities.
Nonetheless, I'm open to suggestions.

Created #173 as a first step for improving netfox in this regard.

Yes, I was aware of the diff part. I didn't consider sending deltas over a reliable channel though!

I wouldn't recommend sending state data over a reliable channel. The main reason not to use reliable channels is that dropping a single packet delays the arrival of all following packets, which results in noticeable stutter.

I don't see delta diffs viable, since state and input properties are sent as unreliable, so at the time we receive a delta, we may or may not have the preceding state to use as reference.

Fortunately, you don't actually need the preceding state. You just need a preceding state. If the client tells the server which tick it last received, the server can use that tick as reference for the following state diffs.

Worth mentioning transports provide compression. Doing the following on ENET for example will half your bandwidth usage.
enet_peer.host.compress(ENetConnection.COMPRESS_RANGE_CODER)


Update with dry-run before diffing deployments

What this PR does / why we need it:
Fixes #2488
Fixes #2402
When determining if we need to update the deployment for a predictor/explainer/transformer we compare a calculated version of the deployment based on the Inference Service manifest and serving runtimes to the one currently residing in K8s. It's possible for K8s to represent empty values differently (e.g. nil vs "") as well as populate default values (e.g.  setting the scheme for a liveness check to HTTP). This means that the generated manifest will always be different from the one in the K8s and we will continually try to reconcile the deployment. The continuous reconciliation generates a ton of log spam and puts unneeded pressure on the KServe manager and the K8s API server.
This PR fixes the issue by doing a dry run on the calculated deployment before comparing it to the one currently in K8s. The dry run will ensure that all default values are populated and empty values are consistent.
Type of changes

[x] Bug fix (non-breaking change which fixes an issue)

Feature/Issue validation/testing:
I tested the change by applying an inference service that was previously causing a infinite reconciliation loop. It causes the deployment to only be reconciled as needed.
Fixed issue with raw deployments causing infinite reconciliation loops

hi @yuzisun, do you have some time to take a look at this?

hi @yuzisun, do you have some time to take a look at this?

@cmaddalozzo Thanks for the fix! The change looks good to me, just a small comment.

@cmaddalozzo can you help sign off the commit ?

@yuzisun done!

Awesome fix! Thanks @cmaddalozzo !
/lgtm
/approve

/lgtm
/approve


Addition of PLUMBER2 Readers

The LIS model presently does not include PLUMBER2 readers. The addition of PLUMBER2 readers would enable LIS and its DA capabilities to be leveraged for surface and PBL research.
SUNY Albany has developed a PLUMBER2 reader, which can be added to the LIS code. This will be supported by Timothy Lahmers (NASA-GSFC/UMD ESSIC).

Code to be used for the PR is undergoing tests, PR should be submitted by later in the afternoon 23 November 2021.


Resource Based Naming not behaving correctly

Version

Karpenter: HEAD

Kubernetes: v1.220
Expected Behavior

Actual Behavior
It looks like resource based naming is being used by default, but my cloud provider is launching with ip naming.
NAME                                           STATUS    ROLES    AGE    VERSION
i-09c42b07cdba678b7                            Unknown   <none>   50s
ip-192-168-22-139.us-west-2.compute.internal   Ready     <none>   129d   v1.20.4-eks-6b7464
ip-192-168-65-180.us-west-2.compute.internal   Ready     <none>   12s    v1.20.11-eks-f17b81

Steps to Reproduce the Problem
make apply

Resource Specs and Logs

@olemarkus

Potentially caused by
* 423a806 (31 hours ago) GitHub       Don't fail on missing privatednsname if using RBN (#1068)

Ah -- turn out this is just a surprising default.

Sorry about that one. That was not really intentional. Thanks for fixing.


Add Panic handler to waitReady

Under heavy concurrency with contexts being canceled based on certain events, we were experiencing nil pointer dereference panics coming from this goroutine:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x100b422d0]

goroutine 68222 [running]:
github.com/chromedp/chromedp.parseRemoteObject(0x140026ee300?, {0x1010b05e0?, 0x14007d58550?})
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/eval.go:69 +0x20
github.com/chromedp/chromedp.callFunctionOn({0x10123ae90, 0x140055faf30}, {0x100f05f24?, 0x100b3e1b8?}, {0x1010b05e0?, 0x14007d58550}, 0x14007d59320, {0x0, 0x0, 0x100b446d0?})
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/call.go:68 +0x200
github.com/chromedp/chromedp.CallFunctionOn.func1({0x10123ae90?, 0x140055faf30?})
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/call.go:26 +0x44
github.com/chromedp/chromedp.ActionFunc.Do(0x100f05f24?, {0x10123ae90?, 0x140055faf30?})
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/chromedp.go:614 +0x34
github.com/chromedp/chromedp.callFunctionOnNode({0x10123ae90, 0x140055faf30}, 0x140064b0600, {0x100f05f24, 0x72}, {0x1010a4020, 0x14006f017f8}, {0x0, 0x0, 0x0})
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/query.go:430 +0x194
github.com/chromedp/chromedp.NodeVisible.func1({0x10123ae90, 0x140055faf30}, 0x14000c9df88?, 0x140064b0600)
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/query.go:460 +0x158
github.com/chromedp/chromedp.(*Selector).waitReady.func1.1(0x14000c9dfa8?)
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/query.go:239 +0x78
created by github.com/chromedp/chromedp.(*Selector).waitReady.func1
        /Users/djenriquez/go/pkg/mod/github.com/chromedp/chromedp@v0.8.6/query.go:235 +0x250

When I dug into this, the panic occurs when a *runtime.RemoteObject parameter returns a nil, here: https://github.com/chromedp/chromedp/blob/master/eval.go#L69. Digging further, this seems to happen because the goroutine executing check() depends on a context that can be canceled in a different goroutine. I believe this leads to the *runtime.RemoteObject being nil, and then triggering the panic when its .Type property is being accessed.
I'm not sure if this is the best method, as this sort of goes around the problem, but I'm not sure how one can guarantee that the goroutine doesn't panic when it depends on a context defined outside its scope.

Thank you @djenriquez !
I think we should find out why *runtime.RemoteObject is nil first and handle it directly (instead of recovering from a panic).

this seems to happen because the goroutine executing check() depends on a context that can be canceled in a different goroutine. I believe this leads to the *runtime.RemoteObject being nil

This is unlikely. If the context is cancelled, if should return before reaching parseRemoteObject:
https://github.com/chromedp/chromedp/blob/6a8fef8d17ceaf7dd5d64ac614f207c9b7e9d15a/call.go#L60-L68
Can you turn on the debug log (chromedp.WithDebugf(log.Printf)) and share the log? We are interested in CDP messages like the one shown below. But please share more logs around these messages.
2022/10/03 09:32:37 -> {"id":21,"sessionId":"8743C20757D14133E1016B3BC85C9CB8","method":"Runtime.callFunctionOn","params":{"functionDeclaration":"function visible() {\n    return Boolean(this.offsetWidth || this.offsetHeight || this.getClientRects().length);\n}\n","objectId":"6922537476352520887.2.1","silent":true,"returnByValue":true}}
2022/10/03 09:32:37 <- {"id":21,"result":{"result":{"type":"boolean","value":true}},"sessionId":"8743C20757D14133E1016B3BC85C9CB8"}

Definitely, I'll enable those logs and get them over as soon as I can.
In the meantime, to give context, we monitor specific network requests and send specific events to an event handler to do some automation. Each event generates its own context with a cancel function to use for the page automation. Sometimes a page load will send the same event, in which case, we cancel any existing contexts that are being processed so that we don't overlap any automation that hasn't finished. It's during this cancel where the panic occurs.

[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x100b422d0]

Pay attention to the code 0x2, which is SEGV_ACCERR. Maybe v is not nil. See https://stackoverflow.com/a/54767503/1369400.
BTW, can you run your app with the -race option? See https://go.dev/doc/articles/race_detector

@ZekeLu Thanks so much for pointing that out. Turns out my mind was used to ignoring that first part of the error and lazer focusing on the nil pointer defer. Was able to find the issue in our implementation and corrected it, verified no issues afterwards.
I don't think this PR is needed anymore as it would hide problems like it did with this forked code.
Thanks for your input!

Thank you for your feedback! I'm curious about how this could happen. Please share more about the error if it's okay with you.


FeatureAdd schema change for remote storage file

Proposed changes
Issue Number: close #13486
Problem summary
Support schema change for rowset on remote storage.
Checklist(Required)

Does it affect the original behavior:

[x] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[x] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[x] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[x] Yes
[ ] No

Are there any changes that cannot be rolled back:

[x] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

We should not implement heavy schema change for cooldown, light schema change is done only in fe.  We can enable light schema change when creating a table with property light_schema_change = true.

We should not implement heavy schema change for cooldown, light schema change is done only in fe. We can enable light schema change when creating a table with property light_schema_change = true.

light_schema_change is only useful in alter table add value, but not alter table add key, which is still used in old case, so we must change the implement in BE.
you can't force user to create table with light_schema_change = true, when he want to use cold data in a old table, it doesn't work. This is used to compatible old table.

We already have light weight schema change(set a property during create table), not need link any more and S3(all object systems) not support link.

you can't force user to create table with light_schema_change = true, when he want to use cold data in a old table, it doesn't work. This is used to compatible old table.

I think we could add support to convert old table (not support light weight schema change) to new table (support light weight schema change) because we will set light_schema_change = true as default in one or two months. Then we could use light weight schema change to do such things.

we will remove linked schema change after 1.2 is released and it is stable.

I think you could add support to convert old table (not support light weight schema change) to new table (support light weight schema change).  Then we could use light weight schema change to do such things.
we will set light_schema_change = true as default in one or two months. We will remove linked schema change after 1.2 is released and it is stable. Then most of link file related code will be removed.  I think you could help us add such feature then we could remove linked schema change more quickly.

light_schema_change is only useful in alter table add value, but not alter table add key, which is still used in old case, so we must change the implement in BE.

light_schema_change is only useful in alter table add value, but not alter table add key, which is still used in old case, so we must change the implement in BE.

Do you mean add key could be resolved by using linked schema change? Could you please provide a case?
I think if an old schema change could use linked schema change, then it could also use light weight schema change.

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 39.74 seconds
load time: 557 seconds
storage size:<PHONE_NUMBER>0 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221026133910_clickbench_pr_34414.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 38.5 seconds
load time: 571 seconds
storage size:<PHONE_NUMBER>1 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221027185618_clickbench_pr_34799.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 40.14 seconds
load time: 561 seconds
storage size:<PHONE_NUMBER>1 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221027171554_clickbench_pr_34952.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 38.66 seconds
load time: 569 seconds
storage size:<PHONE_NUMBER>0 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221028110551_clickbench_pr_35053.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 38.46 seconds
load time: 571 seconds
storage size:<PHONE_NUMBER>8 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221028112724_clickbench_pr_35071.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 39.43 seconds
load time: 634 seconds
storage size:<PHONE_NUMBER>5 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221028035700_clickbench_pr_35100.html


Feature/33

Closes #33

Coverage decreased (-0.3%) to 38.594% when pulling 44cf1393c02625ce0873e7e4fcbb06b4c7eccf5f on feature/33 into 830fa0f1c75080500993289884a178873617f52a on master.


WIP: New book form model

Group the data needed for the new book form.
I would love to hear opinions on this approach.

ping @isaacabraham

When I'm home next week I'll have look at this :)

Woah. We somehow forgot about it


Minimal cross-build support

Description
This PR allows the registration of multiple toolchains for various scala versions.
Extends both scala_library and scala_binary with scala_version parameter which allows to pick proper toolchain
Detailed explanation here
I am already researching the next steps:

support scalafmt for multiple scala versions
fix glitches with BSP
extend scala_test rule too
support for scalac_bootstrap

Gonna add some documentation when the API is approved
Motivation
https://github.com/bazelbuild/rules_scala/issues/1290

A brief summary:

in this PR I define a few _scalac targets that are included in common_attributes and selected while 'compile phase' depending on scala_version:

def _select_scalac(ctx):
    scala_version = ctx.toolchains["@io_bazel_rules_scala//scala:toolchain_type"].scala_version
    if scala_version:
        major_version = extract_major_version(scala_version)
        minor_version = extract_minor_version(scala_version)
        if major_version.startswith("2.11") or (major_version.startswith("2.12") and int(minor_version) < 13):
            return ctx.executable._scalac_before_2_12_13
...

the other solution is to build separate rules scala_library, scala_binary, etc. that encapsulate corresponding _scalac: https://github.com/mateuszkuta256/rules_scala/commit/f247cc8a8d0ad249d78743f2059106a91a10a4c9

scala_2_13_binary = make_scala_binary(scala_version = "2.13.12")
scala_3_1_binary = make_scala_binary(scala_version = "3.1.0")

this one works with BSP perfectly

an update of https://github.com/bazelbuild/rules_scala/pull/1546#discussion_r1490748804:
https://github.com/mateuszkuta256/rules_scala/commit/674453ecf953c172cef9bf782a8b6ff082b3f21f
scalac targets are pushed into new repositories, so we get rid of circular dependencies and can add those targets directly to the toolchain. Then 'compile phase' does:
ctx.toolchains["@io_bazel_rules_scala//scala:toolchain_type"].scalac
instead of ctx.executable._scalac

@simuons @lukaszwawrzyk feel free to test and share your thoughts on which of these is superior

Hi, @mateuszkuta256, sorry for delays. I'll try to take a deeper look on weekend.

Hi, @mateuszkuta256, sorry for delays. I'll try to take a deeper look on weekend.

thx! FYI I am checking the remaining rules in the context of cross-build
there's a same problem for e.g. scala_test - parameter _scalatest_reporter is built differently, depending on SCALA_VERSION
what I propose is to make it a label_list, instead of passing few different attributes for each version https://github.com/mateuszkuta256/rules_scala/blob/356c088ccc8d0c0f98113d73afee25180f26f6e2/scala/private/rules/scala_test.bzl#L81
then, proper version can be selected like this: https://github.com/mateuszkuta256/rules_scala/blob/356c088ccc8d0c0f98113d73afee25180f26f6e2/scala/private/phases/phase_collect_jars.bzl#L22
and we don't define more targets than required, only one per scala_version requested by the user https://github.com/mateuszkuta256/rules_scala/blob/356c088ccc8d0c0f98113d73afee25180f26f6e2/scala/support/support.bzl#L98
we can consider something for scalac too

@simuons Can we do anything to help with the review? Or maybe someone else could also take a look?
At this point it would be good to take a look at the overall design and pick concrete solutions. If you'd feel that it is needed, we can write some doc to explain what happens here in more detail. Let us know if you'd like it or just the comments here and code is enough.
Once we are settled on the overall idea, we can try to split these changes into smaller PRs if it would be helpful.

@lukaszwawrzyk I think doc makes a lot of sense because change is substantial.

Once we are settled on the overall idea, we can try to split these changes into smaller PRs if it would be helpful.

Thanks for this comment. I was unsure do you consider this to be merged or exploring design.

thx @simuons, this PR will be split into a few smaller ones. I already prepared the first part: https://github.com/mateuszkuta256/rules_scala/commits/multiple_scala_versions/

get rid of branching on SCALA_VERSION

In there I introduced scala_versions config property with the semantics you suggested:

scala_version - signifies the default version
scala_versions -  contains all versions required by the repository to build. Default to [scala_version]

there is no more statement like 'if SCALA_VERSION' - instead I rely on elements of SCALA_VERSIONS
for example, the configuration like this: scala_version = "2.13.12",  scala_versions = ["3.3.1"]
will register two targets: scalac_2_13_12, scalac_3_3_1
instead of single target : scalac -> srcs = [...] if SCALA_VERSION...
please take a brief look and confirm this is what you expected, in the meantime I'm gonna continue with "move some of the toolchains properties to build_settings"

one more question @simuons

move some of the toolchains properties to build_settings meaning toolchains will contain only scala version specific stuff. Otherwise we will have a combinatorial explosion of scala versions and properties like strict_deps

you mean to introduce same settings as for scala_version? like:
config_setting(
    name = "strict_deps",
    flag_values = ...
)

such a change wouldn't be backward-compatible, or?
also, one could argue that global settings for each toolchain are not 'elastic' enough (sounds ok for me, just wanna assure we are on the same page)

Hi, @mateuszkuta256, I think I've introduced more confusion by mentioning build_settings. I thought about it and looks like it's not relevant now. So let's not concentrate on that (I'll share latter what I had in mind). Looks like your multiple_scala_version branch attempts to solve smaller scope of this issue. I took a glance at it and think maybe you should open a PR with that and we could move discussion there. After this will be sorted out you will add transitions. wdyt?

I extracted the first part of this PR into a smaller one https://github.com/bazelbuild/rules_scala/pull/1552
another PR will add a transition for toolchain selection
poc for the whole feature

Closing as it was completed as part of https://github.com/bazelbuild/rules_scala/issues/1290


Bump Identity Outbound Auth OIDC Version

Purpose

$Subject

Related PRs

https://github.com/wso2-extensions/identity-outbound-auth-oidc/pull/154

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/6573789280

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/6573789280
Status: success


Update csv

This patch updates the test-operator csv. The CSV now contains full description of all the CRs that are introduced by the test-operator.

tobiko failed even after we disabled it? https://github.com/openstack-k8s-operators/test-operator/blob/main/.zuul.yaml#L76

recheck

@kopecmartin If you agree let's merge this.
The issue is most likely [this|https://softwarefactory-project.io/zuul/t/rdoproject.org/job/podified-multinode-edpm-deployment-crc-test-operator] (multiple job definitions with name 'main').


setToken doesn't switch YouTube channel in Google API (gapi)

I've got a problem that I cannot solve. I want to allow users to connect to multiple youtube channels at once and create youtube streams for them. The main code looks like this:
    export const setGapiTokenForTarget = async (token) => {
        await window.gapi.client.setToken(token);
        await window.gapi.auth.setToken(token);
    };

    export const bindStreamToBroadcast = async (streamId, broadcastId, token) => {
        await setGapiTokenForTarget(token);
        return window.gapi.client.youtube.liveBroadcasts.bind({
            'id': broadcastId,
            'part': 'snippet',
            'streamId': streamId
        });
    };

    export const createBroadcast = async (token) => {
        await setGapiTokenForTarget(token);
        return window.gapi.client.youtube.liveBroadcasts.insert({
            'part': 'snippet,contentDetails,status',
            'resource': {
                'snippet': {
                    'title': 'l1',
                    'scheduledStartTime': '2020-02-07T09:20:17.039Z',
                    'scheduledEndTime': '2020-02-07T09:40:17.039Z'
                },
                'status': {
                    'privacyStatus': 'unlisted'
                }
            }
        });
    };

    export const createStream = async (token) => {
        await setGapiTokenForTarget(token);
        return window.gapi.client.youtube.liveStreams.insert({
            'part': 'snippet,cdn,contentDetails,status',
            'resource': {
                'snippet': {
                    'title': 'LIVE PANEL TEST',
                    'description': 'LIVE PANEL TEST'
                },
                'cdn': {
                    'frameRate': '60fps',
                    'ingestionType': 'rtmp',
                    'resolution': '1080p'
                },
                'contentDetails': {
                    'isReusable': true
                }
            }
        });
    };

    export const createStreamAndBroadcastForTarget = async (target) => {
        const broadcast = await createBroadcast(target.token);
        const stream = await createStream(target.token);
        const binded = await bindStreamToBroadcast(stream.result.id, broadcast.result.id, target.token);

        return { stream, broadcast, binded };
    };

    export const createStreamAndBroadcastForTargets = async (targets, { ...all }) => {
        const youtubeEvents = targets.map(createStreamAndBroadcastForTarget);

        return Promise.all(youtubeEvents);
    };

This is just the prototype and the data is hard-coded. However, when I try to setToken for each target (channel), the profile doesn't change and I'm doing the same thing (creating lives) at only one of the channels. Each channel has it's own token returned from google after sign in and it is an object taken directly from google, not just key (string). I've checked it and every token is different for each channel. It looks like window.gapi.client.setToken and window.gapi.auth.setToken is not working and it doesn't switch anything.

Anyone, anything? 😢

Anyone? I’ve still got this problem

Check this https://github.com/google/google-api-javascript-client/issues/13#issuecomment-296907306


Create Headrs_SSRF_Blind.yaml

Identifies SSRF vulnerability in known headers
Checks for both HTTP/1.1 & HTTP/2.0
Checks for both GET & POST

root@robensive$> nuclei -l urls.txt -t Headers_Blind_SSRF.yaml -silent
[header-blind-ssrf] [http] [high] https://ginandjuice.shop/?category=1#Referer%23GET
[header-blind-ssrf] [http] [high] https://ginandjuice.shop/?category=1#Referer%23GET

Hello @RikunjSindhwad, The response time to this issue was much longer than usual. Thank you so much for sharing this template with the community and contributing to this project 🍻
I have updated the template, removed unnecessary headers and paths, and added a headers file, as this repo is separate from nuclei-templates. Let me know if it looks you. You can join our discord server. It's a great place to connect with fellow contributors and stay updated with the latest developments. Thank you once again

closing, this repository is archived and merged into nuclei-templates project under /dast directory.
@princechaddha we can move this template into template project.


Async operations on cookie jar

I haven't given much thought to this before now, but for the crawler to be able to run reliably in a distributed fashion, we need to have a distributed cookie jar as well. To have that, we need to only use asynchronous operations on the cookie jar.
I'd like to hold off till after 1.0.0 with this, though. Changing the crawler's internal behaviour doesn't break anything for the end user. And the cookie API is quite poorly documented, so I think if we add a deprecation warning first about the fact that the cookie jar methods will stop returning results (and instead only use callbacks) we should be fine

Yeah, let's call it a 2.0 release (because it's breaking, not because it's far away.) But I don't think it's so risky — from what I've seen most people use the cookie jar implicitly rather than hook any of their own stuff up to it.

I think we should look into whether using a 3rd party dependency for cookie management makes sense or not.
tough-cookie is widely used (being request's cookie module), and comes with a cookie store which uses a replaceable, asynchronous back-end. There are even back-end implementations for both redis and SQL-databases.


Mvn to maven alias

Map mvn to maven for the Maven user used to the shortcut that doesn't define an alias

I have not looked at this, but I like the sound of it, and will try to tomorrow some time.


Selecting of large folded regions is slow. Time spent in writeScreenReaderContent

Investigating https://github.com/microsoft/vscode/issues/192257

open https://vscode.dev/, create an untitled file
create a large JSON array. Add []and insert the content of https://github.com/microsoft/vscode/blob/1e528d7a4cba563f465265344e260394e2e8f332/cgmanifest.json  multiple times separated by commas
fold the content (Ctrl + K CTRL + 0), expand the top level
go to the end of the file and slowly select to the top. Note that the selection gets sloppier the longer you do that.

Big contents of selected text are written to the screenreader content, which seems to take a long time to render.
I don't have a screenreader enabled.

Trace-20230906T105957.zip

cc @alexdima


onConsoleMessage and onError do not work

Expected behavior
I want to get console messages of page by page.property('onConsoleMessage') and thrown errors by page.property('onError').
Actual behavior
It looks like that callbacks inside onConsoleMessage and onError do not work now.
Steps to reproduce the behavior
Here is a code
const phantom = require('phantom');

phantom.create()
.then((phantomInstance) => phantomInstance.createPage())
.then((page) => {

    page.property('onConsoleMessage', (msg) => {
        console.log('phantomjs page console message', msg);
    });

    page.property('onError', (msg) => {
        console.log('phantomjs page error', msg);
    });

    return page;

})
.then((page) => {

    return page.open('http://google.com/').then(() => page);

})
.then((page) => {

    return page.evaluate(function() {

        console.log('HELLO FROM CONSOLE');

        throw 'SOMETHING';

        return 'something';

    }).then((res) => {

        console.log('result', res);

        return page;

    });

});

Now I see result null in console, when I expect to get phantomjs page console message HELLO FROM CONSOLE and phantomjs page error SOMETHING.
Also, if I comment page.property('onError'), output will be
info: SOMETHING
info:
info:   :5 in anonymous
info:   :10
result null

Environment

OS: Mac OS 10.11.3
Node version (node -v): v5.8.0
package version: 2.0.9

I haven't had a chance to look at this. Any update? I don't know what is the problem.  Any debugging information?

Maybe here
.then((page) => {

    page.property('onConsoleMessage', (msg) => {
        console.log('phantomjs page console message', msg);
    });

    page.property('onError', (msg) => {
        console.log('phantomjs page error', msg);
    });

    return page;

})

you return page before set onConsoleMessage and onError?

@waitingduck I don't think that problem is here, the same way I added
    page.property('onResourceReceived', (msg) => {
        console.log('received');
    });

and it worked fine, print to console.

@roadhump When you don't use arrow functions, your example works fine here. So maybe just use regular functions for now?

Interesting. I always compile so I never tried this. It makes sense though because I serialize and it needs a function.

Closing since the issue was found.


vs/base/parts/tree/common is a fake

The first method of the ITree interface is getHTMLElement(): HTMLElement; which is a violation the rules of the common namespace.

You got me.

Thanks - related/unrelated question: why is this a part and not just a ui element like others (actionbar etc)


Getting an complete folder structure in terminal only(Different colour structure)

Description of the new feature/enhancement
I am writing today to make a feature request that I believe would greatly enhance the user experience for developers working in the terminal. Currently, when navigating through repositories in the terminal, the folder structure is displayed in a uniform color, making it challenging to quickly identify different levels and subdirectories.
I would like to propose the implementation of a feature that allows for a complete folder structure to be displayed in the terminal, with each level of the structure assigned a distinct color. This visual differentiation would enable developers to easily grasp the hierarchy of their project and navigate through directories more efficiently.
I believe that this feature would be highly beneficial to developers who frequently work in the terminal, helping them save time and reduce errors. It would greatly enhance the productivity and user experience for GitHub users across the globe.
Thank you for considering my feature request. I appreciate the hard work and dedication of the GitHub team in continuously improving the platform. I look forward to seeing GitHub evolve and empower developers even further.
Proposed technical implementation details (optional)

This is usually something configurable based on the application that's emitting the directory structure. For example, ls uses LS_COLORS to change the colors of the output based on the file type. There's a similar way of controlling the colors in PowerShell 7.2+.
Terminal is more than happy to listen to the colors emitted by an app, but we don't really control what the client application chooses to emit.


Set the tag of related images when building bundles

Add the IMAGE_TAG variable to Makefile.
Use that variable in cloudbuild.yaml to reference the correct images when creating the bundle.
/cc @mresvanis @ybettan

/test all

Codecov Report
Patch and project coverage have no change.

Comparison is base (fbb7178) 82.87% compared to head (4dd5d71) 82.87%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #425   +/-   ##
=======================================
  Coverage   82.87%   82.87%
=======================================
  Files          33       33
  Lines        3316     3316
=======================================
  Hits         2748     2748
  Misses        465      465
  Partials      103      103

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

/lgtm

/unhold


Revert "Bump spring-data-jpa from 1.3.0.RELEASE to 1.11.23.RELEASE in /developer-tools/java-debugging/app"

Reverts docker/labs#476
After this merge the application no longer starts.
Unexpected exception parsing XML document from class path resource [jpaContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getEnvironment()Lorg/springframework/core/env/Environment;
See #495

Please can you fix the issue not revert security fixes.


Update zio, zio-test, zio-test-sbt to 1.0.1

Updates

dev.zio:zio
dev.zio:zio-test
dev.zio:zio-test-sbt

from 1.0.0-RC17 to 1.0.1.
GitHub Release Notes
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio" } ]

Applied Migrations

github:zio/zio/CurriedAssert

labels: library-update, semver-pre-release, scalafix-migrations

Superseded by #98.

Superseded by #98.


v-model doesen't work with  logic in simple inputs, checkbox, etc

Version
2.4.4
Reproduction link
http://jsfiddle.net/yariksav/26moyu4n/4/
Steps to reproduce
<component :is="'input'" v-model="test"></component>

data () {
  return {
    test: '111'
  }
}

What is expected?
the value 'test' must change when i edit input
What is actually happening?
the value doesen't change, input doesen't emit event

v-model relies on static information about the tag it is used on to generate appropriate code during compilation. When used on a <component> it generates component-specific code instead of native form element code. This is simply something that we don't support due to the compilation-based nature of v-model - use if branches instead.


BuildServer sync causes ROS python issues

Describe the bug
robot@ControlModule1:~/catkin_ws $ rosnode list
Traceback (most recent call last):
File "/opt/ros/indigo/bin/rosnode", line 35, in
rosnode.rosnodemain()
AttributeError: 'module' object has no attribute 'rosnodemain'
To Reproduce
Expected behavior
Screenshots
Additional context
Closing Criteria

Not really sure what the problem is, but maybe something to do with syncing to the bin library: /home/robot/catkin_ws/devel/lib/
Was attempting to troubleshoot and now it's not occuring anymore.  Leaving open for now.

Dont see this anymore. Closing.


Reading Dimensions of Text Resets Resolution on Text  in Phaser 2.3.0

If the resolution config option is set for Phaser, reading the dimensions of text will cause Phaser to re-render the text with a resolution of 1 instead of the set value.
See the jsfiddle for examples on a device with window.devicePixelRatio greater than 1.
https://jsfiddle.net/dbw3jbdz/

This is now fixed in dev.


Feature: handle column and table comments

This aims to implements #17.
Few things:

the new test case is duplicated from mediawiki, I will probably refactor it if I have the time;
columns comment could should Literal, I'll try to change it if I can;

Let me know if there is anything I can improve.

Thanks, this is looking great!
I don't think the column comments should be Literal; the Literal type is for values that could be of several types (integer/string/float), but comments AIUI are always strings.


Fix typos and misspelling

This PR fixes some typos and misspellings found on the toc.md file that are different from the ones pointed in the other Open PRs (#3 and #4 )
Also I wanted to thank for this page which was really useful for me.

@DhruvKumar @msftclas @azurecla @azurecompliance3 @swan-am-i
Can you double check this PR whenever you can?


Add support for React Native and keepFillColor option

This PR adds:

support to use this package in RN projects
possibility to keep fill color from original SVG
possibility to use custom name for component

@pchengsf Hey, thanks! You are right, this functionality depends on react-native-svg library that has to be installed separately (it is not included in dependencies). So just add react-native-svg package to your project and you should be ready to use generated icons like in the examples <Icon color={'blue'} height={21} kind="chevron" width={13} />