Connections are left in CLOSE_WAIT after DatabaseClient.release is called

This has not been a major issue because the recommendation is that applications share one DatabaseClient instance throughout the life of the application and and call release when the application is ready to terminate.  However, we want to be a good citizen and close all the resources we open.  This bug demonstrates we are not doing this in this case.
import com.marklogic.client.DatabaseClient;
import com.marklogic.client.DatabaseClientFactory;
import com.marklogic.client.DatabaseClientFactory.DigestAuthContext;
import com.marklogic.client.io.FileHandle;
import com.marklogic.client.semantics.GraphManager;
import com.marklogic.client.semantics.RDFMimeTypes;

import java.io.*;

// minimal java api client test which illustrates CLOSE_WAIT

public class CloseWaitTest {

    public static DatabaseClient writerClient = DatabaseClientFactory.newClient("localhost", 8000,
        new DigestAuthContext("admin", "admin"));

    protected static final String TESTFILE = "rdfxml.rdf";

    public static void main(String[] args) throws Exception {
        try {
            File testData = new File(TESTFILE);
            FileHandle testHandle = new FileHandle(testData);
            GraphManager gmgr = writerClient.newGraphManager();
            gmgr.setDefaultMimetype(RDFMimeTypes.RDFXML);
            gmgr.merge("/directory1/test.rdf", testHandle);
            gmgr.delete("/directory1/test.rdf");
        } catch (Exception ex) {
            throw ex;
        } finally {
            writerClient.release();
            writerClient = null;
            // increase Thread.sleep or set breakpoints on gmgr.merge and gmgr.delete to observe CLOSE_WAIT
            Thread.sleep(100000);
        }
    }
}

Then on linux, while the Thread.sleep is still going, run the following to see the connections still in close wait:
netstat -an | grep 8000 | grep CLOSE_WAIT

Here's a description of TIME_WAIT connections with respect to Apache httpclient.  The description of TIME_WAIT vs CLOSE_WAIT comes across strange to me, but for what it's worth:
http://wiki.apache.org/HttpComponents/FrequentlyAskedConnectionManagementQuestions

Updating this Git Issue, with comments taken from MarkLogic Bug Track system ( https://bugtrack.marklogic.com/41543)
QA Test Results / Oberservations on Windows Cluster running MarkLogic Server build - 8.0-5.8.
Able to reproduce the issue on a Java Client API branch checked on August 25 2016 with branch 3.0-develop. Used the test code from Sam and ran the test using gradle command.
Commands run are:
cd java-client-api-dev
git checkout 3.0-develop
git branch

mvn clean
mvn compile
mvn -Dmaven.test.skip=true -Dmaven.javadoc.skip=true install
cd test-complete
chmod +x gradlew

Changed one of the test to have Sam's code to reproduce the issue
Copied the required data file into a folder(into "c:" for Windows)
./gradlew clean
./gradlew complie
./gradlew -Dtest.single=TestSearchOnJSON test

On admin GUI verified that there are fragments after the delete of graph (doc) from the sample test code.
On a separate cygwin window, run netstat -an|grep 8011|grep CLOSE_WAIT
Was able to see connection in CLOSE_WAIT.
Did a checkout of latest 3.0-develop into another folder.
Repeated the above steps.
Did not see connection in CLOSE_WAIT.
Tested on Linux cluster with same procedures.
Did not see CLOSE_WAIT with the sample test code.

The issue is fixed. Ran the tests on release-<IP_ADDRESS> branch of Java Client API on MarkLogic Server build 8.0-5.8 version.

Issue won't sync if its closed.


IllegalArgumentException("unknown HashAlgorithm") when server sends Certificate Request with Signature Hash Algorithm which is not supported by bc-java

IllegalArgumentException("unknown HashAlgorithm") is thrown when server sends Certificate Request during handshake with Signature Hash Algorithm which is not supported by bc-java.
I'm trying to add DTLS1.2 support to Jitsi. Jitsi uses bc-java to implement DTLS.
With fixes I'm working on, when Jitsi is server during DTLS connection establishment everything works, but when Jitsi is client during DTLS connection establishment -  the connection could not be established due to internal error reported during handshake.
An exception happen with following stack trace:
createHash:-1, TlsUtils (org.bouncycastle.crypto.tls)
checkTrackingHash:-1, DeferredHash (org.bouncycastle.crypto.tls)
trackHashAlgorithm:-1, DeferredHash (org.bouncycastle.crypto.tls)
trackHashAlgorithms:-1, TlsUtils (org.bouncycastle.crypto.tls)
clientHandshake:-1, DTLSClientProtocol (org.bouncycastle.crypto.tls)
connect:-1, DTLSClientProtocol (org.bouncycastle.crypto.tls)
runInConnectThread:990, DtlsPacketTransformer (org.jitsi.impl.neomedia.transform.dtls)
access$100:40, DtlsPacketTransformer (org.jitsi.impl.neomedia.transform.dtls)
run:1256, DtlsPacketTransformer$2 (org.jitsi.impl.neomedia.transform.dtls)

createHash is invoked with value 8, which is unknown hash algorithm to bc-java.
It comes from list of supported Signature Hash Algorithm inside Servers Certificate Request message.
Below I'm attaching logs from Wireshark.
Client Hello which is sent by Jitsi to WebRTC client:
22	0.150218950	<IP_ADDRESS>	<IP_ADDRESS>	DTLSv1.2	202	Client Hello

Frame 22: 202 bytes on wire (1616 bits), 202 bytes captured (1616 bits) on interface 1
    Interface id: 1 (any)
        Interface name: any
    Encapsulation type: Linux cooked-mode capture (25)
    Arrival Time: Oct 21, 2018 01:00:50.903203108 +03
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time:<PHONE_NUMBER>.903203108 seconds
    [Time delta from previous captured frame: 0.006163916 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
    [Time since reference or first frame: 0.150218950 seconds]
    Frame Number: 22
    Frame Length: 202 bytes (1616 bits)
    Capture Length: 202 bytes (1616 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: sll:ethertype:ip:udp:dtls]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Linux cooked capture
    Packet type: Unicast to us (0)
    Link-layer address type: 772
    Link-layer address length: 6
    Source: 00:00:00_00:00:00 (00:00:00:00:00:00)
    Unused: 0000
    Protocol: IPv4 (0x0800)
Internet Protocol Version 4, Src: <IP_ADDRESS>, Dst: <IP_ADDRESS>
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
    Total Length: 186
    Identification: 0x242e (9262)
    Flags: 0x4000, Don't fragment
        0... .... .... .... = Reserved bit: Not set
        .1.. .... .... .... = Don't fragment: Set
        ..0. .... .... .... = More fragments: Not set
        ...0 0000 0000 0000 = Fragment offset: 0
    Time to live: 64
    Protocol: UDP (17)
    Header checksum: 0x05b3 [validation disabled]
    [Header checksum status: Unverified]
    Source: <IP_ADDRESS>
    Destination: <IP_ADDRESS>
User Datagram Protocol, Src Port: 10000, Dst Port: 54646
    Source Port: 10000
    Destination Port: 54646
    Length: 166
    Checksum: 0x110a [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
Datagram Transport Layer Security
    DTLSv1.2 Record Layer: Handshake Protocol: Client Hello
        Content Type: Handshake (22)
        Version: DTLS 1.0 (0xfeff)
        Epoch: 0
        Sequence Number: 0
        Length: 145
        Handshake Protocol: Client Hello
            Handshake Type: Client Hello (1)
            Length: 133
            Message Sequence: 0
            Fragment Offset: 0
            Fragment Length: 133
            Version: DTLS 1.2 (0xfefd)
            Random: 5d6d2fd359eb4b5a77989eb2a792dd5e5f36953c716664a0...
                GMT Unix Time: Sep  2, 2019 18:05:55.000000000 +03
                Random Bytes: 59eb4b5a77989eb2a792dd5e5f36953c716664a0ac6ad880...
            Session ID Length: 0
            Cookie Length: 0
            Cipher Suites Length: 26
            Cipher Suites (13 suites)
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 (0xc023)
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA (0xc009)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)
                Cipher Suite: TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 (0x00a2)
                Cipher Suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 (0x0040)
                Cipher Suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA (0x0032)
                Cipher Suite: TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x009e)
                Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x0067)
                Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
                Cipher Suite: TLS_EMPTY_RENEGOTIATION_INFO_SCSV (0x00ff)
            Compression Methods Length: 1
            Compression Methods (1 method)
                Compression Method: null (0)
            Extensions Length: 65
            Extension: supported_groups (len=6)
                Type: supported_groups (10)
                Length: 6
                Supported Groups List Length: 4
                Supported Groups (2 groups)
                    Supported Group: secp256r1 (0x0017)
                    Supported Group: secp384r1 (0x0018)
            Extension: use_srtp (len=7)
                Type: use_srtp (14)
                Length: 7
                SRTP Protection Profiles Length: 4
                SRTP Protection Profile: SRTP_AES128_CM_HMAC_SHA1_80 (0x0001)
                SRTP Protection Profile: SRTP_AES128_CM_HMAC_SHA1_32 (0x0002)
                MKI Length: 0
            Extension: signature_algorithms (len=32)
                Type: signature_algorithms (13)
                Length: 32
                Signature Hash Algorithms Length: 30
                Signature Hash Algorithms (15 algorithms)
                    Signature Algorithm: rsa_pkcs1_sha1 (0x0201)
                        Signature Hash Algorithm Hash: SHA1 (2)
                        Signature Hash Algorithm Signature: RSA (1)
                    Signature Algorithm: SHA224 RSA (0x0301)
                        Signature Hash Algorithm Hash: SHA224 (3)
                        Signature Hash Algorithm Signature: RSA (1)
                    Signature Algorithm: rsa_pkcs1_sha256 (0x0401)
                        Signature Hash Algorithm Hash: SHA256 (4)
                        Signature Hash Algorithm Signature: RSA (1)
                    Signature Algorithm: rsa_pkcs1_sha384 (0x0501)
                        Signature Hash Algorithm Hash: SHA384 (5)
                        Signature Hash Algorithm Signature: RSA (1)
                    Signature Algorithm: rsa_pkcs1_sha512 (0x0601)
                        Signature Hash Algorithm Hash: SHA512 (6)
                        Signature Hash Algorithm Signature: RSA (1)
                    Signature Algorithm: SHA1 DSA (0x0202)
                        Signature Hash Algorithm Hash: SHA1 (2)
                        Signature Hash Algorithm Signature: DSA (2)
                    Signature Algorithm: SHA224 DSA (0x0302)
                        Signature Hash Algorithm Hash: SHA224 (3)
                        Signature Hash Algorithm Signature: DSA (2)
                    Signature Algorithm: SHA256 DSA (0x0402)
                        Signature Hash Algorithm Hash: SHA256 (4)
                        Signature Hash Algorithm Signature: DSA (2)
                    Signature Algorithm: SHA384 DSA (0x0502)
                        Signature Hash Algorithm Hash: SHA384 (5)
                        Signature Hash Algorithm Signature: DSA (2)
                    Signature Algorithm: SHA512 DSA (0x0602)
                        Signature Hash Algorithm Hash: SHA512 (6)
                        Signature Hash Algorithm Signature: DSA (2)
                    Signature Algorithm: ecdsa_sha1 (0x0203)
                        Signature Hash Algorithm Hash: SHA1 (2)
                        Signature Hash Algorithm Signature: ECDSA (3)
                    Signature Algorithm: SHA224 ECDSA (0x0303)
                        Signature Hash Algorithm Hash: SHA224 (3)
                        Signature Hash Algorithm Signature: ECDSA (3)
                    Signature Algorithm: ecdsa_secp256r1_sha256 (0x0403)
                        Signature Hash Algorithm Hash: SHA256 (4)
                        Signature Hash Algorithm Signature: ECDSA (3)
                    Signature Algorithm: ecdsa_secp384r1_sha384 (0x0503)
                        Signature Hash Algorithm Hash: SHA384 (5)
                        Signature Hash Algorithm Signature: ECDSA (3)
                    Signature Algorithm: ecdsa_secp521r1_sha512 (0x0603)
                        Signature Hash Algorithm Hash: SHA512 (6)
                        Signature Hash Algorithm Signature: ECDSA (3)
            Extension: ec_point_formats (len=4)
                Type: ec_point_formats (11)
                Length: 4
                EC point formats Length: 3
                Elliptic curves point formats (3)
                    EC point format: uncompressed (0)
                    EC point format: ansiX962_compressed_prime (1)
                    EC point format: ansiX962_compressed_char2 (2)

