text:
node-drain experiment operator CrashLoopBackOff

Is this a BUG REPORT or FEATURE REQUEST?
BUG REPORT
What happened:
When I tested the node-drain experiment, I found that if drain.yaml is configured as follows, chaos-operator-ce will crash.
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
  name: nginx-chaos
  namespace: default
spec:
  # It can be true/false
  annotationCheck: 'false'
  # It can be active/stop
  engineState: 'active'
  #ex. values: ns1:name=percona,ns2:run=nginx
  auxiliaryAppInfo: ''
  appinfo:
#    appns: 'default'
#    applabel: 'app=nginx'
#    appkind: 'deployment'
  chaosServiceAccount: node-drain-sa
  monitoring: false
  # It can be delete/retain
  jobCleanUpPolicy: 'delete'
  experiments:
    - name: node-drain
      spec:
        components:
          env:
            # set node name
            - name: APP_NODE
              value: 'sdn-k8s-b2-7'

We can check the operator work status by kubectl.
kubectl get pod -n litmus -o wide
NAME                               READY   STATUS   RESTARTS   AGE     IP          NODE
    NOMINATED NODE   READINESS GATES
chaos-operator-ce-d78fdff7-sjh4k   0/1     Error    6          6m24s   10.40.0.1   k8s-b2-
6   <none>           <none>

What you expected to happen:
normal work
Anything else we need to know?:
appinfo: Does this field make sense for this experiment?

Hi @jjmengze , thank you for trying this experiment. And indeed it is a great question on if at all the .spec.appInfo section make sense in an experiment like node-drain which is going to impact multiple apps (residing on that node) anyways.
The rationale behind still asking users to fill out  .spec.appInfo (and in some cases auxiliaryAppInfo)  is to ensure that we can check at least one "primary" or "upstream" app on a node whose behavior and availability we want to track as an indicator of resiliency (In the generic experiments, this availability check is still just a pod & container status check, but can be much more depending on how the exp is constructed). For ex: it could be a stateful app which is necessary for a bunch of stateless apps to work around (whose health can be tracked optionally by providing their namespace/labels in the auxiliaryAppInfo).
In the above case, I suspect, the operator tries to parse for the appInfo fields and crashes on not finding them. Would you please share the following details to help us further:

Version of litmus being used (manifests used)
kubectl logs -f chaos-operator-ce-d78fdff7-sjh4k &
kubectl describe chaosengine nginx-chaos

Having said that, I can see the following:  fixes/enhancements we can make to better handle requirements:

Enhancement

Allow option for operator to skip doing app checks when the known blast radius is high and there are other health indicators for an SRE (if you feel this is necessary, can you please raise an enhancement request for the same?)

Interim Fixes

The OpenAPI validation has to be better to prevent creation of a ChaosEngine w/ missing appInfo (make it required)
Instead of crashing upon not finding relevant fields, post and error and continue to reconcile/look for appropriate info/publish appropriate events. I suppose we do have a No Chaos Candidates found log in case the fields are empty (we do seem to take "no values" as empty strings here.

@jjmengze , plan to transfer this issue to the meta repo for the org litmuschaos/litmus as that helps us prioritize/organize the project boards. We keep most user-facing issues in litmus (except if it is a workflow refactor or such very specific kind) while the PRs here are linked to them. I Hope you will not mind!

I printed the error related log about chaos-operator as shown below
 kubectl logs -f chaos-operator-ce-d78fdff7-984ss -n litmus
{"level":"info","ts":1585632225.6407094,"logger":"cmd","msg":"Go Version: go1.10.3"}
{"level":"info","ts":1585632225.640738,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1585632225.6407464,"logger":"cmd","msg":"Version of operator-sdk: v0.12.0"}
{"level":"info","ts":1585632225.6407504,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1585632226.003385,"logger":"leader","msg":"Found existing lock with my name. I was likely restarted."}
{"level":"info","ts":1585632226.0034175,"logger":"leader","msg":"Continuing as the leader."}
{"level":"info","ts":1585632226.4159815,"logger":"cmd","msg":"Could not create metrics Service","error":"failed to initialize service object for metrics: replicasets.apps \"chaos-operator-ce-d78fdff7\" is forbidden: User \"system:serviceaccount:litmus:litmus\" cannot get resource \"replicasets\" in API group \"apps\" in the namespace \"litmus\""}
{"level":"info","ts":1585632226.7690108,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"0.0.0.0:8383"}
{"level":"info","ts":1585632226.7696345,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"chaosengine-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1585632226.769742,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"chaosengine-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1585632226.769802,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"chaosengine-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1585632226.7698197,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"chaosengine-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1585632226.76988,"logger":"cmd","msg":"Starting the Chaos-Operator..."}
{"level":"info","ts":1585632226.7699559,"logger":"controller-runtime.manager","msg":"starting metrics server","path":"/metrics"}
{"level":"info","ts":1585632226.8701098,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"chaosengine-controller"}
{"level":"info","ts":1585632226.9703515,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"chaosengine-controller","worker count":1}
{"level":"info","ts":1585632226.9704752,"logger":"controller_chaosengine","msg":"Reconciling ChaosEngine","Request.Namespace":"default","Request.Name":"nginx-chaos"}
{"level":"dpanic","ts":1585632226.974776,"logger":"controller_chaosengine","msg":"odd number of arguments passed as key-value pairs for logging","Request.Namespace":"default","Request.Name":"nginx-chaos","ignored key":"ChaosEngine.litmuschaos.io \"nginx-chaos\" is invalid: spec.appinfo.appkind: Invalid value: \"\": spec.appinfo.appkind in body should match '^(deployment|statefulset|daemonset)$'","stacktrace":"github.com/litmuschaos/chaos-operator/vendor/github.com/go-logr/zapr.handleFields\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/github.com/go-logr/zapr/zapr.go:106\ngithub.com/litmuschaos/chaos-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/github.com/go-logr/zapr/zapr.go:129\ngithub.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.(*ReconcileChaosEngine).Reconcile\n\tsrc/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:165\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:216\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:192\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:171\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).(github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.worker)-fm\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157\ngithub.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\ngithub.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\ngithub.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
{"level":"error","ts":1585632226.9747474,"logger":"controller_chaosengine","msg":"Unable to update EngineState in ChaosEngine Resource, due to error: %v","Request.Namespace":"default","Request.Name":"nginx-chaos","error":"ChaosEngine.litmuschaos.io \"nginx-chaos\" is invalid: spec.appinfo.appkind: Invalid value: \"\": spec.appinfo.appkind in body should match '^(deployment|statefulset|daemonset)$'","stacktrace":"github.com/litmuschaos/chaos-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.(*ReconcileChaosEngine).Reconcile\n\tsrc/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:165\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:216\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:192\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:171\ngithub.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).(github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.worker)-fm\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157\ngithub.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\ngithub.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\ngithub.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\tsrc/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
{"level":"info","ts":1585632226.9748359,"logger":"controller_chaosengine","msg":"Reconciling ChaosEngine","Request.Namespace":"default","Request.Name":"nginx-chaos"}
E0331 05:23:46.974901       1 runtime.go:73] Observed a panic: "index out of range" (runtime error: index out of range)
goroutine 522 [running]:
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.logPanic(0x12f8e20, 0x1ec0f80)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:69 +0x82
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51 +0x82
panic(0x12f8e20, 0x1ec0f80)
	/usr/local/go/src/runtime/panic.go:502 +0x229
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.initializeApplicationInfo(0xc420428a00, 0xc4201301e0, 0x0, 0x0, 0x0)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:426 +0x2c2
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.getApplicationDetail(0xc420653630, 0x0, 0x17, 0x0)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:508 +0x56
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.(*ReconcileChaosEngine).reconcileForCreationAndRunning(0xc420870240, 0xc420653630, 0xc4207602c9, 0x7, 0xc4207602b4, 0xb, 0x1, 0x1, 0x827d79e5e5710535, 0xb)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:825 +0x1bf
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.(*ReconcileChaosEngine).Reconcile(0xc420870240, 0xc4207602c9, 0x7, 0xc4207602b4, 0xb, 0x1ed6420, 0x402515, 0xc420943080, 0x756ea1b872e431)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:205 +0x6c5
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc420af61e0, 0x1347880, 0xc420943080, 0x1347800)
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:216 +0x100
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc420af61e0, 0xc42031c800)
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:192 +0xb7
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc420af61e0)
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:171 +0x2b
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).(github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.worker)-fm()
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x2a
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc42094af80)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152 +0x54
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc42094af80, 0x3b9aca00, 0x0, 0x1, 0xc420526300)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153 +0xbd
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc42094af80, 0x3b9aca00, 0xc420526300)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x35b
panic: runtime error: index out of range [recovered]
	panic: runtime error: index out of range

goroutine 522 [running]:
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
panic(0x12f8e20, 0x1ec0f80)
	/usr/local/go/src/runtime/panic.go:502 +0x229
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.initializeApplicationInfo(0xc420428a00, 0xc4201301e0, 0x0, 0x0, 0x0)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:426 +0x2c2
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.getApplicationDetail(0xc420653630, 0x0, 0x17, 0x0)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:508 +0x56
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.(*ReconcileChaosEngine).reconcileForCreationAndRunning(0xc420870240, 0xc420653630, 0xc4207602c9, 0x7, 0xc4207602b4, 0xb, 0x1, 0x1, 0x827d79e5e5710535, 0xb)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:825 +0x1bf
github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine.(*ReconcileChaosEngine).Reconcile(0xc420870240, 0xc4207602c9, 0x7, 0xc4207602b4, 0xb, 0x1ed6420, 0x402515, 0xc420943080, 0x756ea1b872e431)
	src/github.com/litmuschaos/chaos-operator/pkg/controller/chaosengine/chaosengine_controller.go:205 +0x6c5
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc420af61e0, 0x1347880, 0xc420943080, 0x1347800)
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:216 +0x100
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc420af61e0, 0xc42031c800)
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:192 +0xb7
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc420af61e0)
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:171 +0x2b
github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).(github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.worker)-fm()
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x2a
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc42094af80)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152 +0x54
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc42094af80, 0x3b9aca00, 0x0, 0x1, 0xc420526300)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153 +0xbd
github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc42094af80, 0x3b9aca00, 0xc420526300)
	src/github.com/litmuschaos/chaos-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
	src/github.com/litmuschaos/chaos-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x35b

@jjmengze , thanks for sharing the log. As anticipated, it is the lack of appInfo which causes this crash.
What are your thoughts/opinions about the reasoning and potential next steps discussed in the previous comment ?
Tagging @chandankumar4 & @rahulchheda for their views as well.

authors: jjmengze ksatchit

repo: litmuschaos/chaos-operator


text:
如何解决被封问题

这个问题无解了吗？那还怎么玩？
网上有一些专门做群转发服务的商家，好像可以避免这个问题
他们是怎么实现的呢？

这个问题 解封不就得了吗？ 好友辅助，网上专门做群转发的商家也是这个套路

类似 https://github.com/littlecodersh/ItChat/issues/651

source: gharchive/issue

authors: Chyroc ilovezqh ymli1981

repo: littlecodersh/ItChat

license: MIT

license_type: permissive

license_source: github-api


text:
🛑 USTC Mirrors (IPv4) is down

