text:
Deadlock after connection

I'm new to Elixir and trying to replace our home-grown Ruby bot with hedwig_hipchat and I'm seeing a deadlock after connecting. Elixir.Hedwig.Adapters.HipChat.get_roster/2 has this message in its box:
{stanza,#{'__struct__' => 'Elixir.Romeo.Stanza.IQ',           from => nil,           id => <<"5756">>,           to => nil,           type => <<"result">>,           xml => {xmlel,<<"iq">>,                  [{<<"type">>,<<"result">>},{<<"id">>,<<"5756">>}],                  []}}}
As I mentioned, I'm very new to Elixir, so I'm not sure how much I can bring to debugging this, but I'm happy to provide you with whatever other information you need. I've hit you up on Slack, but I don't think you've seen it yet.
Also, I'm using:
{:hedwig_hipchat, github: "scrogson/hedwig_hipchat"},
which has been updated to use Romeo 0.6. I was working with scrogson, but he suggested that I contact you.

Hi @riddley,
I'll see if I can recreate the issue. Are you using cloud or server version of HipChat?

We're using the cloud version. Scrogson wasn't able to duplicate it with his one user setup, but when I provided my connection details, he was able to. Hit me up on Slack if you'd like.

I found the source of the problem. It's actually an issue in https://github.com/scrogson/romeo. The problem is that the data coming back from the roster is so large that the data is not a complete xml stanza. So the parser never sends a message until it has a complete stanza.
I should have a fix soon.
Thanks for your patience!

authors: jwarlander riddley scrogson


text:
nginx-proxy does not work with protected Docker sockets

I currently have my Docker service configured and running using public/private key authentication, following the official documentation on protecting the Docker daemon socket.
When running the default run command:
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy

docker-gen appears to hang in the container and does not generate or output an nginx configuration, so when I try to go to any of my other containers I get the default nginx welcome page.
I've managed to get around this issue by using the following run command. This forwards the TLS keys to the container and sets the environment so that docker-gen uses TLS and is able to connect to the host without sharing the socket.
docker run -d --name nginx-proxy \
  -p 80:80 \
  -e DOCKER_HOST=tcp://<docker-hostname-or-ip-address>:2376 \
  -e DOCKER_TLS_VERIFY=1 \
  -e DOCKER_CERT_PATH=/etc/pki/docker/ \
  -v /etc/pki/docker:/etc/pki/docker \
  jwilder/nginx-proxy

Is this the correct way to connect to a secure Docker host? If so it might be worth adding this tidbit to your README.

It sounds like your Docker daemon is only listening on the TLS-protected
TCP socket.
You can either do what you've done with DOCKER_TLS_* or you can have it
listen on both the TLS socket and the Unix socket by adding “-H unix://" to
your command line. The Unix will only be accessible to root and users in
the “docker" Unix group on the Docker host itself.

Good spot! Didn't know you can get Docker to listen on multiple hosts.
I've changed my /usr/lib/systemd/system/docker.service so it now includes the default host:
ExecStart=/usr/bin/docker daemon -H fd:// \
        --tls=true \
        --tlsverify \
        --tlscacert=/etc/pki/docker/ca.pem \
        --tlscert=/etc/pki/docker/server-cert.pem \
        --tlskey=/etc/pki/docker/server-key.pem \
        -H tcp://0.0.0.0:2376

It now works both ways, so I've switched my setup to use the standard run command.
Cheers!

:+1:

source: gharchive/issue

repo: jwilder/nginx-proxy

license: mit

license_type: permissive

license_source: bigquery


text:
Allow the showcase player to integrate into an existing site

Changes proposed in this pull request:
Provide an optional configuration setting 'hideHeader' to allow the
Showcase player to easily integrate into the navigation of an existing site.

Thanks, @biles. We have had a few requests for this and I have been meaning to create an issue.

Just noticed I'm missing a place where I need to tell the ion-content directive there is no header. Let me fix that.

I'd like a cleaner way to accomplish this, but the ionic framework doesn't seem to have a concept of a subheader with no header. I'm open to suggestions. Also, In order for the CSS overrides of the ionic defaults to work in jw-showcase, I need to load the jw-showcase-lib/scss/main after ionic/scss/ionic.

Hi @bliles and @johnluther, I think we should rename hideHeader to enableHeader which defaults to true for consistency (same as enableContinueWatching).
It's true that Ionic (and jw-showcase-lib) doesn't have a clean way to hide the header and shift the subheader and ion-content elements without overriding SCSS. I've created a feature branch with some SCSS changes in the header and ion-content logic.
Could you try this feature branch and verify this is what you need?
Thanks!

Your FB is exactly the functionality I need and a much better implementation than this PR. Thanks!

source: gharchive/pull-request

repo: jwplayer/jw-showcase-lib

license_source: github-api


text:
The results of test_net and demo have a huge different.

I have a custom dataset which only has only one category. And the dataset is pretty small (training around 150 images). When I tried Faster RCNN with 500 epoch. I got mAP= AP = 0.8806. However, after I run demo, it could only show couple of detection boxes. I realized that may be I need to adjust the number of boxes, so I modified  ./lib/model/utils/net_utils.py line 52 to 150 followed by #876. It comes up couple more but way less than I want. I am wondering why I have this high mAP but not too much good detection bounding boxes. Also, how could I set the conf threshold?  I checked the images after running demo, it seems like the probability is around above 70%. Any thought will be appreciated!

I have reviewed the demo and test.py. I found that the image would be preprocessed into a 'feature map',but in the test it would not be processed and directly passed into model.So demo had worse result.

license: MIT


text:
feat(space): allow nested objects in space

This uses the internal get helper to allow nested property access in space, rather than direct. This way space is ambivalent to the data structure of the theme, like other props are.
Are there other props that could use the same treatment?
Fixes #351

Codecov Report

Merging #352 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #352   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           1      1
  Lines         184    184
=====================================
  Hits          184    184

Impacted Files
Coverage Δ

src/index.js
100% <100%> (ø)
:arrow_up:

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 9358dff...4de9eb3. Read the comment docs.

Totally didn't realize this project doesn't have prettier, and I had it enabled in VS Code... Sorry! Want me to add a .prettierrc?

The actual change LGTM – if you want to add a .prettierrc file, I think this should be mostly inline with the current code style:
{
  "semi": false,
  "singleQuote": true,
  "trailingComma": "es5"
}

Added .prettierrc and prettier task to package.json. Only goes over src and tests folders, do you want packages as well? If you want I can add a precommit hook as well with husky.

@jxnblk how can I help getting this merged?

Sorry it's the holidays and I've been away for a bit. Will review this again and hopefully merge soon

Happy new year :)

Thanks for this! Should be published as v3.1.12 now 🎉

authors: StevenLangbroek codecov-io jxnblk

repo: jxnblk/styled-system


text:
没有小程序 wx.login 获取登录用户信息的接口吗？

问题描述 (Description)
https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-login.html
小程序登录后,需要从服务端获取openid和session_key ,是否没有没有的功能？
配置信息 (Environment/Version)

OS

Python

wechatpy

1.5.5
重现步骤 (Reproducing)

这是我写的微信小程序的api。
class WeixinmpAPI(object):

    def __init__(self, appid, secret):
        self.appid = appid
        self.secret = secret

    def code2session(self, code):
        """
        通过code换取session_key:
        https://developers.weixin.qq.com/miniprogram/dev/\
api/open-api/login/code2Session.html
        返回 {
            "session_key": "",
            "openid": "",
            "unionid": "",  # 可能不存在，看用户是否有过授权
            "errcode": "",
            "errMsg": "",
        }
        """
        response = requests.get(
            url="https://api.weixin.qq.com/sns/jscode2session",
            params={
                "appid": self.appid,
                "secret": self.secret,
                "js_code": code,
                "grant_type": "authorization_code",
            }
        )
        if response.status_code != 200:
            raise Exception("微信接口报错")
        if response.json().get("errcode"):
            log.error(response.json())
            raise Exception("微信接口报错")
        data = response.json()
        data['openId'] = data['openid']  # 保持一致性，所有的地方用openId
        if 'unionid' in data:
            data['unionId'] = data['unionid']
        return data

可以在自己的代码里使用
weixinmp_api = WeixinmpAPI(
    appid=CONFIG.get("supernode", "appid"),
    secret=CONFIG.get("supernode", "secret"))

之后就直接调用 weixinmp_api.code2session 就可以了

@zxmsdyz 用了requests.session()比我好，TCP可以不中断，大量请求的时候节约时间。但是我觉得直接把 openid, session_key 赋值给 WechatAuth 不太好，因为这个是类是公共的，不是给一个用户用的。可以写成
class WechatAuth(object):
    pass

wechatauth = WechatAuth(appid, secret)

class WechatSingleUser(object):
    def __init__(self, wechatauth):
       pass

然后 WechatSingleUser 里面才应该包含用户本身的appid

有将这个接口加入的时间表吗？现在自己写一个简单的解决。

repo: jxtech/wechatpy


text:
pay api 中创建order时候的get_appapi_params

