[BACKPORT][v1.2.x] Recurring job test case fixes

https://ci.longhorn.io/job/public/job/v1.2.x/job/v1.2.x-longhorn-tests-sles-amd64/42/
https://github.com/longhorn/longhorn/issues/3517
https://github.com/longhorn/longhorn/issues/3470
https://github.com/longhorn/longhorn-tests/pull/839
https://github.com/longhorn/longhorn-tests/pull/838

Launching test on a typical fresh cluster, three cases failed:

test_recurring_job.py::test_recurring_jobs_maximum_retain
test_recurring_job.py::test_recurring_job_volume_label_when_job_and_group_use_same_name
test_recurring_job.py::test_recurring_job_backup[nfs]

Need to look into the test env. and the error to see why.

 Expand to see the full test result.
root@longhorn-test:/integration/tests# ./run.sh test_recurring_job.py
=============================================================================== test session starts ===============================================================================
platform linux -- Python 3.9.12, pytest-5.3.1, py-1.11.0, pluggy-0.13.1 -- /usr/local/bin/python
cachedir: .pytest_cache
rootdir: /integration, inifile: pytest.ini
plugins: repeat-0.9.1
collected 28 items

test_recurring_job.py::test_recurring_job[s3] PASSED                                                                                [  3%]
test_recurring_job.py::test_recurring_job[nfs] PASSED                                                                                [  7%]
test_recurring_job.py::test_recurring_job_in_volume_creation PASSED                                                                                [ 10%]
test_recurring_job.py::test_recurring_job_duplicated PASSED                                                                                [ 14%]
test_recurring_job.py::test_recurring_job_in_storageclass[s3] PASSED                                                                                [ 17%]
test_recurring_job.py::test_recurring_job_in_storageclass[nfs] PASSED                                                                                [ 21%]
test_recurring_job.py::test_recurring_job_labels[s3] PASSED                                                                                [ 25%]
test_recurring_job.py::test_recurring_job_labels[nfs] PASSED                                                                                [ 28%]
test_recurring_job.py::test_recurring_job_kubernetes_status[s3] PASSED                                                                                [ 32%]
test_recurring_job.py::test_recurring_job_kubernetes_status[nfs] PASSED                                                                                [ 35%]
test_recurring_job.py::test_recurring_jobs_maximum_retain FAILED                                                                                [ 39%]
test_recurring_job.py::test_recurring_job_detached_volume PASSED                                                                                [ 42%]
test_recurring_job.py::test_recurring_jobs_allow_detached_volume[s3] PASSED                                                                                [ 46%]
test_recurring_job.py::test_recurring_jobs_allow_detached_volume[nfs] PASSED                                                                                [ 50%]
test_recurring_job.py::test_recurring_jobs_when_volume_detached_unexpectedly[s3] PASSED                                                                                [ 53%]
test_recurring_job.py::test_recurring_jobs_when_volume_detached_unexpectedly[nfs] PASSED                                                                                [ 57%]
test_recurring_job.py::test_recurring_jobs_on_nodes_with_taints SKIPPED                                                                                [ 60%]
test_recurring_job.py::test_recurring_job_groups[s3] PASSED                                                                                [ 64%]
test_recurring_job.py::test_recurring_job_groups[nfs] PASSED                                                                                [ 67%]
test_recurring_job.py::test_recurring_job_default PASSED                                                                                [ 71%]
test_recurring_job.py::test_recurring_job_delete PASSED                                                                                [ 75%]
test_recurring_job.py::test_recurring_job_delete_should_remove_volume_label PASSED                                                                                [ 78%]
test_recurring_job.py::test_recurring_job_volume_label_when_job_and_group_use_same_name FAILED                                                                              [ 82%]
test_recurring_job.py::test_recurring_job_multiple_volumes[s3] PASSED                                                                                [ 85%]
test_recurring_job.py::test_recurring_job_multiple_volumes[nfs] PASSED                                                                                [ 89%]
test_recurring_job.py::test_recurring_job_snapshot PASSED                                                                                [ 92%]
test_recurring_job.py::test_recurring_job_backup[s3] PASSED                                                                                [ 96%]
test_recurring_job.py::test_recurring_job_backup[nfs] FAILED                                                                                [100%]

==================================================================================== FAILURES =====================================================================================
_______________________________________________________________________ test_recurring_jobs_maximum_retain ________________________________________________________________________

client = <longhorn.Client object at 0x7f7de8274d90>, core_api = <kubernetes.client.api.core_v1_api.CoreV1Api object at 0x7f7de8475a00>, volume_name = 'longhorn-testvol-25ptih'

    def test_recurring_jobs_maximum_retain(client, core_api, volume_name): # NOQA
        """
        Scenario: test recurring jobs' maximum retain

        Given set a recurring job retain to 51.

        When create recurring job.
        Then should fail.

        When set recurring job retain to 50.
        And create recurring job.
        Then recurring job created with retain equals to 50.

        When update recurring job retain to 51.
        Then should fail.
        """
        # set max total number of retain to exceed 50
        recurring_jobs = {
            RECURRING_JOB_NAME: {
                TASK: BACKUP,
                GROUPS: [],
                CRON: SCHEDULE_1MIN,
                RETAIN: 51,
                CONCURRENCY: 1,
                LABELS: {},
            },
        }
        with pytest.raises(Exception) as e:
            create_recurring_jobs(client, recurring_jobs)
>       assert "spec.retain in body should be less than or equal to 50".upper()\
            in str(e.value).upper()
E       assert 'SPEC.RETAIN IN BODY SHOULD BE LESS THAN OR EQUAL TO 50' in '(APIERROR(...), \'500 : UNABLE TO CREATE RECURRING JOB RECURRING-TEST: ADMISSION WEBHOOK "VALIDATOR.LONGHORN.IO" DENI...IDATOR.LONGHORN.IO" DENIED THE REQUEST: RETAIN IN BODY SHOULD BE LESS THAN OR EQUAL TO 50\\\', \\\'STATUS\\\': 500}\')'
E        +  where 'SPEC.RETAIN IN BODY SHOULD BE LESS THAN OR EQUAL TO 50' = <built-in method upper of str object at 0x7f7de8592b90>()
E        +    where <built-in method upper of str object at 0x7f7de8592b90> = 'spec.retain in body should be less than or equal to 50'.upper
E        +  and   '(APIERROR(...), \'500 : UNABLE TO CREATE RECURRING JOB RECURRING-TEST: ADMISSION WEBHOOK "VALIDATOR.LONGHORN.IO" DENI...IDATOR.LONGHORN.IO" DENIED THE REQUEST: RETAIN IN BODY SHOULD BE LESS THAN OR EQUAL TO 50\\\', \\\'STATUS\\\': 500}\')' = <built-in method upper of str object at 0x55c94cae5440>()
E        +    where <built-in method upper of str object at 0x55c94cae5440> = '(ApiError(...), \'500 : unable to create recurring job recurring-test: admission webhook "validator.longhorn.io" deni...idator.longhorn.io" denied the request: retain in body should be less than or equal to 50\\\', \\\'status\\\': 500}\')'.upper
E        +      where '(ApiError(...), \'500 : unable to create recurring job recurring-test: admission webhook "validator.longhorn.io" deni...idator.longhorn.io" denied the request: retain in body should be less than or equal to 50\\\', \\\'status\\\': 500}\')' = str(ApiError(ApiError(...), '500 : unable to create recurring job recurring-test: admission webhook "validator.longhorn.io...ook "validator.longhorn.io" denied the request: retain in body should be less than or equal to 50\', \'status\': 500}'))
E        +        where ApiError(ApiError(...), '500 : unable to create recurring job recurring-test: admission webhook "validator.longhorn.io...ook "validator.longhorn.io" denied the request: retain in body should be less than or equal to 50\', \'status\': 500}') = <ExceptionInfo ApiError(ApiError(...), '500 : unable to create recurring job recurring-test: admission webhook "valida...dator.longhorn.io" denied the request: retain in body should be less than or equal to 50\', \'status\': 500}') tblen=7>.value

