Why HikariCP creates new connection for every web app in Tomcat on startup

When I define HikariCP with Tomcat 7 as JNDI inside context.xml like the below, every time I deploy new web application, it opens new connections. For example, if I have 5 Apps in Tomcat, it will open 50 connections, 10 for each App. However, in C3p0, using the same settings and the same tomcat instance, it only creates a pool with 10 connections and share this pool with All Apps. I mean, in C3P0, the pool doesn't open new connection per APP while in HikariCP, it does. Was this done for a reason and is there anyway to change it?
<Resource name="jdbc/testDatasource"
          auth="Container"
          factory="com.zaxxer.hikari.HikariJNDIFactory"
          type="javax.sql.DataSource"
          driverClassName="com.mysql.jdbc.Driver"
          jdbcUrl="jdbc:mysql://localhost:3306/football"
          username="xxx"
          password="xxx"
          minimumIdle="3" maximumPoolSize="10" connectionTimeout="300000" maxLifetime="1800000" />

@alqershi If simply swapping out the factory method works for C3P0, they are doing it wrong.  The purpose of the factory, by default, is specifically to generate a new instance for each WAR that performs a JNDI lookup.
If you want to share a pool across WARs, from my reading of the Tomcat docs, what you need is the singleton="false" attribute.
You may also need to...
Define the resource in the conf/server.xml file:
<GlobalNamingResources>
  <Resource name="jdbc/testDatasource"
            auth="Container"
            factory="com.zaxxer.hikari.HikariJNDIFactory"
            singleton="true"
            type="javax.sql.DataSource"
            driverClassName="com.mysql.jdbc.Driver"
            jdbcUrl="jdbc:mysql://localhost:3306/football"
            username="xxx"
            password="xxx"
            minimumIdle="3" maximumPoolSize="10" connectionTimeout="300000" maxLifetime="1800000"
  />
</GlobalNamingResources>

And subsequently define the WAR web.xml with the following:
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <ResourceLink global="jdbc/testDatasource"
                  name="jdbc/testDatasource"
                  type="javax.sql.DataSource"/>
</Context>

If that's not it, it's really close.  Read the internets.


Denormalised child objects are always empty

I copied the code from the example:

    const { normalize, Schema, arrayOf } = require("normalizr/dist/normalizr.min.js");
    const { denormalize } = require("denormalizr");

    const articleSchema = new Schema('articles');
    const authorSchema = new Schema('author');
    const articleList = arrayOf(articleSchema);

    articleSchema.define({
        author: authorSchema,
    });

    authorSchema.define({
        articles: articleList,
    });

    const JSONResponse = {
        "articles": [{
            "id": 2,
            "title": "You won\'t believe what this high order component is doing",
            "author": {
                "id": 1,
                "name": 'Dan',
                "articles": [2],
            },
        }],
    };

    const normalized = normalize(JSONResponse, {
        articles: articleList,
    });

    const article = normalized.entities.articles['2'];
    const denormalized = denormalize(article, normalized.entities, articleSchema);

    console.log(denormalized.author.articles[0] === denormalized); // true

The denormalized variable returns:
author: Object
id: 2
title: "You won't believe what this high order component is doing"

Which is great... but author is an empty object.
I have also had this problem when trying to implement this code with other normalised objects, I have tried using previous versions of the denormalizr too, but that too doesnt work. I am using normalizr version 2.2.1 on Chromium web browser.

The problem seems to be that in the denormalize function, when an individual entity is being parsed, it does not enter this if statement "if (schema instanceof _EntitySchema2.default)" (line 172).
This causes line 180, which clones the object, to instead clone it to an empty object.
As a temporary fix if i change line 172 to: "if (schema instanceof _EntitySchema2.default || typeof obj === "number") {", the denormalizr works.
I dont know why the schema wont be seen as a child of EntitySchema2, at the moment, if i have more time i might try to make the temporary fix into something more... substantial.

The last version is using the latest normalizr and has some changes that may solve this issue – could you please upgrade and try? Thanks


Make "access as/revoke unique name" a checkbox

Closes https://github.com/godotengine/godot-proposals/issues/7812

The option was a checkbox originally, but it was changed in #65134 (might be related to adding the shortcut).

I just tested and it seems to be working just fine with shortcuts:

The assigned shortcut is correctly displayed and works as expected (it doesn't work with the popup menu open but I don't believe that's related)

Well, I don't know the original reasoning for that change, other than we don't have add_icon_check_item_shortcut().
CC @Mickeon

I don't know. It's likely for that reason as I wanted it to work as soon as possible. The original option was called "Access as Scene Unique Name" which made the right-click menu very, very wide all the time.


KUBE_PEERS is reporting missing peers in launch script

What you expected to happen?
All the weave-net pods in the Kubernetes cluster to have the same KUBE_PEERS passed to the weaver process.
What happened?
Some of the nodes have missing or erroneous IPs in the KUBE_PEERS list. For example, the cluster with the following nodes:
NAME                              STATUS   ROLES    AGE   VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                                      KERNEL-VERSION               CONTAINER-RUNTIME
cs05r-sc-cloud-01.diamond.ac.uk   Ready    <none>   22d   v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-02.diamond.ac.uk   Ready    <none>   22d   v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-03.diamond.ac.uk   Ready    <none>   22d   v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-04.diamond.ac.uk   Ready    <none>   22d   v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-05.diamond.ac.uk   Ready    <none>   21d   v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-06.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-07.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-08.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-09.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-10.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-11.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-12.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-13.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-14.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-15.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-16.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-17.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-18.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-19.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-20.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-21.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-22.diamond.ac.uk   Ready    <none>   9d    v1.17.3   <IP_ADDRESS>   <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-29.diamond.ac.uk   Ready    master   22d   v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6
cs05r-sc-cloud-30.diamond.ac.uk   Ready    master   9d    v1.17.3   <IP_ADDRESS>    <none>        Red Hat Enterprise Linux Server 7.7 (Maipo)   3.10.0-1062.4.3.el7.x86_64   docker://19.3.6

Some of the pods have the full list of peers, others don't:
This one has some peers missing:
13614 root     57:08 /home/weave/weaver --port=6783 --datapath=datapath --name=ae:21:7b:c5:00:28 --host-root=/host --http-addr=<IP_ADDRESS>:6784 --metrics-addr=<IP_ADDRESS>:6782 --docker-api= --no-dns --db-prefix=/weavedb/weave-net --ipalloc-range=<IP_ADDRESS>/12 --nickname=cs05r-sc-cloud-01.diamond.ac.uk --ipalloc-init consensus=6 --conn-limit=200 --expect-npc <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>

This one doesn't:
268669 root      1h37 /home/weave/weaver --port=6783 --datapath=datapath --name=fa:32:50:f1:c1:e5 --host-root=/host --http-addr=<IP_ADDRESS>:6784 --metrics-addr=<IP_ADDRESS>:6782 --docker-api= --no-dns --db-prefix=/weavedb/weave-net --ipalloc-range=<IP_ADDRESS>/12 --nickname=cs05r-sc-cloud-13.diamond.ac.uk --ipalloc-init consensus=23 --conn-limit=200 --expect-npc <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>

Restarting the weave pod where the list is wrong seems to correct the issue. As far as I can tell, the peer list is gathered by the launch script once at start time.
How to reproduce it?
A basic kubeadm cluster installed with weave CNI using kubectl apply -f
Anything else we need to know?
On prem cluster, using kubeadm.
Versions:
$ weave-kube 2.6.0
$ docker-ce 19.3.6
$ uname -a
[root@cs05r-sc-cloud-29 kubernetes]# uname -a
Linux cs05r-sc-cloud-29.diamond.ac.uk 3.10.0-1062.4.3.el7.x86_64 #1 SMP Tue Nov 12 10:42:40 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
$ kubectl version 1.17.3
Logs:
Logs show Weave trying to connect to peers and failing:
INFO: 2020/03/12 16:41:24.899020 ->[<IP_ADDRESS>:6783] error during connection attempt: dial tcp :0-><IP_ADDRESS>:6783: connect: no route to host

As far as I can tell, the peer list is gathered by the launch script once at start time.

@cjreyn thats correct. Launch script on each node fetches list of the nodes from the Kubernetes API server, so its unlikely they get a differentent list in a static cluster (i.e. when no new nodes are getting added/deleted). When you checked did you have any nodes getting added/deleted.
Neverthless, there is no functional impact, as all nodes will discover or learn the currnet set of peers. You can verify from weave status

As far as I can tell, the peer list is gathered by the launch script once at start time.

@cjreyn thats correct. Launch script on each node fetches list of the nodes from the Kubernetes API server, so its unlikely they get a differentent list in a static cluster (i.e. when no new nodes are getting added/deleted). When you checked did you have any nodes getting added/deleted.
Neverthless, there is no functional impact, as all nodes will discover or learn the currnet set of peers. You can verify from weave status

Where can I run weave status from? When running it inside a weave-net container I get:
/home/weave # ./weave status
./weave: line 250: docker: not found
ERROR: Unable to parse docker version

You need to pass --local as falg. Please see https://www.weave.works/docs/net/latest/kubernetes/kube-addon/#troubleshooting for an example

Ok, this is making more sense. There were 5 nodes that were installed initially, and the cluster was expanded later. These 5 nodes show 5 "Targets" in the status output, but all show 23 connections with 24 peers. I guess it counts itself as a peer, but doesn't count a connection to itself?
I guess I can ignore the error messages in the logs where it tries to connect to peers that no longer exist?

I guess it counts itself as a peer, but doesn't count a connection to itself?

yes

I guess I can ignore the error messages in the logs where it tries to connect to peers that no longer exist?

In the logs do you see a node connecting to deleted node continuously?

Sorry, my earlier comment was incorrect. The one that is logging a failed connection shows 24 peers and 24 connections. It reports the failed one:
/home/weave # ./weave --local status

        Version: 2.6.0 (version 2.6.1 available - please upgrade!)

        Service: router
       Protocol: weave 1..2
           Name: fa:2f:ed:2b:42:b7(cs05r-sc-cloud-04.diamond.ac.uk)
     Encryption: disabled
  PeerDiscovery: enabled
        Targets: 5
    Connections: 24 (23 established, 1 failed)
          Peers: 24 (with 552 established connections)
 TrustedSubnets: none

        Service: ipam
         Status: ready
          Range: <IP_ADDRESS>/12
  DefaultSubnet: <IP_ADDRESS>/12

/home/weave # ./weave --local status connections
<- <IP_ADDRESS>:58531   established fastdp fa:4b:04:d8:85:27(cs05r-sc-cloud-11.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:43115   established fastdp 82:a5:fe:6e:1e:f6(cs05r-sc-cloud-10.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:50500   established fastdp f6:6e:38:56:b9:7a(cs05r-sc-cloud-14.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:40105   established fastdp 4e:07:f3:af:c2:5e(cs05r-sc-cloud-21.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:49152   established fastdp 8e:af:8c:c0:12:83(cs05r-sc-cloud-15.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:56981   established fastdp ce:3b:ef:5e:c2:c7(cs05r-sc-cloud-18.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:32914   established fastdp f6:9e:31:92:15:d8(cs05r-sc-cloud-19.diamond.ac.uk) mtu=1376
-> <IP_ADDRESS>:6783     established fastdp 2a:36:40:17:ae:cc(cs05r-sc-cloud-03.diamond.ac.uk) mtu=1376
-> <IP_ADDRESS>:6783     established fastdp 82:ee:87:bd:ee:20(cs05r-sc-cloud-30.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:36448    established fastdp b6:82:59:8c:8e:ad(cs05r-sc-cloud-06.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:33209    established fastdp 92:45:06:38:7e:2d(cs05r-sc-cloud-08.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:49897   established fastdp 36:99:3f:a0:77:1f(cs05r-sc-cloud-16.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:55460    established fastdp 32:04:2b:76:29:89(cs05r-sc-cloud-09.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:58341    established fastdp 2a:18:c8:04:64:97(cs05r-sc-cloud-05.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:33998   established fastdp c2:59:15:cc:12:2c(cs05r-sc-cloud-20.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:52097   established fastdp ea:8c:39:fa:2f:22(cs05r-sc-cloud-12.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:44152    established fastdp a2:54:e8:4e:0f:c0(cs05r-sc-cloud-29.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:33958    established fastdp ae:21:7b:c5:00:28(cs05r-sc-cloud-01.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:47657    established fastdp 9e:a8:9f:e6:e0:59(cs05r-sc-cloud-07.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:57173   established fastdp ea:bb:f3:97:a3:fd(cs05r-sc-cloud-22.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:59376    established fastdp 46:bd:d0:9e:53:47(cs05r-sc-cloud-02.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:36623   established fastdp 76:69:2e:b9:e0:dc(cs05r-sc-cloud-17.diamond.ac.uk) mtu=1376
<- <IP_ADDRESS>:53997   established fastdp fa:32:50:f1:c1:e5(cs05r-sc-cloud-13.diamond.ac.uk) mtu=1376
-> <IP_ADDRESS>:6783   failed      dial tcp :0-><IP_ADDRESS>:6783: connect: no route to host, retry: 2020-03-16 14:03:43.116997488 +0000 UTC m=+1539085.501256265

The IP it's trying to connect to has never been assigned to anything, so I'm baffled as to where it's come from. Only one node is still trying to connect to it. Others have done in the past, but are seemingly now "fixed", i.e. showing expected number of connections and peers.

@cjreyn hope you no longer see original reported symptom (missing peers in KUBE_PEERS) as issue. Can you please open seperate issue for the case where you see a node connecting to deleted node?

Will do. Thanks for your help!


Path not supported for some path arguments

Most of the path arguments handle both str and pathlib.Path object.
It is not the case for Live's dvcyaml while it should probably be.

Hi @dberenbaum , I would like to contribute for this issue. If I understand correct dvcyaml (str | None)

Hi @dberenbaum, I'm interested in contributing to dvclive, and I believe this issue is a great starting point. If I'm not mistaken, it appears that the Live's dvcyaml argument should also accept pathlib.Path objects. Therefore, the argument should be defined as dvcyaml: Optional[Union[str, pathlib.Path]] = "dvc.yaml"
Could you confirm if my understanding is correct?

If I'm not mistaken, it appears that the Live's dvcyaml argument should also accept pathlib.Path objects.

Correct.

Therefore, the argument should be defined as dvcyaml: Optional[Union[str, pathlib.Path]] = "dvc.yaml"

Partially correct. Fixing the type hint would be nice, but the underlying issue goes deeper. If you try an example with dvcyaml set to some pathlib.Path value, you should see where it breaks. This issue is to fix any underlying problems so that pathlib.Path values work.

@dberenbaum I tried passing dvcyaml arguments a pathlib.Path value, it did not break but rather silently defaulted to "dvc.yaml" as mentioned by this function.
One solution I could think of is type converting to string, like....
  def _init_dvc_file(self) -> str:
      if isinstance(self._dvcyaml, Path):
          self._dvcyaml = str(self._dvcyaml)
      if isinstance(self._dvcyaml, str):
          if os.path.basename(self._dvcyaml) == "dvc.yaml":
              return self._dvcyaml
          raise InvalidDvcyamlError
      return "dvc.yaml"

I've manually tested the changes, and they work as expected. What do you think of this solution?

@AbdullahMakhdoom I think it's fine to fix it this way. I would also add something like:
if self._dvcyaml:
raise InvalidDvcyamlError("DVC file path mush be of str or Path type")
before the return dvc.yaml
so that we don't silently return some default value

Alright @shcheklein. One quick question before I open a PR: Do you think it's worth adding a test case for this change, or is it too minor to require one?

I can parametrize this test for dvcyaml argument, something like....
@pytest.mark.parametrize("dvcyaml_path", ["dvc.yaml", Path("dvcyaml/dvc.yaml")])
def test_test_mode(tmp_dir, monkeypatch, mocked_dvc_repo, dvcyaml_path):
    monkeypatch.setenv(DVCLIVE_TEST, "true")
    live = Live("dir", dvcyaml=dvcyaml_path)
    live.make_dvcyaml()
    assert live._dir != "dir"
    assert live._dvc_file != "dvc.yaml"
    assert live._save_dvc_exp is False
    assert not os.path.exists("dir")
    assert not os.path.exists(dvcyaml_path)

Took inspiration from this sibling function, which is in the same test_dvc.py file.


check-format broken when merging latest main and pushing a PR

After merging the latest main, and trying to push the latest commit, I've observed the following failure:
Running pre-push check; to skip this step use `push --no-verify` or add `NO_VERIFY=1` to `.env`

  Checking format for .github/actions/pr_notifier/pr_notifier.py .github/actions/pr_notifier/requirements.in .github/actions/pr_notifier/requirements.txt .github/workflows/check-deps.yml api/envoy/config/route/v3/route_components.proto changelogs/current.yaml ci/run_envoy_docker.sh source/common/http/conn_manager_config.h source/common/http/conn_manager_impl.cc source/common/http/conn_manager_impl.h source/common/runtime/runtime_features.cc source/common/upstream/load_balancer_impl.cc source/extensions/filters/http/oauth2/filter.cc source/extensions/filters/http/oauth2/filter.h test/common/http/conn_manager_impl_test_2.cc
INFO: Analyzed target //tools/code_format:check_format (1 packages loaded, 9 targets configured).
INFO: Found 1 target...
Target //tools/code_format:check_format up-to-date:
  bazel-bin/tools/code_format/check_format
INFO: Elapsed time: 0.454s, Critical Path: 0.07s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/tools/code_format/check_format '--path=/usr/local/google/home/adip/git/fix_wrr_lb_init' '--clang_format_path=tools/clang-format/clang-format' '--buildifier_path=external/com_github_bazelbuild_buildtools/buildifier/buildifier_/buildifier' '--buildozer_path=external/com_github_bazelbuild_buildtools/buildozer/buildozer_/buildozer' check .github/actions/pr_notifier/pr_notifier.py .github/actions/pr_notifier/requirements.in .github/actions/pr_notifier/requirements.txt .github/workflows/check-deps.yml api/envoy/config/route/v3/route_components.proto changelogs/current.yaml ci/run_envoy_docker.sh source/common/http/conn_manager_config.h source/common/http/conn_manager_impl.cc source/common/http/conn_manager_impl.h source/common/runtime/runtime_features.cc source/common/upstream/load_balancer_impl.cc source/extensions/filters/http/oauth2/filter.cc source/extensions/filters/http/oauth2/filter.h test/common/http/conn_manager_impl_test_2.cc test/common/http/conn_manager_impl_test_base.cc test/common/http/conn_manager_impl_test_base.h test/common/http/http2/http2_frame.cc test/common/http/http2/http2_frame.h test/integration/multiplexed_integration_test.cc
ERROR: From ./api/envoy/config/route/v3/route_components.proto
ERROR: ./api/envoy/config/route/v3/route_components.proto:622: over-enthusiastic spaces
ERROR: check format failed. run 'bazel run //tools/code_format:check_format -- fix'

Note that the PR doesn't update a proto file.

cc @phlax


Set version 3.2.2 in quickstart and installation pages

In response to your suggestion https://github.com/paulbutcher/ScalaMock/issues/43

Many thanks!


Fix MXT protocol response

The last fix generated out of memory error because it was writing into the same buffer it was reading from.
I tested it online with a device and it's now working. The byte stuffing is ok too.

Merged, thanks for pull request.


Add Rubocop and cleanup

First of all, thank you so much for this gem. It saved a lot of time and effort for me. I was going through the code and thought, it can use some code cleanup. These changes simply apply the widely used ruby style guide using Rubocop. In my opinion, this will be helpful in maintaining and refactoring (if needed/planned).
I have broken up the commits very granular based on each type of offense fix, for ease of review. Please go through the commit one by one and let me know your feedback. Once changes are approved, I'll squash them in 3-4 commits.

Seems like the build is failing for older ruby versions. But since, the official support has been dropped for >= 1.9.3 rubies since Feb 2015, can we bump the gem version please?

Hello,
Thanks for doing this - it would be good to standardise the mqtt code.
Is it possible to only run rubocop for specific versions?
I am aware of people running ruby-mqtt on RedHat Enterprise Linux / CentOS.
RHEL 6 is still in its support period and amazingly is Ruby 1.8. Although Ruby 1.9 is available via Software Collections.

RHEL 6:   ruby <IP_ADDRESS>4-5.el6
RHEL 7:   ruby <IP_ADDRESS>8-29.el7

nick.

Hi @njh ,
Thank you for your feedback. I've made rubocop to be run only on versions > 2.0.0. Also, I've reverted few changes to support older ruby versions. All builds have passed now. Please take a look. Thanks.

Thanks for doing this!


Open J9 Hardened version not signed properly

Platform and architecture (e.g. Linux/x64: Mac Catalina

Java version (from "java --version") e.g. 1.8.0_181, 11.0.4+11 etc.: OpenJDK8U-jre_x64_mac_openj9_macosXL_8u252b09_openj9-0.20.0.tar.gz

Variant e.g. HotSpot or OpenJ9:  Open J9 (Hardened) Large Heap

Have you tested it with other vendors' java: No

Steps to reproduce: See below

Error messsage and/or description of what is not working as expected:
We used the Open J9 hardened version released last week and we got this error from Apple during notarization:
{ "severity": "error", "code": null, "path": "/jre/Contents/MacOS/libjli.dylib", "message": "The signature of the binary is invalid.", "docUrl": null, "architecture": "x86_64" }
It says libjli.dylib has no signature, but I believe its a link file?
We also tried this command
File downloaded - OpenJDK8U-jre_x64_mac_openj9_macosXL_8u252b09_openj9-0.20.0.tar.gz* unzipped it to the folder jdk8u252-b09-jre-j9 and then checked signature -
codesign -vvvv jdk8u252-b09-jre-j9jdk8u252-b09-jre-j9/: code has no resources but signature indicates they must be present

Looks like these binaries were not signed. This error does not happen with the Hotspot version. Only happens with Open J9 (large heap)

Did you sign the bundled binaries as described in https://medium.com/adoptopenjdk/adoptopenjdk-8u252-11-0-7-and-14-0-1-available-df8617d182df, section "Notarization and Hardened Runtime Support on macOS"?

We didn't have to do that for Hotspot. Is that something unique to Open J9?

You have to re-sign the bundle, see https://github.com/AdoptOpenJDK/openjdk-support/issues/97.
@gdams: Are there differences between OpenJ9 and HotSpot in that regard?

@keithc-ca can you take a look at this?

I downloaded the latest b09.2 .tar.gz package: the gatekeeper will not allow execution.
Downloading and installing the .pkg package works for me.
@Ram-Krishnamurthy Can you try the latest .pkg? There were problems with the b09 and b09.1 builds.

Thanks .pkg works.

The release notes say: 'only pkg installers are notarized'.
@Ram-Krishnamurthy noted that the pkg installer works: this should be closed.


Thinking in Events: From Databases to Distributed Collaboration Software

https://martin.kleppmann.com/2021/07/02/debs-keynote-thinking-in-events.html
ref:

https://zhuanlan.zhihu.com/p/404518395

Database replication and events

Viewed through the lens of event-based systems,

A transaction that modifies the database is an update event
Execution of an update is the processing of that event
Replication of data among machines is the propagation of that event through the distributed system.
Read-only transactions may or may not correspond to events, depending on the system.

Classify of replication system

Arrange the replication events into a log

Reasons:

It's totally ordered: all replicas observe the log entries in the same order
It's append-only: if a replica observes log entry A immediately followed by log entry B, then there will never be a log entry C that appears between A and B in the total order

Type:

WAL (write-ahead log): indicate how the database’s on-disk data structures are changing
CDC (change data capture): extract the data change events (rows inserted, updated, or deleted)

Use some other replication mechanism (such as gossip protocols, anti-entropy, or clients independently updating several replicas)

Event Sourcing/State machine replication (SMR)

Idea: Turning the database inside-out

In WAL-based replication and CDC, the primary data model is the database state that can be mutated by the application, and the data change events are generated automatically as a side-effect of these mutations
It is also possible to swap these roles, making the data change events the primary data model of the application, so that any state changes become a side-effect of processing those events

Description:

Commands are sent by applications as append-only event log
All replicas subscribe to and orderly process event log
Each replica is a state machine whose state is its copy of the database, and whose state transition function is the event processing function: the database state is a materialised view onto the underlying event log

Advantages:

More descriptive

Before: “one row was deleted from the enrollments table, the available_places field of a course was incremented, and one row was added to the cancellation_reasons table”
After: “student x cancelled their enrollment in course y for reason z”

More retroactive: can be replayed in order to rebuild the resulting database state

If the application developers wish to change the logic for processing an event, for example to change the resulting database schema or to fix a bug, they can set up a new replica, replay the existing event log using the new processing function, switch reading requests to the new replica
It is easy to maintain several different views onto the same underlying event log if needed.

Disadvantage:

Less familiar to application developers than mutable-state databases,
The level of indirection between the event log and the resulting database state adds complexity in some types of applications that are more easily expressed in terms of state mutations
In applications with a high rate of events, storing and replaying the log may be expensive.
Permanent records deletion requires extra care

Partially ordered events

Importance: if replicas are globally geo-distributed or connecting using an unreliable network, the assumption of a totally ordered log becomes impossible to satisfy
In a system that allows disconnected operation, the strongest order we can guarantee is a causal order
Timestamp ordering

In a partially ordered system it is still possible to enforce a total order on events using Lamport clock <counter, replicaID>
Timestamp ordering produces a totally ordered sequence of events, but it is not a log, because new events are not always appended to the end but can be merged intersectionally.
Time wrap to deal with out-of-order events

When a replica processes events out of timestamp order, it must be able to roll back the replica state to the state at the time corresponding to the insertion position, apply the new event, and then replay the events whose timestamps are greater than that of the new event
Roll-back is not always acceptable according to the business

Conflict-free Replicated Data Types (CRDTs)


[Bug] oracle clob

Search before asking

[X] I searched in the issues and found nothing similar.

Flink version
1.12
Flink CDC version
2.1.0
Database and its version
oracle11
Minimal reproduce step
In Oracle with Flink CDC, one of the fields is a CLOB. When modifying a data record, as long as the CLOB field remains unchanged, Flink CDC, during the incremental phase, will not include the CLOB field data in the received Oracle data updates. All other fields will be included. Only when modifying the CLOB field data will Flink CDC transmit it. Is this a bug? Why isn’t the CLOB field transmitted?
What did you expect to see?
flinkcdc will transfer clob field even oralce not update this field
What did you see instead?
1
Anything else?
No response
Are you willing to submit a PR?

[X] I'm willing to submit a PR!

默认情况下，oracle 不会同步 clob 格式的数据，你可以尝试添加这个高级参数 debezium.lob.enabled=true 试试。

i meet this problem too, when update some columns (not clob)，will get null value in clob columns maybe this is oracle official act, information from :https://access.redhat.com/documentation/zh-cn/red_hat_integration/2022.q4/html/debezium_user_guide/debezium-connector-for-oracle
Note
Oracle only supplies column values for CLOB, NCLOB, and BLOB data types if they’re explicitly set or changed in a SQL statement. As a result, change events never contain the value of an unchanged CLOB, NCLOB, or BLOB column. Instead, they contain placeholders as defined by the connector property, unavailable.value.placeholder.

If the value of a CLOB, NCLOB, or BLOB column is updated, the new value is placed in the after element of the corresponding update change event. The before element contains the unavailable value placeholder.

Hi, Debezium's Oracle maintainer here.
Oracle, PostgreSQL, and SQL Server have specific use cases with certain column types that will not be written to the transaction logs unless those fields are explicitly modified.  For the Oracle database, this includes data types such as CLOB, BLOB, and XMLTYPE.
What you should be observing (assuming that lob.enabled is set to true), is that you will see the Debezium unavailable placeholder injected as the value for CLOB/XMLTYPE columns and the unavailable value placeholder injected as the value for BLOB columns, except the latter is converted to a byte array to satisfy the schema type.
For consumers, when you see the unavailable value placeholder sentinel value for these columns, your consumer should ignore that column in this case, so when using something like a JDBC sink; you simply don't add that column to your INSERT or UPDATE operation.
As @fangchuanming points out, this is not a Debezium limitation, but how the database works.  And as I mentioned above, PostgreSQL and SQL Server also have specific data types that work in an identical way.

Closing this issue as it has been migrated to Apache Jira.


T570 Intel wifi broken

Issue description
[   41.705588] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8265-33.ucode failed with error -2
I would be happy to hear about any kernel version where it does work. I tried boot.kernelPackages = pkgs.linuxPackages_latest; too.
Steps to reproduce
Technical details

system: "x86_64-linux"
host os: Linux 4.13.16, NixOS, 17.09.2182.7f6f0c49f0 (Hummingbird)
multi-user?: yes
sandbox: no
version: nix-env (Nix) 1.11.15
channels(root): "nixos-17.09.2182.7f6f0c49f0"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

If it works with another Linux distribution, could you attach its dmesg?

I don't know whether it works with another Linux distribution.

Could you post the complete dmesg | grep iwlwifi from NixOS here?

Ah, first of all try setting hardware.enableRedistributableFirmware = true.

[   41.700386] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002)
[   41.705588] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8265-33.ucode failed with error -2
[   41.705605] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8265-32.ucode failed with error -2
[   41.713910] iwlwifi 0000:04:00.0: loaded firmware version 31.560484.0 op_mode iwlmvm
[   41.779694] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230
[   41.888521] iwlwifi 0000:04:00.0: base HW address: redacted
[   42.439521] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0

iwlist scan doesn't return anything.
lsmod| grep iwlwifi
iwlwifi               217088  1 iwlmvm
cfg80211              503808  3 iwlmvm,iwlwifi,mac80211

loaded firmware version 31.560484.0 op_mode iwlmvm means that the firmware is successfully loaded. iwlist scan performs a scan only when you run it under sudo.

 wlp4s0    Interface doesn't support scanning : Network is down
This is using wpa_supplicant.

Just in case, I rebooted without a direct ethernet connection and then I got the exact same response.

I'm not familiar with using wpa_supplicant directly, but ifconfig wlp4s0 up should solve this hurdle. Consider networking.supplicant configuration option which seems to provide some basic automation, or maybe NetworkManager (it has a terminal config tool nmtui).

SIOCSIFFLAGS: Operation not possible due to RF-kill

After rfkill unblock wifi it was unblocked and I can now ping devices via the wireless network.
This is a bug, because I shouldn't be required to make such imperative changes to network configuration.

You could have accidentally toggled rfkill via a button on your keyboard.

I checked and Fn + F8 on the laptop keyboard toggles the state displayed by rfkill list.
Are you sure that nixos-rebuild switch calls rfkill unblock wifi when wireless is enabled?

It does not and it should not.


Selected conversation might not exist

Fixes https://keybase.atlassian.net/browse/DESKTOP-2427

@keybase/react-hackers


Non-Rothberger spaces

This was alluded to in https://github.com/pi-base/data/pull/961#issuecomment-2505919897. A large amount of spaces in pi-Base can be shown to be non-Rothberger, using three obvious facts:

$X$ is Rothberger iff its Kolmogorov quotient is
Rothberger property passes to closed subspaces
Rothberger property passes to coarser topologies

This PR is the result of combing through all spaces for which Rothberger property is unknown and adding the traits whenever a space can be shown to be non-Rothberger by easy applications of the three facts above. Two exceptions are S112, which I opted to show it has no isolated point (I also clarified the definition, as the definition in Counterexamples in Topology makes it clear $R_0$ is not supposed to be part of the space), and S113, which I opted to show Polish. Both are quite simple to show and stronger than non-Rothberger, under known traits and theorems.

FYI change "coaser" to "coarser" in 12 places.

@GeoffreySangston Thanks for catching the typo! The entire thing is mostly just copy-paste, so the typo in the first place just got copied into 12 of them...


feat(ui): add highlight definition for FloatTitle

Description
Adds a definition for FloatTitle, which is the default highlight group for neovim floating window titles. Before this change, it would link to Title which does not match the float background color.
Screenshots
Before:

After:

Much nicer indeed, thanks for the contribution! 🙌


[NANO]: lnwallet: fix OnionBlob to 1366 bytes

Change Description
Prior to this commit, In some places we had fixed onions and in others we had dynamic onions. This makes things consistent across the codebase.
Steps to Test
make unit pkg=lnwallet
Pull Request Checklist
Testing

[ ] Your PR passes all CI checks.
[ ] Tests covering the positive and negative (error paths) are included.
[ ] Bug fixes contain tests triggering the bug to prevent regressions.

Code Style and Documentation

[ ] The change obeys the Code Documentation and Commenting guidelines, and lines wrap at 80.
[ ] Commits follow the Ideal Git Commit Structure.
[ ] Any new logging statements use an appropriate subsystem and logging level.
[ ] Any new lncli commands have appropriate tags in the comments for the rpc in the proto file.
[ ] There is a change description in the release notes, or [skip ci] in the commit message for small changes.

📝 Please see our Contribution Guidelines for further guidance.

Looks like this is much better to just include in one of the later PRs.

cACK for updating this!!

Looks like this is much better to just include in one of the later PRs.

Why?

I thought I could cherry-pick this commit out of the stream and float it to the beginning independently, but it turns out I simplified a bunch of other code before making this change originally so cherry-picking it resulted in broken builds. It is now part of #8981


Integrate CLI runner in CLI trait

in reth bin we do
https://github.com/paradigmxyz/reth/blob/d3091cbb58bfff07eca44af61f3ba8ec01e0323c/bin/reth/src/cli/mod.rs#L145-L145
we can integrate this in the CLI crate with a helper function
https://github.com/paradigmxyz/reth/blob/d3091cbb58bfff07eca44af61f3ba8ec01e0323c/crates/cli/cli/src/lib.rs#L21-L21
eg:
fn with_runner(self, FnOnce(self, CliRunner)

can be combined with the parse function, like execute(FnOnce(Self, CliRunner))

I can take this on.


[AutoPR datafactory/resource-manager] [Datafactory] DatabricksSparkJarActivity, DatabricksSparkPythonActivity and other D…

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/3391

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/2008


CoinControl should disable DS when non-anonymized inputs are selected

If there are non-anonymized inputs selected in CoinControl - unset DS checkbox, give warning and instructions how to fix it (if needed)
discussion https://dashtalk.org/threads/small-request.4615/

Works :thumbsup:
One minor issue:

have Darksend selected, select non-anonymized input -> pop-up (good)
confirm pop-up (OK-button) and select Darksend again
open Coin Control -> pop-up pops up again. Would be more consistent if it would pop up when closing the Coin Control dialogue.

I could live with that, so it's up to you :-)


Not able to fetch logs in splunk, Server is busy, code:9 Invalid event number

What happened:
We are trying to fetch logs from kubernetes to pass them to splunk.  The following error comes up in the logging pods
2021-02-15 05:14:01 +0000 [warn]: #0 failed to flush the buffer. retry_time=3 next_retry_seconds=2021-02-15 05:14:02 +0000 chunk="5bb590d3789c6b8ee4a15d306b1d6ad2" error_class=RuntimeError error="Server error (503) for POST http://splunk.example.com:8088/services/collector, response: {\"text\":\"Server is busy\",\"code\":9,\"invalid-event-number\":0}"
  2021-02-15 05:14:01 +0000 [warn]: #0 suppressed same stacktrace

What you expected to happen:
Logs should be seen in the index index_for_logs index that we have configured.
How to reproduce it (as minimally and precisely as possible):

We created HEC token   for index index_for_logs.
We used the below values.yaml

global:
  splunk:
    hec:
      token: <token>
      host: splunk.example.com
      port: 8088
      indexName: index_for_logs
      # connection to splunk is insecure
      insecureSSL: true
  kubernetes:
    clusterName: "cluster_name"

splunk-kubernetes-logging:
  enabled: true
  splunk:
    hec:
      host: splunk.example.com
      port: 8088
      token: <token>
      protocol: http
      indexName: index_for_logs
      insecureSSL: true

splunk-kubernetes-objects:
  enabled: false

splunk-kubernetes-metrics:
  enabled: false

Anything else we need to know?:
Its a four node cluster with one master and 3 nodes.
kubectl get nodes
NAME         STATUS   ROLES    AGE   VERSION
***-master   Ready    master   30d   v1.18.8
***-node01   Ready    <none>   30d   v1.18.8
***-node02   Ready    <none>   30d   v1.18.8
***-node03   Ready    <none>   30d   v1.18.8

Command used to deploy the helm chart
helm install my-splunk-connect splunk-connect-for-kubernetes/ -f new.yaml

with new.yaml being the above values file
Status of the kubernetes pod
kubectl get pods -l "app=splunk-kubernetes-logging"
NAME                                                READY   STATUS    RESTARTS   AGE
my-splunk-connect-splunk-kubernetes-logging-6fv9m   1/1     Running   0          11m
my-splunk-connect-splunk-kubernetes-logging-6qghj   1/1     Running   0          11m
my-splunk-connect-splunk-kubernetes-logging-vtk9p   1/1     Running   0          11m
my-splunk-connect-splunk-kubernetes-logging-xj6g9   1/1     Running   0          11m

Environment:

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:12:48Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:04:18Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}

Ruby version (use ruby --version):
OS (e.g: cat /etc/os-release):

NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Splunk version:

8.1.1

Splunk Connect for Kubernetes helm chart version:

apiVersion: v1
appVersion: 1.4.5
description: Collect logs, objects (metadata), and metrics with Splunk.
home: https://github.com/splunk/splunk-connect-for-kubernetes/tree/main/helm-chart
keywords:
- splunk
- monitoring
- logging
- metrics
- metadata
- objects
maintainers:
- email<EMAIL_ADDRESS>  name: Splunk Inc.
name: splunk-connect-for-kubernetes
sources:
- https://github.com/splunk/splunk-connect-for-kubernetes/tree/main/helm-chart
- https://github.com/splunk/fluent-plugin-splunk-hec
- https://github.com/splunk/fluent-plugin-kubernetes-metrics
- https://github.com/splunk/fluent-plugin-k8s-metrics-agg
- https://github.com/splunk/fluent-plugin-kubernetes-objects
version: 1.4.5

Others:

5xx HTTP errors are server side errors which probably you can't fix with changing something clientside. You've got a Server is busy which implies that Splunk Server is not able to accept new events due to exhausted resources.
Searching splunk hec 503 Server is busy with google brings up this one as first hit:
https://community.splunk.com/t5/Archive/HTTP-503-status-code-from-HEC-during-high-load/m-p/385346
https://lmgtfy.app/?q=splunk+hec+503+Server+is+busy

The issue  comes when there is high load and in our case we have just started the logging functionality. Moreover there is nothing much going on in splunk other than this. Can you please suggest what changes I should make in order for this issue to get resolved.?

I'd suggest you to Google for *splunk hec 503 server is busy" and try to figure out whats the problem or to involve Splunk Support to help solve your Splunk Server issues.

Hey @dunefro , are you still facing the issue?

No

Okay . Closing this issue . :)


Update language.cs with Portuguese

Hi Damien,
I took the liberty of adding generic accents for Portuguese.
They should be fine for both Portuguese and Brazilian Portuguese.
F.

Missed the flag-thing. Since the accented letters are virtually the same for both Portuguese and Brazilian Portuguese Ill add just one flag. I dont see the need to duplicate the entries just for a flag...
I`ll fix it later today.

Out of curiosity, where are used the flags? I didn't see them on PowerToys then I suppose is just for your stand alone version.
Do I need to open a PR under Powertoys too or you'll push this one automatically?

Yeah it is for the stand alone version.
About PowerToys you are right, no need. I will just have to add the translation text. Next time I will open the solution I will synchronise everything has been added from this repo (and take what's done in the PowerToys's repo if there are).


Prompt during training and inference

Hi, excellent work.
I would like to know if any system prompt is used during the training and inference. Or do you consistently adopt "User: {xxxxx}\nBot: {xxxxx}" as the prompt?

Thank you for your attention～
The prompt we use is in the format of "User: {xxxxx}\nBot:" as you mentioned, with no special system prompts ，And lowercase processing before passing it into the model. Here are a few examples:
(1) "User: Describe the image in detail.\nBot:"
(2)if you want to get a short answer(used in VQA task), "User: How many kayaks are on the beachfront? Give a short answer.\nBot:"
(3) for Places365, "User: Where is this? Answer with a place name.\nBot:"
(4) if you want to get an answer in Y/N, "User: Is there a bed in this image? Please answer yes or no.\nBot:"
(5) If you want to have multiple conversations, "User: Describe the image in detail.\nBot: This is an image of ....\nUser: How many people in this image?\nBot:"
Try to follow the basic format shown above as input, otherwise you may get some unexpected results and fail to get the answers you want. I hope my reply will be helpful to you～

Thanks. Besides, is the visual encoder trainable acrossing pre-training?

Thanks. Besides, is the visual encoder trainable acrossing pre-training?

I have replied in the previous issue～


GEODASH - Automatically validate image/feature collection names and load band names

When configuring an element in geodash the band names should be validated to ensure the user uses the right names.
Also, adding information tooltips would be very useful so the user understands what is expected.
When the imnagecollection name is set, then the band names available should shown directly to the user to avoid errors.

Resolved with PR #452


Forward widgetParams to the unmountFn of connectors

If we save some data, like the container node of our custom widget into widgetParams it would be great to have it with as param of the unmountFn 👍

Hey @iam4x! Do you remember in which cases you needed to access the container node in the connector?
Usually we specify the unmountFn function body in the widget, where we have the knowledge of the container node and unmounts its component.
https://github.com/algolia/instantsearch.js/blob/9dcbdd582d082acaea0edeabdc7e5d6cd9173c51/src/widgets/menu/menu.js#L168-L170
To my knowledge, the connector nevers needs to access the container node because it only calls the unmountFn given by the widget:
https://github.com/algolia/instantsearch.js/blob/9dcbdd582d082acaea0edeabdc7e5d6cd9173c51/src/connectors/menu/connectMenu.js#L228

I think the original idea here is that if you give a container to the renderfn & make elements. If you don't particularly save it on the instance, you don't have access to that selector to unmount

We could provide the widgetParams, at least users have access to some information. The use case is more about users that want to cleanup their DOM rather than our own usage. The fact that we rely on a container node is a detail of our implementation. With the widgetParams provided to the function users could do:
const makeHits = instantsearch.connectors.connectHits(
  function renderHits({ hits, widgetParams }) {
    $(widgetParams.container).html(hits.map(hit => JSON.stringify(hit)));
  },
  function unmount({ widgetParams }) {
    $(widgetParams.container).remove();
  }
);

search.addWidget(
  makeHits({
    container: ".hits"
  })
);

I don't think it makes even sense to have the unmount function being exposed as another argument of the connector. I believe we should rather see the render function as a side effect in vanilla JavaScript (because manipulating the DOM is a side effect), and then we should clean up the effect in a function returned by the renderer.
Given you example above @samouss, that would look like:
const makeHits = instantsearch.connectors.connectHits(
  ({ hits, widgetParams }) => {
    $(widgetParams.container).html(hits.map(hit => JSON.stringify(hit)));

    return () => {
      $(widgetParams.container).remove();
    };
  }
);

search.addWidget(
  makeHits({
    container: '.hits',
  })
);

It starts making even more sense when you start attaching events to avoid memory leaks.
I've been thinking a lot about our render API lately and I think I've got some interesting ideas that I'll share in multiple RFCs.


cleanup_operations replaces CZ with CZ**-1

Description of the issue
cleanup_operations replaced CZ with CZ**-1 where that was unneccassry. in this case the result is still correct since CZ==CZ**-1. but it's worth invisigating whether this a side effec of CZ==CZ**-1 or a symptom of a bug.
Digging deeper into the method the change happens when it calls cirq.transformers.eject_phased_paulis
How to reproduce the issue
The input (a CNOT written in CZ gateset)
c = cirq.Circuit(
         (cirq.Z**0.75).on(cirq.LineQubit(0)) ,
         (cirq.X**-0.25).on(cirq.LineQubit(1)) ,
         (cirq.X**0.5000000000000001).on(cirq.LineQubit(0)) ,
         (cirq.Y**-0.5).on(cirq.LineQubit(1)) ,
         (cirq.S**-1).on(cirq.LineQubit(0)) ,
         (cirq.Y**-0.5).on(cirq.LineQubit(0)) ,
         cirq.CZ(cirq.LineQubit(0), cirq.LineQubit(1)) ,
         (cirq.S**-1).on(cirq.LineQubit(0)) ,
         (cirq.S**-1).on(cirq.LineQubit(1)) ,
         (cirq.Y**0.5).on(cirq.LineQubit(0)) ,
         (cirq.Y**0.5).on(cirq.LineQubit(1)) ,
         (cirq.Y**0.5).on(cirq.LineQubit(0)) ,
         (cirq.X**-0.24999999999999997).on(cirq.LineQubit(1)) ,
         (cirq.Z**-0.75).on(cirq.LineQubit(0)) ,
)
print(cirq.transformers.analytical_decompositions.two_qubit_to_cz.cleanup_operations(c))

result
[cirq.PhasedXPowGate(phase_exponent=-0.5000000000000002, exponent=0.5).on(cirq.LineQubit(1)), (cirq.CZ**-1.0).on(cirq.LineQubit(0), cirq.LineQubit(1)), cirq.PhasedXPowGate(phase_exponent=0.4999999999999998, exponent=0.5).on(cirq.LineQubit(1))]

related to https://github.com/quantumlib/Cirq/issues/6422

the change happens in https://github.com/quantumlib/Cirq/blob/2ef19094f2225b2f2707d169bafe75ecdcdc0537/cirq-core/cirq/transformers/eject_phased_paulis.py#L212
I don't think this is a bug. the function f(t) = CZ^t is periodic with period 2. so if we restrict t to -1 <= t <= 1 then f(t) = conj(f(-t)).
but even if I restrict t to that range deciding between 1 and -1 will be ambiguous. and dropping either end (-1 or 1) is not an option

offline update from @eliottrosenberg, it's a bug because in the original example https://github.com/quantumlib/Cirq/issues/6422#issuecomment-1913798978 partial CZs aren't allowed


I am a student of Tsinghua University, and I am very confused about the mistakes in using my own data training

NNI 学生项目问题概述 / General Question of Student Program
请简要概述您的问题 / 观点 :
the error is
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/collate.py", line 79, in default_collate
return [default_collate(samples) for samples in transposed]
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/collate.py", line 79, in
return [default_collate(samples) for samples in transposed]
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/collate.py", line 55, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 128 and 146 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:612
Short summary about the question / idea :
请提供 NNI 环境信息 :
nni Environment :

nni version:
nni mode(local|pai|remote):
OS:
python version:
is conda or virtualenv used?:
is running in docker?:

其他建议 / Other Advice
是否需要更新文档（是 / 否）:
Need to update document ( yes / no ) :
其他分享内容 :
Anything else we need to know :
Log message / 日志信息 :

nnimanager.log and dispatcher.log :

nnictl stdout and stderr :

This seems a model tensor shape problem,  you can try to run it without nni to find the problem,  when the model code is correct, then tune it with nni.

Closing it as duplicate of #2472 , @xianglei3 feel free to reopen if it is a different problem.


Code quality

I checked out the code because I want to try out adding flux-standard-action properties to actions interface (error and meta) but then I realized there were quite some unused imports and variables which add to the visual clutter.
I propose removing these imports, adding tslint rule no-unused-variable and running tslint as part of test command.

after release of 2/0 it's not relevant anymore


Add parent when creating layer context menu to inherit application theme and add style entry for disabled widgets

Description

Hi, this adds a missing parent kwarg so the layer context menu inherits the application theme (possible bug found while working on PR #5362). Also, add a style rule for disabled widgets (to for example show with a different style disabled entries on menus):
Preview
Layer context menu
Windows:

Before
After

MacOS:

Before
After

Ubuntu:

Before
After

Application menus
Windows:

Before
After

MacOS:
On macOS the application menus are integrated with the OS so the qss style doesn't change the way they look.
Ubuntu:

Before
After

Type of change

[x] Bug-fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

References

How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[ ] example: all tests pass with my change
[x] example: I check if my changes works with both PySide and PyQt backends
as there are small differences between the two Qt bindings.

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

Ironically, because I use system for my napari I've never noticed the underlying issue.
However, for me this isn't working so well on macOS.
My OS is currently in dark mode, while napari has Light theme:
with this PR:

Without:

I think the old behavior doesn't look good, but is functional. The new behavior is hard to read.
Menus seem fine with this PR:

It looks like something was missing from qss, but it looks like macOS specific problem.

Thanks for the feedback @psobolewskiPhD ! Will check on macOS to see what I can do :+1:

Updated the screenshots testing on Windows, macOS and Ubuntu. The current approach sets a style that works as far as I tested on all three. Thinking on alternatives, another approach could be to only set the parent kwarg for the context menu on Windows and Linux (so the system style context menu is shown). Any further feedback, suggestions and checks are appreciated!

this PR
Live

N/A it's system dark

I have a small preference for the live thinner border and the grey rather than black dividers — it's more native that way; see the menu screenshot above (note the border on macOS dark is also grey and not black). Not a blocker from me.

Trying to update the OP preview for the application menu, seems like the suggested style rules for QModelMenu doesn't apply to some application menus (like File) while for other menus is getting applied (like View):
File menu

View menu

Maybe some application menus are created in a different way than using QModelMenu/build_qmodel_menu ?

I think it may be related to the app-model menu roll out.
Some menus have been converted to use app-model, like View: https://github.com/napari/napari/pull/4826
and also Help: https://github.com/napari/napari/pull/4922
All menus will eventually be migrated, so if View and Help look correct, then eventually everything will look fine. (on my mac, all the menus look the same—native—so I can't check.)
Also my suggestion may have been a bit reckless, not sure that the menu code makes sense there? At the very least maybe a comment is worth adding—sorry I neglected this.

Thanks for the explanation! Will check adding the extra comment/changing the position for the QMenuModel styles. Probably moving them near the QMenuBar styles section makes more sense?
Again thanks for all the help, reviews and suggestion done here! :)


Traverse archive files as if they were directories

As a java developer, I often wish to browse and preview files inside a .jar file. Sometimes the .jar is in .war, or a .zip. Midnight Commander allows me to navigate into the archive files as if they were simple directories, and can even do this when the archives are nested one inside another.
I'd love for yazi to have this capability as well.
Describe alternatives you've considered
The alternative is to keep using mc when I need to do this.
Additional context
Basic viewing of files is a good place to start. Recreating the archives upon modifications to the files would be a next step.

This has always been the feature I wanted, but I don't have enough time to implement it, it will be a long-term goal unless someone drives it forward

Hey, Yazi now allows users to create custom preloader and previewer - this feature will be shipped with Yazi v0.2.0. See https://github.com/sxyazi/yazi/pull/401 for more information.
As for "archives as directories", I have added it to the Feature Requests, closing the issue in favor of that list.


add project variables support

Project client provides support to retrieve/add/update/delete environment variables for a given project

https://github.com/nmklotas/GitLabApiClient/commit/fd028dd8e94a53b9bd3f55fa6f568531c668ebb3.patch
@tellespallabob
You might want to set up an email alias on your GitHub account 🥇
Or look into fixing your git user.email config 😅
to get proper credit for your commits 🏆
https://help.github.com/articles/adding-an-email-address-to-your-github-account/
https://help.github.com/articles/setting-your-commit-email-address-in-git
then to amend your commits: https://stackoverflow.com/a/3042512


Conform to current naming standards

We need to change "blacklist" to "denylist" and rename the Master branch to Main.

Done


path/filepath: Rel() fails for UNC volumes when trailing slash is omitted

What version of Go are you using (go version)?

$ go version
go version go1.15.1 windows/amd64

What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\micro\AppData\Local\go-build
set GOENV=C:\Users\micro\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\micro\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\micro\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\micro\AppData\Local\Temp\go-build149210574=/tmp/go-build -gno-record-gcc-switches

What did you do?

package main

import (
        "fmt"
        "path/filepath"
)

func main() {
        fmt.Println(filepath.VolumeName(`\\host\share`))
        fmt.Println(filepath.VolumeName(`\\host\share\`))

        rel, err := filepath.Rel(`\\host\share`, `\\host\share\file.txt`)
        fmt.Printf("rel: %v\n", rel)
        fmt.Printf("err: %v\n", err)

        rel, err = filepath.Rel(`\\host\share\`, `\\host\share\file.txt`)
        fmt.Printf("rel: %v\n", rel)
        fmt.Printf("err: %v\n", err)
}

\\host\share
\\host\share

rel:
err: Rel: can't make \\host\share\file.txt relative to \\host\share

rel: file.txt
err: <nil>

What did you expect to see?
Expected both invocations of filepath.Rel to return the same relative path
What did you see instead?
First invocation returns an error
cc @alexbrainman

Rel: can't make \host\share\file.txt relative to \host\share

Thank you for your report.
I suspect we never implemented Rel bits for UNC rooted paths. I don't have time to do it now. But I will review contribution.
Generally, you should not use Rel on windows. For example, filepath.Rel is broken when we walking from one drive to another. It has no meaning for something like filepath.Rel(c:\a, d:\a\b).
Alex

Thanks! I understand the limitations of filepath.Rel. I'm using it in the context of filepath.Walk to get a relative path from the base path I'm walking.
My CL only contains a failing test. I did attempt to make it pass but I wasn't sure where best to fix this case.

I could use some advice on the best way to make this failing test pass.

Sorry, I'm not sure quite what you are asking.  It seems that you've found a bug in the path/filepath package.  Are you asking how to modify the package so that your test passes?

cc @rasky @mattn

Yea I'm just confused about where is best to fix this. It's not clear to me if the bug lies in filepath.Clean, filepath.VolumeName or filepath.Rel

I updated my CL with the dumbest possible thing I could do to make the test pass. It still feels like I'm missing a simpler solution, but maybe a special case is the best.
https://go-review.googlesource.com/c/go/+/253197
If someone wants to experiment, here's a playground link with all the windows-specific code paths: https://play.golang.org/p/GhDba2BSex9

I think the right place to fix this is filepath.Rel.
I commented on your CL.  Thanks.


'Union All' Alias to 'rbind' in Join function?

Within the join function, there are currently four choices: 'Inner', 'Right', 'Left', and 'Outer'. There's actually a fifth, lesser used 'Union' join, which is similar to the rbind scenario of stacking multiple files. (Technically, rbind is 'Union All' in SQL, stacking all rows from tables....'Union' is the case of stacking two or more tables AND de-duplicating records)
Should we make an alias of 'Union All' to rbind within the join function to represent the fifth join choice? rbind and cbind are relatively arbitrary as terms IMO (just R syntax), whereas 'Union All' is SQL standard syntax.
Only downside would be, by moving to 'Union All' syntax, it would naturally imply needing to extend the join function to do de-duplication using 'Union' for completeness.
http://www.w3schools.com/sql/sql_union.asp

I think this can be closed now.

Agreed


HcaAudioStream doesn't seem to be seekable

I'm not majored in IT-related subjects. I'm not sure whether I misunderstand something for now, however I think something is (potentially) wrong.
The HCA (2.0, CBR?) decoding process seems to be "stateful" to me. Each block is not decoded "independently", let alone "disorderly". Every block relies on the state (decided/affected by its prior block) to be correctly decoded.
Currently EnsureSoundDataDecoded/EnsureSoundDataDecodedWithLoops takes position (in the name of waveDataOffset) as an argument - so what would happen if the stream got seeked? I haven't thought about this thoroughly, but I doubt whether the current code could correctly handle this.

Ah, the fact that EnsureSoundDataDecodedWithLoops taking position as an argument itself shouldn't be a problem - the problem is, in my humble opinion, startBlockIndex should be calculated based on the begining, rather than current position passed in.

On the other hand, I think in a common streaming scenario, it should assume that the beginning part, rather than the following/ending part is available.

Hmm... Maybe making HcaAudioStream seekable isn't as challenging as I thought. However, anyway, because of the fact that every block depends on the state decided by its prior block to be correctly decoded, the beginning part still has to be (in the first place: available - and then) decoded in order, only after that could the decoder then hand out decoded WAV PCM data.

Hmm... As for:

in a common streaming scenario, it should assume that the beginning part, rather than the following/ending part, is available

I think even if, like, the user drags the timeline/progress bar to skip some part in the beginning, (strictly saying) the decode still has no choice but to download & decode all prior blocks in spite of the fact that those block will probably never be used/played.
(However, according to my rough observation, the "effect" won't last for more than 1 block, so maybe fetching & decoding 2 prior blocks (rather than the whole part up to the beginning) is already enough)

Ah, after skimming VGAudio's related code (related: https://github.com/Nyagamon/HCADecoder/issues/4 ), I think maybe (still not very sure) this "state/context" dependence problem shouldn't be as important as I originally thought.


Autofill, support deleting all passwords, UI changes

Task/Issue URL: https://app.asana.com/0/0/1206374582118438/f
Description
ℹ if you are using internal build type to test this, you can visit Settings -> Autofill Dev Settings to access options like adding hundreds of sample logins with one tap.
Steps to test this PR
Deleting all (when there are multiple saved passwords)

[ ] Visit Settings->Passwords
[ ] Add 2 or more saved passwords
[ ] Tap overflow and Delete All Passwords
[ ] Verify the delete dialog has the number of passwords that will deleted in the title
[ ] Verify you are prompted to authenticate as the final step in the process.
[ ] Cancel device auth, make sure the delete-all operation is cancelled
[ ] Repeat and this time authenticate.
[ ] Verify all passwords deleted
[ ] Verify you see the Snackbar with an UNDO button
[ ] Test both scenarios: pressing the UNDO button and not

Deleting all (when there is only a single saved password)
In this scenario, we have slightly different copy than when deleting-all with multiple passwords

[ ] Visit Settings->Passwords
[ ] Add a single saved password (delete all others if necessary to ensure there is only one)
[ ] Tap overflow and Delete All Passwords
[ ] Verify the delete dialog does not have a number of passwords in the title

Ensure delete-all option not available if you have no saved passwords

[ ] Visit Settings -> Passwords
[ ] Delete all passwords if any remain
[ ] Verify there is no overflow menu visible, and therefore no "Delete All" menu option visible

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

develop

#4082

#4087   👈

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @CDRussell and the rest of your teammates on  Graphite

Merge activity

Jan 29, 12:39 PM: Graphite rebased this pull request as part of a merge.


feat(app-cmds): support Range/Length for min/max value/length options

Summary
Closes #590
Adds support for a shorthand syntax for range validation.
Supports

Range[1, 2] for min and max ranges.
Range[1.1, 2.2] for floating-point ranges.
Range[2] for max ranges only.
Range[1, ...] for min ranges only.

Testing
Supported Syntax
@bot.slash_command()
async def range_int(inter: Interaction, option: Range[1, 2]):
    await inter.send(f"You inputted {option}")

@bot.slash_command()
async def range_float(inter: Interaction, option: Range[1.1, 2.2]):
    await inter.send(f"You inputted {option}")

@bot.slash_command()
async def only_max(inter: Interaction, option: Range[2]):
    await inter.send(f"You inputted {option}")

@bot.slash_command()
async def only_min(inter: Interaction, option: Range[3, ...]):
    await inter.send(f"You inputted {option}")

@bot.slash_command()
async def annotated_range(inter: Interaction, option: Annotated[float, Range[1.1, 2.2]]):
    await inter.send(f"You inputted {option}")

@bot.slash_command()
async def string_length(inter: Interaction, option: Length[1, 2]):
    await inter.send(f"You inputted {option}")

Unsupported Syntax
Not Setting Either min or max
@bot.slash_command()
async def neither_defined(inter: Interaction, option: Range[...]):
    ...

TypeError: At least one of min or max must be set.

Not Using float or int items
@bot.slash_command()
async def invalid_items(inter: Interaction, option: Range["1", "2"]):
    ...

TypeError: Range min must be int or float.

Using More Than 2 Items
@bot.slash_command()
async def too_many_items(inter: Interaction, option: Range[1, 2, 3]):
    ...

ValueError: Range can only take 1-2 arguments

Checklist

[x] If code changes were made then they have been tested.

[x] I have updated the documentation to reflect the changes.
[x] I have run task pyright and fixed the relevant issues.

[ ] This PR fixes an issue.
[x] This PR adds something new (e.g. new method or parameters).
[ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
[ ] This PR is not a code change (e.g. documentation, README, ...)

Maybe Range[..., max] should also be supported for consistency with using ... as a max?
Maybe something similar for string length range should be added at the same time?
I tried using this with Annotated and got an error

7f9ac0b067d601d1a49776b94a9c8725a61e8492
e75b60d21afa9be1bdf45eeea71ba7d5643e3ab8
999af8270acda8070cdfa0cee9926f59b815e8fa


Better Error:try_from tests

bors merge

bors cancel

bors merge

bors merge

Rebasing, zapping Cargo.lock and trying again...

bors merge


Does not join channels

I'm so triggered right now, like I can't even begin to tell you how triggered I am. I am just so triggered that when I run !admin channel join #lobby it doesn't work... doesn't that trigger YOU??? The bot even says it's joining but doesn't... this whole thing is just so triggering

You're not even funny.


fix: menu, popconfirm, slider issues

🤔 这个 PR 的性质是？

[ ] 日常 bug 修复
[ ] 新特性提交
[ ] 文档改进
[ ] 演示代码改进
[ ] 组件样式/交互改进
[ ] CI/CD 改进
[ ] 重构
[ ] 代码风格优化
[ ] 测试用例
[ ] 分支合并
[ ] 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

fix(menu): 修复 expandMutex 属性设置无效 (#729)
fix(slider): 修复 toolTipProps 属性设置无效, 拼写错误 (#741)
fix(popconfirm): 修复箭头与 trigger 属性
fix(dialog): 修复初始化且为显示时的 lock 问题
fix(breadcrumb): 修复弹出 tooltip 异常

☑ 请求合并前的自查清单
⚠ 请自检并全部勾选全部选项。⚠

[x] 文档已补充或无须补充
[x] 代码演示已提供或无须提供
[x] TypeScript 定义已补充或无须补充
[x] Changelog 已提供或无须提供

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@b4170b9). Click here to learn what that means.
The diff coverage is n/a.

:exclamation: Current head 13d8b6c differs from pull request most recent head 7ccf502. Consider uploading reports for the commit 7ccf502 to get more accurate results

@@            Coverage Diff             @@
##             develop     #750   +/-   ##
==========================================
  Coverage           ?   61.48%
==========================================
  Files              ?      404
  Lines              ?    14129
  Branches           ?     2683
==========================================
  Hits               ?     8687
  Misses             ?     5190
  Partials           ?      252

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4170b9...7ccf502. Read the comment docs.


Expose unique_element_ids to JS client

Can we expose a new partition parameter called uniqueElementIds now that https://github.com/Unstructured-IO/unstructured-api/pull/399 is merged/released?

Absolutely! The clients here are autogenerated so they'll get updated as soon as the param is in our openapi spec. (Just got merged here). Note that we do have some breaking changes coming that I want to coordinate with the python client, so I've disabled npm publishing just for a little bit here. I'll bump priority on getting the changes through so we can expose that param.

The new 0.11.0 is published and includes uniqueElementIds! You can see all the current client params here: https://docs.unstructured.io/api-reference/api-services/api-parameters


Wrong Voltage values for EHVX11S18CB3V

Hi raomin,
I don't retrieve any good values for voltage.
0x21,4,101,2     Voltage (N-phase) (V), provide a 0
0x21,2,101,2     Voltage (N-phase) (V), provides a value 60-90?, it's something else.
Is there any way to retrieve this value by polling a different register or maybe a way to scan all registers and find the one that represents the voltage?

Sorry for not replying (here) earlier.
It might be that you don't have a voltage sensor in your heatpump. (model?)
@pengemetal had the same issue on https://github.com/raomin/ESPAltherma/issues/17
0x21,2,101,2 is most probably Amp x10 (here, so 6-9Amp).
There are many possible conversions for the registers, so you cannot really imagine going through them all and try to find 230 somewhere. All registers information were deduce from DChecker Daikin application, so I don't think you can expect finding it elsewhere.
Now don't worry too much about the voltage, in most countries, it's pretty stable. Mine never moved from 230.

Np, it's not a very big issue but seemed nice to calculate the COP value.
So far the number still don't add up.
I have:
INV primary current (A): 3.3
INV secondary current (A): 5.3
Voltage (N-phase) (V): 53
And I know from several smart plugs / smart meter the voltage level is about 240VDC over here (bit high).
That is indeed stable enough. But what is then the best current value?
INV primary, secondary or the 0x21,2,101,2 divided by 10 (which is in this example exactly INV secondary....hmmm need to monitor/verify that)
Do the COP calculation only work for normal heating patterns?
I sometime see it;s in another heating mode for DHW, the leaving water temp are then much higher. Is there a valve or something routing this flow into the tank? I assume when the tank is filled, no water (with that higher temp) is punt into the floor heating so the flow value is for the tank?

Primary Current is from the mains (240V) to the inverter. Secondary is from the inverter to the compressor (higher amps, lower voltage). COP calculation works on DHW too. The heating water is routet by the DHW valve through the tank instead the floor.

DHW position of the valves

Hey @FlexxFR, don't
Just to add to this:

don't use 0x21,2,101,2 for your voltage. With your HP, you're getting INV secondary current (A) x10.
So, in the COP formula just replace the voltage with 240 and you should be good.

You'll see more discussion on calculating COP on issue #17.
The leaving water is what you need for the COP, regardless if it goes to your floor or your DHW tank, it's still heat production :)

ok, thanks again for the support. I will give it another try :)
I'm also trying to retrieve other interesting values to show on a dashboard....there is a lot!

Primary Current is from the mains (240V) to the inverter. Secondary is from the inverter to the compressor (higher amps, lower voltage). COP calculation works on DHW too. The heating water is routet by the DHW valve through the tank instead the floor.

@KalaNagHTD Hi, would you mind sharing the input values you've used to calculate Thermische Leistung und Elektrische Leistung in your nice diagram? What's the secondary inverter current used for? Cheers

Elektrische Leistung = inv. prim. current * 230
Thermische Leistung = Durchfluss [l/h] * (Vorlauf - Rücklauf) * 1,163

Elektrische Leistung = inv. prim. current * 230 Thermische Leistung = Durchfluss [l/h] * (Vorlauf - Rücklauf) * 1,163 Secondary current is not used for my calculations

Thanks @KalaNagHTD !
I have an Altherma 3 R ECH2O (EHSX08P30DA) and currently use the values from "Outlet Water Heat Exch. Temp. (R1T)" and "Inlet water temp.(R4T)" for my calculations. Is this correct?

That‘s correct!


Faint lines between nodes in 0.14.0rc2

Bevy version
release-0.14, current main (d659a1f7d506c5c6eba9dfe2a6e878a8c72ecef6)
bisected to #13523
Relevant system information
SystemInfo { os: "MacOS 14.5 ", kernel: "23.5.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" }
AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

scale_factor 2.0
What you did

Code
use bevy::prelude::*;

const BG: Color = Color::BLACK;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn(Camera2dBundle::default());

    let container = commands
        .spawn(NodeBundle {
            style: Style {
                width: Val::Percent(100.0),
                height: Val::Percent(100.0),
                flex_direction: FlexDirection::Column,
                align_items: AlignItems::Center,
                justify_content: JustifyContent::Center,
                ..default()
            },
            background_color: Color::NONE.into(),
            ..default()
        })
        .id();

    let top = commands
        .spawn(NodeBundle {
            style: Style {
                width: Val::Px(300.),
                height: Val::Px(50.0),
                ..default()
            },
            background_color: BG.into(),
            ..default()
        })
        .id();

    let bottom = commands
        .spawn(NodeBundle {
            style: Style {
                width: Val::Px(300.),
                height: Val::Px(51.0),
                ..default()
            },
            background_color: BG.into(),
            ..default()
        })
        .id();

    commands.entity(container).push_children(&[top, bottom]);
}

What went wrong
There are faint lines between the adjacent flex nodes.

0.13.2

main

Additional information
This was reported by a user who experienced a similar issue in the wild while migrating their project to 0.14.0-rc.2.

The issue probably that the edges are on a half pixel, so they end up getting antialiased. But I'm not sure what the right fix is here. If there wasn't another shape there the edge should get antialiased since it's not fully on the pixel.

The issue probably that the edges are on a half pixel

I had a similar thought and added 1px to one of the boxes and saw the same behavior. I'm not sure if that's the right way to test though.


Systemd services should allow wildcards in some attributes like requiredBy

The regular expression that validates some attributes for system services in the nixos module is too restrictive. For example this snippet of a service definition:
{
  systemd.services.generate-acme-secret = {
    requiredBy = [ "acme-*.service" ];
    before = [ "acme-*.service" ];
    # ...
  };
  # ...
}

would be valid, were it not for:
error: A definition for option `systemd.services.generate-acme-secret.before."[definition 1-entry 1]"' is not of type `string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)'. Definition values:
       - In `/nix/store/6pldlypc20h6lkv4z1srl7wjjyx3km8p-source/machines/acme.nix': "acme-*.example.com.service"

for RequiredBy, at least, i get this when I try to use a wildcard:
Failed to enable unit: "acme-*.service" is not a valid unit name.

Hmm... you right, I'm very sorry, it works with eg. journalctl -u acme*.service and a few other select things, but I must have imagined using in requiredBy. :eyes: Kinda disappointing.


Strategy to propagate the context up the stack trace

Use case: sometimes information related to the user request is not available in the entry point (f.e. business transaction is recognized somewhere in the impl flow). We need a way to propagate such information up so when metric is recorded we would have these tags also available.

data providers could opt to propagate up
propagation is done in the inspectIT specific GRPC context key at the exit
overwrite config option can be added to know what to do if key already available (f.e. two methods report the BT)

Fixed via #109 and #111.


Swift: emoji variables

let 🐄 = 22

should not highlight 🐄 as an error. It's Swift's most feature.
https://pygments.org/demo/?lexer=swift&style=solarized-light&formatter=html&code=let+🐄+%3D+22

Thanks
On Tue, 09 Apr 2024, 12:22 Boris Verkhovskiy, @.***>
wrote:

let 🐄 = 22
should not highlight 🐄 as an error. It's Swift's most feature.
https://pygments.org/demo/?lexer=swift&style=solarized-light&formatter=html&code=let+🐄+%3D+22
—
Reply to this email directly, view it on GitHub
https://github.com/pygments/pygments/issues/2690, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEXF3X3OIIJTTMNK4TF3C53Y4O6OTAVCNFSM6AAAAABF6JIECOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTGMJRGE3DMOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Update functions/Copy-DbaServerAuditSpecification.ps1

Type of Change

[ ] Bug fix (non-breaking change, fixes #)
[ ] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] Nunit test is included
[X] Documentation
[ ] Build system

Purpose

Update example to reflect current parameter name

tres bien ! 💯 💯 💯


Resolve - Wrap errors returned from Store

Wraps errors returned from the Store

Hmm I wonder if another flakey test? Ran the tests locally before opening PR and was fine. Also these failures look unrelated to the changes being added @tzdybal

The tests are failing consistently locally. I left comments.

Thank you! I realized I was running the test locally on main 😂  - Now failing for me too. Will address

Codecov Report

Merging #404 (a030778) into main (644a85a) will decrease coverage by 0.06%.
The diff coverage is 25.92%.

@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
- Coverage   56.54%   56.47%   -0.07%
==========================================
  Files          44       44
  Lines        7518     7527       +9
==========================================
  Hits         4251     4251
- Misses       2659     2665       +6
- Partials      608      611       +3

Impacted Files
Coverage Δ

store/store.go
64.05% <25.92%> (-4.01%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 644a85a...a030778. Read the comment docs.


androidenv: ability to use packages outside of android-sdk

There is a need to use e.g. cmake, outside of android-sdk, at least setting cmake.dir in local.properties, which is required to package some android apps.
Currently I have to use this one-time-hack printf "cmake.dir = ${sdk.androidsdk}/libexec/android-sdk/cmake/<IP_ADDRESS>88404\n" >> local.properties.
Can this currently be archived, is it a bug, or is there a better way?
Ping @numinit @jakubgs  and anyone else that knows about androidenv.

Just to follow up on this, there's a slightly better way that's been added to the example shell.nix in #89775.

Out of date, unsure if it's still a thing, reopen if so.


Postgres date-time types

This is based on @tyler-harpool's work in #2865.  I've migrated it to the new v3 world and the new package structure, and implemented it into the Postgres factor.
So far this has not yet been tested (the kindest thing that can be said about it is that it compiles... on my machine).  I'm putting the draft PR up so that Rust and Wasm gurus can suggest easier/terser ways of doing things.
@tyler-harpool, I hope you don't feel this is treading on your toes, but some of the migration stuff was a bit tricky and tedious, and I really wanted to get a handle on what implementing an interface upgrade was going to look like.  I apologise in advance if I have caused any upset.  Also if you have any feedback on the way I've implemented the new types (see the to_sql_parameter function in client.rs) then that would be super useful as I'm not very au fait with the specifics of Postgres types!  Thanks!

related: #2870

Happy @itowlson to see you take this on.


Add database, RP as tags on shard stats

This commit updates tsdb.Shard to contain the name of the owner Database
and RetentionPolicy and updates tsdb.Store to directly reference a map
of tsdb.Shard rather than the tsdb.shardLocation abstraction.
/cc @e-dard

@mark-rushakoff couple of niggles, but I'm pretty cool with this; I probably should have done it like this in the first place :smile:

Updated with @e-dard's suggestions then waiting on a green build and another +1.


Prediction yaml file for Seqweaver

Hi, I am interested in using the Seqweaver pre-trained model to generate predictions on just an input fasta file of RNA sequences (with no saturation mutagenesis), but was struggling a little bit. This was my YAML file:

ops: [analyze]
model: {
path: /home/vagar/SeqWeaver/code_asd_dnarna_v3/models/seqweaver/seqweaver.py,
class: Seqweaver,
class_args: {
n_classes: 43
}
}
analyze_sequences: !obj:selene_sdk.predict.AnalyzeSequences {
sequence_length: 1000,
batch_size: 128,
trained_model_path: /home/vagar/SeqWeaver/code_asd_dnarna_v3/models/seqweaver/mouse_seqweaver.pth,
features: !obj:selene_sdk.utils.load_features_list {
input_path: /home/vagar/SeqWeaver/code_asd_dnarna_v3/models/seqweaver/data.mm10.colnames
},
use_cuda: False,
write_mem_limit: 10000
}
prediction: {
input_path: /home/vagar/SeqWeaver/code_asd_dnarna_v3/test.fa,
output_dir: /home/vagar/SeqWeaver/code_asd_dnarna_v3/test_output,
output_format: tsv
}
random_seed: 999
...

In python, I run this command and get the following error:

parse_configs_and_run(load_path("configs/mouse_seqweaver_fromSeq.yml", instantiate=True)) #YML is the file above
Traceback (most recent call last):
File "", line 1, in
File "/home/vagar/anaconda3/lib/python3.7/site-packages/selene_sdk/utils/config_utils.py", line 341, in parse_configs_and_run
execute(operations, configs, current_run_output_dir)
File "/home/vagar/anaconda3/lib/python3.7/site-packages/selene_sdk/utils/config_utils.py", line 247, in execute
analyze_seqs.get_predictions(**predict_info)
TypeError: get_predictions() got an unexpected keyword argument 'input_path'

Any idea what might be going on? Am I doing something wrong in the YAML?
One more question if you happen to know: Is Seqweaver trying to predict CLIP binding to the central 50nt of a sequence given a 1000nt window context, or is it trying to predict the probability that the full 1000nt input window is likely to possess a CLIP peak somewhere in the entire sequence?
Thank you for your help!
Vikram

Hi Vikram, thanks so much for your post. This is actually a known bug with the latest release of Selene, sorry about that! https://github.com/FunctionLab/selene/commit/2fb66df18411a224487a7ad954e81649762e213c#diff-f7e2ff8a7383f263b4715c9694f0e90893327cbcf8d06e4e4d7a6563e80b03e0L526
You can change the variable from input_path to path and it should work - alternatively, you can use the master branch of this repository (locally building and installing the library) and you can use input_path as expected.
To answer your other question - Seqweaver predicts for the center 50nt given a 1000nt window context, yes. (The CLIP peak has to overlap with at least 50% of the 50nt center bin)

Hi Vikram, thanks so much for your post. This is actually a known bug with the latest release of Selene, sorry about that! https://github.com/FunctionLab/selene/commit/2fb66df18411a224487a7ad954e81649762e213c#diff-f7e2ff8a7383f263b4715c9694f0e90893327cbcf8d06e4e4d7a6563e80b03e0L526
You can change the variable from input_path to path and it should work - alternatively, you can use the master branch of this repository (locally building and installing the library) and you can use input_path as expected.
To answer your other question - Seqweaver predicts for the center 50nt given a 1000nt window context, yes. (The CLIP peak has to overlap with at least 50% of the 50nt center bin)

Thank you for the response!
However, my file matches your master file from the link you sent above, and is also version 0.4.8 as I just installed it last week (my get_predictions has input_path not path). I tried your recommendation anyways but it failed with the identical error more or less.

Thank you for the response!
However, my file matches your master file from the link you sent above, and is also version 0.4.8 as I just installed it last week (my get_predictions has input_path not path). I tried your recommendation anyways but it failed with the identical error more or less.

Oh, I didn't read my code clearly - actually you need to change input_path to input, NOT path for it to work.
Though for me, if I roll back my master branch the fix I just described works, and with master input_path works as expected. Judging by your error message, you might be using 0.4.8 from the conda installation which isn't the same as the master branch (which needs to be locally built and installed via python setup.py --install, since we haven't released another version yet)

Oh, I didn't read my code clearly - actually you need to change input_path to input, NOT path for it to work.
Though for me, if I roll back my master branch the fix I just described works, and with master input_path works as expected. Judging by your error message, you might be using 0.4.8 from the conda installation which isn't the same as the master branch (which needs to be locally built and installed via python setup.py --install, since we haven't released another version yet)

Thank you, you are correct on both accounts: "input" fixed my issue, and also I was using the conda install. Thanks for pointing out it is different than github main branch. I'll go ahead and close this out now that it works fine, appreciate your help!

Thank you, you are correct on both accounts: "input" fixed my issue, and also I was using the conda install. Thanks for pointing out it is different than github main branch. I'll go ahead and close this out now that it works fine, appreciate your help!


which text encoding model you are using in this code?

In your paper, it says

At first, we encode TB into an embedded vector vB either by many-hot encoding or using a pre-trained NLP model such as BERT, FastText, or Word2Vec

Can you tell me exactly which text encoding model you are using in your released code? Could you release the encoding model for custom images?

We use many-hot encoding in our code as it provides a straightforward way to encode the text for our application. However, BERT-encoded text also provides comparable results. We have tested with a pre-trained BERT model uncased_L-24_H-1024_A-16 from the following repository - https://github.com/google-research/bert#pre-trained-models.

Thanks a lot, it was a great help. I will try it soon.

Hi I noticed that the encoding length in encodings.csv is 84, while the output of BERT from your provided url is (61,1024). I urgently need to reproduce your results from custom input text. Could you realse your many-hot encoding model mentioned above? or could you release the code suits the bert's encoding shape?

The many-hot encoding was manually collected during data annotation. So, we do not have a model to infer this encoding directly from the image. It needs to be done manually as an interactive user input. In the case of a frozen text encoder, such as BERT, you need to consider the output from the last hidden layer. The final hidden layer output can be projected to the target shape through another linear layer if required. In our experiments, we tested with BERT encoding of length 384. Also, note that for any specific encoding type and/or length, the stage-1 network needs to be retrained.
Check the following resources on text encoding with BERT.
[1] https://medium.com/future-vision/real-time-natural-language-understanding-with-bert-315aff964bfa
[2] https://github.com/NVIDIA/TensorRT/tree/main/demo/BERT
However a more recent and currently recommended way is to use Hugging Face Transformers.
https://github.com/huggingface/transformers
A demo of TIPS with BERT encoding is (temporarily) available at
https://drive.google.com/file/d/1Jsms6hPKg6ESrJyRTdwkgKScIKow1RnU

Thanks for the reply, but I didnt find the BERT encoding of length 384 you mentioned above in hugging face. Berts I found in hugging face are:

| H=128 | H=256 | H=512 | H=768
-- | -- | -- | -- | --
L=2 | 2/128 (BERT-Tiny) | 2/256 | 2/512 | 2/768
L=4 | 4/128 | 4/256 (BERT-Mini) | 4/512 (BERT-Small) | 4/768
L=6 | 6/128 | 6/256 | 6/512 | 6/768
L=8 | 8/128 | 8/256 | 8/512 (BERT-Medium) | 8/768
L=10 | 10/128 | 10/256 | 10/512 | 10/768
L=12 | 12/128 | 12/256 | 12/512 | 12/768 (BERT-Base)

from https://huggingface.co/google/bert_uncased_L-2_H-768_A-12

Could you please tell me where I can get your pretrained BERT encoding of length 384 ?


SQL notebook and ability to run SQLCMD or OS commands

Issue Type: Feature Request
Please enable SQLCMD extension to T-SQL editor and the SQL notebook. The SQLCMD mode in T-SQL editor is currently broken (I have filed separate bug for that).
 I use a .SQL script right now and run from SSMS that can support this pattern.
Azure Data Studio version: azuredatastudio-insiders 1.14.0-insider (43387f0d0b73b34b7f119720c7335c3c5aa54f55, 2019-11-25T05:56:06.371Z)
OS version: Windows_NT x64 10.0.19030

@chlafreniere adding myself too for the sqlcmd side. here is the full list that I am working on https://github.com/microsoft/azuredatastudio/issues/7381

@udeeshagautam @kburtram Do you have any updates on this feature.


Added new sensor meteoalarm to get weather alerts in Europe

Description:
The MeteoAlarm platform allows one to watch for weather alerts in europe from MeteoAlarm (EUMETNET).
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#9375
Example entry for configuration.yaml (if applicable):
sensor:
  - platform: meteoalarm
    country: "NL"
    province: "Groningen"
    language: 'nl'

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[x] The manifest file has all fields filled out correctly (example).
[x] New dependencies have been added to requirements in the manifest (example).
[x] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

Hi All, I will close this pull request because of my fault i accidentally delete configs from test files. I will create a new one.

@rolfberkenbosch Little hint: Instead of closing the issue and deleting your changes everytime, just add another commit to your branch and it will be automatically added to this pull request. So no need for closing it everytime and create a new one ;)