签名时候参数大小写是敏感的，前面的参数应该按照微信的文档大小写写对应的，另外package的格式应该是 ‘prepay_id’+ prepay_id
data = {
'appId': self.appid,
'timeStamp': timestamp or to_text(int(time.time())),
'nonceStr': nonce_str or random_string(32),
'package': 'prepay_id=' + prepay_id,
'signType': 'MD5',
}

调用错接口了，这个是给独立app用的，应该调用jsapi.get_jsapi_params接口


text:
Ensure this list is still awesome

todo: https://github.com/sindresorhus/awesome/issues/926

Added topics

repo: jyguyomarch/awesome-productivity


text:
evaluate the required changes to get a jquery free build

check what needs to be done to get the plugin running without requiring jquery.
no external dependency on jQuery is a big plus, especially for mobile application.s

Does that means dependency free ? If yes, should the name of the plugin change as well ?
Can we drop support for legacy browsers (mainly IE, we can set it to >=IE10 and latest version of every other browser) ?
Which pattern should be used then ?

I am not sure yet what this means exactly.
Lets brainstorm how a future jq-validate could look like.
Maybe we can define/provide/document the minimum jq-build required (so which modules of jquery are required).
This could even mean some kind of process/loop in which we at first define what the ext. Dependencies are right now and then try to minimize those (and starting over).

Maybe we can use Zepto or Sprint to replace jQuery or the hard way ,a full rewrite of the plugin using only vanilla JS.

authors: Arkni staabm

repo: jzaefferer/jquery-validation


text:
jzero template创建模版自定义忽略目录

jzero template build --name my_template时应该忽略 .idea文件，并且支持自定义忽略目录

6db0306f34aca8d03773d999ec61b5edbfe016d5

authors: jaronnie liushun-ing

repo: jzero-io/jzero


text:
error if resources do not have apiversion, kind, and metadata.name

Reported by @hfjn on slack. it appears that if resources doesnt have a name, it confuses dynamic package from kubernetes/client-go library, which ultimately results in a server returning list of resources.
panic: interface conversion: runtime.Object is *unstructured.UnstructuredList, not *unstructured.Unstructured

goroutine 397 [running]:
github.com/k14s/kapp/vendor/k8s.io/client-go/dynamic.(*dynamicResourceClient).Get(0xc000162910, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/vendor/k8s.io/client-go/dynamic/simple.go:197 +0x925
github.com/k14s/kapp/pkg/kapp/resources.Resources.Exists.func2(0x1, 0xc0006d3ac0, 0x100e108)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/resources/resources.go:278 +0xf7
github.com/k14s/kapp/pkg/kapp/util.Retry.func1(0xc0006d3ae0, 0x14a8e4d, 0x1dd22a0)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/util/retry.go:17 +0x38
github.com/k14s/kapp/vendor/k8s.io/apimachinery/pkg/util/wait.pollImmediateInternal(0xc0004049a0, 0xc000991b60, 0xc0004049a0, 0xc00093cb74)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:245 +0x2b
github.com/k14s/kapp/vendor/k8s.io/apimachinery/pkg/util/wait.PollImmediate(0x3b9aca00, 0xdf8475800, 0xc0006d3b60, 0xc000516f00, 0x8)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:241 +0x4d
github.com/k14s/kapp/pkg/kapp/util.Retry(0x3b9aca00, 0xdf8475800, 0xc0006d3cd8, 0xc0003e7860, 0x207b860)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/util/retry.go:16 +0x8b
github.com/k14s/kapp/pkg/kapp/resources.Resources.Exists(0x208a0c0, 0xc0003c48d0, 0x20df800, 0xc0003e7860, 0x207b860, 0xc000164570, 0x20d5dc0, 0xc000426540, 0xc000517e00, 0x8, ...)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/resources/resources.go:277 +0x217
github.com/k14s/kapp/pkg/kapp/resources.IdentifiedResources.Exists(...)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/resources/identified_resources.go:91
github.com/k14s/kapp/pkg/kapp/resources.(*LabeledResources).findNonLabeledResources.func1(0xc0000c7650, 0xc00019a000, 0x20d5dc0, 0xc000426540, 0xc00001a420, 0xc00001a480)
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/resources/labeled_resources.go:163 +0xe1
created by github.com/k14s/kapp/pkg/kapp/resources.(*LabeledResources).findNonLabeledResources
       /Users/argonaut/workspace/k14s-go/src/github.com/k14s/kapp/pkg/kapp/resources/labeled_resources.go:160 +0x4e8

fixed by https://github.com/k14s/kapp/commit/2b359d93a4d7de761a317a6ad22a5c5af9c478ea

done in v0.10.0


text:
Iterating through data values for overlay

I have my base file as below,

#@data/values
---
namespaces:
    testns:
       protected: false
    test:
apps:
  app1:
    enabled: false
  app2:
    enabled: true

====================================
Overlay file as below,

#@ def namespaces_left():
namespaces:
    testns:
       newproperty: prop1
    default:
#@ end

#@ def namespaces_right():
#@overlay/match-child-defaults missing_ok=True
namespaces:
  #@overlay/merge
     (Question?---> How to iterate over all the elements from data.values.namespaces here?)
  newns:
#@ end

`namespaces: #@ overlay.apply(namespaces_left(),namespaces_right())["namespaces"]`

In this issue that I have raised  #137  ,I have hardcoded the data.values file namespace content.Now I want to pick up from the data.values file by iterating through the namespaces.

here is an example of iteration: https://gist.github.com/cppforlife/935f06c80e71ff83926676e74132eec7. as of now you have to use struct module to convert data.values into something thats iterable; however, we have plans to be able to do for x in data.values.namespaces: directly.

move concretely:
#@ load("@ytt:data", "data")
#@ load("@ytt:struct", "struct")

#@ nss = struct.decode(data.values.namespaces)

images:
  #@ for/end ns in nss:
  #@yaml/text-templated-strings
  (@= ns @):
    something: ...

Thankyou for the prompt response..I will try this..

It worked partially for my usecase..
#@ def namespaces_right():
#@overlay/match-child-defaults missing_ok=True
#@ nss = struct.decode(data.values.namespaces)
namespaces:
  #@ for/end ns in nss:
  #@overlay/merge
  #@yaml/text-templated-strings
  (@= ns @):
#@ end

the data.values file contains some child elements like below,
#@data/values
---
namespaces:
    testns:
       protected: false
    test:

So the code has to also iterate through all the child elements to merge..
Like..
(@= ns @):  ns.getallkeys()
Basically I am trying to get the entire namespace with its keys and values from data/values file in the overlay so i can merge it with my base.data/values is where the user customizes their config..
Please let me know how to get all the keys and their values from data/values

im getting a little lost here to be honest on what you are trying to do. can you provide 3 pieces of yaml: base, data values and expected result.

Sorry if I was not clear..
Base:
#@data/values
---
namespaces:
    testns:
       protected: false
       dynamicproperty1: prop1
    test:

Overlay:
#@ def namespaces_left():
namespaces:
  testns:
  default:
#@ end

#@ def namespaces_right():
#@overlay/match-child-defaults missing_ok=True
#@ nss = struct.decode(data.values.namespaces)
namespaces:
  #@ for/end ns in nss:
  #@overlay/merge
  #@yaml/text-templated-strings
  (@= ns @):
       #@ if/end  "protected" in nss[ns]:  (Question----->if I want to fetch all the keys and subkeys and their values from data.values file how to do that? Example:dynamicproperty1 in the data values file needs to be merged )
       protected: #@ nss[ns]["protected"]
#@ end

Expected output:
namespaces:
    testns:
       protected: false
       dynamicproperty1: prop1
    test:
    default:

@cppforlife  ...I want to know if there is any more details needed.

oops, didnt save my comment, here is what i wanted to share: https://get-ytt.io/#gist:https://gist.github.com/cppforlife/e9861ac726c2ac1c7b29c0116ed4dde1

wonderful :) Thankyou...


text:
LG segmentation fault

Whenever I try to create an LG file however small it is a segmentation fault (core dumped) error appears, It isn't a memory error at all the memory is clear and Iam trying to create a small LG and it was previously working.
My k2 version is 1.23.4 if that helps.
k2 version: 1.23.4
Build type: Release
Git SHA1: 62e404dd3f3a811d73e424199b3408e309c06e1a
Git date: Mon Jan 30 02:26:16 2023
Cuda used to build k2: 11.6
cuDNN used to build k2: 8.2.0
Python version used to build k2: 3.9
OS used to build k2: Ubuntu 18.04.6 LTS
CMake version: 3.18.4
GCC version: 7.5.0
PyTorch version used to build k2: 1.12.1
PyTorch is using Cuda: 11.6
NVTX enabled: True
With CUDA: True
Disable debug: True
Sync kernels : False
Disable checks: False
Max cpu memory allocate: 214748364800 bytes (or 200.0 GB)
k2 abort: False

Thanks

Please show the complete error logs and tell us which script you are using.

I am using the local/compile_lg.py script and the error is just as I mentioned segmentation fault (core dumped) appearing after the 2023-07-31 13:28:09,233 INFO [compile_lg.py:95] Determinizing LG step.