Server Hello message which is sent by WebRTC client to Jitsi:
23	0.150667255	<IP_ADDRESS>	<IP_ADDRESS>	DTLSv1.2	718	Server Hello, Certificate, Server Key Exchange, Certificate Request, Server Hello Done

Frame 23: 718 bytes on wire (5744 bits), 718 bytes captured (5744 bits) on interface 1
    Interface id: 1 (any)
        Interface name: any
    Encapsulation type: Linux cooked-mode capture (25)
    Arrival Time: Oct 21, 2018 01:00:50.903651413 +03
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time:<PHONE_NUMBER>.903651413 seconds
    [Time delta from previous captured frame: 0.000448305 seconds]
    [Time delta from previous displayed frame: 0.000448305 seconds]
    [Time since reference or first frame: 0.150667255 seconds]
    Frame Number: 23
    Frame Length: 718 bytes (5744 bits)
    Capture Length: 718 bytes (5744 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: sll:ethertype:ip:udp:dtls:x509sat:x509sat:pkcs-1]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Linux cooked capture
    Packet type: Unicast to us (0)
    Link-layer address type: 772
    Link-layer address length: 6
    Source: 00:00:00_00:00:00 (00:00:00:00:00:00)
    Unused: 0000
    Protocol: IPv4 (0x0800)
Internet Protocol Version 4, Src: <IP_ADDRESS>, Dst: <IP_ADDRESS>
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
    Total Length: 702
    Identification: 0x242f (9263)
    Flags: 0x4000, Don't fragment
        0... .... .... .... = Reserved bit: Not set
        .1.. .... .... .... = Don't fragment: Set
        ..0. .... .... .... = More fragments: Not set
        ...0 0000 0000 0000 = Fragment offset: 0
    Time to live: 64
    Protocol: UDP (17)
    Header checksum: 0x03ae [validation disabled]
    [Header checksum status: Unverified]
    Source: <IP_ADDRESS>
    Destination: <IP_ADDRESS>
User Datagram Protocol, Src Port: 54646, Dst Port: 10000
    Source Port: 54646
    Destination Port: 10000
    Length: 682
    Checksum: 0x130e [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
Datagram Transport Layer Security
    DTLSv1.2 Record Layer: Handshake Protocol: Server Hello
        Content Type: Handshake (22)
        Version: DTLS 1.2 (0xfefd)
        Epoch: 0
        Sequence Number: 0
        Length: 104
        Handshake Protocol: Server Hello
            Handshake Type: Server Hello (2)
            Length: 92
            Message Sequence: 0
            Fragment Offset: 0
            Fragment Length: 92
            Version: DTLS 1.2 (0xfefd)
            Random: 5bcba592c3df351eb8cc6b8e0d073f48c9dc243bd55d18ca...
                GMT Unix Time: Oct 21, 2018 01:00:50.000000000 +03
                Random Bytes: c3df351eb8cc6b8e0d073f48c9dc243bd55d18ca0bd6f340...
            Session ID Length: 32
            Session ID: e62dfcfdaa7222c7961f0188ff0c7f6794626b8e1947141d...
            Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)
            Compression Method: null (0)
            Extensions Length: 20
            Extension: renegotiation_info (len=1)
                Type: renegotiation_info (65281)
                Length: 1
                Renegotiation Info extension
                    Renegotiation info extension length: 0
            Extension: use_srtp (len=5)
                Type: use_srtp (14)
                Length: 5
                SRTP Protection Profiles Length: 2
                SRTP Protection Profile: SRTP_AES128_CM_HMAC_SHA1_80 (0x0001)
                MKI Length: 0
            Extension: ec_point_formats (len=2)
                Type: ec_point_formats (11)
                Length: 2
                EC point formats Length: 1
                Elliptic curves point formats (1)
                    EC point format: uncompressed (0)
    DTLSv1.2 Record Layer: Handshake Protocol: Certificate
        Content Type: Handshake (22)
        Version: DTLS 1.2 (0xfefd)
        Epoch: 0
        Sequence Number: 1
        Length: 300
        Handshake Protocol: Certificate
            Handshake Type: Certificate (11)
            Length: 288
            Message Sequence: 1
            Fragment Offset: 0
            Fragment Length: 288
            Certificates Length: 285
            Certificates (285 bytes)
                Certificate Length: 282
                Certificate:<PHONE_NUMBER>81bda003020102020900f2ee885aa8b2553e30... (id-at-commonName=WebRTC)
                    signedCertificate
                        version: v3 (2)
                        serialNumber:<PHONE_NUMBER>4594390334
                        signature (ecdsa-with-SHA256)
                            Algorithm Id: 1.2.840.10<IP_ADDRESS> (ecdsa-with-SHA256)
                        issuer: rdnSequence (0)
                            rdnSequence: 1 item (id-at-commonName=WebRTC)
                                RDNSequence item: 1 item (id-at-commonName=WebRTC)
                                    RelativeDistinguishedName item (id-at-commonName=WebRTC)
                                        Id: <IP_ADDRESS> (id-at-commonName)
                                        DirectoryString: uTF8String (4)
                                            uTF8String: WebRTC
                        validity
                            notBefore: utcTime (0)
                                utcTime: 18-10-19 22:00:50 (UTC)
                            notAfter: utcTime (0)
                                utcTime: 18-11-19 22:00:50 (UTC)
                        subject: rdnSequence (0)
                            rdnSequence: 1 item (id-at-commonName=WebRTC)
                                RDNSequence item: 1 item (id-at-commonName=WebRTC)
                                    RelativeDistinguishedName item (id-at-commonName=WebRTC)
                                        Id: <IP_ADDRESS> (id-at-commonName)
                                        DirectoryString: uTF8String (4)
                                            uTF8String: WebRTC
                        subjectPublicKeyInfo
                            algorithm (id-ecPublicKey)
                                Algorithm Id: 1.2.840.10045.2.1 (id-ecPublicKey)
                                ECParameters: namedCurve (0)
                                    namedCurve: 1.2.840.10<IP_ADDRESS> (secp256r1)
                            Padding: 0
                            subjectPublicKey: 04cd8b8fb202396c7877cd55016f512083a74dfb31202625...
                    algorithmIdentifier (ecdsa-with-SHA256)
                        Algorithm Id: 1.2.840.10<IP_ADDRESS> (ecdsa-with-SHA256)
                    Padding: 0
                    encrypted:<PHONE_NUMBER>89d194a0c6f738b054a04c9ec6c13cf3e3353e...
    DTLSv1.2 Record Layer: Handshake Protocol: Server Key Exchange
        Content Type: Handshake (22)
        Version: DTLS 1.2 (0xfefd)
        Epoch: 0
        Sequence Number: 2
        Length: 156
        Handshake Protocol: Server Key Exchange
            Handshake Type: Server Key Exchange (12)
            Length: 144
            Message Sequence: 2
            Fragment Offset: 0
            Fragment Length: 144
            EC Diffie-Hellman Server Params
                Curve Type: named_curve (0x03)
                Named Curve: secp256r1 (0x0017)
                Pubkey Length: 65
                Pubkey: 043954b89002ed7b7b861ac638d41e2d90d783049aadfb61...
                Signature Algorithm: ecdsa_secp256r1_sha256 (0x0403)
                    Signature Hash Algorithm Hash: SHA256 (4)
                    Signature Hash Algorithm Signature: ECDSA (3)
                Signature Length: 71c
                Signature:<PHONE_NUMBER>723b2e10f7c0ba6fb57a544a2a64415ca006ef...
    DTLSv1.2 Record Layer: Handshake Protocol: Certificate Request
        Content Type: Handshake (22)
        Version: DTLS 1.2 (0xfefd)
        Epoch: 0
        Sequence Number: 3
        Length: 37
        Handshake Protocol: Certificate Request
            Handshake Type: Certificate Request (13)
            Length: 25
            Message Sequence: 3
            Fragment Offset: 0
            Fragment Length: 25
            Certificate types count: 2
            Certificate types (2 types)
                Certificate type: RSA Sign (1)
                Certificate type: ECDSA Sign (64)
            Signature Hash Algorithms Length: 18
            Signature Hash Algorithms (9 algorithms)
                Signature Algorithm: ecdsa_secp256r1_sha256 (0x0403)
                    Signature Hash Algorithm Hash: SHA256 (4)
                    Signature Hash Algorithm Signature: ECDSA (3)
                Signature Algorithm: rsa_pss_rsae_sha256 (0x0804)
                    Signature Hash Algorithm Hash: Unknown (8)
                    Signature Hash Algorithm Signature: Unknown (4)
                Signature Algorithm: rsa_pkcs1_sha256 (0x0401)
                    Signature Hash Algorithm Hash: SHA256 (4)
                    Signature Hash Algorithm Signature: RSA (1)
                Signature Algorithm: ecdsa_secp384r1_sha384 (0x0503)
                    Signature Hash Algorithm Hash: SHA384 (5)
                    Signature Hash Algorithm Signature: ECDSA (3)
                Signature Algorithm: rsa_pss_rsae_sha384 (0x0805)
                    Signature Hash Algorithm Hash: Unknown (8)
                    Signature Hash Algorithm Signature: Unknown (5)
                Signature Algorithm: rsa_pkcs1_sha384 (0x0501)
                    Signature Hash Algorithm Hash: SHA384 (5)
                    Signature Hash Algorithm Signature: RSA (1)
                Signature Algorithm: rsa_pss_rsae_sha512 (0x0806)
                    Signature Hash Algorithm Hash: Unknown (8)
                    Signature Hash Algorithm Signature: Unknown (6)
                Signature Algorithm: rsa_pkcs1_sha512 (0x0601)
                    Signature Hash Algorithm Hash: SHA512 (6)
                    Signature Hash Algorithm Signature: RSA (1)
                Signature Algorithm: rsa_pkcs1_sha1 (0x0201)
                    Signature Hash Algorithm Hash: SHA1 (2)
                    Signature Hash Algorithm Signature: RSA (1)
            Distinguished Names Length: 0
    DTLSv1.2 Record Layer: Handshake Protocol: Server Hello Done
        Content Type: Handshake (22)
        Version: DTLS 1.2 (0xfefd)
        Epoch: 0
        Sequence Number: 4
        Length: 12
        Handshake Protocol: Server Hello Done
            Handshake Type: Server Hello Done (14)
            Length: 0
            Message Sequence: 4
            Fragment Offset: 0
            Fragment Length: 0