test_recurring_job.py:604: AssertionError
________________________________________________________ test_recurring_job_volume_label_when_job_and_group_use_same_name _________________________________________________________

client = <longhorn.Client object at 0x7f7de81a6b50>, volume_name = 'longhorn-testvol-5xy4my'

    @pytest.mark.recurring_job  # NOQA
    def test_recurring_job_volume_label_when_job_and_group_use_same_name(client, volume_name):  # NOQA
        """
        Scenario: test volume label recurring job when recurring job and
                  job-group uses the same name.

        Given volume-1 created.
              volume-2 created.
              volume-3 created.
        And  create `snapshot1` recurring job with `snapshot-1` in groups.
             create `snapshot2` recurring job with `snapshot-1` in groups.
        And  `snapshot1` job-group applied to volume-1.
             `snapshot1` job       applied to volume-2.
             `snapshot2` job       applied to volume-3.
        And  `snapshot1` job-group exist in volume-1 recurring job label.
             `snapshot1` job       exist in volume-2 recurring job label.
             `snapshot2` job       exist in volume-3 recurring job label.

        When delete `snapshot1` recurring job.
        Then `snapshot1` job-group     exist in volume-1 recurring job label.
             `snapshot1` job       not exist in volume-2 recurring job label.
             `snapshot2` job           exist in volume-3 recurring job label.

        When delete `snapshot2` recurring job.

        Convenience function.  Connect to *address* (a 2-tuple ``(host,
        port)``) and return the socket object.  Passing the optional
        *timeout* parameter will set the timeout on the socket instance
        before attempting to connect.  If no *timeout* is supplied, the
        global default timeout setting returned by :func:`socket.getdefaulttimeout`
        is used.  If *source_address* is set it must be a tuple of (host, port)
        for the socket to bind as a source address before making the connection.
        An host of '' or port 0 tells the OS to use the default.
        """

        host, port = address
        if host.startswith("["):
            host = host.strip("[]")
        err = None

        # Using the value from allowed_gai_family() in the context of getaddrinfo lets
        # us select whether to work with IPv4 DNS records, IPv6 records, or both.

        Convenience function.  Connect to *address* (a 2-tuple ``(host,
        port)``) and return the socket object.  Passing the optional
        *timeout* parameter will set the timeout on the socket instance
        before attempting to connect.  If no *timeout* is supplied, the
        global default timeout setting returned by :func:`socket.getdefaulttimeout`
        is used.  If *source_address* is set it must be a tuple of (host, port)
        for the socket to bind as a source address before making the connection.
        An host of '' or port 0 tells the OS to use the default.
        """

        host, port = address
        if host.startswith("["):
            host = host.strip("[]")
        err = None

        # Using the value from allowed_gai_family() in the context of getaddrinfo lets
        # us select whether to work with IPv4 DNS records, IPv6 records, or both.
        # The original create_connection function always returns all records.
        family = allowed_gai_family()

        try:
            host.encode("idna")
        except UnicodeError:
            return six.raise_from(
                LocationParseError(u"'%s', label empty or too long" % host), None
            )

        for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
            af, socktype, proto, canonname, sa = res
            sock = None
            try:
                sock = socket.socket(af, socktype, proto)

                # If provided, set socket level options before connecting.
                _set_socket_options(sock, socket_options)

                if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
                    sock.settimeout(timeout)
                if source_address:
                    sock.bind(source_address)
>               sock.connect(sa)
E               ConnectionRefusedError: [Errno 111] Connection refused

/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError

During handling of the above exception, another exception occurred:

self = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f7de8136b20>, method = 'POST', url = '/v1/backupvolumes/test-job-1?action=backupList', body = '{}'
headers = {'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Length': '2', 'Authorization': 'Basic Og=='}
retries = Retry(total=0, connect=None, read=False, redirect=None, status=None), redirect = False, assert_same_host = False, timeout = Timeout(connect=None, read=None, total=None)
pool_timeout = None, release_conn = False, chunked = False, body_pos = None, response_kw = {'decode_content': False, 'preload_content': False}
parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/v1/backupvolumes/test-job-1', query='action=backupList', fragment=None), destination_scheme = None
conn = None, release_this_conn = True, http_tunnel_required = False, err = None, clean_exit = False

    def urlopen(
        self,
        method,
        url,
        body=None,
        headers=None,
        retries=None,
        redirect=True,
        assert_same_host=True,
        timeout=_Default,
        pool_timeout=None,
        release_conn=None,
        chunked=False,
        body_pos=None,
        **response_kw
    ):
        """
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param url:
            The URL to perform the request on.

        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When ``False``, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.

        :param \\**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """

        parsed_url = parse_url(url)
        destination_scheme = parsed_url.scheme

        if headers is None:
            headers = self.headers

        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)

        if release_conn is None:
            release_conn = response_kw.get("preload_content", True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries)

        # Ensure that the URL we're connecting to is properly encoded
        if url.startswith("/"):
            url = six.ensure_str(_encode_target(url))
        else:
            url = six.ensure_str(parsed_url.url)

        conn = None

        # Track whether `conn` needs to be released before
        # returning/raising/recursing. Update this variable if necessary, and
        # leave `release_conn` constant throughout the function. That way, if
        # the function recurses, the original value of `release_conn` will be
        # passed down into the recursive call, and its value will be respected.
        #
        # See issue #651 [1] for details.
        #
        # [1] <https://github.com/urllib3/urllib3/issues/651>
        release_this_conn = release_conn

        http_tunnel_required = connection_requires_http_tunnel(
            self.proxy, self.proxy_config, destination_scheme
        )

        # Merge the proxy headers. Only done when not using HTTP CONNECT. We
        # have to copy the headers dict so we can safely change it without those
        # changes being reflected in anyone else's copy.
        if not http_tunnel_required:
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        # Keep track of whether we cleanly exited the except block. This
        # ensures we do proper cleanup in finally.
        clean_exit = False

        # Rewind body position, if needed.  This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        """
        self.num_requests += 1

        timeout_obj = self._get_timeout(timeout)
        timeout_obj.start_connect()
        conn.timeout = timeout_obj.connect_timeout

        # Trigger any extra validation we need to do.
        try:
            self._validate_conn(conn)
        except (SocketTimeout, BaseSSLError) as e:
            # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout.
            self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
            raise

        # conn.request() calls http.client.*.request, not the method in
        # urllib3.request.

        This method sends the request to the server.

        Appends an extra \\r\\n to the buffer.
         Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response
        """

        try:
            conn = self.get_connection(request.url, proxies)
        except LocationValueError as e:
            raise InvalidURL(e, request=request)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError as e:
                # this may raise a string formatting error.
                err = ("Invalid timeout {}.  This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param url:
            The URL to perform the request on.

        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When ``False``, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.

        :param \\**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """

        parsed_url = parse_url(url)
        destination_scheme = parsed_url.scheme

        if headers is None:
            headers = self.headers

        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)

        if release_conn is None:
            release_conn = response_kw.get("preload_content", True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries)

        # Ensure that the URL we're connecting to is properly encoded
        if url.startswith("/"):
            url = six.ensure_str(_encode_target(url))
        else:
            url = six.ensure_str(parsed_url.url)

        conn = None

        # Track whether `conn` needs to be released before
        # returning/raising/recursing. Update this variable if necessary, and
        # leave `release_conn` constant throughout the function. That way, if
        # the function recurses, the original value of `release_conn` will be
        # passed down into the recursive call, and its value will be respected.
        #
        # See issue #651 [1] for details.
        #
        # [1] <https://github.com/urllib3/urllib3/issues/651>
        release_this_conn = release_conn

        http_tunnel_required = connection_requires_http_tunnel(
            self.proxy, self.proxy_config, destination_scheme
        )

        # Merge the proxy headers. Only done when not using HTTP CONNECT. We
        # have to copy the headers dict so we can safely change it without those
        # changes being reflected in anyone else's copy.
        if not http_tunnel_required:
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        # Keep track of whether we cleanly exited the except block. This
        # ensures we do proper cleanup in finally.
        clean_exit = False

        # Rewind body position, if needed. Record current position
        # for future rewinds in the event of a redirect/retry.
        body_pos = set_file_position(body, body_pos)

        try:
            # Request a connection from the queue.
            timeout_obj = self._get_timeout(timeout)
            conn = self._get_conn(timeout=pool_timeout)

            conn.timeout = timeout_obj.connect_timeout

            is_new_proxy_conn = self.proxy is not None and not getattr(
                conn, "sock", None
            )
            if is_new_proxy_conn and http_tunnel_required:
                self._prepare_proxy(conn)

            # Make the request on the httplib connection object.
            httplib_response = self._make_request(
                conn,
                method,
                url,
                timeout=timeout_obj,
                body=body,
                headers=headers,
                chunked=chunked,
            )

            # If we're going to release the connection in ``finally:``, then
            # the response doesn't need to know about the connection. Otherwise
            # it will also try to release it and we'll have a double-release
            # mess.
            response_conn = conn if not release_conn else None

            # Pass method to Response for length checking
            response_kw["request_method"] = method

            # Import httplib's response into our own wrapper object
            response = self.ResponseCls.from_httplib(
                httplib_response,
                pool=self,
                connection=response_conn,
                retries=retries,
                **response_kw
            )

            # Everything went great!
            clean_exit = True

        except EmptyPoolError:
            # Didn't get a connection from the pool, no need to clean up
            clean_exit = True
            release_this_conn = False
            raise

        except (
            TimeoutError,
            HTTPException,
            SocketError,
            ProtocolError,
            BaseSSLError,
            SSLError,
            CertificateError,
        ) as e:
            # Discard the connection for these exceptions. It will be
            # replaced during the next _get_conn() call.
            clean_exit = False

            def _is_ssl_error_message_from_http_proxy(ssl_error):
                # We're trying to detect the message 'WRONG_VERSION_NUMBER' but
                # SSLErrors are kinda all over the place when it comes to the message,
                # so we try to cover our bases here!
                message = " ".join(re.split("[^a-z]", str(ssl_error).lower()))
                return (
                    "wrong version number" in message or "unknown protocol" in message
                )

            # Try to detect a common user error with proxies which is to
            # set an HTTP proxy to be HTTPS when it should be 'http://'
            # (ie {'http': 'http://proxy', 'https': 'https://proxy'})
            # Instead we add a nice error message and point to a URL.
            if (
                isinstance(e, BaseSSLError)
                and self.proxy
                and _is_ssl_error_message_from_http_proxy(e)
            ):
                e = ProxyError(
                    "Your proxy appears to only use HTTP and not HTTPS, "
                    "try changing your proxy URL to be HTTP.

        When create a recurring job with `default` in groups.
        Then should have 1 cron job.

        When write some data to volume `test-job-1`.
             write some data to volume `test-job-2`.
        And wait for `backup1` cron job scheduled time.
        Then volume `test-job-1` should have 1 backups.
             volume `test-job-2` should have 1 backups.

        When write some data to volume `test-job-1`.
             write some data to volume `test-job-2`.
        And wait for `backup1` cron job scheduled time.
         Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response
        """

        try:
            conn = self.get_connection(request.url, proxies)
        except LocationValueError as e:
            raise InvalidURL(e, request=request)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError as e:
                # this may raise a string formatting error.
                err = ("Invalid timeout {}. Pass a (connect, read) "
                       "timeout tuple, or a single float to set "
                       "both timeouts to the same value".format(timeout))
                raise ValueError(err)
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)

        try:
            if not chunked:
                resp = conn.urlopen(
                    method=request.method,
                    url=url,
                    body=request.body,
                    headers=request.headers,
                    redirect=False,
                    assert_same_host=False,
                    preload_content=False,
                    decode_content=False,
                    retries=self.max_retries,
                    timeout=timeout
                )

            # Send the request.
            else:
                if hasattr(conn, 'proxy_pool'):
                    conn = conn.proxy_pool

                low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT)

                try:
                    low_conn.putrequest(request.method,
                                        url,
                                        skip_accept_encoding=True)

                    for header, value in request.headers.items():
                        low_conn.putheader(header, value)

                    low_conn.endheaders()

                    for i in request.body:
                        low_conn.send(hex(len(i))[2:].encode('utf-8'))
                        low_conn.send(b'\r\n')
                        low_conn.send(i)
                        low_conn.send(b'\r\n')
                    low_conn.send(b'0\r\n\r\n')

                    # Receive the response from the server
                    try:
                        # For Python 2.7, use buffering of HTTP responses
                        r = low_conn.getresponse(buffering=True)
                    except TypeError:
                        # For compatibility with Python 3.3+
                        r = low_conn.getresponse()

                    resp = HTTPResponse.from_httplib(
                        r,
                        pool=conn,
                        connection=low_conn,
                        preload_content=False,
                        decode_content=False
                    )
                except:
                    # If we hit any problems here, clean up the connection.
                    # Then, reraise so that we can handle the actual exception.
                    low_conn.close()
                    raise

        except (ProtocolError, socket.error) as err:
            raise ConnectionError(err, request=request)

        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)

            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)

            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)

            if isinstance(e.reason, _SSLError):
                # This branch is for urllib3 v1.22 and later.
                raise SSLError(e, request=request)

>           raise ConnectionError(e, request=request)
E           requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=9500): Max retries exceeded with url: /v1/backupvolumes/test-job-1?action=backupList (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7de81c1760>: Failed to establish a new connection: [Errno 111] Connection refused'))

/usr/local/lib/python3.9/site-packages/requests/adapters.py:516: ConnectionError
============================================================== 3 failed, 24 passed, 1 skipped in 8253.64s (2:17:33) ===============================================================
root@longhorn-test:/integration/tests#

Validation - PASSED
No more failed cases with v1.2.x-head branch.

Test name
Duration
Status

test_recurring_job[nfs]
11 min
Passed

test_recurring_job_backup[nfs]
3 min 20 sec
Passed

test_recurring_job_default
16 sec
Passed

test_recurring_job_delete
32 sec
Passed

test_recurring_job_delete_should_remove_volume_label
2 min 17 sec
Passed

test_recurring_job_detached_volume
3 min 59 sec
Fixed

test_recurring_job_duplicated
1 min 49 sec
Passed

test_recurring_job_groups[nfs]
4 min 56 sec
Passed

test_recurring_job_in_storageclass[nfs]
6 min 30 sec
Passed

test_recurring_job_in_volume_creation
6 min 43 sec
Passed

test_recurring_job_kubernetes_status[nfs]
5 min 39 sec
Passed

test_recurring_job_labels[nfs]
4 min 5 sec
Passed

test_recurring_job_multiple_volumes[nfs]
4 min 17 sec
Passed

test_recurring_job_snapshot
2 min 43 sec
Passed

test_recurring_job_volume_label_when_job_and_group_use_same_name
43 sec
Passed

test_recurring_jobs_allow_detached_volume[nfs]
9 min 30 sec
Passed

test_recurring_jobs_maximum_retain
1 min 43 sec
Passed

test_recurring_jobs_on_nodes_with_taints
0 ms
Skipped

test_recurring_jobs_when_volume_detached_unexpectedly[nfs]
8 min 47 sec
Passed

Additional notes for master-head(20220411, v1.3.0-dev):

test_recurring_jobs_maximum_retain:
Update the asserting error message from validator https://github.com/longhorn/longhorn-tests/pull/933
Both test_recurring_job_volume_label_when_job_and_group_use_same_name and test_recurring_job_backup[nfs] are more or less related to the connection and timing, for the moment using a slightly better instance(better network as I assumed) will almost pass every time.

Further tweak or change should look into common.py.wait_for_volume_recurring_job_update


big section of content is hyperlinked

the whole "Using Custom Themes" section is "linked" to nothing.

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

ID: 87b678e7-5336-db4f-02ac-db6d2115ebec
Version Independent ID: 5434c705-8fa7-f2ed-e358-6c05d915cde0
Content: Material Theme - Xamarin
Content Source: docs/android/user-interface/material-theme.md
Product: xamarin
Technology: xamarin-android
GitHub Login: @davidortinau
Microsoft Alias: daortin

Hi @Edgaras91
Thanks for opening this issue. The issue was caused by an updated version of markdig that's used by the docs build system. It handles HTML that's embedded in markdown more strictly. I've updated all the affected pages, and so the issue is now fixed.


[Bug]: OpenSearch Vector Store have a lot of connection problem after #11513

Bug Description
I noticed that after #11513, my OpenSearch vector store connection became unstable, and we can confirm this by trending bug reports related to this issue recently. (#13358, #11661, etc)

This event loop is already running.
ConnectionError(Timeout context manager should be used inside a task) caused by: RuntimeError(Timeout context manager should be used inside a task)
etc

I also see it suggested to use asyncio, but even with that we can still get the errors
import nest_asyncio
nest_asyncio.apply()

I also notice, this error getting worse when we use LlamaIndex with FastAPI,
Version
latest
Steps to Reproduce
Just use OpenSearch vector store long enough that you'll notice it's become unstable.
Relevant Logs/Tracbacks
No response

It would be nice to support async in this vector store. If you have any ideas for improvements, open to PRs 😇

@logan-markewich I Agree with the async, but I think would be great if the changes were backward compatible or at least made them optional, so it won't break an existing implementation.
Unfortunately, I'm not really good with OpenSearch connection or python async handling, so I can't help with this one.

I have written a patched Opensearch class to handle async and connection issues do to this - happy to send a PR, although I'm not sure how compatible it will be (should probably be good for llama-index v0.10+)

We are running into similar issues. I had to basically rewrite the Opensearch support to go back to using the sync version of opensearch-py to get it to run in our fast api service. I could put in a PR for allowing a flag to use async or not possibly?

I also encountered similar connection issues when using OpenSearch with FastAPI. I think the patch by @der-ofenmeister or the flag to allow async/sync choice suggested by @GeorgeDittmar would be a great solution. It would be much better to avoid using workarounds like nest_asyncio.
Looking forward to the patch!

yeah nest_asyncio didnt even work for us on our service but even then I wouldnt trust it for a prod solution. I'll maybe start work on a flag approach unless @der-ofenmeister puts their patch in first

@GeorgeDittmar , I’ve experienced similar connection problems when using OpenSearch with FastAPI as well. I agree with avoiding nest_asyncio for production use; it didn't work well in our setup either.

Hi @der-ofenmeister, would you be able to share the details of the patch you mentioned? I'd love to test it out, as we're facing similar issues and looking for a more stable solution than nest_asyncio.
Thanks in advance!

It wasn't as straightforward as expected :). I had to implement custom versions of OpensearchVectorStore and OpensearchVectorClient to switch the async operations to synchronous ones. After doing that, it seems to be working now.

Yeah thats exactly what I had to do on my end sadly.


bufferTime - Duplicate emission

const { Subject } = require('rxjs')
const { bufferTime } = require('rxjs/operators')

const sub = new Subject()

sub.pipe(bufferTime(100)).subscribe({
  complete: () => console.log('done'),
  next: x => {
    console.log('output', x)
    sub.complete()
  },
})

sub.next(1)

Expected output:
output [ 1 ]
done

Actual output:
output [ 1 ]
output [ 1 ]
done

Environment
node v15.3.0
Rxjs v6.6.3

7.0.0 behaves to emit once only. https://stackblitz.com/edit/rxjs-zoo7s4?file=index.ts.

7.0.0 behaves to emit once only. https://stackblitz.com/edit/rxjs-zoo7s4?file=index.ts.


fix allow_unstable_extensions GUC - make it USERSET,

fix message wording

I think we messed this up a bit, because there were two PRs: one from Tristan and then a simplified version from Konstantin. In the Tristan's version it had a correct GUC level https://github.com/neondatabase/neon/pull/9508. but wrong GUC description, thanks for fixing


Allow Exhibition display in an existing navigation stack

When pushing Exhibition in a navigation stack a double navigation bar is visible due to the nested NavigationView. Would be nice to have some way to indicate to the lib that the extra navigation view was not required.

Navigation and display is something I'd like to have customizable.
More than just specifying whether or not its in a navigation view already.
I'd like to consider the whole picture with this.
What if the consumer doesn't want a navigation view? and instead wants some custom navigation into exhibits?
The layout closure on Exhibit provides a small portion of this, but is not as clear as I'd like.
How do we allow for customization of that level as well.
Potentially:

Move navigation code into the Sourcery template.
Provide closures / bindings instead of performing navigation inline

On the other side, one could say this is not meant to be an integrated view inside of another app. It should be presented in such a way that it has complete control over the viewport. EG: Presentation, new window, etc.
Similar to how storyboard is its own separate webpage, and not an integrated portion.

Resolved by #39
You can now remove the navigation view from the sourcery template and push onto your own stack.


form

What is your username and discriminator?
oij#6740
Why did you join Discord Linux?
programmer
Where did you hear about Discord Linux?
python discord
What is the passphrase that was assigned to you by the bot?

From Ethan Weegee#9302 :
The passphrase you have entered is not correct.  Please check the message that mentions you in the welcome channel to find your passphrase.

Closing as it has been more than 24 hours.


OBS-  Implement' Open Bible Stories'  for various languages

Implement Open Bible Stories to view Bible stories for various languages

Open Bible stories have been successfully implemented . The related issues raised have been verified.


Magic UI for VueJS

I'm making this issue to track any ports of Magic UI components to VueJS
If you have any ports, feel free to comment them below to share with the community!
We will eventually try and merge everything together in one repo if possible down the line.
However our current priority will be on react first.
If someone from the community wants to take initiative to integrate VueJS support into this repo please feel free to comment below and get started :) No permission needed

👍

We are waiting for Vuejs support

Need this :D

tik tok... tik tok...


Not rendering after lock-unlock

On the device, when performing a lock (via hard button or after screen being idle for 30+secs) and unlocking, sometimes the progress indicator is not rendered. After navigating back-forth, the progress is shown

I encounter the same bug but only on Android. The render function is called and everything seems to be fine but the component is not visible. The inspector shows no changes when the component is not visible after lock.

Yes it is Android only. I ended up using an AppState callback to restart the animation when the app returns to the foreground (I'm using AnimatedCircularProgress).

@kelvinlawson can you share how you fixed it?

@gamingumar, here is my patch: https://gist.github.com/kelvinlawson/01985972c333f4690951daff20b4dabf

thanks @kelvinlawson is it safe to use these events? aren't they going to be deprecated?

#95 fixes this. Let's hope we can get it merged soon and keep discussion over there for now.


.net

URL
https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/run
Operating system
windows
More information about your system
x64
Description
localhost uses encryption to protect your information. When Microsoft Edge tried to connect to localhost this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be localhost, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Microsoft Edge stopped the connection before any data was exchanged.
You can't visit localhost right now because the website sent scrambled credentials that Microsoft Edge can't process. Network errors and attacks are usually temporary, so this page will probably work later.
dotnet --info
No response

Can you share a screenshot? Is this about the NET::ERR_CERT_INVALID error message?


Telegraf plugin - graphite "insecure_skip_verify"

Hi,
after configuration of telegram plugin and output to graphite, no output is sent because of unsecure traffic between opnsense and graphite node.
the value for this is automatically set in background by the opnsense webGUI.
/usr/local/etc/telegraf.conf:
insecure_skip_verify = true
after changing this to "insecure_skip_verify = false" the telegraf plugin is working.
my issue is: after reboot of opnsense the value is set to "true" again.
would it be possible to make this value accessable via webGUI or the value manually set in conf-file survives reboot?
Thanks and bye
dtavb

Can you open this issue in plugins repo please and close this one here?
Telegraf is a plugin and I don't monitor core issues.

thanks, I will do it.

i have this same issue, any news about this? what is the solution for this?

@donixa Graphite SSL Verification checkbox.

thank you @fichtner it works now...

great, no problem :)


Lint support

add Android Lint

@giginet
I fixed your comments.
Please check my commits.

I'm sorry. I made you wait.
I asked an Android engineer to check this PR, therefore it seems to LGTM.
I'll merge.
Thank you contribution 🎉


Detect Inno and NSIS automagically

[x] Have you signed the Contributor License Agreement?

Resolves Trenly/winget-pkgs#177

cc @denelon @russelbanks @mdanish-kh
Microsoft Reviewers: Open in CodeFlow

If you're always reading 264 bytes, won't NSIS installers always equal false as their magic bytes are 224 bytes long? You'd end up with 40 bytes extra that are different between NSIS installers

If you're always reading 264 bytes, won't NSIS installers always equal false as their magic bytes are 224 bytes long? You'd end up with 40 bytes extra that are different between NSIS installers

You right; I just didn't read carefully

$burn = @(46; 119; 105; 120; 98; 117; 114; 110)
The only thing is that it can present anywhere in the binary, so we have to read the complete binary from beginning to end.

That could present a lot of false positives

It is short because it's just .wixburn header as array of UTF-8 bytes.

It is short because it's just .wixburn header (reference: Trenly#179) as an array of UTF-8 bytes.
The thing is that @russellbanks implemented a different way of detecting .wixburn header in binary, but just out of curiosity, I had put these bytes into the same function which detects inno/nullsoft installers with the only modification of reading the complete binary, and it turned out to be working for burn too.

Komac keeps reading a small amount of bytes to find the .wixburn header until a certain point. It was based on Wix's C# implementation. Reading the whole binary at once will of course work but will use very large amounts of memory.
For example, say the header can appear anywhere from bytes 100-1000 in a 10,000 byte file, I keep reading 8 bytes at a time until I find it in the 100-1000 section, to keep memory usage at a minimum.

Reading the whole binary at once will of course work but will use very large amounts of memory.

That's really a disadvantage and since YamlCreate is meant to be a user-facing script, we might have to go through the process of reading a small amount of bytes at a time.

Scanning through the entire binary for a burn header seems a bit excessive, especially if the binary is big. Android Studio for example is > 1gb

Scanning through the entire binary for a burn header seems a bit excessive, especially if the binary is big. Android Studio for example is > 1gb

That's true, but it returns immediately as soon as it finds it if it is present; I'll have to see how long it takes to read a larger file, but because it's a streamreader it should be fairly quick

Scanning through the entire binary for a burn header seems a bit excessive, especially if the binary is big. Android Studio for example is > 1gb

That's true, but it returns immediately as soon as it finds it if it is present; I'll have to see how long it takes to read a larger file, but because it's a streamreader it should be fairly quick. Its also why the NSIS/Inno checks are first

@russellbanks - Is there a specified number of bytes that komac will read?

@russellbanks - Is there a specified number of bytes that komac will read?

Here's how it works simply:

Offset starts at 0

Repeat the below 65535 times:

Read 8 (length of .wixburn) bytes at current offset
Compare those read bytes to .wixburn as bytes
If found, it's burn
Otherwise, move offset to the current position

If it's not found after 65535 times, it's not burn. This is the most performant way of doing it that I know of (takes milliseconds) and works every time (except for the JPackager case I mentioned in https://github.com/Trenly/winget-pkgs/issues/179).
Checking Inno and Nullsoft first is best priority-wise, as you're currently doing.

So at most, 8*65535 bytes

No, I'm clearing the buffer so we only have 8 bytes in memory for reading at a time

So at most, 8*65535 bytes

No, the buffer gets overwritten so we only have 8 bytes in memory for reading at a time

Right; But at most your read 8 bytes 65535 times, which would be 524280 bytes into the binary; If it isn't found within the first 524280 bytes, then it isn't burn

So at most, 8*65535 bytes

No, the buffer gets overwritten so we only have 8 bytes in memory for reading at a time

Right; But at most your read 8 bytes 65535 times, which would be 524280 bytes into the binary; If it isn't found within the first 524280 bytes, then it isn't burn

Yeah

@russellbanks - Latest commit limits it to just that maximum number of bytes; Please review


New type of exception handling

try...catch block contains too many code, however, the code which might have error is not that long. For example;
try
{
    int a = Integer.parseInt(input());
    print(a);
}
catch (Exception e)
{
    // Some code
}

The print() function does not have parsing failure exception. I think we do not have to try some function that
the function itself does not have error.
Example:
attempt
{
    int a = Integer.parseInt(input());
}
catch (Exception e)
{
    extern int a = 0; // If you still want to use a
    throw new Exception(); // If you want to stop this function
}
welldone
{
    extern int a;
}

print(a);

End by handling only one variable, do something like this:
int a = try loop { int(input()) } catch (Error e) ;


Add patch to allow buffered mnemonics as valid type as args on some methods

Adds patch we currently implement in metamask-extension.

It looks like the TypeScript source remains unchanged. The altered files are the build output, they shouldn't be changed directly.

It looks like the TypeScript source remains unchanged. The altered files are the build output, they shouldn't be changed directly.

Ah ok! Will make the changes in the ts files.

@Gudahtt ready for another look when you have a moment

Looks like the tests need to be updated too, for the two functions that had their return type changed. Adding tests for the function that now accepts a Buffer would be great too


swipeout: Fix left-menu is shown when sliding back and forth #1139

Please makes sure the items are checked before submitting your PR, thank you!

[ ] Rebase before creating a PR to keep commit history clear.
[ ] Only One commit
[ ] No eslint errors

这个换行问题搞死了，在webstorm里面修改就自动变了，最后只能在文本编辑器里修改了


webapp: we need a loading spinner

Expected behaviour
Display a "waiting for check results ..." with a spinner image so that the user knows something is going on.
Observed behaviour
Webapp feels frozen while waiting for server-side fontbakery run, due to the lack of a visual indicator of the ongoing activity.

FontBakery logo animated with SVG SMIL attributes to be used as a "spinner" on the webapp while waiting for the server-side check results:
https://github.com/felipesanches/fontbakery/blob/de8bc725ee8b8ed316361d2504b6b652edbccde1/data/animated_logo.svg
Isn't that cool ? :-D

implemented on branch issue_1121 will be merged with the rest of the webapp code tracked by issue #1121


@folke maybe set opts.delay to timeoutlen by default to maintain previous behaviour?

          @folke maybe set `opts.delay` to `timeoutlen` by default to maintain previous behaviour?

Originally posted by @Rizhiy in https://github.com/folke/which-key.nvim/issues/648#issuecomment-2227524539

I currently have the following in my which-key config:
delay = function()
  -- NOTE: To make `<Leader>d` and `<Leader>dd` keymaps work
  --       make sure that opts.delay >= timeoutlen.
  --       - https://github.com/folke/which-key.nvim/issues/648#issuecomment-2226881346
  local delay = 200
  return delay < vim.o.timeoutlen and vim.o.timeoutlen or delay
end,

I'll just fix it so that it always works regardless of timeoutlen / delay.

I just pushed a change where which-key now honors nowait and timeoutlen the same as Neovim does,
regardless of timeoutlen or delay


Add ...WithAttributes functions

As part of the v1 rewrite discussions (see #36), it was suggested to add ...WithAttributes variants of the key generation functions. This would allow generation of keys with arbitrary attributes.
I began implementing this in the with-attributes branch, but decided to pause the work. It's not clear if anyone using this library needs that functionality, so it feels premature to add it.
I'll leave this issue open as a reminder of the potential feature and to see if anyone has interest in it.

I'm currently working on a project that needs to generate new keys with the CKA_PRIVATE attribute set to ensure they can only be accessed with either a OCS or a Softcard.  This proposal would work for this solution but looking at the current branch it might be too generic (requiring the caller to also add any labels and ids along with the additional parameters). I will spend some time looking at your proposed changes and see what I can come up with.


Clarify Type System and Operator Behavior

This is a doozy.
Resolves #40 (Commas in function calls)
Resolves #97 (Weak Typing)
Resolves #101 (Boolean Operators)
Resolves #102 (Functions with zero arguments)
Resolves #107 (Truthiness)
Resolves #108 (String Concatenation)
Resolves #130 (Function calls with and)
This tries to stay as accurate as possible, and I've looked over everything thrice, but I have probably missed an edge case or the wording isn't as precise as it could be. I have tried to keep to what was agreed upon in various discussions, but I will imagine some lively discussion will come of this. 🤘

Not a huge deal, but it does bother me a little that A is not B has two interpretations that behave differently. I know the spec clarifies that it is always A != B but it still feels a bit weird to me. What if instead of using "is not" for comparison we use "isn't" instead, in addition to the existing alternative of "aint", so that A is not B only has a single interpretation. Not set on this though if you prefer keeping "is not" as is.

Just realized, it would be good to clarify if the logical operators are "short circuiting". For example, is false and 1 over 0 equal to false or an error?

I agree on both counts, I'll give it a fix. Operators should short circuit, they wouldn't be very useful otherwise.

Thanks @cwfitzgerald! I believe there's a typo in your new commit - it says true and 1 over 0 is false when it should be false and 1 over 0.

@wizered67 and that my friends is why peer review exists. That's what I get for editing while tired. :)

Looking over this again, I'm realizing there doesn't seem to be a way to read a string from standard input and convert it to a number. Using it in a comparison would convert it to a number, but trying to do math on it would treat it as a string.

I convert it implicitly in Kaiser on reading from stdin, out of the assumption that if someone enters a number they would most likely expect it to be treated like a number.
Some conversion function might be nice though.

@marcinruszkiewicz This problem is going to be solved by the modules/stdlib implementation that have been mused about in various places. #115 is the place that my github-foo can find.

A standard library seems like a good idea! It would be nice to start standardizing it soon before every implementation makes their own functions.

A agree, it's on my todo list 😄


Yaxis labels are being cut off

I have used plugin ngEcharts for display charts. is displays like below.

As you can see yAxis labels are being cut off. can anyone point me on the direction to how to prevent this or increase yAxis label area or decrease chart area?

please have a try  css padding
for example

Increase grid.left,
Or set grid.containLabel as true.

@100pah Thanks. Got it working!

Y-axis label name is still cut off. Can anyone suggest to me how to make the y-axis name visible?

Y-axis label name is still cut off. Can anyone suggest to me how to make the y-axis name visible?


More details and samples are requered

Hi Guys,
After reading the article it is still very hard to implement the solution. Article require samples for:

How to create AD users in the database, how should their login's looks like, what auth method should be used
After the token is acquired how we should connect to the database, how exactly token should be used

Ideally, some code samples on .NET....

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

ID: 6ef22f99-457e-7a07-cdfe-1388fc0a1b52
Version Independent ID: 6589690d-0cbe-1b09-5abd-794d0df0a81a
Content: Active Directory authentication - Azure Database for MySQL
Content Source: articles/mysql/concepts-azure-ad-authentication.md
Service: mysql
GitHub Login: @lfittl-msft
Microsoft Alias: lufittl

@yahorsi Thank you for the feedback. We are actively investigating and will get back to you soon.

@yahorsi Thank you for the feedback. We are actively investigating and will get back to you soon.

@yahorsi Thanks for opening an issue & reaching out.
I believe these two documents address what you are asking for (in the how to section, instead of concepts section)
https://docs.microsoft.com/en-us/azure/mysql/howto-configure-sign-in-azure-ad-authentication
https://docs.microsoft.com/en-us/azure/mysql/howto-connect-with-managed-identity
This should address both (1) and (2) that you mentioned.

@yahorsi Thanks for opening an issue & reaching out.
I believe these two documents address what you are asking for (in the how to section, instead of concepts section)
https://docs.microsoft.com/en-us/azure/mysql/howto-configure-sign-in-azure-ad-authentication
https://docs.microsoft.com/en-us/azure/mysql/howto-connect-with-managed-identity
This should address both (1) and (2) that you mentioned.

Guys you are awesome, thank you.

Guys you are awesome, thank you.


[Bug]: Getting "Could not find a session for" error on any new git repo or branch I open

Your minimal.lua config
local root = "/tmp/persisted"

-- Set stdpaths to use root dir
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- Bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

vim.opt.sessionoptions = "buffers,curdir,folds,globals,tabpages,winpos,winsize" -- Session options to store in the session

-- Install plugins
local plugins = {
  {
    "olimorris/persisted.nvim",
    opts = {
      use_git_branch = true,
      should_autosave = true,
      autoload = true
      -- Your custom config here
    }
  },
  -- Put any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

Error messages
[Persisted.nvim]
Could not load a session for branch master
Trying to load a session for branch main ...
[Persisted.nvim]
Could not find a session for /home/miversen/.local/share/nvim/lazy/marks.nvim
As per https://github.com/olimorris/persisted.nvim/discussions/103 you may need to remove the branch from the name

Describe the bug
After the changes referenced in #103 , it seems that autoloading while using git repositories is kinda broken. This issue only pops up when you enter a repository (or branch) for the first time. After the session is created initially it goes away. I ignored the error for a while but it is getting irritating that I am ignoring false errors. Do let me know if there is anything I can provide to help :)
Reproduce the bug

Navigate to a git repository that you have not yet opened (or delete the session for an existing repo)
Open neovim in that directory
Observe error

Final checks

[X] I have made sure this issue exists in the latest version of the plugin
[X] I have tested with the minimal.lua config file above and still get the issue
[X] I have used SessionSave to save the session before restarting Neovim and using SessionLoad
[X] I have made sure this is not a duplicate issue

Firstly, thanks for the clear issue and the minmal.lua config. I'm amazed this is the first time this issue has been raised 😉 . I knew that putting the warning in would cause some clashes but I figured it was a small price to pay to notify users of a breaking change.
I've removed the message now so should fix the issue.

Works for me :) Would you be open to a PR changing your opening print "warnings" to vim.notify?

Oh yes please 😄 !


WithPartition.java: /DEV Write tests for WithPart...

The puzzle 736733034 originating from #428 has to be resolved:
https://github.com/eo-cqrs/eo-kafka/blob/b5678e759eb76e884e1e9e9b8545150f1c1582f1/src/main/java/io/github/eocqrs/kafka/data/WithPartition.java#L47-L49
"/DEV Write tests for WithPartition caching mechanism.  We need to prove with tests that our caching works  and that it is also thread-safe.".
The puzzle was created by l3r8yJ at 2023-08-21 18:18:08 +0300.
Estimation is 60 minutes.
If you have any technical questions, don't ask me, I won't be able to help. Open new issues instead.

@l3r8yJ this is your task now, please go ahead. Deadline (when this ticket should be closed) is 2024-02-15T01:19:55.162332.
Estimation here is 60 minutes, that's how much you will be paid.
Remember, you don't have to solve everything in this ticket - you can solve it partially and leave todo markers in the code, which will become future tasks.
If you have any questions don't ask me, I'm not a technical person. Open new tickets instead.
If you don't have time or simply don't want to work on this, you can always resign.

@l3r8yJ Don't forget to close this ticket before the deadline (2024-02-15T01:19:55). You are past the first half of the allowed period.

@l3r8yJ Looks like you've missed the task deadline (2024-02-15T01:19:55). You are now resigned from this task.
Please stop working on it, you will not be paid. I will assign it to someone else soon.

@h1alexbel this is your task now, please go ahead. Deadline (when this ticket should be closed) is 2024-02-25T01:30:21.510618.
Estimation here is 60 minutes, that's how much you will be paid.
Remember, you don't have to solve everything in this ticket - you can solve it partially and leave todo markers in the code, which will become future tasks.
If you have any questions don't ask me, I'm not a technical person. Open new tickets instead.
If you don't have time or simply don't want to work on this, you can always resign.

@h1alexbel Don't forget to close this ticket before the deadline (2024-02-25T01:30:22). You are past the first half of the allowed period.

@h1alexbel Looks like you've missed the task deadline (2024-02-25T01:30:22). You are now resigned from this task.
Please stop working on it, you will not be paid. I will assign it to someone else soon.

@h1alexbel I couldn't find any assignee for this task. This is either because there are no contributors with role DEV available or because the project does not have enough funds.
Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.


Training on TPU

Is it possible to train RoBERTa Using TPUs?

Not that we've tried.  Looks like there might be external resources available though.

What's the current status on this?

@lematt1991 do you know which code/repo/branch lies under the external resources link you posted?

You can use the tpu branch: https://github.com/pytorch/fairseq/tree/tpu
We'll be merging the relevant flags to master very soon (basically just --tpu --distributed-world-size=XX should work). We've achieved good results for RoBERTa training, but more work is needed for translation, since TPUs don't like dynamic shapes and we need to modify our batching approach to limit the number of unique batch shapes.

Thank you very much. Are all BPE algorithms supported as in the main branch, like sentencepiece, huggingface bpe etc.?
Which value do we have to select for distributed-world-size? We plan to train on a TPU pod.

--distributed-world-size should match the size of the TPU pod.
I typically do:
python -m torch_xla.distributed.xla_dist \
  --tpu=myleott-tpu-64 \
  --conda-env=torch-xla-nightly \
  -- \
  python /mnt/myleott/fairseq-py/train.py \
  --distributed-world-size 64 \
  --tpu \
  --log-format json --log-interval 25 \
  (...)

Note that on TPUs we only synchronize logging stats at the end of the logging interval (--log-interval). Smaller values will slow things down a bit, so I recommend using a log interval 25 (or greater). Also note that the words-per-second counter will be off by the same factor. So if you have --log-interval=25, then you should multiply the wps counter by 25 to get the correct value.

Initial support merged in 775122950d145382146e9120308432a9faf9a9b8. I'll be iterating on this over coming weeks to add a README, support for translation tasks (currently only LM and RoBERTa are supported), hopefully support for model parallel, etc.

Thanks a lot!
Any tips yet how to setup --update-freq and --max-sentences with TPUs (esp. when training on pods)?


Add Glyphs 3.app feature code as a compilation target

Glyphs 3 has support for substitutions by directly writing opentype feature code that's conditioned on designspace locations (see the end of this thread for details). (This is not part of adobe's OpenType feature specification, it's a layer that Glyphs 3 added.) We could have the variable font visualizer author this feature code base on what you select in the interface, and then you could copy/paste the code back into  Glyphs directly, which would sidestep the need to go through designspace files entirely.
You could export a .ttf (with no production names) from Glyphs, drop it in the visualizer, generate your subs, and paste the resulting features back into Glyphs. Job done.

Seconded, I was thinking of trying to build this myself too actually

Thanks @weiweihuanghuang ! I'm glad the idea makes sense. We're still in Glyphs 2 land at Occupant Fonts. I think I'll look at building this when we make that jump to Glyphs 3.
In the mean time, if you're interested in working on this feature, that would be pretty amazing. I'd be happy to help you get set up with the code / show you where to put code for a Glyphs 3 backend. Let me know!

My js isn't great but I'd love to try take a look – if you could point me where I can write the gneerator. The G3 sytnax is very simple tbh, this is a typical example:
# ifdef VARIABLE

condition 127 < wght < 175;
sub dollar by dollar.bold;
sub naira by naira.bold;
sub won by won.bold;
sub colonsign by colonsign.bold;

condition 105 < wght < 175, 75 < wdth < 90;
sub dollar by dollar.bold;
sub naira by naira.bold;
sub won by won.bold;
sub colonsign by colonsign.bold;

# endif

Awesome. I'm super excited that you're into trying this out.
This seems like a good opportunity for me to add more information of contributing and development to the README document. I'll add a section at the bottom that describes how to get a local development environment up and running, and then another section that describes where/how to add a new generator.
I'll ping this thread when that stuff is up.

@weiweihuanghuang I just added a bunch of information to the README, in the Developing and Contributing section. I added some information about getting the development env up and running, as well as how to add a code generator. I think there's enough info in there for you to figure out the data you're working with, and how to transform it into Glyphs 3 feature code.
I also quickly stubbed out a place in the UI where the glyphs 3 code will render, for you to test with. When you open the Generate Table tab at the top right, you'll see a .glyphs tab. It looks like this:

Whenever someone switches to that .glyphs tab, it will run your code generator, and dump the output into that window.
I also added a stub method in the src/store/tables.js file, where you can do your implementation of the code generator.

There's a lot of documentation on the parameters you'll get in the README. You should return a list of strings that you want the user to copy and paste into Glyphs 3. Let me know if there's any other info I can give you / anything I can help out with. This is our first time having anyone outside the Occupant Fonts team work on our codebase, and we're learning what the best way to do it. Feel free to open a PR when you're ready to share. Thanks for being interested in helping out!

Fantastic, thank you! I have noticed you have excepitonally detailed documentation and comments in the code.

Hello @nicschumann and @weiweihuanghuang
I recently learned about this incredible tool. I am curious if there are any updates about using the VF Visualizer to create the Glyphs 3 feature code?

I wonder if would make sense to run that directly inside Glyphs as a plugin?

@schriftgestalt if it has the same visualisation functions yes that would be amazing?!


websocket and prioritised handlers

Hi there!
I've tried to use priority queue (get it straight from https://www.boost.org/doc/libs/1_77_0/doc/html/boost_asio/example/cpp03/invocation/prioritised_handlers.cpp example) with beast websocket and mostly it worked fine. But under stress-testing with more than 20 thousand of connections I've start to see a problem which is not present if you are running without prioritised handlers queue.
Each of websockets in my stress-test scenario loaded with binary frames coming in and out at a moderate speed and there is also occasional ping-pong exchanges at a slow steady pace. My problem is that somehow some of connections become stuck. Async read just never returns and even close of low level socket doesn't force this handler to finish. I've put some time in finding condition for such event and as it turns out there is always a packet received with two ws frames inside: binary and ping. I'm not sure yet if this packet created in such form originally or concatenated by network adapter offload mechanism. But in every case of such stuck ws connection I've seen was preceded by a packet with binary and ping frames inside.
Is there a problem inside websockeet implementation? Should it be compatible with prioritised handlers queue? Or should I stay away from it?

I don't think it should be a problem that more than one frame has been sent in the same TCP message. We treat the underlying socket as a stream, so we have no concept of TCP message boundaries in the websocket stream code (the websocket stream would work if connected to file handle or pipe, for example).

I would like to be able to replicate your test. Would you be in a position to share the steps to create the test client and share the (complete) code that is failing?
I would like a copy of the contents of the network packet in which there is both the binary frame and the ping, so that I can build a test to check the interaction of the parser and the transport layer.

What you are doing sounds more complex than this example, and it might be that you have a race condition.
Anecdotally, I have tested beast in a production server while handling 80,000 concurrent connections. That server has been running for three years. I suspect that if there was an inherent logic error, I would have seen it, but it is always possible that we are doing something different.

Error only pops out for me after addition of priority queue. With plain io context there is no problem.
I will try to create simple test basing on one of echo server tests.
And I will provide pcap dump in a few minutes.

Dump of stream with a problem. Look for a packet No 652.
ws.error.pcap.gz

Dump of stream with a problem. Look for a packet No 652.
ws.error.pcap.gz

I see only one frame in that tcp message though, and we sent back a pong.

I've tried to replicate my problem in a simple test and it doesn't show up in this tests. I will go deeper in my code look for error of my own. Luckily I can replicate error with just two of concurrent sessions.

Great. This is often the case. The most common violations of asio/beast preconditions are:

not protecting a connection with a strand when there are more than one thread, resulting in data races.
initiating more than one async_write per stream at a time.
Invoking methods on a stream from one thread while there is an async operation making progress on another.
Not ensuring that the buffers or stream itself outlives all async operations initiated by the stream.

@shuras109 what's the state of this issue?


Adds support for Yaml Schemas

Currently we only support Json Schemas. This is only 1 of the two
standard formats that Swagger supports, the other being YAML. This
change will add support YAML.
Fixes issue #21

Nice, just need the test to pass :)
I believe this is due to the version of symfony yaml component, which was a little low in features in 2.3, i have some symfony dependencies that works from 2.3, but i'm not attached to support 2.3. However it should support Symfony from 2.8 at least (as there is still many projects in 2.X and don't want to have conflicts with them).
When it's good i will merge this but not tag it, as there is a new build dependency (but not needed on runtime) i want to change the way this lib is packaged as say in https://github.com/jolicode/jane-openapi/issues/19 and certainly release a .phar (so you don't need to have php-parser and many others deps for running your api)

Cool, I shall work on this tomorrow (I'm in the Europe/London timezone).
I'll see if I can make it work with older versions than 2.8, but I do know
it works against that.
On Fri, 12 Aug 2016, 16:13 Joel Wurtz<EMAIL_ADDRESS>wrote:

Nice, just need the test to pass :)
I believe this is due to the version of symfony yaml component, which was
a little low in features in 2.3, i have some symfony dependencies that
works from 2.3, but i'm not attached to support 2.3. However it should
support Symfony from 2.8 at least (as there is still many projects in 2.X
and don't want to have conflicts with them).
When it's good i will merge this but not tag it, as there is a new build
dependency (but not needed on runtime) i want to change the way this lib is
packaged as say in #19
https://github.com/jolicode/jane-openapi/issues/19 and certainly
release a .phar (so you don't need to have php-parser and many others deps
for running your api)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jolicode/jane-openapi/pull/23#issuecomment-239473661,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIIz6KpvV1LQqC2FF2ja3bbbsFNCkKKks5qfI2ZgaJpZM4JjELJ
.

--
Billie Thompson
Software Developer
Purple Booth Ltd
Mob:<PHONE_NUMBER>6
Web: purplebooth.co.uk
Keybase: http://billie.codes/1NOw29c
LinkedIn: http://billie.codes/1KT8gcI
Twitter: http://billie.codes/1SGPMCw

(and that that is better reflected in the composer dependencies)
On Fri, 12 Aug 2016, 18:24 Billie Thompson<EMAIL_ADDRESS>wrote:

Cool, I shall work on this tomorrow (I'm in the Europe/London timezone).
I'll see if I can make it work with older versions than 2.8, but I do know
it works against that.
On Fri, 12 Aug 2016, 16:13 Joel Wurtz<EMAIL_ADDRESS>wrote:

Nice, just need the test to pass :)
I believe this is due to the version of symfony yaml component, which was
a little low in features in 2.3, i have some symfony dependencies that
works from 2.3, but i'm not attached to support 2.3. However it should
support Symfony from 2.8 at least (as there is still many projects in 2.X
and don't want to have conflicts with them).
When it's good i will merge this but not tag it, as there is a new build
dependency (but not needed on runtime) i want to change the way this lib is
packaged as say in #19
https://github.com/jolicode/jane-openapi/issues/19 and certainly
release a .phar (so you don't need to have php-parser and many others deps
for running your api)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jolicode/jane-openapi/pull/23#issuecomment-239473661,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIIz6KpvV1LQqC2FF2ja3bbbsFNCkKKks5qfI2ZgaJpZM4JjELJ
.

--
Billie Thompson
Software Developer
Purple Booth Ltd
Mob:<PHONE_NUMBER>6
Web: purplebooth.co.uk
Keybase: http://billie.codes/1NOw29c
LinkedIn: http://billie.codes/1KT8gcI
Twitter: http://billie.codes/1SGPMCw

--
Billie Thompson
Software Developer
Purple Booth Ltd
Mob:<PHONE_NUMBER>6
Web: purplebooth.co.uk
Keybase: http://billie.codes/1NOw29c
LinkedIn: http://billie.codes/1KT8gcI
Twitter: http://billie.codes/1SGPMCw

Tests are passing now, could probably do with another code review since I moved things around a little

Thanks !

Will certainly do a refactoring to decouple runtime libraries from generator librairies in the next week then tag this with a new version (certainly 2.0, not sure about the BC layer)
In the meantime you can use the dev master branch