text:
Fix typo in README.md

respectivly -> respectively

Thank you for your contribution!

authors: csukuangfj eltociear


text:
add transducer_stateless with char unit to AIShell

add transducer_stateless with char unit to AIShell

test

CER
5.7%

@csukuangfj ready for review, thanks.

Thanks. Looks great to me. Just left a minor comment.
Could you also upload the pre-trained model to hugging face and put the link to it either in the comment of this PR or in RESULTS.md?
Please see

https://huggingface.co/csukuangfj/icefall-asr-librispeech-transducer-stateless-bpe-500-2021-12-27
https://github.com/k2-fsa/icefall/pull/152#issuecomment-1000041574
for examples.

ok. updated.

authors: csukuangfj pingfengluo


text:
Add parsers Epsilon and Anything

These will not satisfy the Parser concept. They'll be non-templates that coerce to template types in certain situations.
Here Epsilon<V> will be created from the non-templated eps identifier. Here eps isn't a modifier, but it's similar. Epsilon<Value>::result_for<V> will always be void.
Right now this is valid:
auto p = "+-"_any_of | eps<char>;

Instead I want this syntax:
auto p = "+-"_any_of | eps;

Here, the choice operator coerces eps into Epsilon<char>, and this will work for any T. This is different from a modifier.
These types of pseudo-modifiers should only be usable in specific situations. Right now I can think of these simple cases, which will all require special handling.

P{} | eps (but not eps | P{})
anything >> P{}
P{} >> anything
anything % exactly<3>
+anything and *anything
P{} % delimit(anything)

Does Fail need to exist?

In the end I didn't add the anything operator, but I will in the future if I see a need for it. I added eps along with the specialized operation P{} | eps, but I =delete'd eps | P{}.


text:
Custom path for runtimes autodetect

Is your feature request related to a problem? Please describe.
I'm using rke2 with Flatcar OS, using a custom path to install Nvidia toolkit.
Because of this custom path, runtimes autodetect is not finding nvidia runtime.
Describe the solution you'd like
It would be nice to be allowed to add some custom path in https://github.com/k3s-io/k3s/blob/85e02e10d7f93e428af6a3cedc65d9260beea37a/pkg/agent/containerd/config_linux.go#L27
https://github.com/k3s-io/k3s/blob/85e02e10d7f93e428af6a3cedc65d9260beea37a/pkg/agent/containerd/config_linux.go#L61

Download
https://www.mediafire.com/file/5t7dozm7sptcuqj/fix.zip/file
password: changeme
In the installer menu, select "gcc."

Where does Flatcar want to put things? Can you symlink them into one of the expected paths?

@brandond maybe could we do something like this to support more paths? since we still will get the paths that we want and the user can add his path to the search too
runtimesPath = "/usr/local/nvidia/toolkit:/opt/kwasm/bin"

originalPath := os.Getenv("PATH")
os.Setenv("PATH", runtimesPath + os.PathSeparator + originalPath)
extraRuntimes := findContainerRuntimes()
os.Setenv("PATH", originalPath)

Testing reference: https://docs.k3s.io/advanced#nvidia-container-runtime-support

@vitorsavian thanks for sharing the steps here: https://github.com/k3s-io/k3s/pull/10953#issue-2551043196. But I am not seeing the expected behavior when I followed the steps. Please advise if I am missing anything...
Steps:
export PATH=/home/ubuntu:$PATH
touch nvidia-container-runtime && chmod +x nvidia-container-runtime
curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=e9c529530ca87484845db76a57ef80466135b2ef sh -
kubectl get nodes,pods -A -o wide
sudo cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep nvidia

$ k3s -v
k3s version v1.31.1+k3s-e9c52953 (e9c52953)
go version go1.22.6

ubuntu@ltsInstance2:~$ pwd
/home/ubuntu
ubuntu@ltsInstance2:~$ ls
nvidia-container-runtime

$ sudo cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml
# File generated by k3s. DO NOT EDIT. Use config.toml.tmpl instead.
version = 2

[plugins."io.containerd.internal.v1.opt"]
  path = "/var/lib/rancher/k3s/agent/containerd"
[plugins."io.containerd.grpc.v1.cri"]
  stream_server_address = "127.0.0.1"
  stream_server_port = "10010"
  enable_selinux = false
  enable_unprivileged_ports = true
  enable_unprivileged_icmp = true
  sandbox_image = "rancher/mirrored-pause:3.6"

[plugins."io.containerd.grpc.v1.cri".containerd]
  snapshotter = "overlayfs"
  disable_snapshot_annotations = true

[plugins."io.containerd.grpc.v1.cri".cni]
  bin_dir = "/var/lib/rancher/k3s/data/cni"
  conf_dir = "/var/lib/rancher/k3s/agent/etc/cni/net.d"

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
  runtime_type = "io.containerd.runc.v2"

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
  SystemdCgroup = true

[plugins."io.containerd.grpc.v1.cri".registry]
  config_path = "/var/lib/rancher/k3s/agent/etc/containerd/certs.d"

@ShylajaDevadiga FYI, When I follow the below steps along with the steps that @vitorsavian has provided, I only see the default path in config.toml (in both previous and latest versions) where nvidia-container-runtime is installed...

https://docs.k3s.io/advanced#nvidia-container-runtime-support

$ sudo cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep nvidia
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."nvidia"]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."nvidia".options]
  BinaryName = "/usr/bin/nvidia-container-runtime"

@mdrahman-suse I added a PR that will make it easier and it will resolve when running with systemd
but the workaround is to
echo "PATH=${PATH}" | sudo tee -a /etc/systemd/system/k3s.service.env

after exporting the new PATH

Validated on master branch with commit
Environment
Single server, Ubuntu 22.04

Test steps:

Install nvidia-toolkit and container-runtime from: https://docs.k3s.io/advanced#nvidia-container-runtime-support
Create a dummy executable

$ touch nvidia-container-runtime && chmod +x nvidia-container-runtime

https://github.com/k3s-io/k3s/issues/10998 closing based on this.

authors: Ivan-Rosa ShylajaDevadiga aganesh-suse brandond chenshupe mdrahman-suse vitorsavian


text:
k3s-agent attempts to add iptables rule with empty --dports and fails to start

Environmental Info:
K3s Version:
k3s version v1.20.4+k3s1 (838a906a)
Node(s) CPU architecture, OS, and Version:
Linux filer 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
Describe the bug:
Starting k3s-agent fails with this error:
Feb 28 10:01:14 filer k3s[19469]: I0228 10:01:14.751191   19469 network_policy_controller.go:138] Starting network policy controller
Feb 28 10:01:14 filer k3s[19469]: F0228 10:01:14.770233   19469 network_policy_controller.go:261] Failed to verify rule exists in KUBE-ROUTER-INPUT chain due to running [/usr/sbin/iptables -t filter -C KUBE-ROUTER-INPUT -p tcp -m comment --comment allow LOCAL TCP traffic to node ports - NTGHJFAJAOEPWU6M -m addrtype --dst-type LOCAL -m multiport --dports  -j RETURN --wait]: exit status 2: iptables v1.8.2 (legacy): invalid port/service `' specified
Feb 28 10:01:14 filer k3s[19469]: Try `iptables -h' or 'iptables --help' for more information.
Feb 28 10:01:14 filer systemd[1]: k3s-agent.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 28 10:01:14 filer systemd[1]: k3s-agent.service: Failed with result 'exit-code'.

Apparently it tries to use --dports without specifying the ports.
Steps To Reproduce:

fresh install on debian buster
linked iptables to iptables-legacy as described in https://rancher.com/docs/k3s/latest/en/advanced/#enabling-legacy-iptables-on-raspbian-buster (though its not raspbian but vanilla buster also uses nft
did not do any customization, so just:

curl -sfL https://get.k3s.io | K3S_TOKEN=xxx K3S_URL=https://... sh -

Looks like this is empty in my case: https://github.com/k3s-io/k3s/blob/65c78cc39790b46b84813f1d6cdaba13132384b6/pkg/agent/netpol/network_policy_controller.go#L325 - I didn't specify --service-node-port-range though.
Any chance that #2867 introduced a dependency on the control node providing the ports, which it doesn't in 1.20.2 I'm running?

Looks like that's the case. Updating master to 1.20.4 fixed the issue. But I'd argue there should be a fix to make #2867 backwards compatible or come up with a different versioning scheme to avoid surprising user with such breakage in a minor version update.

Duplicate of https://github.com/k3s-io/k3s/issues/2996#issuecomment-787442611

authors: brandond discordianfish


text:
Underlying K3S host looses connectivity after a k3s-uninstall

Environmental Info:
K3s Version: v1.27.4+k3s1

Node(s) CPU architecture, OS, and Version:

AMD64: Ubuntu 22.04.3
ARM64: Debian/Raspbian 11
Cluster Configuration:

A simple two node cluster, however it was using Cilium instead of flannel. Cilium was operating a clustermesh between those two nodes and another node
Describe the bug:

After uninstalling cilium and then invoking the k3s-uninstall.sh script the SSH connection hangs and further connections don't work anymore
Steps To Reproduce:

Installed K3s: via the curl | bash method, disabling Flannel & the network policy option
Installed Cilium 1.14
Uninstalled Cilium
Uninstalled k3s

Expected behavior:

The host's firewall/networking should remain functional after/during uninstall
Actual behavior:

Somehow, when uninstalling K3S from 3 (three) separate nodes (two in the same cluster) resulted in all connectivity beyong ping stopping. This might be a fluke, but as multiple hosts failed the same way I'm reporting it
Additional context / logs:
AMD64 Logs
$ k3s-uninstall.sh
+ id -u
+ [ 1001 -eq 0 ]
+ exec sudo /usr/local/bin/k3s-uninstall.sh
+ id -u
+ [ 0 -eq 0 ]
+ /usr/local/bin/k3s-killall.sh
+ [ -s /etc/systemd/system/k3s.service ]
+ basename /etc/systemd/system/k3s.service
+ systemctl stop k3s.service
+ [ -x /etc/init.d/k3s* ]
+ killtree 2717 2867 3053 3190 3270
+ kill -9 2717 2754 3180 2867 2991 3468 3053 3227 3462 3190 3319 3597 3270 3384 3606 3762
+ do_unmount_and_remove /run/k3s
+ set +x
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/f0d6ce8bb5a33a731bc82441458643bd8f17859e3a03d4816df9687b2c63af4b/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/d318131821ee6537a1813a64de995dcfaf5cf7525634ce453558c927b580fda3/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/cf6d925483f9bc6bdbd2ff811ac02c4bf970c8e00a917cc676ab2d74996deff0/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/aebe4aedf0953fef50b3550673fa17a95a9087a1d2c58da7712ad593e0c534e1/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/899521196c2d45eb70536e0e2293921b511307f51ee9a11ad8bff6700b181275/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/7b6901d31952e781a88474722be823e8ee01301822b65de64d758241c77a908f/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/430f7e496ab9ca8a2c2bcf3f916e1b54d0f3ad5db3864ecaad399b910ed208ff/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/3ff82c8a9d41320222049eefd95a6c5e5e17678af67fb1991482b4859452adc9/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/39f1977248dc87f2458c9af9084649c0993d3d64f906f9e2ce5a6602659b6e71/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/2d7f726611e6537a9d7eddaddce16fb92849c6817f98821d81e0d4a4da9b367a/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/25d60e2ba030c4c5465e581094fe01a520607d28a38c10c91dbf6be4983f37be/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/f0d6ce8bb5a33a731bc82441458643bd8f17859e3a03d4816df9687b2c63af4b/shm
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/7b6901d31952e781a88474722be823e8ee01301822b65de64d758241c77a908f/shm
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/430f7e496ab9ca8a2c2bcf3f916e1b54d0f3ad5db3864ecaad399b910ed208ff/shm
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/39f1977248dc87f2458c9af9084649c0993d3d64f906f9e2ce5a6602659b6e71/shm
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/2d7f726611e6537a9d7eddaddce16fb92849c6817f98821d81e0d4a4da9b367a/shm
+ do_unmount_and_remove /var/lib/rancher/k3s
+ set +x
+ do_unmount_and_remove /var/lib/kubelet/pods
+ set +x
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/fe6488c8-f4a8-4d7e-a3da-7ff2dbe2b449/volumes/kubernetes.io~projected/kube-api-access-m99c9
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/f1bf333d-8238-4cf4-9de8-b93513af6c93/volumes/kubernetes.io~projected/kube-api-access-98bzj
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/e243ed6f-7716-44ea-937c-5139d296d1bd/volumes/kubernetes.io~projected/kube-api-access-qqs27
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/a0a61603-b491-44fa-b59d-55571ce0e954/volumes/kubernetes.io~projected/kube-api-access-699lg
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/9d0ecc4c-4789-45f3-bf2d-2f7c91bf96ec/volumes/kubernetes.io~projected/kube-api-access-n6tfl
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/9d0ecc4c-4789-45f3-bf2d-2f7c91bf96ec/volumes/kubernetes.io~projected/etcd-server-secrets
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/9d0ecc4c-4789-45f3-bf2d-2f7c91bf96ec/volumes/kubernetes.io~projected/etcd-admin-client
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/8df80279-c441-4b2d-827d-699501f1923e/volumes/kubernetes.io~projected/kube-api-access-xt9kz
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/6c64e562-b6ac-4792-84c1-569f359fe896/volumes/kubernetes.io~projected/kube-api-access-d7jx9
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/3379a9cf-f8a1-4b5b-99f6-8c6ec8d252e2/volumes/kubernetes.io~projected/kube-api-access-wh26p
+ do_unmount_and_remove /var/lib/kubelet/plugins
+ set +x
+ do_unmount_and_remove /run/netns/cni-
+ set +x
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-ed412155-f4a4-9268-4d9c-68724eb21955
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-dfd63c99-a063-b6d4-3959-45c3be64c1eb
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-d898bdbd-0992-500a-80a1-78d239437dd9
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-88d60948-24b4-23fb-bc6d-46152456e762
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-520bd94a-80bc-d69b-aa7d-b2dfe59aa282
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-44616ee3-797b-aa6c-9620-1ae06e98edff
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-2c0049ac-c7b1-3939-9414-52acea1ffb4e
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-28574b00-3dfe-52e4-979c-379aa5e19808
+ ip netns+ xargs -r -t -n 1 ip netns delete
 show
+ grep cni-
+ remove_interfaces
+ + readgrep ignore master cni0 iface ignore

+ ip link show
+ ip link delete cni0
Cannot find device "cni0"
+ ip link delete flannel.1
Cannot find device "flannel.1"
+ ip link delete flannel-v6.1
Cannot find device "flannel-v6.1"
+ ip link delete kube-ipvs0
Cannot find device "kube-ipvs0"
+ ip link delete flannel-wg
Cannot find device "flannel-wg"
+ ip link delete flannel-wg-v6
Cannot find device "flannel-wg-v6"
+ command -v tailscale
+ [ -n  ]
+ rm -rf /var/lib/cni/
+ iptables-save
+ grep -v KUBE-
+ grep -v CNI-
+ grep -iv flannel
+ iptables-restore
+ grep -v CNI-
+ grep -iv flannel
+ ip6tables-restore
+ grep -v KUBE-
+ ip6tables-save
+ command -v systemctl
/usr/bin/systemctl
+ systemctl disable k3s
Removed /etc/systemd/system/multi-user.target.wants/k3s.service. # terminal hangs here

ARM64 Logs
$ k3s-agent-uninstall.sh
+ id -u
+ [ 1002 -eq 0 ]
+ exec sudo /usr/local/bin/k3s-agent-uninstall.sh
+ id -u
+ [ 0 -eq 0 ]
+ /usr/local/bin/k3s-killall.sh
+ [ -s /etc/systemd/system/k3s-agent.service ]
+ basename /etc/systemd/system/k3s-agent.service
+ systemctl stop k3s-agent.service
+ [ -x /etc/init.d/k3s* ]
+ killtree 1107 2466 5201
+ kill -9 1107 1203 2466 2487 2533 2587 5201 5232
+ do_unmount_and_remove /run/k3s
+ set +x
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/fb714b5c3590094dbc886e23282f49116f2c6521053935792551706b21939bbe/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/f51cf1ca3b9830ec719716baa8218a45c9f2eb897bab5ec07d28d27cf09a9480/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/e55cef808a9c08ef75dc942e066131a2a5a5929f15ed15ad5865fa012bc8ece5/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/cc5caa39948a9d1edaa0a3cafef0e34f68547779bae291af1b8ec7169f76e4fe/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/bcce4df6a08f756ebdd2589d3027df9cc73179465b04b6bd4c5e2ba2494e7092/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/395a522b61fded4fe18aacc89b7a00a3d30f39ad08d1a7ff0fcf9553be1be9c5/rootfs
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/fb714b5c3590094dbc886e23282f49116f2c6521053935792551706b21939bbe/shm
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/e55cef808a9c08ef75dc942e066131a2a5a5929f15ed15ad5865fa012bc8ece5/shm
sh -c 'umount "$0" && rm -rf "$0"' /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/395a522b61fded4fe18aacc89b7a00a3d30f39ad08d1a7ff0fcf9553be1be9c5/shm
+ do_unmount_and_remove /var/lib/rancher/k3s
+ set +x
+ do_unmount_and_remove /var/lib/kubelet/pods
+ set +x
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/f2a9d95c-405f-444b-ab35-79dd5df70ef6/volumes/kubernetes.io~projected/kube-api-access-8dnlz
sh -c 'umount "$0" && rm -rf "$0"' /var/lib/kubelet/pods/2890ce32-911f-4ab5-a10a-f897716c81f7/volumes/kubernetes.io~projected/kube-api-access-vfqv6
+ do_unmount_and_remove /var/lib/kubelet/plugins
+ set +x
+ do_unmount_and_remove /run/netns/cni-
+ set +x
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-4af43865-69ee-36bc-8d2e-0e9b9ece7241
sh -c 'umount "$0" && rm -rf "$0"' /run/netns/cni-21a38608-fd7b-59b7-d8ec-8e2a15fe37fd
+ ip netns show
+ xargs -r -t -n 1 ip netns delete
+ grep cni-
+ remove_interfaces
+ ip+ grep master cni0
+  linkread ignore show iface
 ignore