In 5ec6b64, USTC Mirrors (IPv4) (https://ipv4.mirrors.ustc.edu.cn) was down:

HTTP code: 0
Response time: 0 ms

Resolved: USTC Mirrors (IPv4) is back up in f78812e.

repo: littlekud/sites-status


text:
Background image and TabView

Hi,
Just started playing with this on an IMXRT1052 EVB board and associated LCD....working great, and a really impressive piece of software. One question that's probably down to sticky-fingers;
Is it possible to have a background image bleed-through the background of a TabView? I've set the empty attribute on both the LV_TABVIEW_STYLE_BG and LV_TABVIEW_STYLE_BTN_BG but that just seems to lead to a solid background coming through, not the underlying image.
Regards
DAVE

Hi,
I tested it and it worked for me. The same code works for you too?
/*Gradient on the screen*/
lv_style_scr.body.main_color = LV_COLOR_RED;
lv_style_scr.body.grad_color = LV_COLOR_BLUE;

/*Empty background style*/
static lv_style_t bg_style;
lv_style_copy(&bg_style, &lv_style_plain);
bg_style.body.empty = 1;

/*Create a tabview set the empty background style*/
lv_obj_t * tv = lv_tabview_create(lv_scr_act(), NULL);
lv_tabview_set_style(tv, LV_TABVIEW_STYLE_BG, &bg_style);

/*Add two tabs*/
lv_obj_t * tab1 = lv_tabview_add_tab(tv, "First");
lv_obj_t * label1 = lv_label_create(tab1, NULL);
lv_label_set_text(label1, "Dummy text 1");

lv_obj_t * tab2 = lv_tabview_add_tab(tv, "Second");
lv_obj_t * label2 = lv_label_create(tab2, NULL);
lv_label_set_text(label2, "Dummy text 2");

And got this:

Yes, that works perfectly.....must be something tangled in my code!
Sticky fingers. Apologies for the noise, please close this.
Regards
DAVE
On 14/07/18 00:38, Gabor Kiss-Vamosi wrote:

/Gradient on the screen/
lv_style_scr.body.main_color = LV_COLOR_RED;
lv_style_scr.body.grad_color = LV_COLOR_BLUE;
/Empty background style/
static  lv_style_t  bg_style;
lv_style_copy(&bg_style, &lv_style_plain);
bg_style.body.empty =1;
/Create a tabview set the empty background style/
lv_obj_t  * tv = lv_tabview_create(lv_scr_act(),NULL);
lv_tabview_set_style(tv, LV_TABVIEW_STYLE_BG, &bg_style);
/Add two tabs/
lv_obj_t  * tab1 = lv_tabview_add_tab(tv,"First");
lv_obj_t  * label1 = lv_label_create(tab1,NULL);
lv_label_set_text(label1,"Dummy text 1");
lv_obj_t  * tab2 = lv_tabview_add_tab(tv,"Second");
lv_obj_t  * label2 = lv_label_create(tab2,NULL);
lv_label_set_text(label2,"Dummy text 2");

Great, no problem!
Glad to help :)

authors: kisvegabor mubes

repo: littlevgl/lvgl

license: mit

license_source: bigquery


text:
Can you provide an example of log. h?

I looked for the document. You did not see how to use the built-in lv_log_xx.

@3038922 lv_conf_templ.h gives enough information to get started:
https://github.com/littlevgl/lvgl/blob/374dfcd60a12ef0127a25a0a8bae4a5fbacf8bd4/lv_conf_templ.h#L151-L164

@3038922 lv_conf_templ.h gives enough information to get started:
lvgl/lv_conf_templ.h
Lines 151 to 164 in 374dfcd
/Log settings/
#define USE_LV_LOG      1   /Enable/disable the log module/
#if USE_LV_LOG
/* How important log should be added:

LV_LOG_LEVEL_TRACE       A lot of logs to give detailed information
LV_LOG_LEVEL_INFO        Log important events
LV_LOG_LEVEL_WARN        Log if something unwanted happened but didn't caused problem
LV_LOG_LEVEL_ERROR       Only critical issue, when the system may fail
*/

define LV_LOG_LEVEL    LV_LOG_LEVEL_WARN
/* 1: Print the log with 'printf'; 0: user need to register a callback*/
define LV_LOG_PRINTF   0
#endif  /USE_LV_LOG/

Is there any specific writing?
···
LV_LOG_TRACE（“helloworld”）; //Would that be all right? Is the path of output file not initialized and not configured?
···

@3038922 If you enable LV_LOG_PRINTF, it calls printf behind the scenes and you can just do that. Otherwise you have to register a callback with lv_log_register_print.

@3038922 If you enable LV_LOG_PRINTF, it calls printf behind the scenes and you can just do that. Otherwise you have to register a callback with lv_log_register_print.
What if it's std:: court?

@3038922 Then register a callback that prints the values to std::cout. The documentation of lv_log_register_print should be self-explanatory:
https://github.com/littlevgl/lvgl/blob/374dfcd60a12ef0127a25a0a8bae4a5fbacf8bd4/lv_misc/lv_log.c#L40-L48

I set up a label to read log.txt records. Does he automatically distinguish by color?

If you mean the recoloring system, you have to enable it with lv_label_set_recolor(label, true).

@3038922 Then register a callback that prints the values to std::cout. The documentation of lv_log_register_print should be self-explanatory:
lvgl/lv_misc/lv_log.c
Lines 40 to 48 in 374dfcd
/**

Register custom print (or anything else) function to call when log is added
@param f a function pointer:

     `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)`

*/
void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t,  const char *))
{
print_cb = f;
}

I set up a label to read log.txt records. Does he automatically distinguish by color?

If you mean the recoloring system, you have to enable it with lv_label_set_recolor(label, true).

I'll do the experiment first. Thank you.


text:
发现许多 bug

看了一下博主，似乎不怎么使用 github，也很久没有使用维护了，大概已经放弃了吧。一些 bug

目录显示 bug，当目录过长时，只能显示一个屏幕的目录，向下拖动目录也无法显示
图片显示 bug，使用  命令时无法加载图片，看了下 hugo 的 markdown 语法，没有发现有什么区别，但是加载失败

还有许多 feature

评论
代码复制按钮

等等，还有许多问题，实在是因为我很喜欢这个主题，极其简洁而专注于内容本身，同时 ui 又非常美观，我看过其他继续维护的 rep，可以变得臃肿，反而落入俗套。我现在对前端还一窍不通，希望以后能修复这些遗憾。我的 blog： https://edte.github.io/

我也非常喜欢这个主题

@edte @GolferChen
可以关注一下，后续会修复一些问题，增加一些feature
https://www.telami.cn/2020/optimize-the-leaveit-theme/

authors: GolferChen edte telami

repo: liuzc/LeaveIt


text:
Feature: Catppuccin Color Scheme

Type of feature
🎨 Style
Current behavior
No response
Suggested feature
The catppuccin color scheme for the editor would be super cool. I like the pastel colors and my whole system is themed to catppuccin. I can give my best shot at implementing this, where would I begin adding the theme options? Is there a style.css file for codejar, codemirror, and monaco that I can edit? Thanks!
The scope of the change is that there are 4 new themes in the editor theme picker preferably for all 3 of the editor types. If that is not possible, I will prioritize codejar

Catppuccin Latte
Catppuccin Frappe
Catppuccin Macchiato
Catppuccin Mocha

Please let me know of anything I should look out for. Like if I need to add the themes anywhere else in the typescript or if there is other stuff that needs to be done after adding css.
Additional context
https://catppuccin.com/palette - Here are the color pallets.
Ill be looking at their style guide for implementation of colors - https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Contributing Docs

[X] I agree to follow this project's Contribution Docs

hi @Shlok-Bhakta
Thank you for the nice suggestion.
I agree, this would be a nice addition to the themes available in LiveCodes.
Yes, please. Go ahead implementing that if you like. I would be very grateful.
You can find the theme definitions for the code editors here:

Monaco
CodeMirror 6
CodeJar (uses Prism.js themes)

You may just follow the pattern for adding themes for each editor. Please let me know if you need any guidance.
Thank you :)

Closed by 688

authors: Shlok-Bhakta hatemhosny

repo: live-codes/livecodes


text:
Tweak --upgrade command to also replace @liveblocks/react-{comments => ui}

…and also warn the user if a dependency on @liveblocks/core is detected.

Nice! Feel free to remove the package.json part of the react-comments-to-react-ui codemod now that it's handled here.

@marcbouchenoire Like this? d98d43a740c6c043358f45b9a8555b2735e87367

source: gharchive/pull-request

repo: liveblocks/liveblocks


text:
agent architecture - recovery from agent shutdown

if an agent (implemented by users of livekit using the python sdk) crashes, then ideally the livekit-backend should continue pinging the agent pool until another agent becomes available.
however this is not the case:
if the agent stops (for instance I am running the agent in my debugger, and stop the debugger to change code),
and then run the agent again, the livekit-backend never calls my agent to rejoin the room.
for a system built with agents to become production-ready, this error recovery mechanism is a must

@aviadr1 yes, this is a great point.. we are working on automatic recovery capability

repo: livekit/agents


text:
Please adapt webrtc_interface-1.0.3

non-abstract class 'RTCDataChannelNative' is missing implementations for these members:

RTCDataChannel.bufferedAmount
RTCDataChannel.id
Try to either
provide an implementation,
inherit an implementation from a superclass or mixin,
mark the class as abstract, or
provide a 'noSuchMethod' implementation.