From my debugging session it looks like presence of rsa_pss_rsae_sha256 causes bc-java to fail in runtime.
I'm not sure what is proper fix, need to investigate a big more, but it sounds like unsupported algorithm should be just skipped here and not abort DTLS handshake.

Thanks for the bug report. Indeed it is the rsa_pss algorithms that trigger the problem, but the bug is ours, as we should be tolerating (ignoring) unrecognised hash algorithms; both RFC 8422 and 8446 introduced signature algorithms (into TLS 1.2) with the new HashAlgorithm.Intrinsic value (8).
I've pushed a fix to our git which should mirror here shortly.
On a side note, please consider updating to the new TLS API (bctls jar, org.bouncycastle.tls package). The old API in org.bouncycastle.crypto.tls is bug-fix only.

Thank you very much @peterdettman. I'll try to migrate Jitsi to new package. I was really confused from source code, why do I have same classes in different packages, but with slightly different signatures/naming - so one of them was deprecated :).

I am getting this issue talking to servers using native TLS1.2 on OpenJDK11+
Do you have an ETA for a release with this fix in it?

It's in the current beta at https://www.bouncycastle.org/betas if you want to try it.

Thanks. Works perfectly.
Any idea when the next release will be?

Soon... we're aiming for before Christmas. As always it's a question of resources.

Is this fixed in v1.61?

Yes, the fix is in 1.61.

Great, thanks.  Will it make it to maven soon as wel?


TracksServiceConnection: lifecycle

Check how the TrackServiceConnection is used (when created and when destroyed) and make sure that it makes sense according the lifecycle of activities and fragments.
See: https://developer.android.com/guide/components/fragments
Also remove context as attribute and rather pass it for each call by the caller.

Rethink if StatsFragment really needs a TrackRecordingServiceConnection to get the heart rate.
Could be handled by the TrackDetailActivity.


Collect output of cluster-info command

It will be useful to collect more logs about
the cluster.
As a pull request owner and reviewers, I checked that:

[x] Appropriate testing is done and actually running

It may be good to ensure we're not having duplicated logs - I see we're gathering a lot of things from crc/openshift in various ways.
Maybe better to collaborate with @Sandeepyadav93 and the "must-gather" thingy so that we consolidate all of the openshift logs/data/info in one place?

Thanks you @cjeanner, closing this pr in favor of https://github.com/openstack-k8s-operators/ci-framework/pull/359


Broken link to APNS payload documentation

The link to https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html is broken.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 4ea0073c-5276-e642-fa23-3f0b3abd3641
Version Independent ID: 99e7a300-e9aa-15cb-fc17-d63b42de6353
Content: NotificationHubClient.SendAppleNativeNotificationAsync Method (Microsoft.Azure.NotificationHubs) - Azure for .NET Developers
Content Source: xml/Microsoft.Azure.NotificationHubs/NotificationHubClient.xml
Service: notification-hubs
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Managed Identity:0.21012576,Event Hubs:0.1986477,Docs:0.07907445'

@markuspalme Thanks for reaching out to us and sharing this feedback. We are looking into this issue and we will provide an update.

@markuspalme The above PR has been filed and it is currently waiting for the review. In the meantime, if you have any queries, please feel free to ask.

Looks great, thanks for the fix.


Update documentation guide

This updates the documentation guide according to #743 and also adds a section that talks about general writing style. I came up with this section today based on my own experiences with reading and writing documentation, so it might be controversial and not what we want for Snabb Switch documentation. Feedback welcome!

On thing I think we might want to add is a notation dictionary. E.g. pick a set of useful notations such as [range_start,range_end) and describe them in a “Notations” chapter. On the one hand these notations can be very useful on the other hand they can be cryptic if you are unfamiliar with them, and how do you google for [a,b)?

I think a notation dictionary is a good idea, as well as a glossary of acronyms.

I still feel like the documentation is irrelevant unless/until people are actually using it on a daily basis and I wonder to what extent they are.

@lukego I found the documentation on how the Intel driver's 'vlan' argument to be extremely valuable yesterday. I'd say I routinely look at the documentation of Snabb code I'm using, if it has any. It gives an idea of what's intended API vs implementation detail, what's intentional or a bug, etc.

@kbara great to hear! How do you consume it -- via Github, build HTML manual, or read the markdown source locally?

@kbara @lukego I was going to say exactly the opposite!  That documentation was incorrect, incomplete, and misleading!!! https://github.com/SnabbCo/snabbswitch/issues/749

I would have been much better off reading the source code than the documentation.

I use the documentation frequently on GitHub as well as by reading the Markdown source to “load in” context when working with modules and also to track and identify API changes in code.

I read the markdown locally, as well as the source.

I would find it valuable to cite/link parts of the documentation that we especially like and want to emulate in the future. Then these rules could be used more as a reference and to fill in details.
I find it noteworthy that @kbara is the number one fan of the documentation and that she is consuming it in source format in her text editor. This reinforces my feeling that we have an accessibility problem for the formatted documentation.
I wonder how snabb doc man packet or snabb doc apropos append commands might be implemented? (Compile the docs into the executable and print them to the console? Or compile in an index and link to the online docs? Or just not a good idea in the first place?)

I don't mind reading various markup formats as source, as long as they're not as annoying as XML with a ton of attributes, fwiw.

I reflect that we are all giving our $0.02 here but we have not identified an upstream maintainer to actually guide this change towards merge. How to solve that?

I would nominate @eugeneia , on the grounds that he's shown the most enthusiasm/energy on the topic.

I don't think reviewing our own patches is a pattern we should be encouraging :)  @kbara that would mean you or me would be the next hop for this one.  I do not like the change as it stands, which made me hesitant to take responsibility for getting it in (or keeping it out of course).  OTOH if you would like to take it @kbara I will not NAK it.

Oops, I'd managed to forget that it was his patch; excellent point.
I'm ok with this change as-is, though I think both you and Luke have made reasonable points; a patch that addresses those is also welcome. Reducing the 'general considerations' to a pointer to the Lua Reference manual would perhaps be an improvement, but I'd be willing to accept the current text. The src.md/md.src changes are fine, and I mainly agree with the point about where implementation details should be documented.
I suppose there's a case to be made for splitting it into the non-controversial and controversial bits, merging the former onto kbara-next, and hashing out the rest elsewhere or dropping them.
But the tl;dr version is that while I don't love every detail of this patch, I'm willing to merge it as-is, as well as to accept further patches from anyone changing the text.

I still view the branches in the kernel / subsystem model. For me we should have a documentation branch, this branch should have an owner, that person should decide what changes are merged and how much review is enough. If we want the documentation done differently then we would send in PRs as input to that person (who would still hold the editorial control).
On the other hand I don't want every change to have to pass through the documentation branch so all maintainers need to be basically on the same page about what is expected and what we should ask downstream contributors to provide.
The model we are using now of maintainers volunteering to take changes on a case-by-case basis seems unlikely to scale to me, but I am prepared to be proven wrong.

If we want particularly cohesive high-level documentation, I think we need to use an approach like that. For API-level documentation, as you said, not every change should pass through such a mechanism.

We have documentation-fixes which is maintained by me as well and I think it could very well accept PRs that are about high level documentation considerations.
Regarding this PR: which phrases are preachy? I didn't intend to sound preachy obviously. ;-)
As to the suggestion to point to an external guide: we do this in some way already by saying to use the Lua reference manual as orientation, but for this particular case I find it unpractical to say “derive what we expect from you from this 'book'”. I don't know of any applicable style guide or other existing documentation guide either, and think this PR adds some valuable pointers that imho are not obvious and very useful. E.g. I had to figure this out myself and past-me would have benefited from a brief “general writing guide”.

I reflect that I am bikeshedding on this PR so please take my feedback with a grain of salt. On a meta-level I feel like we will have more of a positive effect on documentation by increasing the rate of contributions (merges) in this area. This can all be changed in follow-on PRs after it lands.
I mark @kbara as the Assignee here based on the discussion above. Seems that @kbara has signaled that she is willing to merge so now it's up to @eugeneia to signal how much more revision/feedback he wants to do before that.