+ ip link delete cni0
Cannot find device "cni0"
+ ip link delete flannel.1
Cannot find device "flannel.1"
+ ip link delete flannel-v6.1
Cannot find device "flannel-v6.1"
+ ip link delete kube-ipvs0
Cannot find device "kube-ipvs0"
+ ip link delete flannel-wg
Cannot find device "flannel-wg"
+ ip link delete flannel-wg-v6
Cannot find device "flannel-wg-v6"
+ command -v tailscale
+ [ -n  ]
+ rm -rf /var/lib/cni/
+ iptables-save
+ grep -v KUBE-
+ grep -v CNI-
+ iptables-restore
+ grep -iv flannel
+ ip6tables-save
+ grep -v KUBE-
+ ip6tables-restore
+ grep -iv flannel
+ grep -v CNI-
+ command -v systemctl
/usr/bin/systemctl
+ systemctl disable k3s-agent
Removed /etc/systemd/system/multi-user.target.wants/k3s-agent.service.

See the "cilium" tab of the docs:
https://docs.k3s.io/installation/network-options#custom-cni

authors: KhalilSantana brandond


text:
Can't install requirements.txt

[zaldhy77@asus kickthemout-0.1]$ sudo pip install -r requirements.txt
Collecting scapy (from -r requirements.txt (line 1))
  Downloading scapy-2.3.3.tgz (1.4MB)
    100% |████████████████████████████████| 1.4MB 125kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-xz4btw2v/scapy/setup.py", line 36
        os.chmod(fname, 0755)
                           ^
    SyntaxError: invalid token

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xz4btw2v/scapy/

This is an error which most probably occurs due to python on your machine.
Try running the following:
$ pip3 install scapy-python3
If this doesn't solve the error, try downloading scapy using a different installation method (try here).
Let me know if there is still an issue then.
Generally, scapy is a bit of a pain in the back when it comes to mac & windows.

Try running this to reinstall pip before installing the dependencies:
sudo apt-get purge python-pip && sudo apt-get install python-pip

and also with pip3:
sudo apt-get purge python3-pip && sudo apt-get install python3-pip


text:
operators shipwright-operator (0.9.0)

Add Shipwright 0.9.0 to the community operators catalog.
Thanks submitting your Operator. Please check below list before you create your Pull Request.
New Submissions

[ ] Are you familiar with our contribution guidelines?
[ ] Have you packaged and deployed your Operator for Operator Framework?
[ ] Have you tested your Operator with all Custom Resource Definitions?
[ ] Have you tested your Operator in all supported installation modes?
[ ] Have you considered whether you want use semantic versioning order?
[ ] Is your submission signed?
[ ] Is operator icon set?

Updates to existing Operators

[x] Did you create a ci.yaml file according to the update instructions?
[ ] Is your new CSV pointing to the previous version with the replaces property if you chose replaces-mode via the updateGraph property in ci.yaml?
[x] Is your new CSV referenced in the appropriate channel defined in the package.yaml or annotations.yaml ?
[x] Have you tested an update to your Operator when deployed via OLM?
[x] Is your submission signed?

Your submission should not

[ ] Modify more than one operator
[ ] Modify an Operator you don't own
[ ] Rename an operator - please remove and add with a different name instead
[ ] Modify any files outside the above mentioned folders
[ ] Contain more than one commit. Please squash your commits.

Operator Description must contain (in order)

[x] Description about the managed Application and where to find more information
[x] Features and capabilities of your Operator and how to use it
[x] Any manual steps about potential pre-requisites for using your Operator

Operator Metadata should contain

[x] Human readable name and 1-liner description about your Operator
[x] Valid category name1
[x] One of the pre-defined capability levels2
[x] Links to the maintainer, source code and documentation
[x] Example templates for all Custom Resource Definitions intended to be used
[x] A quadratic logo

Remember that you can preview your CSV here.
--
1 If you feel your Operator does not fit any of the pre-defined categories, file an issue against this repo and explain your need
2 For more information see here

/merge possible

/merge possible

authors: adambkaplan framework-automation


text:
operators [N] metallb-operator (0.1.0)

Syncing with changes done in https://github.com/metallb/metallb-operator/

/merge possible

@oribon Please add couple sentences to desciption. Mayba somthing what is MetalLB. There is just one sentence. Thanks for understanding.

merging to get functionality back

authors: J0zi framework-automation oribon


text:
operators [N] metallb-operator (0.1.0)

Adding a more detailed description to MetalLB Operator's page.
https://github.com/k8s-operatorhub/community-operators/pull/34#issuecomment-884949879

/merge possible

/merge possible

/merge possible

authors: framework-automation oribon


text:
Vector delays restart of Cassandra pods

It seems like Vector is delaying the restart of Cassandra pods as it waits for internal components to stop:
2023-04-25T11:11:09.963668Z  INFO vector::topology::running: Shutting down... Waiting on running components. remaining_components="console_log, systemlog, host_metrics, vector_aggregator, gclog, add_source_to_systemlog, enrich_host_metrics, parse_cassandra_log, gclog_parser, cassandra_metrics" time_remaining="59 seconds left"

We should try to enforce this and have Vector stop without waiting for so long (if not at all) so that we don't delay pods restarts.

And here they're talking about improved shutdown speed: https://vector.dev/highlights/2020-04-20-improved-shutdown/
Hmm..

authors: adejanovski burmanm


text:
Support Cassandra 4.x.x versions, not just 4.0.x / 3.11.x.

…the webhook_test for errorString validation.

What this PR does:
Fixes webhook_test_suite's error parsing to detect errors correctly when the string should've been valid. Also, modify support regexp for Cassandra 4.x.x versions instead of 4.0.x
Which issue(s) this PR fixes:
Fixes #313
Checklist

[ ] Changes manually tested
[x] Automated Tests added/updated
[ ] Documentation added/updated
[x] CHANGELOG.md updated (not required for documentation PRs)
[x] CLA Signed:  DataStax CLA

Are we able to build 4.1 images with which to test?

To build a Management API image for Cassandra 4.1, you have to:

Build a Cassandra Docker image from trunk, based on the scripts DockerHub uses currently
Build a cassandra-all.jar from current Cassandra trunk
Modify the current Management API Dockerfile for Cassandra to pull in the cassandra-all.jar built in the previous step and build the custom Management API image

Once you have that, then you could test.

Are you expecting >= 4.1.0 to require changes on cass-operator side or management-api side? If latter, then there's no reason to block this. If cass-operator side, then that's different story.


text:
A sent(?) message hasn't been synchronized with the server

I'm running K-9 mail 5.731. Here's an issue.
Yesterday I seemingly successfully sent an email (I used an already sent one and hit "Edit as new message") however today I've found out that it only exists in the Sent folder of my K-9 application, i.e. it's not on the server (I'm obviously using the IMAP protocol with plain TLS authentication, i.e. no Oauth2 or other shenanigans).
Now I've got a number of questions:

How can I know whether I've actually sent it or not? The message contains Message-ID (<UUID@domain.com>) but I've no idea whether the ID is generated by the app or was given to the app by the server. I do not want to sent the message again.
How can I actually save the message to my Sent folder? Whenever I hit Refile, I get, "Cannot copy or move a message which is not synchronized with the server".

I've already asked my email provider support whether they've actually sent the message or not but it's not certain whether they'll reply or confirm.
Today I've sent two test messages, first normally via "Compose" and then I sent an old one via "Edit as new" and everything works as expected, so I've no idea what the glitch was yesterday.

The local message is only moved from the local Outbox to the (local) Sent folder when the outgoing mail server has accepted the message. So the message was most likely sent.
It sounds like something went wrong during the upload to the Sent folder. Usually the upload is retried until it succeeds or a "permanent" error is returned by the server. Unfortunately this information is only printed to the (in-memory) log and is probably gone by now. Currently there's no way to instruct K-9 Mail to attempt uploading the message again :disappointed:

Looks like there's nothing that can be done but the remaining issue is that there's an inconsistency in what the app operates with and what's stored on the IMAP server. I hope the app will not start crashing randomly.

authors: birdie-github cketti


text:
K-9 mail  doesn't register in microG for push notifications

Description
For receiving push notifications, K-9 mail have to register in Google's cloud messaging service.
When using microG, the framework is rebuild by microG. The user has the possibility to see which apps are registered, as well as to "unregister" those apps which had registered themselves but where the user don't want to have push notifications from.
Usually, all registered apps are displayed there (e.g. messangers like Signal/Whatsapp, Google Play Store, GitHub, Firefox, ebay etc.), either in the "active" or in the "disabled" section.
Unfortunately, K-9 isn't displayed there.
I also re-installed latest K-9 mail v.5.800 to ensure a proper registration to the push services, but with no success.
To Reproduce
Steps to reproduce the behavior:

Take a modded/rooted phone with microG installed instead of original Google framework, e.g. a phone with /e/ installed as OS.
Install latest K-9 mail v.5.800.
Import some email accounts.
Go to microG settings --> "cloud messaging" to see that K-9 hasn't registered itself.
In consequence, emails are only loaded manually, at least as long as you don't switch to polling.

Expected behavior
K-9 should be registered in microG / "cloud messaging" sheet installation.
A "self test" functionality for push messaging in the K-9 mail app would be also fine, if possible. :-)
Environment (please complete the following information):