class RTCDataChannelNative extends RTCDataChannel {
^^^^^^^^^^^^^^^^^^^^
../../fvm/versions/2.10.0/.pub-cache/hosted/pub.flutter-io.cn/webrtc_interface-1.0.3/lib/src/rtc_data_channel.dart:79:12: Context: 'RTCDataChannel.bufferedAmount' is defined here.
int? get bufferedAmount;
^^^^^^^^^^^^^^
../../fvm/versions/2.10.0/.pub-cache/hosted/pub.flutter-io.cn/webrtc_interface-1.0.3/lib/src/rtc_data_channel.dart:74:12: Context: 'RTCDataChannel.id' is defined here.
int? get id;
^^
FAILURE: Build failed with an exception.

Where:
Script '/Users/lwj/fvm/versions/2.10.0/packages/flutter_tools/gradle/flutter.gradle' line: 1102

What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/Users/lwj/fvm/versions/2.10.0/bin/flutter'' finished with non-zero exit value 1

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 38s
Exception: Gradle task assembleDebug failed with exit code 1

This should be fixed.

authors: hiroshihorie hrxiang

repo: livekit/client-sdk-flutter


text:
Cannot read property 'connectionQuality` of undefined

Describe the bug
Algumas vezes em que estava executando o projeto, recebi o seguinte erro Cannot read property 'connectionQuality` of undefined.
To Reproduce
I was unable to repeat the steps to repeat the error.
Expected behavior
It is expected that this error will not occur, even if for some reason the participant is undefined. This occurred during the call.
I believe that such an error is possible to be corrected by checking if participant inside usePartipant is valid, perhaps with the optional-chaining operator? PRs welcome?
Screenshots

Device Info (please complete the following information):

Device: Android Emulator
OS: Android 8.1.0
livekit-client: 1.4.1
livekit-react-native: https://github.com/livekit/client-sdk-react-native

I don't think this will make much sense to do; the state itself becomes meaningless if an undefined participant is passed in.

authors: davidliu marcosdourado

repo: livekit/client-sdk-react-native


text:
offer new type of auth provider

livekit only support file base auth provider so I want to develop new kind of auth provider.
If it is okay for the function to be officially supported, we will work on the function directly through a pull request.
The new authentication provider I'm trying to create is to be able to dynamically add api key & secret dynamically while server is running. I am thinking of using redis or mysql for storage to store the data.
We'll be working on this soon, so I'm curious if there's a chance it'll be officially included.

Livekit supports the distributed concept, but the api key is difficult to apply to the distributed concept. Also, it cannot be added during execution.

We are open to it, though would like to ensure it could be added in a way that does not introduce additional dependencies to the overall package. Do you have an idea of how you'd like to reference the new auth provider?

authors: SlZeroth davidzhao

repo: livekit/protocol


text:
boot jar, 生成jar无法启动

org.springframework.boot.loader.JarLauncher 缺少@org.springframework.boot.autoconfigure.SpringBtApplication注解

使用 SpringApplication.run(SpringApplication.class, args);

启动类上需要添加@org.springframework.boot.autoconfigure.SpringBootApplication注解

感谢提交issue，SpringBoot打包之后是fat jar，调用链上的最后一个类是org.springframework.boot.loader.Launcher

已修复commit

authors: AmbitionLover livk-cloud

repo: livk-cloud/spring-boot-extension


text:
大佬tql！

学习，请问是已经工作了吗

想跟着学习一下

You can ask question here.


text:
本地开发模式无法热重载

折腾了几个小时，死活无法热重载。
后来检查依赖，发现还是依赖egg@0.12.0，现在已经更新到1.5了
使用 npm i egg egg-bin更新依赖后，可以正常热重载

问题在 #8 中修复
分析：
经过测试，目前定位问题在于当nuxt作为核心中间件注册后。
webpack热重载所请求的/__webpack_hmr 应作为 websockt 进行响应，而egg其他的中间件将此请求作为一般请求进行了处理。
解决方式：
在nuxt中间件中，判断请求为 /__webpack_hmr 时，直接转交nuxt进行渲染处理，不再经过其他中间件。

修复前：websocket响应异常

修复后：websocket正确响应

页面热重载正常

repo: liyanlong/nuxt-egg


text:
fix styling issue of send again button

the button appears below the response section when scrolling down.

Hey @ahmedsayedabdelsalam,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: c04436c0-cb57-11e9-81b8-6fab94e294e1

authors: TravisBuddy ahmedsayedabdelsalam

repo: liyasthomas/postwoman


text:
Update for Xcode 9.3 and Swift 4.1

Basically I just did 2 things:

Automatic Xcode upgrade of the project
Removed weak keywords on the HeroPreprocessor and HeroAnimator protocol definitions as it is deprecated in Swift 4.1

Awesome, thank you! Preparing a new release right now.

authors: joaomvfsantos lkzhao

repo: lkzhao/Hero


text:
License problem with HED implementation?

Hi,
First, thanks for releasing this work under Apache-2.0. I appreciate it a lot.
I'm re-implementing your annotators for a personal project (gyre.ai) and have been looking for the origins and licenses of the various models in the annotator subfolder.
It looks like the HED implementation is originally from https://github.com/sniklaus/pytorch-hed/ (the code & models are identical). Unfortunately the license on this implementation is GPL-3.0, which doesn't allow re-licensing under Apache-2.0.
Is this the correct origin of that implementation and model?
(There are two other implementations under more permissive licenses, https://github.com/meteorshowers/hed and https://github.com/chongruo/pytorch-HED - unfortunately neither of them come with pretrained models, and I haven't yet checked how cross-compatible they are).

Thanks for bringing this up! I am the author of https://github.com/sniklaus/pytorch-hed/ and I am under the impression that ControlNet indeed copied my code 1) without attribution and 2) illicitly relicensing it.

https://github.com/xwjabc/hed seems to be able to load the Caffe models from https://github.com/s9xie/hed (which can then be saved as a .pt or .safetensors), and both those are under compatible licenses. Should be easy to swap. Also seems a relatively light to retrain if needed (27 hours on a single Titan X).

True, but that doesn't really address the issue at large - this is a clear violation of the GPL and there are currently 1.6k forks that equally are in violation of the GPL.

Hello Sniklaus, those codes (about 80 lines) are copied from somewhere else and we did not notice that these are your codes.
We are now aware of that those short codes are written by you. It seems that, before the project ControlNet, many people have copied those codes in many places and we find those 80 lines of codes from another place without any source information. We are sorry about the situation.
If you wish we can remove all HED codes all future ControlNets will not use your codes anymore.
It seems that Stability is also experimenting with HED. We can also inform Stability so that all future Stable Diffusion and ControlNet will use PIDINet and avoid introducing connections to your HED code base.
We can also put a notice to ask Stable Diffusion community to stop using those codes from you as soon as possible, with correct attribution to you and your projects.
Let us know your ideas and thank you for the support!
lvmin

Note that it isn't just the code but also the model, the weights that you are distributing magically have the same md5 as the model that I created (5b180f45403e908a39ce3e737b0df10e). As such, I am afraid that you are not doing yourself a favor by trying to downplay it by using the term "short codes".
Similarly, trying to justify the situation by saying that you copied from others that have copied from me doesn't make the situation any better either. If you copy from somewhere you need to play by the rules and in order to not violate any pre-existing license, the source where you copied the code from would have had to be Apache 2.0 as well. However, you are using a HEDdetector class which was first indexed on GitHub with the release of ControlNet so you not only copied the code from somewhere you also modified it - and as per the Apache 2.0 license you would have had to declare what these changes were. So no matter how you twist it, you didn't play by the rules.
I hope that you understand the seriousness of such an offense, GitHub's policies are clear here and I could just submit a takedown request to have the ControlNet repository deleted. However, I understand that that would be an extreme measure. Instead, I offer to let this go under the following terms. First, the ControlNet readme should have a prominent acknowledgment of any sources. This not only includes me but, if applicable, anyone else from whom you may have copied significant pieces of work from. Second, I would like to have a word with your advisor. I already sent him an email earlier today, please kindly ask him to reach out to me.
And if there is some follow-up/derivative work of ControlNet that you are aware of then please kindly notify the involved parties of this issue, I am fine with anyone using my code as long as they provide attribution. And no need to notify the Stable Diffusion community as a whole, there is no need to blow this out of proportion.

Hello @sniklaus,
Thank you for the message.
We have conducted the following action:

the ControlNet readme should have a prominent acknowledgment of any sources. This not only includes me but, if applicable, anyone else from whom you may have copied significant pieces of work from. See https://github.com/lllyasviel/ControlNet/commit/14b4ed999f2e76fb03b5c45842f49002e2682e62 https://github.com/lllyasviel/ControlNet/commit/c94578ccdb39e39f8ae22c4be1344f86f7333323 https://github.com/lllyasviel/ControlNet/commit/82c8788fdde81d33eb99969661f9993f74b27e1a
the email from my advisor will reach out to you.

Let us know your ideas and thank you for the support!
lvmin

authors: hafriedlander lllyasviel sniklaus

repo: lllyasviel/ControlNet


text:
SD3.5 Support please

SD3.5 Support please

+1，The 1.5 model now has problems with quality and command follow-up. I hope to use 3.5

authors: TccccD rafiislambd

repo: lllyasviel/sd-forge-layerdiffuse


text:
TypeError: Cannot read property 'message' of null

go-debug doesn't respond to any command and this error is shown in the console.
"~/.atom/packages/go-debug/lib/main.js:79 Uncaught (in promise) TypeError: Cannot read property 'message' of null
at ~/.atom/packages/go-debug/lib/main.js:63:55"
I was seeing issues #8, #18 and other similars but I couldn't fix this error with the proposed solutions.
Below the output to the "npm ls" command.
$ npm ls
go-debug@1.2.0 ~/.atom/packages/go-debug
├─┬ ansi-to-html@0.6.0
│ └── entities@1.1.1
├─┬ atom-package-deps@4.6.0
│ ├─┬ atom-package-path@1.1.0
│ │ └── sb-callsite@1.1.2
│ ├─┬ sb-exec@3.1.0
│ │ ├── consistent-env@1.3.0
│ │ ├── lodash.uniq@4.5.0
│ │ └─┬ sb-npm-path@2.0.0
│ │   └── sb-memoize@1.0.2
│ └─┬ sb-fs@3.0.0
│   ├── sb-promisify@2.0.1
│   └─┬ strip-bom-buf@1.0.0
│     └── is-utf8@0.2.1
├─┬ chokidar@1.6.1
│ ├─┬ anymatch@1.3.0
│ │ ├── arrify@1.0.1
│ │ └─┬ micromatch@2.3.11
│ │   ├─┬ arr-diff@2.0.0
│ │   │ └── arr-flatten@1.0.3
│ │   ├── array-unique@0.2.1
│ │   ├─┬ braces@1.8.5
│ │   │ ├─┬ expand-range@1.8.2
│ │   │ │ └─┬ fill-range@2.2.3
│ │   │ │   ├── is-number@2.1.0
│ │   │ │   ├── isobject@2.1.0
│ │   │ │   ├── randomatic@1.1.6
│ │   │ │   └── repeat-string@1.6.1
│ │   │ ├── preserve@0.2.0
│ │   │ └── repeat-element@1.1.2
│ │   ├─┬ expand-brackets@0.1.5
│ │   │ └── is-posix-bracket@0.1.1
│ │   ├── extglob@0.3.2
│ │   ├── filename-regex@2.0.0
│ │   ├─┬ kind-of@3.1.0
│ │   │ └── is-buffer@1.1.5
│ │   ├─┬ normalize-path@2.1.1
│ │   │ └── remove-trailing-separator@1.0.1
│ │   ├─┬ object.omit@2.0.1
│ │   │ ├─┬ for-own@0.1.5
│ │   │ │ └── for-in@1.0.2
│ │   │ └── is-extendable@0.1.1
│ │   ├─┬ parse-glob@3.0.4
│ │   │ ├── glob-base@0.3.0
│ │   │ └── is-dotfile@1.0.2
│ │   └─┬ regex-cache@0.4.3
│ │     ├── is-equal-shallow@0.1.3
│ │     └── is-primitive@2.0.0
│ ├── async-each@1.0.1
│ ├─┬ fsevents@1.1.1
│ │ ├── nan@2.6.2
│ │ └─┬ node-pre-gyp@0.6.33
│ │   ├─┬ mkdirp@0.5.1
│ │   │ └── minimist@0.0.8
│ │   ├─┬ nopt@3.0.6
│ │   │ └── abbrev@1.1.0
│ │   ├─┬ npmlog@4.0.2
│ │   │ ├─┬ are-we-there-yet@1.1.2
│ │   │ │ ├── delegates@1.0.0
│ │   │ │ └── readable-stream@2.2.2
│ │   │ ├── console-control-strings@1.1.0
│ │   │ ├─┬ gauge@2.7.3
│ │   │ │ ├── aproba@1.1.1
│ │   │ │ ├── has-unicode@2.0.1
│ │   │ │ ├── object-assign@4.1.1
│ │   │ │ ├── signal-exit@3.0.2
│ │   │ │ ├─┬ string-width@1.0.2
│ │   │ │ │ ├── code-point-at@1.1.0
│ │   │ │ │ └─┬ is-fullwidth-code-point@1.0.0
│ │   │ │ │   └── number-is-nan@1.0.1
│ │   │ │ ├─┬ strip-ansi@3.0.1
│ │   │ │ │ └── ansi-regex@2.1.1
│ │   │ │ └── wide-align@1.1.0
│ │   │ └── set-blocking@2.0.0
│ │   ├─┬ rc@1.1.7
│ │   │ ├── deep-extend@0.4.1
│ │   │ ├── ini@1.3.4
│ │   │ ├── minimist@1.2.0
│ │   │ └── strip-json-comments@2.0.1
│ │   ├─┬ request@2.79.0
│ │   │ ├── aws-sign2@0.6.0
│ │   │ ├── aws4@1.6.0
│ │   │ ├── caseless@0.11.0
│ │   │ ├─┬ combined-stream@1.0.5
│ │   │ │ └── delayed-stream@1.0.0
│ │   │ ├── extend@3.0.0
│ │   │ ├── forever-agent@0.6.1
│ │   │ ├─┬ form-data@2.1.2
│ │   │ │ └── asynckit@0.4.0
│ │   │ ├─┬ har-validator@2.0.6
│ │   │ │ ├─┬ chalk@1.1.3
│ │   │ │ │ ├── ansi-styles@2.2.1
│ │   │ │ │ ├── escape-string-regexp@1.0.5
│ │   │ │ │ ├── has-ansi@2.0.0
│ │   │ │ │ └── supports-color@2.0.0
│ │   │ │ ├─┬ commander@2.9.0
│ │   │ │ │ └── graceful-readlink@1.0.1
│ │   │ │ ├─┬ is-my-json-valid@2.15.0
│ │   │ │ │ ├── generate-function@2.0.0
│ │   │ │ │ ├─┬ generate-object-property@1.2.0
│ │   │ │ │ │ └── is-property@1.0.2
│ │   │ │ │ ├── jsonpointer@4.0.1
│ │   │ │ │ └── xtend@4.0.1
│ │   │ │ └─┬ pinkie-promise@2.0.1
│ │   │ │   └── pinkie@2.0.4
│ │   │ ├─┬ hawk@3.1.3
│ │   │ │ ├── boom@2.10.1
│ │   │ │ ├── cryptiles@2.0.5
│ │   │ │ ├── hoek@2.16.3
│ │   │ │ └── sntp@1.0.9
│ │   │ ├─┬ http-signature@1.1.1
│ │   │ │ ├── assert-plus@0.2.0
│ │   │ │ ├─┬ jsprim@1.3.1
│ │   │ │ │ ├── extsprintf@1.0.2
│ │   │ │ │ ├── json-schema@0.2.3
│ │   │ │ │ └── verror@1.3.6
│ │   │ │ └─┬ sshpk@1.10.2
│ │   │ │   ├── asn1@0.2.3
│ │   │ │   ├── assert-plus@1.0.0
│ │   │ │   ├── bcrypt-pbkdf@1.0.1
│ │   │ │   ├─┬ dashdash@1.14.1
│ │   │ │   │ └── assert-plus@1.0.0
│ │   │ │   ├── ecc-jsbn@0.1.1
│ │   │ │   ├─┬ getpass@0.1.6
│ │   │ │   │ └── assert-plus@1.0.0
│ │   │ │   ├── jodid25519@1.0.2
│ │   │ │   ├── jsbn@0.1.1
│ │   │ │   └── tweetnacl@0.14.5
│ │   │ ├── is-typedarray@1.0.0
│ │   │ ├── isstream@0.1.2
│ │   │ ├── json-stringify-safe@5.0.1
│ │   │ ├─┬ mime-types@2.1.14
│ │   │ │ └── mime-db@1.26.0
│ │   │ ├── oauth-sign@0.8.2
│ │   │ ├── qs@6.3.1
│ │   │ ├── stringstream@0.0.5
│ │   │ ├─┬ tough-cookie@2.3.2
│ │   │ │ └── punycode@1.4.1
│ │   │ ├── tunnel-agent@0.4.3
│ │   │ └── uuid@3.0.1
│ │   ├─┬ rimraf@2.5.4
│ │   │ └─┬ glob@7.1.1
│ │   │   ├── fs.realpath@1.0.0
│ │   │   ├── inflight@1.0.6
│ │   │   ├─┬ minimatch@3.0.3
│ │   │   │ └─┬ brace-expansion@1.1.6
│ │   │   │   ├── balanced-match@0.4.2
│ │   │   │   └── concat-map@0.0.1
│ │   │   ├── once@1.4.0
│ │   │   └── path-is-absolute@1.0.1
│ │   ├── semver@5.3.0
│ │   ├─┬ tar@2.2.1
│ │   │ ├── block-stream@0.0.9
│ │   │ ├─┬ fstream@1.0.10
│ │   │ │ └── graceful-fs@4.1.11
│ │   │ └── inherits@2.0.3
│ │   └─┬ tar-pack@3.3.0
│ │     ├─┬ debug@2.2.0
│ │     │ └── ms@0.7.1
│ │     ├── fstream-ignore@1.0.5
│ │     ├─┬ once@1.3.3
│ │     │ └── wrappy@1.0.2
│ │     ├─┬ readable-stream@2.1.5
│ │     │ ├── buffer-shims@1.0.0
│ │     │ ├── core-util-is@1.0.2
│ │     │ ├── isarray@1.0.0
│ │     │ ├── process-nextick-args@1.0.7
│ │     │ ├── string_decoder@0.10.31
│ │     │ └── util-deprecate@1.0.2
│ │     └── uid-number@0.0.6
│ ├── glob-parent@2.0.0
│ ├── inherits@2.0.3
│ ├─┬ is-binary-path@1.0.1
│ │ └── binary-extensions@1.8.0
│ ├─┬ is-glob@2.0.1
│ │ └── is-extglob@1.0.0
│ ├── path-is-absolute@1.0.1
│ └─┬ readdirp@2.1.0
│   ├── graceful-fs@4.1.11
│   ├─┬ minimatch@3.0.3
│   │ └─┬ brace-expansion@1.1.7
│   │   ├── balanced-match@0.4.2
│   │   └── concat-map@0.0.1
│   ├─┬ readable-stream@2.2.9
│   │ ├── buffer-shims@1.0.0
│   │ ├── core-util-is@1.0.2
│   │ ├── isarray@1.0.0
│   │ ├── process-nextick-args@1.0.7
│   │ ├── string_decoder@1.0.0
│   │ └── util-deprecate@1.0.2
│   └── set-immediate-shim@1.0.1
├── etch@0.9.5
├─┬ json-rpc2@1.0.2
│ ├─┬ debug@2.6.3
│ │ └── ms@0.7.2
│ ├─┬ es5class@2.3.1
│ │ └── better-curry@1.6.0
│ ├── eventemitter3@1.2.0
│ ├─┬ faye-websocket@0.11.1
│ │ └─┬ websocket-driver@0.6.5
│ │   └── websocket-extensions@0.1.1
│ ├── jsonparse@1.3.0
│ ├── lodash@3.10.1
│ └── object-assign@4.1.1
├─┬ redux@3.6.0
│ ├── lodash@4.17.4
│ ├── lodash-es@4.17.4
│ ├─┬ loose-envify@1.3.1
│ │ └── js-tokens@3.0.1
│ └── symbol-observable@1.0.4
├── semver@5.3.0
├─┬ standard@9.0.2
│ ├─┬ eslint@3.18.0
│ │ ├── babel-code-frame@6.22.0
│ │ ├─┬ chalk@1.1.3
│ │ │ ├── ansi-styles@2.2.1
│ │ │ ├── escape-string-regexp@1.0.5
│ │ │ ├── has-ansi@2.0.0
│ │ │ ├── strip-ansi@3.0.1
│ │ │ └── supports-color@2.0.0
│ │ ├─┬ concat-stream@1.6.0
│ │ │ └── typedarray@0.0.6
│ │ ├── doctrine@2.0.0
│ │ ├─┬ escope@3.6.0
│ │ │ ├─┬ es6-map@0.1.5
│ │ │ │ ├── d@1.0.0
│ │ │ │ ├── es5-ext@0.10.15
│ │ │ │ ├── es6-iterator@2.0.1
│ │ │ │ ├── es6-set@0.1.5
│ │ │ │ ├── es6-symbol@3.1.1
│ │ │ │ └── event-emitter@0.3.5
│ │ │ ├── es6-weak-map@2.0.2
│ │ │ └─┬ esrecurse@4.1.0
│ │ │   └── estraverse@4.1.1
│ │ ├─┬ espree@3.4.1
│ │ │ ├── acorn@5.0.3
│ │ │ └─┬ acorn-jsx@3.0.1
│ │ │   └── acorn@3.3.0
│ │ ├── esquery@1.0.0
│ │ ├── estraverse@4.2.0
│ │ ├── esutils@2.0.2
│ │ ├─┬ file-entry-cache@2.0.0
│ │ │ └─┬ flat-cache@1.2.2
│ │ │   ├── circular-json@0.3.1
│ │ │   ├─┬ del@2.2.2
│ │ │   │ ├─┬ globby@5.0.0
│ │ │   │ │ └─┬ array-union@1.0.2
│ │ │   │ │   └── array-uniq@1.0.3
│ │ │   │ ├── is-path-cwd@1.0.0
│ │ │   │ ├─┬ is-path-in-cwd@1.0.0
│ │ │   │ │ └── is-path-inside@1.0.0
│ │ │   │ ├─┬ pinkie-promise@2.0.1
│ │ │   │ │ └── pinkie@2.0.4
│ │ │   │ └── rimraf@2.6.1
│ │ │   └── write@0.2.1
│ │ ├─┬ glob@7.1.1
│ │ │ ├── fs.realpath@1.0.0
│ │ │ ├─┬ inflight@1.0.6
│ │ │ │ └── wrappy@1.0.2
│ │ │ └── once@1.4.0
│ │ ├── globals@9.17.0
│ │ ├── ignore@3.2.7
│ │ ├── imurmurhash@0.1.4
│ │ ├─┬ inquirer@0.12.0
│ │ │ ├── ansi-escapes@1.4.0
│ │ │ ├── ansi-regex@2.1.1
│ │ │ ├─┬ cli-cursor@1.0.2
│ │ │ │ └─┬ restore-cursor@1.0.1
│ │ │ │   ├── exit-hook@1.1.1
│ │ │ │   └── onetime@1.1.0
│ │ │ ├── cli-width@2.1.0
│ │ │ ├── figures@1.7.0
│ │ │ ├── lodash@4.17.4
│ │ │ ├─┬ readline2@1.0.1
│ │ │ │ ├── code-point-at@1.1.0
│ │ │ │ ├─┬ is-fullwidth-code-point@1.0.0
│ │ │ │ │ └── number-is-nan@1.0.1
│ │ │ │ └── mute-stream@0.0.5
│ │ │ ├── run-async@0.1.0
│ │ │ ├── rx-lite@3.1.2
│ │ │ ├── string-width@1.0.2
│ │ │ └── through@2.3.8
│ │ ├─┬ is-my-json-valid@2.16.0
│ │ │ ├── generate-function@2.0.0
│ │ │ ├─┬ generate-object-property@1.2.0
│ │ │ │ └── is-property@1.0.2
│ │ │ ├── jsonpointer@4.0.1
│ │ │ └── xtend@4.0.1
│ │ ├─┬ is-resolvable@1.0.0
│ │ │ └── tryit@1.0.3
│ │ ├─┬ js-yaml@3.8.3
│ │ │ ├─┬ argparse@1.0.9
│ │ │ │ └── sprintf-js@1.0.3
│ │ │ └── esprima@3.1.3
│ │ ├─┬ json-stable-stringify@1.0.1
│ │ │ └── jsonify@0.0.0
│ │ ├─┬ levn@0.3.0
│ │ │ ├── prelude-ls@1.1.2
│ │ │ └── type-check@0.3.2
│ │ ├── lodash@4.17.4
│ │ ├─┬ mkdirp@0.5.1
│ │ │ └── minimist@0.0.8
│ │ ├── natural-compare@1.4.0
│ │ ├─┬ optionator@0.8.2
│ │ │ ├── deep-is@0.1.3
│ │ │ ├── fast-levenshtein@2.0.6
│ │ │ └── wordwrap@1.0.0
│ │ ├── path-is-inside@1.0.2
│ │ ├── pluralize@1.2.1
│ │ ├── progress@1.1.8
│ │ ├─┬ require-uncached@1.0.3
│ │ │ ├─┬ caller-path@0.1.0
│ │ │ │ └── callsites@0.2.0
│ │ │ └── resolve-from@1.0.1
│ │ ├─┬ shelljs@0.7.7
│ │ │ ├── interpret@1.0.3
│ │ │ └─┬ rechoir@0.6.2
│ │ │   └─┬ resolve@1.3.2
│ │ │     └── path-parse@1.0.5
│ │ ├── strip-bom@3.0.0
│ │ ├── strip-json-comments@2.0.1
│ │ ├─┬ table@3.8.3
│ │ │ ├─┬ ajv@4.11.7
│ │ │ │ └── co@4.6.0
│ │ │ ├── ajv-keywords@1.5.1
│ │ │ ├── lodash@4.17.4
│ │ │ ├── slice-ansi@0.0.4
│ │ │ └─┬ string-width@2.0.0
│ │ │   └── is-fullwidth-code-point@2.0.0
│ │ ├── text-table@0.2.0
│ │ └─┬ user-home@2.0.0
│ │   └── os-homedir@1.0.2
│ ├── eslint-config-standard@7.1.0
│ ├── eslint-config-standard-jsx@3.3.0
│ ├── eslint-plugin-promise@3.4.2
│ ├─┬ eslint-plugin-react@6.9.0
│ │ ├─┬ array.prototype.find@2.0.4
│ │ │ ├─┬ define-properties@1.1.2
│ │ │ │ ├── foreach@2.0.5
│ │ │ │ └── object-keys@1.0.11
│ │ │ └─┬ es-abstract@1.7.0
│ │ │   ├─┬ es-to-primitive@1.1.1
│ │ │   │ ├── is-date-object@1.0.1
│ │ │   │ └── is-symbol@1.0.1
│ │ │   ├── function-bind@1.1.0
│ │ │   ├── is-callable@1.1.3
│ │ │   └─┬ is-regex@1.0.4
│ │ │     └── has@1.0.1
│ │ ├── doctrine@1.5.0
│ │ └── jsx-ast-utils@1.4.0
│ ├── eslint-plugin-standard@2.0.1
│ └─┬ standard-engine@5.4.0
│   ├─┬ deglob@2.1.0
│   │ ├── find-root@1.0.0
│   │ ├─┬ pkg-config@1.1.1
│   │ │ └── debug-log@1.0.1
│   │ ├── run-parallel@1.1.6
│   │ └── uniq@1.0.1
│   ├── get-stdin@5.0.1
│   ├─┬ home-or-tmp@2.0.0
│   │ └── os-tmpdir@1.0.2
│   ├── minimist@1.2.0
│   └─┬ pkg-conf@2.0.0
│     ├─┬ find-up@2.1.0
│     │ └─┬ locate-path@2.0.0
│     │   ├─┬ p-locate@2.0.0
│     │   │ └── p-limit@1.1.0
│     │   └── path-exists@3.0.0
│     └─┬ load-json-file@2.0.0
│       ├─┬ parse-json@2.2.0
│       │ └─┬ error-ex@1.3.1
│       │   └── is-arrayish@0.2.1
│       └── pify@2.3.0
└── untildify@3.0.2

It seems there is a problem when go-debug tries to locate/install/update the dlv executable.
Make sure you have installed delve correctly https://github.com/derekparker/delve/tree/master/Documentation/installation and it is available in $GOPATH/bin or somewhere in your $PATH.
Also update go-debug to the current version v1.3.1.
If delve is installed and it still does not work then open ~/.atom/packages/go-debug/lib/main.js and change line 66
this.getStore().dispatch({ type: 'ADD_OUTPUT_MESSAGE', message: e.message + '\n' })

to
console.error("ERROR!", e)

and try it again.
It should now show an "ERROR!" in the console and hopefully more details about the error.

After install version 1.3.1 this is working. Thanks @lloiser

authors: andresgaragiola lloiser

repo: lloiser/go-debug


text:
Error occured when i try to reload pretrained model to inference

I downloaded the checkpoint offered in readme, then i used the Inference API, the params remained unchanged. But an error occuered,
Here's the code and the error info:
Code:
from inference import predict as diffwave_predict
model_dir = './diffwave-ljspeech-22kHz-1000578.pt'
spectrogram = torch.from_numpy(np.load('./upsample_test.wav.spec.npy'))
if len(spectrogram.shape) == 2:
spectrogram = spectrogram.unsqueeze(0)
audio, sample_rate = diffwave_predict(spectrogram, model_dir, fast_sampling=True)
sf.write('./output.wav', audio, sample_rate)
Error info:
Traceback (most recent call last):
File "test.py", line 6, in
audio, sample_rate = diffwave_predict(spectrogram, model_dir, fast_sampling=True)
File "/home/work_nfs6/zqwang/workspace/voicefilter/model/diffusion_model/inference.py", line 40, in predict
model.load_state_dict(checkpoint['model'])
File "/home/environment/zqwang/anaconda3/envs/py38pt17/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for DiffWave:
Unexpected key(s) in state_dict: "spectrogram_upsampler.conv1.weight", "spectrogram_upsampler.conv1.bias", "spectrogram_upsampler.conv2.weight", "spectrogram_upsampler.conv2.bias", "residual_layers.0.conditioner_projection.weight", "residual_layers.0.conditioner_projection.bias", "residual_layers.1.conditioner_projection.weight", "residual_layers.1.conditioner_projection.bias", "residual_layers.2.conditioner_projection.weight", "residual_layers.2.conditioner_projection.bias", "residual_layers.3.conditioner_projection.weight", "residual_layers.3.conditioner_projection.bias", "residual_layers.4.conditioner_projection.weight", "residual_layers.4.conditioner_projection.bias", "residual_layers.5.conditioner_projection.weight", "residual_layers.5.conditioner_projection.bias", "residual_layers.6.conditioner_projection.weight", "residual_layers.6.conditioner_projection.bias", "residual_layers.7.conditioner_projection.weight", "residual_layers.7.conditioner_projection.bias", "residual_layers.8.conditioner_projection.weight", "residual_layers.8.conditioner_projection.bias", "residual_layers.9.conditioner_projection.weight", "residual_layers.9.conditioner_projection.bias", "residual_layers.10.conditioner_projection.weight", "residual_layers.10.conditioner_projection.bias", "residual_layers.11.conditioner_projection.weight", "residual_layers.11.conditioner_projection.bias", "residual_layers.12.conditioner_projection.weight", "residual_layers.12.conditioner_projection.bias", "residual_layers.13.conditioner_projection.weight", "residual_layers.13.conditioner_projection.bias", "residual_layers.14.conditioner_projection.weight", "residual_layers.14.conditioner_projection.bias", "residual_layers.15.conditioner_projection.weight", "residual_layers.15.conditioner_projection.bias", "residual_layers.16.conditioner_projection.weight", "residual_layers.16.conditioner_projection.bias", "residual_layers.17.conditioner_projection.weight", "residual_layers.17.conditioner_projection.bias", "residual_layers.18.conditioner_projection.weight", "residual_layers.18.conditioner_projection.bias", "residual_layers.19.conditioner_projection.weight", "residual_layers.19.conditioner_projection.bias", "residual_layers.20.conditioner_projection.weight", "residual_layers.20.conditioner_projection.bias", "residual_layers.21.conditioner_projection.weight", "residual_layers.21.conditioner_projection.bias", "residual_layers.22.conditioner_projection.weight", "residual_layers.22.conditioner_projection.bias", "residual_layers.23.conditioner_projection.weight", "residual_layers.23.conditioner_projection.bias", "residual_layers.24.conditioner_projection.weight", "residual_layers.24.conditioner_projection.bias", "residual_layers.25.conditioner_projection.weight", "residual_layers.25.conditioner_projection.bias", "residual_layers.26.conditioner_projection.weight", "residual_layers.26.conditioner_projection.bias", "residual_layers.27.conditioner_projection.weight", "residual_layers.27.conditioner_projection.bias", "residual_layers.28.conditioner_projection.weight", "residual_layers.28.conditioner_projection.bias", "residual_layers.29.conditioner_projection.weight", "residual_layers.29.conditioner_projection.bias".
Thanks in advance!  Looking forward to your reply!

It seems that the provided checkpoint is a conditional model, solve the problem by setting the unconditional in the params.py to False. I'm using the pretrained model for speech separation, sorry for being so amateur.

repo: lmnt-com/diffwave


text:
Fractions vs channels

I think we should clarify fractions (along the gradient) and channels (the final columns in the data).

I had a chat with Claire today about this. She thinks there is often confusion with biologists between RP fractions from the MS and gradient fractions collected in the fractionation stage and mentioned that after data is imported into R she also refers to the quantitative columns as channels (not as fractions). I think I have clarified this now. See 5a8c0aa98388bf642f6965c20eecf0412de46053

authors: lgatto lmsimp

repo: lmsimp/bioc-pRoloc-hyperLOPIT-workflow


text:
Issue decoding invoice

this snippet:
import bolt11

invoice = 'lnbc1950n1pjtrgxnpp5ye3lhh8ye8ywm85evshn9wyhdsdg9a350tdhm3dyw89mwfht8s9qdqqxqyjw5q9q7sqqqqqqqqqqqqqqqqqqqqqqqqq9qsqsp5z22wjrrm0lgl32e0yes38dzmvjxnajrvanhw3hp4duq4k55wl0gsrzjqwryaup9lh50kkranzgcdnn2fgvx390wgj5jd07rwr3vxeje0glclludsryzx7vvvqqqqqlgqqqqqeqqjqqq3zq0d9kw8q4fhsgxh595f2l0ass4zaj2pdknzhxzzrlf7g5wgsk3nlgzzeduhnp6mva9jehwcq9y4hrllwt6ffl822q5drdgvxtjspmgfnls'
decoded = bolt11.decode(invoice)

give me this output:
Traceback (most recent call last):
  File "/home/pythcoiner/python/bolt11/main.py", line 4, in <module>
    decoded = bolt11.decode(invoice)
  File "/home/pythcoiner/python/bolt11/venv/lib/python3.10/site-packages/bolt11/decode.py", line 82, in decode
    tags["9"] = Features.from_bitstring(tagdata)  # type: ignore
  File "/home/pythcoiner/python/bolt11/venv/lib/python3.10/site-packages/bolt11/models/features.py", line 76, in from_bitstring
    raise ValueError(f"Feature index ({i}) out of range, word_length: {length}")
ValueError: Feature index (100) out of range, word_length: 150

invoice generated by Phoenix wallet
edit: pip install from pypi (pip install bolt11)

hey, thanks for the issue, it seems like the words length of the feature tag is 150 bit, from the spec here i only see 51 used bits. https://github.com/lightning/bolts/blob/master/09-features.md
i had this issue before,  so i added extra, bits like here.  though i have no clue what they exactly mean.
working on a PR now.

it seems like the words length of the feature tag is 150 bit, from the spec here i only see 51 used

maybe @t-bast have more ideas about the meaning of these extra bits?

thanks for the quick fix, will try it soon!

We're using an experimental feature bit in Phoenix invoices to advertise optional support for trampoline payments: https://github.com/ACINQ/lightning-kmp/blob/fa58d6725ecff7a218c829842d738e951e6b5ee4/src/commonMain/kotlin/fr/acinq/lightning/Features.kt#L232
BOLT 11 states that you should simply ignore optional feature bits you don't support.

thanks for info

authors: dni pythcoiner t-bast


text:
WEBP support

I’m still going to improve this, but its working already.

Thanks! I'll take a look at this over the next couple days.

@mgartner I've updated the PR and now from my point of view it looks good to be merged. Could you please review it and share your opinion?

Reference: https://developers.google.com/speed/webp/docs/riff_container
Lossy: http://tools.ietf.org/html/rfc6386
Lossless: https://chromium.googlesource.com/webm/libwebp/+/master/doc/webp-lossless-bitstream-spec.txt

Looks really good! Thanks for contributing! Do you mind switching back the yodas and squashing your commits into 1?

@mgartner done.

Thanks again!

authors: borodean mgartner

repo: lob/calipers


text:
Localizations.override override the whole app

Perhaps this is a problem with flutter itself and not this awesome package but maybe you can help me narrow the problem so I can open the issue in the Flutter project instead (There is already a similar problem in Flutter issues https://github.com/flutter/flutter/issues/33300)
When using AboutListTile() > Opening Dialog > See Licenses > Tap on any License the Localization becomes English for the whole app, Reading the code they use Localizations.override(locale: const Locale('en', 'US'), ...) so the license page load only in English, the problem is that Localizations.override should only override that page, but it changes the whole app language to English

void main() {
  runApp(const App());
}

// Run the app in other language (Spanish) and after opening licenses and visualizes one

class Appextends StatelessWidget {
  const GameShop({Key key}) : super(key: key);

  @override
  Widget build(BuildContext contexth) {
    return MaterialApp(
      localizationsDelegates: [
        S.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: S.delegate.supportedLocales,
      home: Builder(
          builder: (context) => Scaffold(
              body: AboutListTile(
                  applicationName: S.of(context).example_text
              ),
          )
      ),
    );
  }
}

[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [VersiÃ³n 10.0.18363.1316], locale es-MX)
    • Flutter version 1.22.5 at E:\Programs\flutter
    • Framework revision 7891006299 (5 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\dartz\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:\Users\dartz\AppData\Local\Android\Sdk
    • Java binary at: E:\Programs\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[!] Android Studio (version 4.1.0)
    • Android Studio at E:\Programs\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

Hi @EdwynZN
This is a known problem. Linked issues from IDE plugins:

https://github.com/localizely/flutter-intl-intellij/issues/26

PR is created https://github.com/localizely/intl_utils/pull/18 but I think such changes should be considered for the next major version

Hi @EdwynZN
This is a known problem. Linked issues from IDE plugins:

https://github.com/localizely/flutter-intl-intellij/issues/26

PR is created https://github.com/localizely/intl_utils/pull/18 but I think such changes should be considered for the next major version

At least, we should not assign the new locale in S.load, this is called in each Localizations.override. Let developer to choose when to assign new locale.

authors: EdwynZN aleksakrstic narumishi


text:
[Snyk] Upgrade html-snapshots from 0.18.1 to 0.18.2

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade html-snapshots from 0.18.1 to 0.18.2.

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 16 days ago, on 2022-06-28.

Release notes

Package name: html-snapshots

0.18.2 - 2022-06-28async-lock@1.3.2

0.18.1 - 2022-05-06update devdeps, istanbul -> c8

    from html-snapshots GitHub release notes

Commit messages

Package name: html-snapshots

47431cd Merge pull request #139 from localnerve/rc-0.18.2
efc24f7 @ 0.18.2, update async-lock@1.3.2
6e3161a Merge pull request #138 from localnerve/snyk-upgrade-1755e291f15c044a6e54a347bebecef7
bb1cedd fix: upgrade async-lock from 1.3.1 to 1.3.2
e8e6dee Merge pull request #137 from localnerve/snyk-upgrade-615f209776632debcb0b6cf71eff6ce4
3db5927 fix: upgrade async from 3.2.3 to 3.2.4
b550ed9 Merge pull request #136 from localnerve/snyk-upgrade-7566e8c5ef8fc29d6bf0352d6aa530f1
c6c1c7f fix: upgrade html-snapshots from 0.18.0 to 0.18.1
4c635f0 Merge pull request #135 from localnerve/snyk-upgrade-db030cf019963e6a5ecb29f34dc74207
39ce59a fix: upgrade html-snapshots from 0.18.0 to 0.18.1
77a8667 Merge pull request #134 from localnerve/snyk-upgrade-2af52b049f427964f3a759db3d2582d5
d18fd05 fix: upgrade html-snapshots from 0.18.0 to 0.18.1
51f494d Merge pull request #133 from localnerve/snyk-upgrade-4d905c8a3ed515a4fcb02eeff19d81e8
b125570 fix: upgrade html-snapshots from 0.18.0 to 0.18.1
9874117 Merge pull request #132 from localnerve/snyk-upgrade-89baeb4a93e42e130f0f409811d8187d
548d088 fix: upgrade html-snapshots from 0.18.0 to 0.18.1
753844e Merge pull request #131 from localnerve/snyk-upgrade-3037db708cfe1b8f7eccea78bf7ede75
b0fac92 fix: upgrade html-snapshots from 0.18.0 to 0.18.1
4c29a70 Merge pull request #130 from localnerve/snyk-upgrade-e587b4c54bdbb2561fccc680a7d04f9e
da64220 fix: upgrade html-snapshots from 0.18.0 to 0.18.1

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Coverage increased (+98.9%) to 98.94% when pulling a5b45c61237763696aa4c3c1f4b8609505db8e44 on snyk-upgrade-c18650befd82d5fcb542874f3be918c2 into c7ee77efbc5a0ee5145919f3e7c3f5206ae52f69 on master.

authors: coveralls localnerve

repo: localnerve/html-snapshots


text:
Make share as link url larger

Is your feature request related to a problem? Please describe.
I display the link on my screen in my classroom, but it's too small. QR code is not an option because the students are on desktop computers.
Describe the solution you'd like
I want a button that makes the url display large on my screen. Similar to google classroom's class code UI and similar to the QR code UI that already exists in localsend, but for the text url instead of the QR code.

Describe alternatives you've considered
I zoom in with windows magnifier, but that's not elegant or ideal
Additional context
No response

This is an issue I also have. I'll try to make a PoC.

authors: Caesarovich CubeOfCheese

repo: localsend/localsend


text:
i18n: Updates for missing translations for Ukrainian and Russian. Also, a minor correction for English

Since there is no contact list but rather a favorites list, I think it should specify "favorites list" to avoid confusing users (changes for the English).

Thank you!


text:
Feature Request: Ability to reference a secret for localstack api key

The documentation states that in order to pass the LOCALSTACK_API_KEY environment variable to the deployment, it should be done with extraEnvVars e.g.
  - name: LOCALSTACK_API_KEY
    value: "<your api key>"

Preferably, we'd like to avoid committing the key to a values.yaml file because the value would be in plain text. Ideally, we'd like to be able to pull the value out of a Kubernetes secret that may be defined by a parent chart or perhaps by IaC.
For example,
envFromSecret:
     - name: LOCALSTACK_API_KEY
       secret: localstack-secrets
       key: apiKey

where localstack-secrets may be defined like:
apiVersion: v1
kind: Secret
type: Opaque
data:
  apiKey: hello!
metadata:
  name: localstack-secrets

Hi @sobotklp!
Sorry for the late response. Actually, the extraEnvVars ist just a list of objects which are added to the env vars of the deployment. This means you can just reference a secret there:
extraEnvVars:
- name: LOCALSTACK_API_KEY
  valueFrom:
    secretKeyRef:
      name: <name of the secret containing the API key>
      key: <name of the key in the secret containing the API key>

I just updated the README and the test-values.yaml to make this more clear in the docs with https://github.com/localstack/helm-charts/commit/0e34a273fce7334d46188e2069c17fcd9a7db2fb.
I am sorry for the inconvenience. But thanks a lot for filing the PR. We really appreciate all contributions!

Thanks! using valueFrom works perfectly.

authors: alexrashed sobotklp

repo: localstack/helm-charts


text:
[bug] Localstack docker image started but not visible in docker

Using this version:  pive01/localstack-docker-extension:0.3.2
Used config:
LOCALSTACK_API_KEY=XXX, DEBUG=1, LOCALSTACK_VOLUME_DIR=/C/temp/localstack
When hitting the start button, I received all the INFO, DEBUG messages as toast notifications:

I can see that the docker image is started:

Running localstack status to get info if localstack is started:
localstack status

┌─────────────────┬───────────────────────────────────────────────────────┐
│ Runtime version │ 1.4.1.dev                                             │
│ Docker image    │ tag: latest, id: 48775529339f, 📆 2023-02-23T12:47:41 │
│ Runtime status  │ ✖ stopped                                             │
└─────────────────┴───────────────────────────────────────────────────────┘

Testing out if it works anyway.
awslocal docdb create-db-cluster --db-cluster-identifier fb231 --engine docdb
{
    "DBCluster": {
        "DBClusterIdentifier": "fb231",
        "DBClusterParameterGroup": "default.docdb",
        "Status": "available",
        "Endpoint": "localhost:38397",
        "MultiAZ": false,
        "Engine": "docdb",
        "Port": 38397,
        "MasterUsername": "test",
        "DBClusterMembers": [],
        "StorageEncrypted": false,
        "DBClusterArn": "arn:aws:rds:us-east-1:000000000000:cluster:fb231"
    }
}

If I check Docker Desktop Containers page if the container is running it's not mentioned there. Only the docdb image is visible.

Logs:

LocalStack version: 1.4.1.dev
LocalStack Docker container id: 1a1f007cd964
LocalStack build date: 2023-02-23
LocalStack build git hash: 4be57540

Starting DNS servers (tcp/udp port 53 on 0.0.0.0)...
Ready.

2023-02-24T12:33:29.996  INFO --- [  MainThread] l.extensions.platform      : loaded 0 extensions
2023-02-24T12:33:30.003  INFO --- [  MainThread] botocore.credentials       : Found credentials in environment variables.
2023-02-24T12:33:30.042  WARN --- [-functhread5] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.042  WARN --- [-functhread5] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.049  INFO --- [-functhread5] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-02-24T12:33:30.049  INFO --- [-functhread5] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-02-24T12:33:30.070  WARN --- [-functhread6] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.070  WARN --- [-functhread6] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.070  INFO --- [-functhread6] hypercorn.error            : Running on https://0.0.0.0:443 (CTRL + C to quit)
2023-02-24T12:33:30.070  INFO --- [-functhread6] hypercorn.error            : Running on https://0.0.0.0:443 (CTRL + C to quit)
2023-02-24T12:35:27.076  INFO --- [   asgi_gw_0] botocore.credentials       : Found credentials in environment variables.
2023-02-24T12:35:27.278  INFO --- [functhread27] l.services.docdb.docdb_api : Starting Document DB instance on port 38397
2023-02-24T12:35:29.718  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS rds.CreateDBCluster => 200

Thanks, @MarcelStranak ..... I think you don't see it because you have an option disabled ...can you go to Settings >Extensions > Show Docker Extensions system container and give it another try? (Should add this in the doc or somewhere)....Also, the DEBUG=1 toasts need to be addressed 😅

Thanks. I was able to activate it and see the containers.

I noticed I have this log message in there:

Anyhow, I can confirm that the image is working. It still seems to be a problem if you are also using LocalStack CLI and try to use for example localstack status and it does not work.

I have also noticed that the Logs and the Status are also working.

repo: localstack/localstack-docker-extension


text:
Select map features/plugins from form control upon chart creation

Overview
Make it so that users who create the chart can choose which features/plugins (legend, radius, drivetime, etc.) to include in the visualization.
UI
Done via a multi-select dropdown

Resolved in dfedfa06c3f1c02fd0db2eac6718e2b2cc80a4df

repo: locationiqdata/superset


text:
Document GeoTrellis write example

See raster-write.html#geotrellis-layers
Related possibly #206

Also need a real "read" example.

authors: metasim vpipkt

repo: locationtech/rasterframes


text:
Create dependency from multicontact library

In GitLab by @proyan on Jan 31, 2019, 13:33
I propose to create a dependency with the multicontact library available here https://gepgitlab.laas.fr/loco-3d/multicontact-api. This will enable us to use the same contactphase definition that is being used for the centroidal problem.

In GitLab by @proyan on Jan 31, 2019, 13:43
Although one problem would be that the package is still using Pinocchio1.0
Could you please let us know if you are moving the package to Pinocchio2.0 @jcarpent

In GitLab by @proyan on Jan 31, 2019, 13:54
Never mind. It was just a namespace issue. Solved via https://gepgitlab.laas.fr/loco-3d/multicontact-api/merge_requests/1

In GitLab by @proyan on Jan 31, 2019, 13:54
closed

In GitLab by @proyan on Jan 31, 2019, 14:39
reopened

In GitLab by @nmansard on Feb 1, 2019, 09:47
Excellent, I plus it.

In GitLab by @cmastalli on Feb 2, 2019, 08:10
I'm not sure about it. It's like asking to include a package for kkt dynamics.
In contrast, contact phase definition isn't bit deal to do it. Adding dependencies that aren't strictly necessary isn't good software practice.
You might want to explain why it's needed this, rather than having our internal definitions.

In GitLab by @nmansard on Feb 2, 2019, 11:16
I agree we should discuss it. The MCAPI is there to represent locomotion problem. It is now the standard API for loco3d problems (contact planning, centroidal optimization). It is only an API with a simple struct to store the sequence of contact, nothing bad. And it will be needed to connect with TimeOpt that we need to do.
We might have it as a conditional dependency that is very simple to do in python:
try: import multicontact_api
assert: print('You don't have multicontact_api, install it with apt get ...'
:)

In GitLab by @proyan on Feb 4, 2019, 13:38
I'll close this issue. Thanks for the discussion.

In GitLab by @proyan on Feb 4, 2019, 13:38
closed


text:
Incorrect output for cargo loco generate controller guide -k api

Description
Per doc, https://loco.rs/docs/getting-started/guide/ , running the following command:
cargo loco generate controller guide -k api
should generate the controller body seen below:
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;

pub async fn echo(req_body: String) -> String {
    req_body
}

pub async fn hello(State(_ctx): State<AppContext>) -> Result<Response> {
    // do something with context (database, etc)
    format::text("hello")
}

pub fn routes() -> Routes {
    Routes::new()
        .prefix("guide")
        .add("/", get(hello))
        .add("/echo", post(echo))
}

'What was generated by the loco_cli in guide.rs is the following code:
   #![allow(clippy::missing_errors_doc)]
   #![allow(clippy::unnecessary_struct_initialization)]
   #![allow(clippy::unused_async)]
   use loco_rs::prelude::*;
   use axum::debug_handler;

   #[debug_handler]
   pub async fn index(State(_ctx): State<AppContext>) -> Result<Response> {
       format::empty()
   }

   pub fn routes() -> Routes {
       Routes::new()
           .prefix("guides/")
           .add("/", get(index))
   }

To Reproduce
I ran the command rust cargo loco generate controller guide -k api in the myapp directory.
Below are the entries in Cargo.toml:
[workspace]

[package]
name = "myapp"
version = "0.1.0"
edition = "2021"
publish = false
default-run = "myapp-cli"

[dependencies]

loco-rs = { version = "0.10.1" }
migration = { path = "migration" }

serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1.33.0", default-features = false }
async-trait = "0.1.74"
tracing = "0.1.40"
chrono = "0.4"
validator = { version = "0.18" }
sea-orm = { version = "1.0.0", features = [
  "sqlx-sqlite",
  "sqlx-postgres",
  "runtime-tokio-rustls",
  "macros",
] }

axum = "0.7.5"
include_dir = "0.7"
uuid = { version = "1.6.0", features = ["v4"] }
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] }
fluent-templates = { version = "0.8.0", features = ["tera"] }
unic-langid = "0.9.4"

[[bin]]
name = "myapp-cli"
path = "src/bin/main.rs"
required-features = []

[[bin]]
name = "tool"
path = "src/bin/tool.rs"
required-features = []

[dev-dependencies]
serial_test = "3.1.1"
rstest = "0.21.0"
loco-rs = { version = "0.10.1", features = ["testing"] }
insta = { version = "1.34.0", features = ["redactions", "yaml", "filters"] }

Expected Behavior
Within my src/controllers/guide.rs file, I expected to see the following:
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;

pub async fn echo(req_body: String) -> String {
    req_body
}

pub async fn hello(State(_ctx): State<AppContext>) -> Result<Response> {
    // do something with context (database, etc)
    format::text("hello")
}

pub fn routes() -> Routes {
    Routes::new()
        .prefix("guide")
        .add("/", get(hello))
        .add("/echo", post(echo))
}

Environment:
My OS is a Mac, which is up to date. Rust version is 1.81.0 (not nightly)
Additional Context
In order for me to proceed past this issue, I had to copy the expected output from the doc to my guide.rs.

Thanks,  indeed we need to update the docs to reflect the new controller generator (fixed now)

authors: jondot nagashi

repo: loco-rs/loco


text:
Remove user_classes_count from heartbeat payload

user_classes_count is already part of the stats payload so having it in the heartbeat payload is redundant and makes the payload larger.
TODO:

[ ] Add/update test to validate the content of the heartbeat payload

You should probably also remove these lines from runner.py (910-912):
                    user_classes_count = msg.data.get("user_classes_count")
                    if user_classes_count:
                        c.user_classes_count = user_classes_count

ok to merge? (you still have it marked as draft)

Yes

authors: cyberw mboutet

repo: locustio/locust


text:
Anthropic calls tools mid response. Streaming results in the tool call appearing in the message handler

Anthropic can call tools mid response. Streaming results in the tool call appearing in the message handler
Certainly, I'll consult the book for more details.
[ { "index": 1, "id": "toolu_04S4Y0K1aK5c3Uv0GlOKfkxW", "type": "function", "function": { "name": "Consult__Book", "arguments": "{"Query": "What was the title"}" } } ]The title was...
The behavior seems inconsistent. I'll see if I can generate a code sample to replicate it consistently.

Thanks for the report I might have encountered this too but thought this was an issue with the model. If you can create a sample to replicate it consistently, it would help with resolving the issue.

I haven't been able to consistently repo, but it does occur with OpenAI as well (very occasionally).

I will review the way we handle SSE. We might not currently use the "index" (of the event) sent from their side. That could cause the piece to be placed in the wrong spot.

@John117Coltrane could you please test 3.1.29 and check whether this update resolves the issue? I haven't been able to reproduce it after switching the sse implementation to be something more in line with the spec. 🙏🏻

OpenAI/Anthropic works flawlessly so far without the issue. I will continue to test. Thanks so much!

FYI other providers shouldn't be affected by the issue since they stream data as JSON directly.

repo: lofcz/LlmTornado


text:
Add v1.28 images for k0s & eks

Also updating images to latest releases for previous versions

Given that Kubernetes 1.25 is the currently oldest supported version (for the next three weeks), we can remove older versions from here.
I'm fine if we do that in another PR.

No that makes sense actually. Updated and removed the previous versions for all distros.

repo: loft-sh/utils


text:
Fix role syntax for newer ansible versions

Using success filter has been deprecated in favor of using the test.
Also updated meta to pass linters tests.

Thanks!


text:
Replace zeroMQ by tokio

This PR replaces the dependency on zeroMQ for message passing to and from the transactor. Since it uses the tokio crates, the communication is asynchronous in principle. But because the transactor is synchronized, it doesn't really add much. I guess the encoding/ decoding of objects is done concurrently at least.
The tests pass and it seems to work from my very light user testing. There's something weird going on with the TxReports, though. When adding new entities, the transactor doesn't report any new entity id's. It's especially weird since I didn't touch any of that (I think!). Does this behaviour sound familiar to you?
Oh and the reason the diff is so bloated is that we're using different versions of rustfmt I think. I'm on 0.9.0. If you tell me yours, I'll format it using that version so the diff only highlight the actual changes.

Hmmm, I seem to be on an old nightly locally. I'll update the PR.

Cool! I'll look this over. It looks like I'm on an older rustfmt (0.8.4) so I'll upgrade mine and push a formatting commit to master -- that should help the diff.

@marcusklaas hmm my formatting commit seems to have made things worse. But it looks good. If you can resolve the merge conflicts I'd be happy to merge it.

Rebased!

authors: loganmhb marcusklaas

repo: loganmhb/logos


text:
🛑 Ubuntu.com is down

In 04cfab1, Ubuntu.com (https://ubuntu.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ubuntu.com is back up in 85226f3 after 12 minutes.

repo: logiqbal/upstatus


text:
🛑 Gestión de Proyectos is down

In 7d5336d, Gestión de Proyectos (https://p.potus.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Gestión de Proyectos is back up in 0d1bd8a after 326 days, 20 hours, 50 minutes.


text:
No tests / Tests missing

Hi,
this plugin has no test at all, this is a situation that should be amended soon, so for example changes in both the plugin or the logstash core himself, are properly tested in the CI environment.
If you are giving this plugin some test, feel free to update https://github.com/elastic/logstash/issues/3740 so we keep track of it.

I am today working on this to add an integration test:

Start Logstash
Use the Eventlog Plugin
Ingest events to Elasticsearch

yay! thanks a lot @gmoskovicz

This is added in elastic/logstash#3994

@purbon added:
https://github.com/elastic/logstash/blob/testing/windows/test/windows/event_log/logstash_event_log_plugin_integration.ps1

authors: gmoskovicz purbon


text:
Improve error reporting when a timeout occurs

If a timeout occurs, today, the user is given a rather large dump from Rufus scheduler indicating an error with the real exception buried in the text. Making this error more precise "An error occurred because [reasons]" would be beneficial to users.

Fixed in 2.1

authors: jordansissel suyograo

repo: logstash-plugins/logstash-input-jdbc


text:
type declaration

vscode

Veutr does not support it. Use Volar.

solved

repo: logue/vite-vuetify-ts-starter


text:
Icon checkbox disappears when checked on ios

So I was creating a form and the mock called for a checkbox similar to what was available in your library (which by the way is awesome).
But when I tested it on my phone, the icons on the icon checkboxes will disappear when checked. This also happens on the github page for the library.
Was wondering if there is anything I can do to help.
This is the mark up

    <input type="checkbox" name="placeholders[]" value="[[+placeholder]]"  class="collapse-switch">

        [[+placeholder]]

I can add screenshots or screen recordings as well

@connor-wilson-dev having the same issue on iOS.
The issue is with p-smooth : seems the animation runs twice on iOS, resulting in a opacity: 0.0055445xxxx calculated in Safari DevTools.
Removing the p-smooth as a workaround for now until I find some documentation about this weird iOS behavior

+1
I've got the same issue in Safari on a Mac. Removing p-smooth solves the problem, too.
@superbiche Do you already found a solution? If not, look at this: https://stackoverflow.com/questions/44027294/unexpected-animation-behaviour-in-safari. It might be the same problem.

I found same issue in Safari on a Mac.

authors: connor-wilson-dev miladfm riede superbiche

repo: lokesh-coder/pretty-checkbox


text:
Update README.md

Hello Will, I hope you are having a good day. I have made a few small suggestions about how you could improve the grammatical structure of your GitHub's README.md file. Your project looks interesting and it intuitively makes sense to bring awareness to the user of where they may stutter and if there is a pattern to focus there attention on it to solve the issue there. I wish you the best of luck

@KettleLake  Hello!  thanks for this PR, I will check it out !
Really, thanks a lot for trying to improve, writing is my biggest problem(I can't write clearly) so, looking trough it right now!

Thanks a lot for the contribution! really, It means so much, have a GREAT week and a AMAZING day at you!
//Will.

I am glad to have helped. Have an amazing ### YEAR!!!

authors: KettleLake loneicewolf

repo: loneicewolf/AI-SNN


text:
Rm Nativo and Criteo tags

Removes directly deployed Nativo and Criteo tags.

** Do not merge before Tealium deployment**

repo: lonelyplanet/rizzo


text:
🛑 MAHO is down

In aefe3a0, MAHO (https://maho.jau.co.jp) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MAHO is back up in 0966fbd.

repo: longforme/longforme-uptime-monitor


text:
🛑 Northern Light is down

In 155a0b1, Northern Light (https://northernlight.jau.co.jp) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Northern Light is back up in 6af52f1.


text:
🛑 Northern Light is down

In 21e77b2, Northern Light (https://northernlight.jau.co.jp) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Northern Light is back up in 268ed65.


text:
[IMPROVEMENT] Improve the speed of replica rebuilding if it is somehow stopped and re-started

Is your improvement request related to a feature? Please describe (👍 if you like this request)
Improve the speed of replica rebuilding if it is somehow stopped (usually caused by unstable network or disk IO starvation) and re-started.
A disk file of the healthy replica is read by direct io (code) in current implementation. Hence, if the replica rebuilding somehow failed and restarted, the data will be read from disk again and cannot benefit from the host's page cache mechanism. Reading a disk file of the healthy replica should be not harmful, because the disk file is opened with RDONLY.
After a quick test, the restarted replica rebuilding can be improved by 50% .
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

On AWS EC2 machines, I cannot see the improvement as well. The improvement on Equinix machines is 35%.
After the rebuilding, the memory usage of the instance-manager-r is (`kubectl -n longhorn-system top pods)
instance-manager-r-78e63e75eb3bedb81a32e48d220dd6e8   5m           31192Mi

This might be scary to users. I plan to revert the improvement.
WDYT? @innobead

Verified on master-head (longhorn-engine 84da610). Following the test steps and observing the memory usage on each step, high memory usage in instance-manager-r like https://github.com/longhorn/longhorn/issues/5130#issuecomment-1427372975 won't happen:
(1) Create a 15 GiB volume with 2 replicas. The original memory usage is:
instance-manager-r-0b165eb6a49550ac97473a12c0045a78   1m           7Mi
instance-manager-r-790a4298a3ab3ecc966c0ab724302cbf   1m           7Mi
instance-manager-r-b951cffeead0a3cbc0b8db8e27a43bac   1m           7Mi

(2) Write 15GiB data and delete one of the 2 replicas. The replica rebuilding is triggered and started.
(3) When the rebuilding progress is 80%, the memory usage is:
instance-manager-r-0b165eb6a49550ac97473a12c0045a78   1m           9Mi
instance-manager-r-790a4298a3ab3ecc966c0ab724302cbf   724m         46Mi
instance-manager-r-b951cffeead0a3cbc0b8db8e27a43bac   800m         62Mi

(3) Delete the same replica again, the replica rebuilding is triggered and started again.
(4) When the rebuilding progress is 80% again, the memory usage is:
instance-manager-r-0b165eb6a49550ac97473a12c0045a78   1m           10Mi
instance-manager-r-790a4298a3ab3ecc966c0ab724302cbf   718m         48Mi
instance-manager-r-b951cffeead0a3cbc0b8db8e27a43bac   505m         61Mi

(5) After rebuilding completed and wait for a while, the memory usage is:
instance-manager-r-0b165eb6a49550ac97473a12c0045a78   1m           9Mi
instance-manager-r-790a4298a3ab3ecc966c0ab724302cbf   1m           35Mi
instance-manager-r-b951cffeead0a3cbc0b8db8e27a43bac   2m           41Mi

authors: derekbit yangchiu

repo: longhorn/longhorn


text:
[BUG] Backing image manager fails when SELinux is enabled

Describe the bug (🐛 if you encounter this issue)
When SELinux is enabled, backing-image-manager pods end up in a crash loop.
To Reproduce

Deploy an RKE2 cluster on Rocky 9.2. Do not disable SELinux (getenforce returns enforcing).
Run the Longhorn integration tests. (There is no doubt a much simpler recreate, but I haven't investigated this much yet.)
Observe that instead of being marked as FAILED, tests are marked as ERROR. This indicates something broken in the cluster itself (not just a test case failure).
Observe the below symptoms:

With kubectl access:
[rocky@ip-10-0-1-71 ~]$ kubectl get pod -n longhorn-system | grep backing
backing-image-manager-1050-1130                     0/1     Error               0          3s
backing-image-manager-1050-237b                     0/1     Error               0          3s
backing-image-manager-1050-b9da                     0/1     ContainerCreating   0          1s

[rocky@ip-10-0-1-71 ~]$ kubectl logs -n longhorn-system backing-image-manager-1050-1130
time="2023-06-12T21:55:45Z" level=fatal msg="Error running start command" error="cannot find disk config file /data/longhorn-disk.cfg: open /data/longhorn-disk.cfg: permission denied"

On a worker node:
[rocky@ip-10-0-2-113 ~]$ sudo ausearch -m AVC -ts recent
----
time->Mon Jun 12 21:56:24 2023
type=PROCTITLE msg=audit(1686606984.732:9363): proctitle=6261636B696E672D696D6167652D6D616E61676572002D2D6465627567006461656D6F6E002D2D6C697374656E00302E302E302E303A38303030002D2D73796E632D6C697374656E00302E302E302E303A38303031
type=SYSCALL msg=audit(1686606984.732:9363): arch=c000003e syscall=257 success=no exit=-13 a0=ffffffffffffff9c a1=c0001a07b0 a2=80000 a3=0 items=0 ppid=192769 pid=192885 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="backing-image-m" exe="/usr/local/bin/backing-image-manager" subj=system_u:system_r:container_t:s0:c576,c979 key=(null)
type=AVC msg=audit(1686606984.732:9363): avc:  denied  { read } for  pid=192885 comm="backing-image-m" name="longhorn-disk.cfg" dev="xvda5" ino=134481951 scontext=system_u:system_r:container_t:s0:c576,c979 tcontext=system_u:object_r:container_var_lib_t:s0 tclass=file permissive=0

Expected behavior
Backing image manager works fine.
Log or Support bundle
https://ci.longhorn.io/job/private/job/longhorn-tests-regression/4086
Environment

Longhorn version: v1.5.0-rc1
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): kubectl
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.27.2+rke2

Number of management node in the cluster: 1
Number of worker node in the cluster: 3

Node config

OS type and version: Rocky v9.2
CPU per node:
Memory per node:
Disk type(e.g. SSD/NVMe):
Network bandwidth between the nodes:

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): AWS
Number of Longhorn volumes in the cluster:

Additional context
I THINK this is how https://ci.longhorn.io/job/private/job/longhorn-tests-regression/4086/console is failing / failed. I will try to confirm when it is complete and I have a support bundle.

This should be day 1 issue. cc @longhorn/qa

cc @ChanYiLin

I THINK this is how https://ci.longhorn.io/job/private/job/longhorn-tests-regression/4086/console is failing / failed. I will try to confirm when it is complete and I have a support bundle.

There were two different issues causing this behavior. I am fixing one in https://github.com/longhorn/longhorn-tests/pull/1424, but this one causes similar behavior.

For some reason, this issue is NOT present when using k3s. It is only reproduceable when using RKE2.

Is it probably related to the policies installed differently by both distros?

I now understand what is causing this and am considering how to fix it.
Why did we only see it in RKE2 and not k3s?
This was a false negative. Even though the k3s install script includes container-selinux, SELinux must be explicitly enabled by some k3s configuration option. Without doing so, all k3s pods run with the spc_t (super privileged container) context, giving them extra, unexpected permissions. When SELinux is explicitly enabled, k3s fails in the exact what RKE2 does.
What is the root cause?
Here is the more complete audit log output:
*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that backing-image-manager should be allowed read access on the longhorn-disk.cfg file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'backing-image-m' --raw | audit2allow -M my-backingimagem
# semodule -X 300 -i my-backingimagem.pp

Additional Information:
Source Context                system_u:system_r:container_t:s0:c174,c229
Target Context                system_u:object_r:container_var_lib_t:s0
Target Objects                longhorn-disk.cfg [ file ]
Source                        backing-image-m
Source Path                   /usr/local/bin/backing-image-manager
Port                          <Unknown>
Host                          ip-10-0-2-129.us-east-2.compute.internal
Source RPM Packages
Target RPM Packages
SELinux Policy RPM            selinux-policy-targeted-38.1.11-2.el9_2.2.noarch
Local Policy RPM              selinux-policy-targeted-38.1.11-2.el9_2.2.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     ip-10-0-2-129.us-east-2.compute.internal
Platform                      Linux ip-10-0-2-129.us-east-2.compute.internal
                              5.14.0-284.11.1.el9_2.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Tue May 9 17:09:15 UTC 2023 x86_64
                              x86_64
Alert Count                   1
First Seen                    2023-06-15 14:40:44 UTC
Last Seen                     2023-06-15 14:40:44 UTC
Local ID                      381261be-0236-4a99-97fb-9b1360b22566

Raw Audit Messages
type=AVC msg=audit(1686840044.560:914114): avc:  denied  { read } for  pid=3401056 comm="backing-image-m" name="longhorn-disk.cfg" dev="xvda5" ino=76871079 scontext=system_u:system_r:container_t:s0:c174,c229 tcontext=system_u:object_r:container_var_lib_t:s0 tclass=file permissive=0

type=SYSCALL msg=audit(1686840044.560:914114): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=c0000407e0 a2=80000 a3=0 items=0 ppid=3401004 pid=3401056 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=backing-image-m exe=/usr/local/bin/backing-image-manager subj=system_u:system_r:container_t:s0:c174,c229 key=(null)

Hash: backing-image-m,container_t,container_var_lib_t,file,read

Because it is running from an unprivileged container, backing-image-manager has context container_t. Because the directory containing all Longhorn data was created by containerd, it and all of its children have context container_var_lib_t. The rule that ensures this looks like the following (though this part is a bit hazy).
[rocky@ip-10-0-2-129 lib]$ sesearch -T -s container_runtime_t -t var_lib_t
type_transition container_runtime_t var_lib_t:dir container_var_lib_t;

There is no rule to allow a process running as container_t to read container_var_lib_t files. On the other hand, there is such a rule for spc_t.
[rocky@ip-10-0-2-129 lib]$ sesearch -A -s container_t -t container_var_lib_t -c file -p read

[rocky@ip-10-0-2-129 lib]$ sesearch -A -s spc_t -t container_var_lib_t -c file -p read
allow files_unconfined_type file_type:file { append audit_access create execute execute_no_trans getattr ioctl link lock map mounton open quotaon read relabelfrom relabelto rename setattr swapon unlink watch watch_mount watch_reads watch_sb watch_with_perm write };

What do we do?
There are a number of very specific contexts that container_t is allowed to read from, but none of them are particularly useful, as the container runtime will be creating the /var/lib/longhorn/ directory for us.
In the long term, we can consider writing our own SELinux policy for Longhorn (though it will be difficult to deliver, as usually this is done in an RPM via a package manager).
In the short term, if we want backing-image-manager to run successfully on Longhorn, we will have to run it privileged.

This is a good analysis.
The diskPath is created by longhorn-manager via ns with contained, so this is a permission dependency. Since the longhorn manager is privileged, so does the backing image manager. This is the right fix for me.
/controller/backing_image_manager_controller.go#L862-L871
			Volumes: []v1.Volume{
				{
					Name: "disk-path",
					VolumeSource: v1.VolumeSource{
						HostPath: &v1.HostPathVolumeSource{
							Path: bim.Spec.DiskPath,
						},
					},
				},
			},

For longhorn-specific selinux policies, we could think about that if really needed in the future. However, the below ns selection would be a concern to impact what policies we should.
/vendor/github.com/longhorn/go-iscsi-helper/util/process.go#L55-L65
func GetHostNamespacePath(hostProcPath string) string {
	pf := NewProcessFinder(hostProcPath)
	containerNames := []string{DockerdProcess, ContainerdProcess, ContainerdProcessShim}
	for _, name := range containerNames {
		proc, err := pf.FindAncestorByName(name)
		if err == nil {
			return fmt.Sprintf("%s/%d/ns/", hostProcPath, proc.Pid)
		}
	}
	return fmt.Sprintf("%s/%d/ns/", hostProcPath, 1)
}

This also means the backing image function is not working from day 1 on SELinux enforced environment. @khushboo-rancher we need to review SELinux test case to cover this.
cc @longhorn/qa

@ejweber please remember to update the issue status accordingly when working on the issue.
Need to backport to 1.4 and 1.3.

@yangchiu Please help verify this to see if the issue has been fixed in the master and 1.5.

Verified pass on

longhorn master (longhorn-manager a3b16b)
longhorn v1.5.x (longhorn-manager d85f96)

In a Rocky Linux 9.2. rke2 cluster, perform test_backing_image.py, all test case passed on master and v1.5.x pipeline
In a Oracle Linux 8.6 k3s cluster, perform test_backing_image.py, all test case passed on master and v1.5.x as below
master

v.1.5.x

authors: chriscchien ejweber innobead


text:
Border Patrol needs documentation on public API for sessionx

this is just pure sadness at the moment

#31 closes this

repo: lookout/borderpatrol