(@kbara I can't assign you. Github team invite stuck in your Spam folder?)

@eugeneia Generally I am happy to pull documentation improvements from you directly when you decide they have had enough feedback and revision. Like I mentioned above I do want to move towards having subject matter experts (individuals or small groups) who consistently take the lead on upstreaming changes in specific areas (subsystems). I hope that at the moment we are in the process of discovering where upstream people's interests lie.

@eugeneia are you willing to remove lines 102-131 as @wingo commented on, or would you prefer me to merge this patch set as-is? I'm willing to merge either.

@kbara I say merge it as is for now. I am interested in editing the writing to be less preachy but feel like I would not be able to accomplish this right now without more concrete feedback. I do think that without the explanations the section would be of little use. Any concrete suggestions/feedback can be given in form of PRs, issues or further comments which I would then react to.

Fair. As you said, the feedback hasn't been particularly actionable, and I think this commit is a net contribution. Merged, and thank you.


Auto deleting subscriptions which are expired

Auto deleting subscriptions which are expired

We do not need this for now, because we can check subscriptions expire time where we need


add a meta tag for utf8 charset

Fixes #146
No idea whether this is an appropriate way to do it, I do not have deep understanding of the library. If this is indeed the fix, should I also bump the version number in order to get a new version registered?

Hi, @SimonDanisch , just a friendly bump on this PR. Let me know if you want the version in Project.toml bumped too.

@Krastanov is your issue fixed on master? I just merged #150

Yes, this is great! Commented in the other PR and closed the issue. Having this release would be great!


chore: add compatibility updates for Gateway 3.7 release

Description

Testing instructions
Preview link:
Checklist

[ ] Review label added
[ ] Conditional version tags added, if applicable.

Looks like this changed some more between RCs? We just merged https://github.com/Kong/docs.konghq.com/pull/7372/files this morning.


fix(btc): error message when reporting INSUFFICIENT_UTXO

Changes

Add an allowInsufficient option (set to true by default) to the DataSource.collectSatoshi() API to allow the collection process to be completed when the balance of the target address is insufficient, instead of throwing the INSUFFICIENT_UTXO error
Fix the expected amount of error when collected satoshi and the balance of the target address are both insufficient for a change output to be generated in the transaction (reported by @Dawn-githup)

https://inquisitive-puma-8a7.notion.site/3cebd9c87be54298805f6bfa5106342e

https://inquisitive-puma-8a7.notion.site/error-message-when-reporting-INSUFFICIENT_UTXO-verify-3cebd9c87be54298805f6bfa5106342e


Add image classification support

Ability to assign a class label to an image.
(It's on the roadmap but there was to ticket for it.)

Is this feature implemented?  The link to the roadmap doesn't send me to a roadmap.

I am also interested in this.
Are there any news?


Clean up transformations a bit

This cleans up the Transformations objects a bit so that there's now a single Scale and Translation class, and the scale or translation key in each of them can take either a path or a vector. I think this makes everything a bit clearer by not having lots of different classes, and makes checking for ndim a bit cleaner too.
This also finishes off the coordinateTransformations part of the spec, so fixes https://github.com/BioImageTools/ome-zarr-models-py/issues/32.

How would we deserialize a transform like {"type": "scale", "path": "foo/bar"} after these changes? I feel like without a class that models this JSON exactly (e.g., the PathScale classes being removed here) that becomes unwieldy?

to be clear, I'm all in favor of simplifying things as much as we can, but unfortunately from a structural point of view (i.e., distinguishing types based on their structure) the spec defines two distinct scale transforms, and two distinct translation transforms, and to model that closely we end up needing separate classes for each flavor.

🤦 of course, this does not follow the spec - thanks for pointing that out! Sorry for the noise...


scrcpy not working on mac

Hello All,
Good Evening,
actually, I am using scrcpy on imac  (OS-10.12 (Sierra) after connecting the android device to the mirror image device back and home button is visible.
Requesting you to provide your suggestion.
Thanks,
Vaibhav

I'm not sure to understand the problem.
Could you post a screenshot?

I'm not sure to understand the problem.
Could you post a screenshot?

actually, i am using scrcpy application on mac to mirror the android devices. I am able to mirror the android device with help of scrcpy application but on the mirror image back or home button not visible.

actually, i am using scrcpy application on mac to mirror the android devices. I am able to mirror the android device with help of scrcpy application but on the mirror image back or home button not visible.


Microphone gets cut off while on the call when device goes to sleep

Specify the sample to which the issue belongs (use [x]):
[] P2P Call sample
Platform (use [x])
[] Android
Device info
Manufacturer: Samsung, Redmi, Micromax IN (We tested on wide range of devices same issue)
OS version: android 9 to android 12.
Describe the bug:
While on the call, microphone access gets cut off after a few seconds of the device going to sleep. You can hear other people but other person can't hear you.
Steps to Reproduce:

Start call between any users
Either wait till the device goes to auto sleep (due to inactivity) or manually sleep the device by pressing the power button.
After a few seconds other person on the call will be unable to hear you.

Logs:
Didn't notice any particular error in the logs. It was producing logs the same as when the microphone was working.
Actual result:
Another person cant hear you. While you can hear another person.
Expected behavior:
Both people should be able to hear each other.
Additional info
To tackle this problem I added a wake-lock so the device will stay awake. And its working but the problem arises when a user manually puts device to sleep. After a few seconds microphone access gets cut off.

Is there any information/update on this issue? Its been a while since I opened the issue.

@MrunalrajRedij I'm investigating this issue, it looks like the issue is related to working the app in the background, and if the app is placed in the background for 30 seconds or more the system disables the camera and microphone for this app. I have a few ideas on how to avoid it and will back to you if found any workaround.

Thanks. Please keep me updated as "Calling" is one of the major feature our app delivers.

@MrunalrajRedij in my case the starting of the foreground service fixes the issue. You can add the _ConversationCallScreenState as a WidgetsBindingObserver for listening to the app lifecycle and star the Foreground service when the app moves to the background. For it add the _ConversationCallScreenState as the lifecycle listener in the callback initState():
  @override
  void initState() {
    super.initState();

    // some code there

    WidgetsBinding.instance.addObserver(this);
  }

then implement the method didChangeAppLifecycleState(AppLifecycleState state):
  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    log("[didChangeAppLifecycleState] state: ${state.name}", TAG);
    if (_enableScreenSharing) return; // for screen sharing we manage it separately

    if (state == AppLifecycleState.paused) {
      startBackgroundExecution();
    } else {
      stopBackgroundExecution();
    }
  }

and don't forget to remove the observer after closing the screen:
  @override
  void deactivate() {
    super.deactivate();

    // some code there

    WidgetsBinding.instance.removeObserver(this);
  }

What is the function startBackgroundExecution() and stopBackgroundExecution() ? Other than that I got it.

You said start foreground service when app is in background. What code should be the written in that service?

https://github.com/ConnectyCube/connectycube-flutter-samples/blob/master/p2p_call_sample/lib/src/utils/platform_utils.dart#L23-L39
we already use it for starting the Screen sharing

Okay, got it. Will implement and let you know.

Done all of the steps. Still not working.

Hmm... Interesting... Have you implemented all requirements of the flutter_background plugin? After adding the code above to our P2P Calls sample it started working in the background without any problem.

For some reason was not using this permission
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
After adding the permission it works fine.
Will test it more thoroughly and with different versions. Will close the issue then. Thanks.

Just a question. (Rare scenario) If user has denied permission for bg_service. And since asking for permission is coded in startBackgroundExecution(); So If the app is asking for permission when device goes to paused state. There will be no use since user can't see the permission as device screen is off.
What If I call startBackgroundExecution(); at start of the call? This will ensure that user know that permission is asked. And I don't have to check for paused or inactive state. I can just stopBackgroundExecution();  when screen deactivates.
Will it work or it will have issues that I am unaware of?

In my opinion, you can ask permission after the first start of the application and the second time (if wasn't provided) before the call. Yes, you can call the startBackgroundExecution() immediately after starting the call it will notify a user about a call that continues in the background at any app's lifecycle.

Okay. Thanks for your support.


Add method for finding neighoring points and lines

Is your feature request related to a problem? Please describe.
We need a unified way of finding neighboring sensors, both from points and lines, and a mixture of both.
Describe the solution you'd like
There is an implementation for line-to-point neighbor lookup using shapely here in the prototype that I built some time ago. For line-to-line this is IMO the most solid implementation. It can also be used for line-to-line distance calculations.
For point-to-point we could use functions from scipy.spatial, but since we already have shapely as dependency, this might not be needed. Most likely the scipy functions will be much faster since they are limited to one specific use case, point-to-point distance calculation, whereas shapely works with all its supported geometries.
Hence, currently I would prefer using shapely for line-to-line and line-to-point distance calculation and probably scipy for point-to-point.
There could/should (?) be a general interface to do these calculations. Maybe a good solutions would be a. ABC class, but maybe the added complexity is not worth it and it is better to use separate functions, e.g. calc_line_to_point_distances(ds_lines, ds_points).
Describe alternatives you've considered
There might be code for line-to-point distance calculations because several people (maybe from @eoydvin or @maxmargraf ?)  have used that to find gauges close to CMLs. Hence, we can collect and discuss these implementations and see if we do not need shapely for the line-to-point distances. However, we will need shapely as a dependency if we stick with the fast and tested grid intersection code from pycomlink to be implemented in #5.

The provided code runs nicely on my computer and gives reasonable output as far as I can see.
I have some code that I use to find points near lines that do not need the shapely  to run. The code also runs without projecting the coordinates. However, the code is not that intuitive to read and would need some upgrades to work exactly as intended.. I will have a look at it so that we can discuss it, but for now (and most likely in the future) I think the code you have provided here is better to build on.
One thing to discuss is whether the coordinates should be provided as latitude/longitude or as a in a projected coordinate in a reference grid?

One thing to discuss is whether the coordinates should be provided as latitude/longitude or as a in a projected coordinate in a reference grid?

That is a good point. With shapely or scipy.spatial we will rely on their built-in distance metrics, which, as far as I saw when doing a bit of a search, does not include something that handles lon-lat degree coordinates. If I recall correctly one can supply custom distance metrics via Python code, at least in scipy, but this results in significantly slower calculations.
Because of that, I would suggest to enforce projecting to length-preserving (or something that comes close) local coordinates. We could also enforce/suggest tot store these as x and y variables or for CML as e.g. site_0_x and site_0_y because, anyway, almost all maps make more sense in projected coordinates.
The user should of course be able to choose which projection to use, but we could provide some sane defaults. Naming and storing the projected coordinates needs to be synchronized with the WG1 data format conventions.
We could also add the functionality that the distance calculations always project the data before doing the actual calculation. We have to be careful to not hide too much magic with our functions.
Maybe something like this could be a compromise:
def get_gauge_distance_per_cml(ds_cmls, ds_gauges, project_coordinates_to=None):
    # Check if ds_cmls.site_0_x etc... and ds_gauges.x and y exist
        # If not check if project_coordinates_to is a valid EPSG string
             # If not, raise Error
             # If yes, project data
        # If yes, proceed

    # calculate distance using x and y cooridnates

But then we have to handle the case where one of ds_cmls and ds_gauges has projected coordinates and the other does not, etc...
Maybe it is easier to do something like
ds_cmls = add_projected_coordinates_from_lon_lat(ds_cmls, projection=`some_EPSG_string`)

get_gauge_distance_per_cml(...) # This raises an error if x and y are not there

We would need to check if add_projected_coordinates_from_lon_lat mutates ds_cmls or if we can make it only return an updated version. I prefer to not mutate inputs of a function, i.e. only having pure functions, so that ds_cmls_projected = add_projected....(ds_cmls, ...) will not alter ds_cmls. We could also return a tuple of the four CML coordinates, but that is not nice for the user who has to remember all the correct names of the 4 CML coordinates.

Note that scipy.spatial.distance.cdist seems to be faster than scipy.spatial.distance_matrix, which we currently use. From a quick look and quick test, they provide exactly the same result.
See:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.cdist.html
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance_matrix.html#scipy-spatial-distance-matrix

For very large number of sensors, above 10,000, the distance matrix calculation gets pretty slow (something like 30 sec for 10,000 sensors against themselfs, if I recall correctly) and this scales quadratically (I guess...). Hence we might also want to provide the option to calculat nearest neighbors with scipy.spatial.KDTree, since we typically only use sensors within a certain distance (max. some tens of kilometers) which means that most parts of the distance matrix is not used if our domain is large e.g. for country-wide data in Germany.

There are several ways to calculate the distance between points and points and lines available. I tested some of them and here are the findings. I tested the distance calculation between the following DWD stations available here.
Abenberg_4 10.9667 49.2346
Großenkneten_4 8.237 52.9336

453.708 km - distance in google earth
453.710 km - distance from the pyproj.Geod class described here. This approach digests lon/lat coords and is applicable for point-to-point and point-to-line. Compared to the others it is not very fast.
452.989 km	- distance using the Haversine formula implementation in pycomlink. Uses lon/lat coordinates, 1000x faster then  pyproj.Geod
453.558 km - distance from shapley.Linestring length. Requires coordinates in meters e.g. UTM32. Calculates the Euclidean distance ignoring the earth's curvature. Fast.
scipy cdist: not yet tested.

From this first testing I think pyproj.Geod would be the most precise, does not require transformation from WGS84 and applies to point-to-point and point-to-line calculations (and probably point/line to polygon) but it takes ~200ms for one pair.

Thanks @maxmargraf for doing this comparison and for the summary.
Even though pyproj.Geod is most accurate, it seems to be too slow (200ms for one pair) to use it for a large set of sensors. The Harvesine formula might lead to similar results, depending on radius of the earth that is used (which assumes a spherical earth).
In general, I think, our main limitation is that we need shapely (or at least IMO we should prefer it over own implementations) for doing the calculation for line-to-line and line-to-point distances. And since, as far as I see, there is currently no way in shapely to use something else than the euclidian distance (i.e. do correct lon-lat distance calculation on a the earth surface), we have to project the coordinates first before doing distance calculations. The only problem with this would be, if a dataset spans a domain that is too large for meaningful distance-preserving projections.
Or did you test something else than shapely for point-to-line distances?

Or did you test something else than shapely for point-to-line distances?

No,  please note thatpyproj.Geod relies on shapely objects

Okay. So for point-to-line or line-to-line we have the two options

to use pyproj.Geod (which is slow) with shapely objects with lon-lat or
use shapely directly with coordinates in a distance-preserving projection (which is fast, maybe also the projection itself, since it is not done per pair but per coordinate)

If so, I prefer 2.

Based on discussion on site, it might more important to focus on functions that get the nearest neighbors instead of a full distance matrix (even if it is a sparse distance matrix, see #37).


Replace Compiler::warning and similar to VM ones

We have to change the usage of Compiler warning/error method on modules to use the VM ones.

Already implemented via clever_fatal(), clever_warning() functions.


MSID: 94359 Version: 1 DOI: 10.1101/2<IP_ADDRESS>0504

MSID: 94359
Version: 1
Preprint DOI: https://doi.org/10.1101/2<IP_ADDRESS>0504
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=94359
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>0504

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/94359v1
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2<IP_ADDRESS>0504
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/94359/v1/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

@acollings I think this needs rewriting - very poor grammar!

eLocations missing from references.

Thanks @JGilbert-eLife I've tweaked it

@JGilbert-eLife, FYI, the authors would love to see this published soon: thanks a lot!

Thank you very much for handling this manuscript. I am writing to kindly ask when the Reviewed Preprint of this article will be published on eLife. Will it be possible that it will be online in the next couple of days? I am preparing a grant proposal and I think the publication of this paper can help a lot. Thanks!

@acollings Thanks for letting me know. However, the assessment doesn't see to have updated even though it's been 24 hours. Please could you double-check that your edits went through OK? If so, I'll rerun Temporal again and see if that fixes it (I have done this twice already this morning but no change).

Hi @JGilbert-eLife: assessment on hypothes.is is as such:
This valuable study advances our understanding of the below-ground resource acquisition strategies of diverse tree species, integrating the roles of both roots and their associated microbes. The support for the conclusions is supported by incomplete evidence owing to the uncertainties or shortcomings associated with the design and statistical analyses. Regardless of these technical issues, this study can be of broad interest for plant and microbial ecologists.

"The support for the conclusions is supported by incomplete evidence owing to ..." ???

Grand! Thanks for that!
I'll publish it as soon as I can tomorrow.


Update free-programming-cheatsheets.md

Update broken link from Docker Section.
Resolve Broken Link #7085
What does this PR do?
Added Valid Resource Link
Checklist:

[x] Read our contributing guidelines.
[x] Search for duplicates.
[x] Include author(s) and platform where appropriate.
[x] Put lists in alphabetical order, correct spacing.
[x] Add needed indications (PDF, access notes, under construction).
[x] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Thanks, and welcome to free-programming-books!


dmd/euler example

Finished the examples/dg_euler.py example.
The example was run with default inputs: python dg_euler.py on 4 cores, corresponding to the following options:
<<<
Options used:
--mesh  periodic-square.mesh
--problem  1
--refine_serial  0
--refine_parallel  1
--order  3
--ode_solver  4
--t_final  2.0
--time_step  -0.01
--cfl_number  0.3
--visualization  False
--visit_datafiles  False
--visualization_steps  50
--energy_fraction  0.9999
--rdim  -1
--crbf  0.9

Comparison with libROM example shows identical output error numbers. Although, pylibROM appears to be somewhat slower.
pylibROM output
<<<
Relative error of DMD dens at t_final: 2.0 is 0.0003180880
Relative error of DMD x_mom at t_final: 2.0 is 0.0002069844
Relative error of DMD y_mom at t_final: 2.0 is 0.0012537761
Relative error of DMD e at t_final: 2.0 is 0.0001376798
Elapsed time for solving FOM: 4.072901e+01
Elapsed time for training DMD: 9.936306e-01
Elapsed time for predicting DMD: 1.587152e-03

libROM output
<<<
Relative error of DMD density (dens) at t_final: 2 is 0.000318088
Relative error of DMD x-momentum (x_mom) at t_final: 2 is 0.00020698435
Relative error of DMD y-momentum (y_mom) at t_final: 2 is 0.0012537761
Relative error of DMD energy (e) at t_final: 2 is 0.0001376798
Elapsed time for solving FOM: 2.597199e-01 second
Elapsed time for training DMD: 8.866020e-01 second
Elapsed time for predicting DMD: 8.613530e-04 second

Hi @dreamer2368 I've addressed your comments


Update README to show that mobileSAM is supported

Based on https://github.com/ziqi-jin/finetune-anything/issues/23 being closed, I assume the README should be updated to reflect the change.
https://github.com/ziqi-jin/finetune-anything#support-plan

Based on #23 being closed, I assume the README should be updated to reflect the change.
https://github.com/ziqi-jin/finetune-anything#support-plan

sorry, MobileSAM is not supported now

Okay, in that case, can you re-open #23 ?


How do I change the configuration of angular-bootstrap-datetimepicker dynamically from angular?

There is no response in Stack Overflow.
https://stackoverflow.com/questions/46914599/how-do-i-change-the-configuration-of-angular-bootstrap-datetimepicker-dynamicall

Instead of using a method call (which won't create a scope watch), use a scope variable for your configuration object.
$scope.datePickerConfig = {};

Ok. I'll try and let you know if it works.

It does not work. Just tried:
<datetimepicker data-ng-model="MyData.TaskDateFrom" data-datetimepicker-config="fromDatePickerConfig"></datetimepicker>
Scope variables set:
$scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom', minView: 'day', startView: 'day' };
$scope.toDatePickerConfig = { dropdownSelector: '#taskDateTo', minView: 'day', startView: 'day' };
Here's what changes the config:
`$scope.$watch(
function () {
return $scope.JobVolumeReportData.ResolutionId;
},
function (newVal, oldVal) {
$scope.JobVolumeReportResult = null;
$scope.JobVolumeReportData.TaskDateFrom = null;
$scope.JobVolumeReportData.TaskDateTo = null;
        switch (newVal) {
            case 1:
            case 2:
                $scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom', minView: 'day', startView: 'day' };
                $scope.toDatePickerConfig = { dropdownSelector: '#taskDateTo', minView: 'day', startView: 'day' };
                break;
            case 3:
                $scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom', minView: 'month', startView: 'month' };
                $scope.toDatePickerConfig = { dropdownSelector: '#taskDateTo', minView: 'month', startView: 'month' };
                break;
            case 4:
                $scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom', minView: 'year', startView: 'year' };
                $scope.toDatePickerConfig = { dropdownSelector: '#taskDateTo', minView: 'year', startView: 'year' };
                break;
            default:
                $scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom', minView: 'day', startView: 'day' };
                $scope.toDatePickerConfig = { dropdownSelector: '#taskDateTo', minView: 'day', startView: 'day' };
                break;
        }

        console.log("Cleared report data and set from and to date picker config.");
    });`

The method does get called, but the date time picker still shows the regular date.

This is a Support Question
For support questions, please use one of these channels:
Gitter: https://gitter.im/dalelotts/angular-bootstrap-datetimepicker
Stack Overflow: http://stackoverflow.com/search?q=angular-bootstrap-datetimepicker

Anyway, the documentation is obscure, so for the benefit of other people who will want to do the same, I am going to explain in detail how to do this:

To be able to configure correctly, as per the response to my ticket in github, we need to use a scope level variable to hold the configuration:
$scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom1', minView: 'day', startView: 'day', configureOn: 'config-changed' };

Note how the config value is set. Also note, how the configureOn value is set to a string.

Next wherever your data is changing (which causes you to reconfigure the control), you need to change the configuration as well as broadcast the event.
$scope.fromDatePickerConfig = { dropdownSelector: '#taskDateFrom1', minView: 'month', startView: 'month', configureOn: 'resolution-changed' };
$rootScope.$broadcast("config-changed");

This should do the trick. It works for me.

@vdevappa A pull request for the documentation would be appreciated. I think people will find the documentation easier to find than this comment.


Avoid blowing up if a directory in @*INC doesn't exist

Not sure how the nonexistent directories ended up in @*INC anyway, but this seems like something that should not result in a blowup.
Arguably it would be useful to add a warning output when an @*INC directory does not actually exist.

This was resolved through a separate commit.


ConsumerBuilder.Build throws ArgumentNullException: Value cannot be null

Description
I have issues using Kafka in Unity.
I think I managed to make some progress from issue #1184. (don't want to close it untill I've actually seen it work though.)
It seems to be able to find and load the dlls currently. (I had to manually the x64 folder with all lbrdkafka dlls into the folder of Confluent.Kafka.dll). But now when I start a simple test consumer, it throws an exception when I call the Build method of ConsumerBuilder.
See below for the console output and the code. How can I fix this?
Console output:
ArgumentNullException: Value cannot be null.
Parameter name: source
System.Linq.Enumerable.Where[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
Confluent.Kafka.Config.ExtractCancellationDelayMaxMs (System.Collections.Generic.IEnumerable`1[T] config, System.Int32& cancellationDelayMaxMs) (at <94c8034e30a247ef89dff1b3ce361d8d>:0)
Confluent.Kafka.Consumer`2[TKey,TValue]..ctor (Confluent.Kafka.ConsumerBuilder`2[TKey,TValue] builder) (at <94c8034e30a247ef89dff1b3ce361d8d>:0)
Confluent.Kafka.ConsumerBuilder`2[TKey,TValue].Build () (at <94c8034e30a247ef89dff1b3ce361d8d>:0)
KafkaConsumer.StartKafkaListener (Confluent.Kafka.ConsumerConfig config) (at Assets/KafkaConsumer.cs:35)
KafkaConsumer.Update () (at Assets/KafkaConsumer.cs:27)

Code:
    ConsumerConfig config;

    void Start()
    {
        Debug.Log("Start");
        Debug.Break();
        var config = new ConsumerConfig{
                GroupId = "c#test-consumer-group"+DateTime.Now,  // unique group, so each listener gets all messages
                BootstrapServers = "<IP_ADDRESS>:9092",
                AutoOffsetReset = AutoOffsetReset.Latest
            };
        Debug.Log("Start Done");
    }
    void Update()
    {
        if(Input.GetKeyUp(KeyCode.K))
        {
            Debug.Log("Pressed 'K'; starting Kafka Listener");
            StartKafkaListener(config);
        }
    }
    void StartKafkaListener(ConsumerConfig config)
    {
        Debug.Log("Build Kafka Consumer");
        using (var c = new ConsumerBuilder<Ignore, string>(config).Build())
        {
            c.Subscribe("my-topic");
            Debug.Log("Subscribed kafka");
            [....]

How to reproduce
Checklist
Please provide the following information:

[x] A complete (i.e. we can run it), minimal program demonstrating the problem.
[x] Confluent.Kafka nuget version = 1.3.0
[x] Operating system = Windows. Unity version 2019.3
[x] Provide logs (with "debug" : "..." as necessary in configuration).

it seems like you have a null key or value in your configuration somehow, but it's not clear how you managed that.

I changed the code somewhat to try to see what trips it up. Now it can get passed the .Build() call, but  I'm wondering how best to implement the c.Consume call now such that it properly gets some output. I can now call consume, but it appears to not yet have a value when I try to print it after, even though there are already messages on the server. (this was verified by starting the consumer example on the readme as a .net console app)
Could you give me some direction?
    void StartKafkaListener(ConsumerConfig config)
    {
        var c = new ConsumerBuilder<Ignore, string>(config).Build();
        Debug.Log("Build Kafka Consumer");

        c.Subscribe("grace");
        Debug.Log("Subscribed kafka");

        var cr = c.Consume(TimeSpan.FromSeconds(2));
        Debug.Log(cr.ToString());
        Debug.Log($"Consumed message '{cr.Value}' at: '{cr.TopicPartitionOffset}'.");

        // CancellationTokenSource cts = new CancellationTokenSource();

        // if(Input.GetKeyUp(KeyCode.LeftControl) && Input.GetKeyUp(KeyCode.C))
        // {
        //     Debug.Log("Cancelled in Unity");
        //     cts.Cancel();
        // }
        // Console.CancelKeyPress += (_, e) =>
        // {
        //     e.Cancel = true; // prevent the process from terminating.
        //     Debug.Log("Cancelled");
        //     cts.Cancel();
        // };

        // try
        // {
        //     try
        //     {
        //         var cr = c.Consume(cts.Token);

        //         Debug.Log($"Consumed message '{cr.Value}' at: '{cr.TopicPartitionOffset}'.");
        //     }
        //     catch (ConsumeException e)
        //     {
        //         Debug.Log($"Error occurred: {e.Error.Reason}");

        //     }
        // }
        // catch (OperationCanceledException)
        // {
        //     Debug.Log("Closing Kafka");
        //     // Ensure the consumer leaves the group cleanly and final offsets are committed.
        //     c.Close();
        // }
    }

NullReferenceException: Object reference not set to an instance of an object
KafkaConsumer.StartKafkaListener (Confluent.Kafka.ConsumerConfig config) (at Assets/KafkaConsumer.cs:41)
KafkaConsumer.Update () (at Assets/KafkaConsumer.cs:28)

Line 41 is the Debug.Log($"Consumed message [..]"); line.

I managed to fix these issues by changing the setup of the script, see also #1184


Surveys: Clarify terms used in survey UI

Description
e.g. what is the difference between an owner and an admin ....
Resourcing
We intend to contribute this feature

[x] Help text on survey list pages
[x] Help text on survey run creation pages
[x] Custom Confirmation message support

Custom Confirmations
If you create a static panel with a group key like: CONFIRMATION.SURVEY_ACTION.<templateExtId>.<surveyAction>  then the associated panel will be displayed alongside the generic confirmation message when the surveyAction is performed.
Example key:
CONFIRMATION.SURVEY_ACTION.GOV_SURV.APPROVING
Currently supported actions are:

SUBMITTING
REJECTING
WITHDRAWING
APPROVING


Remove root device on instance destruction

Type of change:
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

Description:

rootDevice.remove() is now called on instance destruction.
openDAQ components can hook onto the onRemoved() that will be called when the openDAQ program terminates.

Should all components call removed() in their destructor if not yet removed?


(minor) "go" in table name breaks "Execute SQL Statement" keyboard shortcut

System information:

OS: Linux Mint 19.2 MATE
DBeaver version: 6.2.0
Additional extensions: None

Connection specification:

Database name and version: Not sure off the top of my head, but doesn't matter as this is a GUI issue
Driver name: Azure SQL Server
Do you use tunnels or proxies (SSH, SOCKS, etc)?: I don't think so, but there could be some network stuff that our db team is doing that I'm not aware of.

Describe the problem you're observing:
When hitting the keyboard shortcut for "Execute SQL Statement,"
Steps to reproduce, if exist:
Create a table with "go" in the name (i.e. "categories" or something), then type a one-line query using that table name and hit CTRL+Enter with your cursor at the end of the line (or anywhere after "go").
The query sent to the server will start just after the "go" and will likely throw a syntax error.
Actually creating the table is optional, since this error happens before reaching the server.
Include any warning/errors/backtraces from the logs
N/A

Reealy weird bug. I'm surprised that nobody reported it before - it is an old one.
Thanks for the bug report!

verified


[Feature] adding a few helper methods for uploading KMS encrypted objects to S3

Adding PutSecure for use by other libraries.
Fixing some tests pre-conditions.

Reviews
0/1
Message

More info

Review Error for fb55@2018-06-20T11:41:36+00:00
User must have write permissions to review

Reviews
1/1
Message

brad-larson
1
approved

Pull request is reviewed and can be merged to master!
More info


chore(auth): make oidc auth provider resolvers configurable

Description
Adds resolver configurations for the oidc auth provider. Users can now specify the resolver the oidc auth provider uses. Currently supports the following:

resolver: preferredUsernameMatchingUserEntityName
resolver: emailMatchingUserEntityProfileEmail
resolver: emailLocalPartMatchingUserEntityName

Using preferredUsernameMatchingUserEntityName should allow proper mapping to users ingested via the keycloak-backend plugin with no additional configurations.
Which issue(s) does this PR fix

Fixes RHIDP-2272

PR acceptance criteria
Please make sure that the following steps are complete:

[ ] GitHub Actions are completed and successful
[ ] Unit Tests are updated and passing
[ ] E2E Tests are updated and passing
[x] Documentation is updated if necessary (requirement for new features)
[ ] Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

Setup a keycloak instance and create a user with a username (ex: test-user) and an email (ex<EMAIL_ADDRESS>Setup the keycloak-backend plugin to ingest users/groups
Configure OIDC auth provider to connect to the keycloak instance
Add the preferredUsernameMatchingUserEntityName resolver
Change signInPage to oidc
Sign-in with OIDC in the frontend and you should be able to login and be associated with the keycloak user ingested via the keycloak-backend.

/cherry-pick 1.2.x

/cherry-pick 1.2.x


"Load Team Hero Build"

Load Hero Team Build hotkeys are named "Load Team Hero Build namehere". "Team" and "Hero" should be switched.

I want to deprecate a lot of these hotkeys now that we have chat commands for many of them; need to remove this hotkey option at load time, and re-create legacy hotkeys to be Sendchat hotkey /heroteam <teambuild>

I want to deprecate a lot of these hotkeys now that we have chat commands for many of them; need to remove this hotkey option at load time, and re-create legacy hotkeys to be Sendchat hotkey /heroteam <teambuild>


CompletionHandler: Unable to start play with new startTime

I am trying to make the AudioKit completionHandler play with a new start time, like this:
func completionHandler () {
pickNextSegment()
player.play(from: playbackStartTime, to: playbackEndTime, completionCallbackType: .dataConsumed)
}
However, the new playbackStartTime is not respected, and the player just keeps looping over the segment that was set with the initial play command.
To Reproduce
Steps to reproduce the behavior:
From the completionHandler, call player.play with a new startTime/EndTime.
Expected behavior
I expect the player to play using the new startTime and endTime values.
Details (please complete the following information):

MacOS
OS: 12.2
The bug was introduced recently, not sure exactly in which AudioKit version.
I have tried both version 5.3.3 and the develop branch.

Additional context
I have attached a demo app. I have named it SegmentPlayer, but it is not using the new MultiSegmentAudioPlayer (it's on my list).
Complied App for macOS:
SegmentPlayer.zip
Just press Play, and you can see that when it reaches the end of section 1, it keeps looping section 1 rather than jumping to the next section.
Source code:
SegmentPlayer Source.zip

I'm not sure if it is a bug but you can get around it by putting your next play call in an async task.
DispatchQueue.main.async {             self.player.play(from: self.playbackStartTime, to: self.playbackEndTime, completionCallbackType: .dataConsumed) }

Thanks a lot! Now the "playNext" works.
Also not sure of it is a bug.
I've compiled the demo app with the async call:
SegmentPlayer.zip
As you see, the player.getCurrentTime() is now all over the place.
But I guess this is another topic.

Thanks a lot! Now the "playNext" works.
Also not sure of it is a bug.
I've compiled the demo app with the async call:
SegmentPlayer.zip
As you see, the player.getCurrentTime() is now all over the place.
But I guess this is another topic.

Yes, I'd like to get to fixing some of the player stuff this week. It appears some changes I made a little bit ago have led to some unexpected behavior. However, once we get the bugs worked out, the new system is more organized with Node Status types.
This way the player can only have one playback status at a time (i.e. playing, paused, or stopped). In many previous issues, I've noticed sometimes it would have multiple states which created undefined behavior.
The edit times are still a work in progress, and it may be due to the completion handler, but I'll work on it asap. Feel free to jump in the code if I don't get to it soon enough.

Thanks for the reply.
I have filed another issue related to the completionHandler resulting in an unrecoverable state when the audio is buffered.

@ShowtimeSoft My apologies on forgetting about this. I had some time this morning to look at it, and I believe I got your program to work. Please test with the new changes, and let me know what you think :) !

Closing for now, feel to continue to correspond here though.


BoxDecoration covers IconButton's splash feedback on tap

Steps to Reproduce

Place an IconButton in the subtree of a Container with a boxDecoration or  color
Tap on it

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          children: <Widget>[
            Container(
              child: Column(
                children: <Widget>[
                  Row(
                    children: <Widget>[
                      IconButton(
                        icon: Icon(Icons.play_arrow),
                        onPressed: () => null,
                      ),
                    ],
                  ),
                ],
              ),
              decoration: BoxDecoration(
                color: Theme.of(context).accentColor,
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Expected results: splash feedback appears on top of the icon, as if there wasn't a  BoxDecoration
Actual results: most of the splash feedback is "covered"
[✓] Flutter (Channel stable, v1.17.0, on Linux, locale en_US.UTF-8)
    • Flutter version 1.17.0 at /home/gabrc52/flutter
    • Framework revision e6b34c2b5c (4 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1

@gabrc52 I found a workaround for this.
check this link on stack overflow
https://stackoverflow.com/questions/51463515/inkwell-not-showing-ripple-when-used-with-container-decoration .

code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Container(
                child: Column(
                  children: <Widget>[
                    Row(
                      children: <Widget>[
                        IconButton(
                          icon: Icon(Icons.play_arrow),
                          onPressed: () => null,
                        ),
                      ],
                    ),
                  ],
                ),
                decoration: BoxDecoration(
                  color: Theme.of(context).accentColor,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel master, 1.21.0-10.0.pre.159, on Mac OS X 10.15.6 19G2021,
    locale en-GB)
    • Flutter version 1.21.0-10.0.pre.159 at
      /Users/tahatesser/Code/flutter_master
    • Framework revision 86d2fe9f20 (8 hours ago), 2020-08-18 21:48:04 -0700
    • Engine revision 0b330467da
    • Dart version 2.10.0 (build 2.10.0-38.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.1
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.48.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (4 available)
    • Taha’s iPhone (mobile) • 00008020-001059882212002E • ios            • iOS
      13.6
    • macOS (desktop)        • macos                     • darwin-x64     • Mac
      OS X 10.15.6 19G2021
    • Web Server (web)       • web-server                • web-javascript •
      Flutter Tools
    • Chrome (web)           • chrome                    • web-javascript •
      Google Chrome 84.0.4147.125

• No issues found!

duplicate of https://github.com/flutter/flutter/issues/31541


Add Elixir platform library

This PR adds all of the essential pieces to make this a proper platform library that can be used with live_view_native, similar to liveview-client-swiftui.

@Kashif-E @KronicDeth I'm running into a blocker with this but not familiar enough with what's going on within the Kotlin side of things to figure it out. live_view_native relies on get_connect_params/1 returning a map with the _platform param to determine what type of client a socket is connecting from to be able to know which platform-specific template to use when rendering a LiveView for the session. It appears that get_connect_params/1 is returning nil however, which prevents this. It looks like we're correctly seeing the _platform and other connect params here but I'm not sure why the Elixir side isn't seeing that:
From live_view_native here (note the added comment at the top of on_mount/4):
defmodule LiveViewNative.LiveSession do
  @moduledoc """
  Ensures common `assigns` are applied to all LiveViews attaching this hook.
  """
  import Phoenix.LiveView
  import Phoenix.Component, only: [assign: 3]

  def on_mount(:live_view_native, _params, _session, socket) do
    # The first line of the `with` statement matches on iOS but not on Android
    # This is due to `get_connect_params/1` returning `nil` for clients connecting from liveview-client-jetpack
    with %{"_platform" => platform_id} <- get_connect_params(socket),
         platforms <- LiveViewNative.platforms(),
         %LiveViewNativePlatform.Context{} = platform_context <- Map.get(platforms, platform_id) do
      {:cont, assign(socket, :native, platform_context)}
    else
      _result ->
        platform_config = %LiveViewNative.Platforms.Web{}
        platform_context = LiveViewNativePlatform.context(platform_config)

        {:cont, assign(socket, :native, platform_context)}
    end
  end
end

I created the android-test branch on the scratchboard project if you'd like to test this yourself. Thanks in advance. 🙂

I tried investigating this on my machine but i am getting this error @supernintendo
 mix phx.server
Could not compile :live_view_native_jetpack, no "mix.exs", "rebar.config" or "Makefile" (pass :compile as an option to customize compilation, set it to "false" to do nothing)
Error while loading project :decimal at /Users/KashifWork/Desktop/scratchboard/deps/decimal
** (FunctionClauseError) no function clause matching in Keyword.merge/2

    The following arguments were given to Keyword.merge/2:

        # 1
        [app: nil, aliases: [], build_embedded: false, build_per_environment: true, build_scm: Mix.SCM.Path, config_path: "config/config.exs", consolidate_protocols: true, default_task: "run", deps: [], deps_path: "deps", elixirc_paths: ["lib"], erlc_paths: ["src"], erlc_include_path: "include", erlc_options: [], lockfile: "mix.lock", preferred_cli_env: [], start_permanent: false]

        # 2
        Decimal.Mixfile

    Attempted function clauses (showing 3 out of 3):

        def merge(keywords1, []) when is_list(keywords1)
        def merge([], keywords2) when is_list(keywords2)
        def merge(keywords1, keywords2) when is_list(keywords1) and is_list(keywords2)

    (elixir 1.14.4) lib/keyword.ex:979: Keyword.merge/2
    (mix 1.14.4) lib/mix/project.ex:141: Mix.Project.push/3
    (stdlib 4.3) lists.erl:1350: :lists.foldl/3

@supernintendo and @Kashif-E I think its a bit late for me to help with the swiftUI but I am very interested in helping with Jetpack and be involved ... can you point me to a starting point ? where i can pick a first task?

It lives! Amazing work @nelson-glauber 😊


Enhance Walkthrough Troubleshooting Tipps

I would like to propose to add some hints to the walkthrough that may make setup and troubleshooting easier. They are the result of me implementing my first code generator, so this can be considered user feedback :). I should note that I did not have any previous experience in Roslyn based code generation, so some of this might be obvious for people that used it before.
Following the example Code Generator was quite easy for me (I needed to do quite some updating of VS and Windows, but I got it running quite straight forward). I had some errors in my own implementation of my code generator and wasn't quite sure how to troubleshoot them. The following bits of information would have probably helped me with that.

Each source file containing code generation attributes will result in corresponding .generated.cs - files in the /obj/ - Directory of the project. They contain the code generated from your generator.

If your code generator throws an exception in the ICodeGenerator.GenerateAsync or IRichCodeGenerator.GenerateRichAsync, it will result in 2 errors in the build process. One is containing the type and text of the exception, the other will say (somewhat obscure) "MSB3073	The command "dotnet codegen<EMAIL_ADDRESS>exited with code 3 beendet." (translated from german, so the text might not be accurate.

You can output messages to the build log:

3.1 You can output messages to the build log by using the IProgress<Diagnostic> progress parameter, like this:
progress.Report(Diagnostic.Create(
    new DiagnosticDescriptor("CA1001", "Cannot apply attribute to non-partial class", "Make class partial", "Microsoft.Design", DiagnosticSeverity.Error, true)
    , Location.Create(applyToClass.SyntaxTree, applyToClass.Span)));

3.2 Or use the CodeGeneration.Roslyn.Logger extension methods like this:
Logger.Error("This message comes from Logger extension", "SOMECODE");

Giving you the following build log in VS:

If you Console.WriteLine in your code generator, it will show up in your build output window in VS.

Thanks! Those are valuable insights, it's so nice of you to share them! I'll attempt to incorporate them when time allows.

Another trick I'm using is to invoke System.Diagnostics.Debugger.Launch() inside my ICodeGenerator implementation's constructor.


Firebase plugin is not working with OSD and dynamic tile sources

Steps to replicate: Set up an OpenSeadragon instance using a dynamic tile source, initialize the Annotorious OSD plugin. Try to load the Firebase plugin.
Error: When annotations are saved, they're always saved as the base URL plus "undefined".
This seems to be due to Firebase using the URL from OSDAnnotationLayer.js (lines 66+67):
      const src = this.viewer.world.getItemAt(0).source['@id'] ||
        new URL(this.viewer.world.getItemAt(0).source.url, document.baseURI).href;

In our OSD implementation, this.viewer.world.getItemAt(0).source.url is undefined. This can be worked around by setting it prior to calling Firebase - that has to be done in TileDoneHandler to make sure that source is defined, as it's only defined when OSD actually puts something in the canvas:
var tileDrawnHandler = function(event) {
  viewer.removeHandler('tile-drawn', tileDrawnHandler);
viewer.world.getItemAt(0).source.url = <URL>

I suspect this is because our OSD tile source isn't a file - we're loading tiles from S3-storage as we need them.
    var viewer = OpenSeadragon({
        id: "openseadragon1",
        prefixUrl: "https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/images/",
		navigatorAutoFade:  false,
        showNavigator:  true,
        zoomInButton:   "zoomIn",
   		zoomOutButton:  "zoomOut",
   	 	homeButton:     "home",
	    fullPageButton: "fullscreen",
        gestureSettingsTouch: {
        	pinchRotate: true
    	},
        success: function(event) {
        	imageDone = true;
        },
    tileSources:   {height: 243848,
width: 106312,
tileSize: 2048,

        overlap: 1,
		getTileUrl: function( level, x, y ){return "<URL>"+ level + "/" + x + "_" + y + ".jpg";
        }
    }
});

I suspect OSD isn't setting source.url because there's no one URL for the source - we get the tiles as we go along.

Yikes - sorry, I completely missed this issue. Not sure if it's still relevant half a year later. In any case: yes, the source URL isn't really a defined concept in OpenSeadragon. (It does work with IIIF sources and when using a normal image file.) Nonetheless, the Firebase plugin requires a source property to be present, so it can query the Firebase DB for the  annotations on that particular image.
The only two workarounds would be to patch the url in the tilehandler, as you did - or hack the Firebase plugin. (I agree that your workaround is the preferable one!)


Acrylic/Mica window

Is is possible to implement Acrylic or Mica that actually blurs what's behind it instead of just the blurring a preset background? Fluent design is great but the background is always off. It would be nice if it could be consistent with the rest of the system.
Additional context
If you see the Terminal app blurs what's behind it while Discord with Fluent-Discord theme just blurs its own background not the whole desktop.

Unfortunately no. Discord uses a different tech to UWP apps called Electron, which is essentially a stand alone Chrome browser. Electron has a bunch of issues with implementing acrylic/mica which I doubt will ever be resolved.
While there is an option to enable transparency in Discord, CSS can't apply filters to anything 'outside' of Discord. Window snapping and double clicking the title bar to maximise/minimise also breaks when the option is enabled which is why it's on the not supported list.
I have experimented with improving the 'acrylic' effect which would make it work a little better with complex backgrounds, so this change might make it into a future build some time.

This will be in the next release.

Was this included on v0.0.13?

Will using https://github.com/arkenthera/electron-vibrancy or https://github.com/Seo-Rii/electron-acrylic-window help?


Angular compiler option preserveWhitespaces: true does not work in >6.0.0 final

Versions
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 6.0.1
Node: 8.11.1
OS: win32 x64
Angular: 6.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.1
@angular-devkit/build-angular     0.6.1
@angular-devkit/build-optimizer   0.6.1
@angular-devkit/core              0.6.1
@angular-devkit/schematics        0.6.1
@ngtools/webpack                  6.0.1
@schematics/angular               0.6.1
@schematics/update                0.6.1
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

Repro steps

Added "angularCompilerOptions": {   "preserveWhitespaces": true } into tsconfig.json like https://angular.io/guide/aot-compiler#angular-compiler-options says
Run ng serve, ng serve --aot, ng build, ng build --aot, ng build --prod --aot

Observed behavior
"preserveWhitespaces": true  doesn't affect ng serve nor ng build
Desired behavior
ng serve and ng build should preserve whitespaces globally
Mention any other details that might be useful (optional)
I've modified my main.ts file for working on ng serve:
platformBrowserDynamic().bootstrapModule(AppModule, {
  preserveWhitespaces: true
})
.catch(err => console.log(err));

but production build still is not preserving white spaces globally

The same way it was put into the root tsconfig.  The file is just the tsconfig specifically for the app.

@criduvero your original code snippet is the correct way to set preserveWhitespaces for JIT.
So to summarize:
In order to set angular compiler options in AOT compile (ng serve --aot, ng build --prod) you must alter the tsconfig.app.json to include:
"angularCompilerOptions": {
  "preserveWhitespaces": true
},

In order to set angular compiler options in JIT compile (ng serve) you must alter main.ts specifically the bootstrapModule call:
platformBrowserDynamic().bootstrapModule(AppModule, {
  preserveWhitespaces: true
})
.catch(err => console.log(err));

To be consistent between JIT and AOT, you must alter both files!

@danwulff Thanks, All clear for me now

I still have the problem !!
I've put preserveWhitespaces: true in tsconfig.app.json, in tsconfig.json and in options of bootstrapModule but it don't works.
The only way I've found is to put preserveWhitespaces: true in all the components !!
Anyone has still the problem ?
Angular V.6.1.7

I still have the problem !!
I've put preserveWhitespaces: true in tsconfig.app.json, in tsconfig.json and in options of bootstrapModule but it don't works.
The only way I've found is to put preserveWhitespaces: true in all the components !!
Anyone has still the problem ?
Angular V.6.1.7

DId you put it in the angularCompilerOptions? Today Ive met the issue and after several attempts, Ive made it work. It started work after I put "angularCompilerOptions": {
"preserveWhitespaces": true,
} to both configs. ( We use aot build)

I still have the problem !!
I've put preserveWhitespaces: true in tsconfig.app.json, in tsconfig.json and in options of bootstrapModule but it don't works.
The only way I've found is to put preserveWhitespaces: true in all the components !!
Anyone has still the problem ?
Angular V.6.1.7

DId you put it in the angularCompilerOptions? Today Ive met the issue and after several attempts, Ive made it work. It started work after I put "angularCompilerOptions": {
"preserveWhitespaces": true,
} to both configs. ( We use aot build)

Yes I tried but without success. It appaers that the problem is only in JIT mode, while it's compiled for buid (with AOT), don't have the problem...

@obtdap See my comment above for JIT mode: https://github.com/angular/angular-cli/issues/10859#issuecomment-390808375

I still have the problem !!
I've put preserveWhitespaces: true in tsconfig.app.json, in tsconfig.json and in options of bootstrapModule but it don't works.
The only way I've found is to put preserveWhitespaces: true in all the components !!
Anyone has still the problem ?
Angular V.6.1.7

DId you put it in the angularCompilerOptions? Today Ive met the issue and after several attempts, Ive made it work. It started work after I put "angularCompilerOptions": {
"preserveWhitespaces": true,
} to both configs. ( We use aot build)

Yes I tried but without success. It appaers that the problem is only in JIT mode, while it's compiled for buid (with AOT), don't have the problem...

@obtdap See my comment above for JIT mode: #10859 (comment)

Yes I have... :(

@obtdap See my comment above for JIT mode: #10859 (comment)

Yes I have... :(

@obtdap shoot, that sucks.
Since you're still having issues after altering both main.ts and tsconfig.app.json I suggest creating a minimal repo and opening a new issue (this one is closed).

Confirming solution by @danwulff - https://github.com/angular/angular-cli/issues/10859#issuecomment-390808375
preserveWhitespaces: true will need to be in main.ts, not only tsconfig.json

Little late to this party. I set both main.ts and tsconfig.json settings but I only see preserveWhitespaces working in dev mode, not in the production build.


[20.03] openvswitch 2.12.0 -> 2.13.0

Upgrades openvswitch to 2.13.0 for the 20.03 release channel. Backported from master c8523fe0

@kmcopper FYI, the nixos-* branches are immutable while fixes for stable branches should be filed against release-* :)


⚠ Samsung has degraded performance

In 6ca7193, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2572 ms

Resolved: Samsung performance has improved in 448f20c.


Changes to the logic of calculating expiration date

Feature or Bugfix

Feature

Detail
Changes to the logic of calculating expiration.
Initially current month was considered into the calculation for expiration date. But this resulted in a bug while performing unit tests here https://github.com/data-dot-all/dataall/pull/1594 and also this was not correct in the sense that if a user requests a month of expiration at the end of month, that user will get expiration at the end of the same month
But with the new logic - https://github.com/data-dot-all/dataall/pull/1594, more than half a month is granted extra .
To minimize this extra access period on share, this PR proposes new logic,

If the user is in the last week of the month and if the user requests 1 month of data, allocate the end of the next month.
If the user is in NOT in the last week of the months and if the user requests 1 month of data, allocate the end of same month as expiration.

Relates

https://github.com/data-dot-all/dataall/issues/1083

Security
Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

Does this PR introduce or modify any input fields or queries - this includes
fetching data from storage outside the application (e.g. a database, an S3 bucket)?

Is the input sanitized?
What precautions are you taking before deserializing the data you consume?
Is injection prevented by parametrizing queries?
Have you ensured no eval or similar functions are used?

Does this PR introduce any functionality or component that requires authorization?

How have you ensured it respects the existing AuthN/AuthZ mechanisms?
Are you logging failed auth attempts?

Are you using or adding any cryptographic features?

Do you use a standard proven implementations?
Are the used keys controlled by the customer? Where are they stored?

Are you introducing any new policies/roles/users?

Have you used the least-privilege principle? How?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dlpzx , @noah-paige , @petrkalos  can you please take a look at this PR and its description. Making changes to the share expiration calculation logic.

@dlpzx  Updated branch and merged code from main branch