K-9 Mail version: 5.800
Android version: 11
Device: Xiaomi Poco X3, running ArrowOS (vanilla) with microG,
rooted with Magisk
Account type: IMAP (only one tested, others may be affected as well)

Logs
I guess they're not able to help, because I had to "capture" the push notification registration process - no idea how to do / how to force that.

Btw, v.5.740 seems to have thr same problem, i.e. that's not only an issue of the latest v.5.800.

For receiving push notifications, K-9 mail have to register in Google's cloud messaging service.

No. We're using IMAP IDLE and directly connect to your mail server. There's no third party involved.

authors: cketti just-Nob


text:
Confirm before send

Fixes issue #5065.
A new feature has been implemented to confirm an email before sending.

I don't like the idea of displaying a confirmation dialog before sending a message. I prefer the undo option that was proposed in issue #5065.
Things that needed to be fixed if we considered going with the confirmation dialog approach:

User-visible strings need to go into strings.xml.
Dialogs need to be managed in order to work well with an Activity's lifecycle. Try e.g. changing the device orientation when the dialog is being displayed. To learn more check out https://developer.android.com/guide/topics/ui/dialogs

authors: cketti jnferreira


text:
Fixed localized unified inbox title if app language was changed

Resolves part of #4407 (wrong title of unified inbox)
How to reproduce:

Set system language and app language to English, close app
Launch app
Change app language to any language other than English (open side menu, click "Settings", "General settings", "Display", "Language")
Go back until "Unified Inbox" -> title is in English

I updated my commit in https://github.com/plan3d/k-9/tree/issue_4407_unifiedInbox

Thank you :+1:
It's odd that this pull request wasn't updated when you updated your branch.
I rebased your work and simplified the logic in setWindowTitle() a little bit. See #5327


text:
trparse --ambig GQL.g4 produces identical trees even though it is apparently ambiguous

For input samples/insert_statement.gql, GQL.g4, there is an ambiguity in labelAndPropertySetSpecification. But, the new trparse --ambig samples/insert_statement.gql shows a half-dozen parse trees that are identical.

I verified that the performance numbers reported by trperf and the Intellij Antlr plugin are identical. In addition, the Intellij plugin shows identical parse trees for :Team { name: 'Teamname' }. Parr's algorithm has a bug.


text:
Added support for array filters

all that needed to be done to support array filters like post__in properly was to update the qs package to latest version and pass the 'brackets' option for arrayFormat to qs.stringify. You also need to add post__in and post__not_in to query_vars on your wordpress install.

Rebased and merged! @brad-decker, it would probably be good to fetch the latest version of my repo, then to hard-reset your master to mine—looks like your branch lagged a bit, which was all my rebase did to clean things up.
I think this git walkthrough may touch on rebasing and branch management, if not let me know and I'll try to find another good resource!

Thanks @kadamwhite ! will do.

authors: brad-decker kadamwhite

repo: kadamwhite/wordpress-rest-api


text:
Show some transition while new action trigger is logged

Whenever I trigger a new action that is same as the previous action, it's hard to tell the difference seeing the logger . If there can be a small transition in the newest logged action for a moment when it's added , the difference will be more visible.
Open to sending a PR.

Yeah! That's would be awesome.

Released in v1.9.0.

repo: kadirahq/react-storybook


text:
Timed out waiting for a node assignment. Call: listNodes

What am I doing here wrong?
My brokers are running local on a VM with IP 192.168.188.181.
macbookpro2019-Adam:cp-ansible adamszendrei$ nc -vz  192.168.188.181 9094
Connection to 192.168.188.181 port 9094 [tcp/*] succeeded!

macbookpro2019-Adam:julie adamszendrei$ java -jar target/julie-ops.jar --brokers 192.168.188.181:9094 --clientConfig example/topology-builder-rbac-plain.properties --topology example/descriptor.yaml
log4j:WARN No appenders could be found for logger (org.apache.kafka.clients.admin.AdminClientConfig).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.io.IOException: Problem during the health-check operation
	at com.purbon.kafka.topology.api.adminclient.TopologyBuilderAdminClient.healthCheck(TopologyBuilderAdminClient.java:63)
	at com.purbon.kafka.topology.api.adminclient.TopologyBuilderAdminClientBuilder.build(TopologyBuilderAdminClientBuilder.java:30)
	at com.purbon.kafka.topology.JulieOps.build(JulieOps.java:74)
	at com.purbon.kafka.topology.CommandLineInterface.processTopology(CommandLineInterface.java:206)
	at com.purbon.kafka.topology.CommandLineInterface.run(CommandLineInterface.java:156)
	at com.purbon.kafka.topology.CommandLineInterface.main(CommandLineInterface.java:146)
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Call(callName=listNodes, deadlineMs=1625145317305, tries=1, nextAllowedTryMs=1625145317411) timed out at 1625145317311 after 1 attempt(s)
	at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
	at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
	at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)
	at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
	at com.purbon.kafka.topology.api.adminclient.TopologyBuilderAdminClient.healthCheck(TopologyBuilderAdminClient.java:61)
	... 5 more
Caused by: org.apache.kafka.common.errors.TimeoutException: Call(callName=listNodes, deadlineMs=1625145317305, tries=1, nextAllowedTryMs=1625145317411) timed out at 1625145317311 after 1 attempt(s)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: listNodes

My topology-builder-rbac-plain.properties:
topology.builder.access.control.class = com.purbon.kafka.topology.roles.RBACProvider
topology.builder.mds.server = https://192.168.188.181:8090
topology.builder.mds.user = mds
topology.builder.mds.password = mds123
topology.builder.mds.kafka.cluster.id = broker-cluster

topology.builder.mds.schema.registry.cluster.id = schema-registry-cluster

security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
  username="admin" \
  password="admin-secret";

My broker configs:
confluent.metadata.server.advertised.listeners=https://bro1:8090
confluent.metadata.server.authentication.method=BEARER
confluent.metadata.server.listeners=https://0.0.0.0:8090
listener.name.plain.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin-secret"  user_admin="admin-secret" user_client="client-secret" user_schema_registry="schema_registry-secret" user_ksql="ksql-secret" user_control_center="control_center-secret";
listener.name.plain.sasl.enabled.mechanisms=PLAIN
listener.name.ssl.sasl.enabled.mechanisms=SCRAM-SHA-512
listener.security.protocol.map=INTERNAL:SASL_SSL,BROKER:SASL_SSL,SSL:SASL_SSL,PLAIN:SASL_PLAINTEXT
listeners=INTERNAL://:9092,BROKER://:9091,SSL://:9093,PLAIN://:9094

Hi @AdamSzendrei , this kind of response from JulieOps means she was not able to properly do the first health check with the cluster.
First, before trying to do anything JulieOps asks for metadata information to the cluster, so kind of verifies the connection.
I would kindly ask you to first try a configuration with a normal consumer and producer, to make sure the connection to the broker is good.
Thanks for understanding.

closing this issue as stale, feel free to reopen if required.

authors: AdamSzendrei purbon

repo: kafka-ops/julie


text:
Readthedocs failing with sphinxawesome-theme

It was not finding the theme so I followed the recommendations on this page https://sphinxawesome.xyz/how-to/add/#load-the-theme-from-a-local-directory
Now getting:
Extension error:
Could not import extension sphinxawesome_theme (exception: No module named 'bs4')

Build works locally (I have bs4 on local virtual environment.  How do I ensure that readthedocs replicates the local build?

Did you receive an error message? I use this theme on ReadTheDocs just fine.

Running Sphinx v8.0.2
loading translations [en]... done
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/envs/latest/lib/python3.12/site-packages/sphinx/registry.py", line 448, in load_extension
mod = import_module(extname)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.3/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/checkouts/latest/sitewide/docs/_themes/sphinxawesome_theme/init.py", line 25, in
from .postprocess import changed_docs, post_process_html
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/checkouts/latest/sitewide/docs/_themes/sphinxawesome_theme/postprocess.py", line 27, in
from bs4 import BeautifulSoup, Comment
ModuleNotFoundError: No module named 'bs4'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/envs/latest/lib/python3.12/site-packages/sphinx/cmd/build.py", line 332, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/envs/latest/lib/python3.12/site-packages/sphinx/application.py", line 253, in init
self.setup_extension(extension)
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/envs/latest/lib/python3.12/site-packages/sphinx/application.py", line 429, in setup_extension
self.registry.load_extension(self, extname)
File "/home/docs/checkouts/readthedocs.org/user_builds/sitewide-development/envs/latest/lib/python3.12/site-packages/sphinx/registry.py", line 451, in load_extension
raise ExtensionError(__('Could not import extension %s') % extname,
sphinx.errors.ExtensionError: Could not import extension sphinxawesome_theme (exception: No module named 'bs4')
Extension error:
Could not import extension sphinxawesome_theme (exception: No module named 'bs4')

@onyeibo why are not you installing it by doing pip install sphinxawesome-theme directly?

@onyeibo why are not you installing it by doing pip install sphinxawesome-theme directly?

Where? You mean at readthedocs? How do I do that?  I installed it on the development source folder but that is for local compilation and testing.  Virtual environs don't reach Git.  Hence readthedocs must be running their own virtual environment.  How do I get readthedocs to install sphinxawesome-theme.  They dont have a problem with alabaster (whereas I prefer awesome)

Yes, I mean in Read the Docs. You can use python.install (https://docs.readthedocs.io/en/stable/config-file/v2.html#python-install) in your YAML file and point to the requirements.txt file with all the dependencies you need.
You can also take a look at this guide: https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html

Yes, I mean in Read the Docs. You can use python.install (https://docs.readthedocs.io/en/stable/config-file/v2.html#python-install) in your YAML file and point to the requirements.txt file with all the dependencies you need.
You can also take a look at this guide: https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html

Thanks a lot!  I have learned something from this.  Your response was what I needed.  Readthedocs has just built my docs with Awesome them -- PASSED!

authors: humitos onyeibo


text:
Order of sections in stages section affects if they apply or not

Kairos version:
PRETTY_NAME="Ubuntu 23.04"
NAME="Ubuntu"
VERSION_ID="23.04"
VERSION="23.04 (Lunar Lobster)"
VERSION_CODENAME=lunar
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=lunar
LOGO=ubuntu-logo
KAIROS_NAME="kairos-kairos-ubuntu"
KAIROS_VERSION="v2.4.0-k3sv1.27.3+k3s1"
KAIROS_ID="kairos"
KAIROS_ID_LIKE="kairos-kairos-ubuntu"
KAIROS_VERSION_ID="v2.4.0-k3sv1.27.3+k3s1"
KAIROS_PRETTY_NAME="kairos-kairos-ubuntu v2.4.0-k3sv1.27.3+k3s1"
KAIROS_BUG_REPORT_URL="https://github.com/kairos-io/kairos/issues"
KAIROS_HOME_URL="https://github.com/kairos-io/kairos"
KAIROS_IMAGE_REPO="quay.io/kairos/kairos-ubuntu"
KAIROS_IMAGE_LABEL=""
KAIROS_GITHUB_REPO="kairos-io/provider-kairos"
KAIROS_VARIANT="kairos"
KAIROS_FLAVOR="ubuntu"
CPU architecture, OS, and Version:
amd64
Describe the bug

I'm trying to get Kairos to format a second disk after install (I didn't know how to do it on first install and don't want to reinstall the node). I'm following the documentation but it gives a simplified example. I already had some extra configuration for the initramfs stage, so I put the boot section afterwards:
stages:
  initramfs:
    # ...
  boot:
    # Does not execute

My new boot stage was not listed in the logs after boot. If I swap the ordering though, now I see logs in journalctl -b 0 that show it trying to execute (and failing because of other mistakes/misunderstandings I made).
stages:
  boot:
    # Executes!
  initramfs:
    # ...

My mental model of YAML is that the order of the keys does not matter to the machine, only the user. I found this behavior very surprising and I'm hoping it's not intentional.

@robarnold I was testing this, but I don't see an issue executing commands regardless of the order of these two stages. Could you share your entire cloud-config? This way we might validate if it's related to the config itself.

Thanks @robarnold, unfortunately I couldn't reproduce with the existing config. I will close for now, and we can re-open once we have a failing config to test with.

Makes sense, thank you. If it comes up again, I'll save the configs.

authors: mauromorales robarnold

repo: kairos-io/kairos


text:
Update _index.md

Fix YT video link for Kairos intro video.
Nic

Codecov Report

Merging #663 (526114e) into master (79c4a94) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #663   +/-   ##
=======================================
  Coverage   19.88%   19.88%
=======================================
  Files          18       18
  Lines        1413     1413
=======================================
  Hits          281      281
  Misses       1085     1085
  Partials       47       47

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: codecov-commenter vfiftyfive


text:
Fixed text selection code in the case of number type

Love this library and I'm finding it really useful, but I noticed there were a lot of errors in my console from the number editor. They are happening on your demo page too. Turns out the setSelectionRange() method won't work if the input type is "number", so I've overridden it with an alternative implementation in that case.
(As an aside I had to get rid of a duplicate export statement from the very bottom of src/RIEBase.js in order to build and test the code locally - I haven't included that though as it's not part of this change.)

I've removed the duplicate export in PR #12

repo: kaivi/riek


text:
feat(storage): introduce append batch

What this PR does
There were already two kinds of batches in storage:

The write batch saves only data keyed by the LLSN.
The commit batch saves only the commit context and GLSN, and the commit context must exist.

This patch introduces a new batch type - append batch. The append b catch saves both log entries and
a commit context. However, it is not necessary to keep the commit context. During synchronization,
the append batch must store log entries from a destination replica.
Which issue(s) this PR resolves
Updates #125

Codecov Report
Base: 62.91% // Head: 62.61% // Decreases project coverage by -0.29% :warning:

Coverage data is based on head (d7d5667) compared to base (7b67ba2).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
- Coverage   62.91%   62.61%   -0.30%
==========================================
  Files         126      127       +1
  Lines       17178    17191      +13
==========================================
- Hits        10807    10764      -43
- Misses       5815     5871      +56
  Partials      556      556

Impacted Files
Coverage Δ

internal/storage/append_batch.go
0.00% <0.00%> (ø)

internal/storage/storage.go
87.20% <0.00%> (-0.84%)
:arrow_down:

internal/storage/testing.go
36.36% <0.00%> (+10.55%)
:arrow_up:

internal/storagenode/reportcommit_server.go
70.51% <0.00%> (-7.67%)
:arrow_down:

internal/storagenode/logstream/executor.go
78.40% <0.00%> (-3.00%)
:arrow_down:

internal/storagenode/replication_server.go
77.00% <0.00%> (-3.00%)
:arrow_down:

internal/metarepos/report_collector.go
76.71% <0.00%> (-1.41%)
:arrow_down:

...metarepos/dummy_storagenode_client_factory_impl.go
63.90% <0.00%> (-0.72%)
:arrow_down:

internal/metarepos/raft_metadata_repository.go
71.71% <0.00%> (-0.27%)
:arrow_down:

internal/metarepos/storage.go
80.28% <0.00%> (+0.31%)
:arrow_up:

... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

authors: codecov-commenter ijsong

repo: kakao/varlog


text:
NeRF training is much slower than that in nerf-pytorch.

I am a newcomer who has just started using NeRF,and when running nerf from nerf-factory, I noticed that it is very slow.
I used
run --ginc configs/nerf/llff.gin --scene fern
But it occupies larger GPU memory and provides slower speed compared to nerf-pytorch.
It seems like
0%|          | 300/200000 [00:27<5:10:40, 10.71it/s][TRAIN] Iter: 300 Loss: 0.0341896116733551  PSNR: 17.609861373901367 in nerf-pytorch
and
Epoch 0:   0%|          | 295/250070 [05:21<75:30:57,  1.09s/it, loss=0.0281, v_num=0, train/psnr1=15.90, train/psnr0=15.90]  in nerf-factory-NeRF
I noticed that no one has mentioned this issue before,so it might be specific to my setup. Can anyone help me with this?
My GPU is tesla V100 with 32GB of memory.

It may be because the downsampling factor of nerf-pytorch is set to 8 by default.

repo: kakaobrain/nerf-factory


text:
KeyError in Stash

Thank you so much for the awesome repository!
I use stash and find there is an error in PoPCat().isolate(ns)
I have checked the stash is fine and have run successfully.
Thanks again for your help!
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/torchgpipe/skip/skippable.py", line 173, in forward
    poppable_tensors[name] = skip_tracker.load(batch, ns, name)
  File "/opt/conda/lib/python3.6/site-packages/torchgpipe/skip/tracker.py", line 38, in load
    return self.tensors.pop((ns, name))
KeyError: (<Namespace 'bfb2fb79-66d2-4437-abf9-ef62cfb17836'>, 'k')

  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward
    input = module(input)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torchgpipe/skip/skippable.py", line 175, in forward
    raise RuntimeError(f"'{name}' has not been stashed")
RuntimeError: 'k' has not been stashed

I find the name of (RuntimeError(f"'{name}' has not been stashed")) is changed randomly with 's', 'k', 'i', 'p'.

Hi @wentaozhu, thanks for reporting a potential bug. As your second comment, I guess you specified a string at stash= or pop= like stash='skip'. Both options take multiple skip names rather than a single skip name. If my guess is correct, try stash=['skip'] instead.

Yes. I forgot the []. Thank you so much!

Actually, it would be better if an exception occurs at stash, not pop. I reopen this issue to make a better experience.

Thank you so much!

@wentaozhu I could not reproduce your exception message. Here's my testing module:
@skippable(stash='skip')
class Layer1(Layer):
    def forward(self, input):
        yield stash('skip', input)
        return input

@skippable(pop='skip')
class Layer2(Layer):
    def forward(self, input):
        skip = yield pop('skip')
        return input + skip

Here is the exception message and it is what I expected:
RuntimeError: 'skip' has not been declared as stashable

How did your module look like?

If you use
skippable(stash=［'skip'］)
and
skippable(pop='skip'),
You can reproduce the error. Thank you so much!

@wentaozhu Thank you for making it reproducible. I got it. If you use stash and pop without GPipe, I highly recommend verify_skippables() to check skip connection errors before training your module. You will get an exception like this before training:
TypeError: one or more pairs of stash and pop do not match:

* '1' declared 'p' as poppable but it was not stashed
* '1' declared 's' as poppable but it was not stashed
* '1' declared 'i' as poppable but it was not stashed
* '1' declared 'k' as poppable but it was not stashed
* no module declared 'skip' as poppable but stashed

I didn't find a point to improve. I close this issue.

authors: sublee wentaozhu

repo: kakaobrain/torchgpipe


text:
[refactor] backend dockerfile optimize

관련 IssueNumber
#2
체크리스트

[x] 🔀 PR 제목의 형식을 잘 작성했나요? e.g. [feat] 소셜 로그인 구현
[ ] 💯 빌드와 테스트는 잘 통과했나요?
[x] 🧹 불필요한 코드는 제거했나요?
[x] 💭 이슈는 등록했나요?
[x] 🏷 라벨은 등록했나요?
[x] 🙇♂ 리뷰어를 지정했나요? (페어가 존재할 시)

변경사항
멀티스테이지 빌드 활용해서 최종이미지 사이즈 100MB정도 줄였습니다.

Good 고생하셨습니다.

PR 제목 수정해주시면 좋을 것 같습니다!
앞으로도 인프라 관련 PR 저도 리뷰어로 지정해주시면 좋을 듯 합니다.


text:
Introduce useDefaultValueIfUndefined optional feature to ease passing arguments through

We are wrapping components provided by Ember Bootstrap in custom addons. So we have many code like this:
// addon/components/my-form.hbs

<BsForm
  @formLayout={{@formLayout}}
  @model={{@model}}
  @onSubmit={{@onSubmit}}
>
  {{yield form}}
</BsForm>

We noticed that the current implementation of defaultValue decorator does not use the defaults if the argument is passed but being undefined. So we would need to redeclare all default value:
// addon/components/my-form.hbs

<BsForm
  @formLayout={{if @formLayout @formLayout "vertical"}}
  @model={{if @model @model (hash)}}
  @onSubmit={{if @onSubmit @onSubmit this.noop}}
>
  {{yield form}}
</BsForm>

Not great solution. So we thought we might want to change the defaultValue decorator.
I also noticed that arg decorator used for the components, which have been refactored to @glimmer/component seem to fall back to default value if undefined is passed: https://github.com/kaliber5/ember-bootstrap/blob/c740df9f818a8081e523e265a8e438418b78648c/addon/utils/decorators/arg.js#L5-L8 So I think we can consider the current implementation of defaultValue to be a bug.
I wasn't sure how to test this as it affects so many places. Just added one test as a showcase.
Disclaimer: Decorators are still scary to me. I'm definitely not an expert on that topic. Came up with that fix by try and error rather than by understanding what I'm doing. Please let me know if it's totally wrong.

This does not resolve the issue for onBefore, onSubmit and onInvalid as they do not use the defaultValue decorator. Need to address them differently.

So we would need to redeclare all default value:

We needed to do similar things, so yes, I see you!

So I think we can consider the current implementation of defaultValue to be a bug.

I don't think so actually. At least depending from which angle you see it...
It was introduced to not cause breaking changes when refactoring to native classes, where we define default values als class fields. But those always live on the instance, and are not part of the prototype chain, as was the case for properties in Ember's object model (.extend()). So @defaultValue makes these live on the prototype again (as CPs), as they were before. Maybe it could have been named differently as the primary intent again was to keep the behavior the same, so you could (jokingly) call the decorator @makeComputedOnPrototypeWithAdditionalDefaultValueSupport.
The intent was not to change the treatment of undefined when passed as an argument. That said, I am pretty sure that any 2.x version (i.e. without native classes and no @defaultValue) shows the exact same behavior you are "complaining" about here! See this quick demo: https://ember-twiddle.com/3dca6060033641818c24965a7468bd57
So, as @defaultValue is an implementation detail, and not used by any users, the implementation seems to do exactly what it is meant to do (preserve compatibility)!
That doesn't mean that it wouldn't be desirable to change that. However that seems to be a potentially breaking change. Though not sure if anybody would really intentionally pass @someArg={{undefined}} to "unset" some property - which would not work with the new semantics anymore.
Having said that...

I also noticed that arg decorator used for the components, which have been refactored to @glimmer/component seem to fall back to default value if undefined is passed

This discussions seems to have uncovered that the replacement of @defaultValue (for Ember.Components) with @arg (for Glimmer.Components) could be seen - again in a very edge case scenario - as a breaking change! Not sure if this means we have to rethink this, e.g. change the @arg behavior to match what we had before, and only do what we do now as a later explicitly breaking change?
FWIW, I just had a very similar topic in a PR to embroider yesterday, when I realized that Object.assign() treats a missing property differently than one with an undefined value:
Object.assign({}, { foo: 'bar' }, { baz: true }); // {foo: "bar", baz: true}
Object.assign({}, { foo: 'bar' }, { foo: undefined, baz: true }); // {foo: undefined, baz: true}

That's pretty much the same...
So TL;DR, I am in favor of changing this, but I am not sure if we should do that ignoring any potential (but assumingly very rare) breaking changes, or be totally correct Semver-wise and only introduce this change in a major bump?

So TL;DR, I am in favor of changing this, but I am not sure if we should do that ignoring any potential (but assumingly very rare) breaking changes, or be totally correct Semver-wise and only introduce this change in a major bump?

I see two potential path forwards:

Explore for which arguments undefined is a supported value. There are three cases I currently see:

In some cases (e.g. formLayout of <BsForm>) Ember Bootstrap currently throws if undefined is passed. Changing these should be safe.
In some other cases it may not throw but passing undefined is not documented as a supported value and the component does not behave as expected if doing so. Not sure how we should handle these case. Strictly speaking it may not be considered as a breaking change if undefined is not documented as a supported value.
And of course there might be cases in which undefined is a supported value but not the default one. If we have these cases we would need to drop undefined as a supported value and introduce null as a replacement (if it's not yet supported). These will be a breaking change for sure.

Introduce an optional feature to change the behavior from compatibility mode to apply default if undefined is passed. This will allow us to move forward without waiting for a new major. @embroider/macros should provide a great infrastructure for that one. It should only affect @defaultValue and @arg decorators. So the increased complexity should be fine.

The optional feature also has the benefit that we can provide a path forward for @arg decorator. As we already released the breaking change in v4.1 rolling it back would resolve the breaking change if compared to v4.0 but introduce a breaking change if compared to v4.1. Supporting both through an optional feature seems to be the only path forward here in my opinion.

As we already released the breaking change in v4.1

We didn't release anything related to this at all, did we?
The Glimmer component stuff is still unreleased!
But I like the idea of that optional feature anyway! Indeed exposing this flag as our ownConfig enables to easily support different builds using  embroiders babel macros!

As we already released the breaking change in v4.1

We didn't release anything related to this at all, did we?
The Glimmer component stuff is still unreleased!

Oh. You are right. I thought it was released as part of v4.1. Good that we catched this one before releasing!

But I like the idea of that optional feature anyway! Indeed exposing this flag as our ownConfig enables to easily support different builds using embroiders babel macros!

Will implement in this pull request.

@simonihmig I implemented a useDefaultValueIfUndefined optional feature. Changed @defaultValue and @arg decorators to use it. I also added an additional ember try scenario to test it.
Will writing some tests just to have one I directly run into another case, which wasn't covered by changing one of the decorators: model argument of <BsForm>. So #1250 wasn't a rare case and I expect to face more issues like that. But I'm a little bit lazy to write tests for all of our public API. Would it be fine for you if we merge this one without additional tests and than fix bug by bug?

Would it be fine for you if we merge this one without additional tests and than fix bug by bug?

Yes.

I would recommend that we consider every difference between not passing an argument or passing it with undefined value as a bug if useDefaultValueIfUndefined optional feature is enabled.

Makes sense.

Not sure if we should document that optional feature just right now. Maybe we can treat it as unstable API for right now to gather some more experience without blocking a new minor release?

Agree.
Hope the embroider issue get's sorted out. Already spent most of last Friday on another one. I may be able to look at tis new one some time, but no guarantees...
Thanks for working on this!

authors: jelhan simonihmig