text:
How does decoder work ?

Hello,
I am trying to use rosc from tokio. My first step is to decode and display incoming osc messages. I have made the server:
use rosc::decoder;
use rosc::{OscMessage, OscPacket};
use tokio::io::AsyncReadExt;
use tokio::net::TcpListener;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("start");
    let listener = TcpListener::bind("0.0.0.0:9000").await?;
    println!("listening");
    loop {
        match listener.accept().await {
            Ok((mut socket, addr)) => {
                println!("new client: {:?}", addr);

                println!("ready");
                tokio::spawn(async move {
                    let mut buf = [0; 1024];

                    // In a loop, read data from the socket and write the data back.
                    loop {
                        let _ = match socket.read(&mut buf).await {
                            Ok(n) if n == 0 => {
                                eprintln!("end tran");
                                return;
                            }
                            Ok(n) => {
                                println!("{:?}", &buf[..n]);
                                println!("read {} bytes", n);
                                match decoder::decode_tcp(&buf[..n]) {
                                    Ok((_, payload)) => {
                                        println!("{:?}", payload);
                                        return;
                                    }
                                    _ => {
                                    eprintln!("decoding error");
                                    return;
                                    }
                                }
                            }
                            Err(e) => {
                                eprintln!("failed to read from socket; err = {:?}", e);
                                return;
                            }
                        };
                    }
                });
            }
            Err(e) => eprintln!("could not get client: {:?}", e),
        }
    }
}

and a simple client inspired from documentation:
use rosc::encoder;
use rosc::{OscMessage, OscPacket, OscType};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpStream;
use tokio::time::{sleep, Duration};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let addr = "127.0.0.1:9000";
    let mut stream = TcpStream::connect(addr).await?;
    let osc_packet = OscPacket::Message(OscMessage {
        addr: "/greet/me".to_string(),
        args: vec![OscType::String("hi!".to_string())],
    });
    if let Ok(buf) = encoder::encode(&osc_packet) {
        println!("send packet");
        println!("{:?}", buf);
        stream.write_all(&buf).await?;
        println!("transmitted");
    }
    Ok(())
}

When the server receives the packet it seems to fail decoding it, and put everything in the left first  tuple element:
([47, 103, 114, 101, 101, 116, 47, 109, 101, 0, 0, 0, 44, 115, 0, 0, 104, 105, 33, 0], None)

I have made a little program to see what happens:
use rosc::{encoder,decoder};
use rosc::{OscMessage, OscPacket, OscType};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let osc_packet = OscPacket::Message(OscMessage {
        addr: "/greet/me".to_string(),
        args: vec![OscType::String("hi!".to_string())],
    });
    if let Ok(buf) = encoder::encode(&osc_packet) {
        println!("{:?}", buf);
        let payload = decoder::decode_tcp(&buf)?;
        println!("{:?}", payload);
    }
    Ok(())
}

got this output:
mik@debian:~/hello$ cargo run  --example test_decode
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/examples/test_decode`
[47, 103, 114, 101, 101, 116, 47, 109, 101, 0, 0, 0, 44, 115, 0, 0, 104, 105, 33, 0]
([47, 103, 114, 101, 101, 116, 47, 109, 101, 0, 0, 0, 44, 115, 0, 0, 104, 105, 33, 0], None)
mik@debian:~/hello$

I guess I missuse the api. I tried to find something to decode directly from a buffer in the API without succeed.

It works using decoder::decode_udp. Is it a feature ? Why not a decode function protocol agnostic ?

Hey @MikHulk !
The naming is a bit misleading, decode_tcp is actually protocol agnostic and just takes a byte slice to decode.
Other than that, I'm not sure at the moment why decode_tcp fails in the server.  Which rosc version are you using?

I tried to reproduce the issue with your example files, but the server is not compiling:
$ cargo build --bin server
   Compiling example v0.1.0 (/private/var/folders/mc/3ssj7_c51dv76d6ll79s5l3w0000gn/T/tmp.pmm1mYUl/example)
error[E0432]: unresolved import `tokio::io::AsyncReadExt`
 --> src/server/server.rs:3:5
  |
3 | use tokio::io::AsyncReadExt;
  |     ^^^^^^^^^^^------------
  |     |          |
  |     |          help: a similar name exists in the module: `AsyncRead`
  |     no `AsyncReadExt` in `io`

error[E0432]: unresolved import `tokio::net::TcpListener`
 --> src/server/server.rs:4:5
  |
4 | use tokio::net::TcpListener;
  |     ^^^^^^^^^^^^^^^^^^^^^^^ no `TcpListener` in `net`
  |
help: consider importing this struct instead
  |
4 | use std::net::TcpListener;
  |     ~~~~~~~~~~~~~~~~~~~~~

error[E0433]: failed to resolve: could not find `main` in `tokio`
 --> src/server/server.rs:6:10
  |
6 | #[tokio::main]
  |          ^^^^ could not find `main` in `tokio`

error[E0425]: cannot find function `spawn` in crate `tokio`
  --> src/server/server.rs:17:24
   |
17 |                 tokio::spawn(async move {
   |                        ^^^^^ not found in `tokio`
   |
help: consider importing this function
   |
1  | use std::thread::spawn;
   |
help: if you import `spawn`, refer to it directly
   |
17 -                 tokio::spawn(async move {
17 +                 spawn(async move {
   |

warning: unused imports: `OscMessage`, `OscPacket`
 --> src/server/server.rs:2:12
  |
2 | use rosc::{OscMessage, OscPacket};
  |            ^^^^^^^^^^  ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0752]: `main` function is not allowed to be `async`
 --> src/server/server.rs:7:1
  |
7 | async fn main() -> Result<(), Box<dyn std::error::Error>> {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` function is not allowed to be `async`

Some errors have detailed explanations: E0425, E0432, E0433, E0752.
For more information about an error, try `rustc --explain E0425`.
warning: `example` (bin "server") generated 1 warning
error: could not compile `example` due to 5 previous errors; 1 warning emitted
```

Hi @klingtnet
Sorry I should start with that this is my Cargo.toml:
[package]
name = "hello"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tokio = { version = "1.27.0", features = ["full"] }
rosc="0.10.0"

I looked into decode_tcp tests, ans it seems there is some prefdix added in order to build something onto decode_tcp can work.

I remembered what the problem is, if you decode OSC messages from a TCP stream then the OSC specification expects that the size of the message is the first element in the byte-stream:

In a stream-based protocol such as TCP, the stream should begin with an int32 giving the size of the first packet, followed by the contents of the first packet, followed by the size of the second packet, etc.

That's why decode_tcp has failed in your server, and why it's actually named decode_tcp and not just decode.  Of course, the doc string could be a bit more explicit and explain this.  I might add a note about this condition to the docs.

this is my rustc version:
mik@debian:~/hello$ cargo --version
cargo 1.69.0 (6e9a83356 2023-04-12)
mik@debian:~/hello$ rustc --version
rustc 1.69.0 (84c898d65 2023-04-16)
mik@debian:~/hello$

What was your setup when you try ?

It's
rustc 1.71.0-nightly (b628260df 2023-04-22

however, it worked with tokio = { version = "1.27.0", features = ["full"] }.
As explained in my previous message, this is not an issue with rosc.  So I'll close this issue if there's no objection from your side.

I remembered what the problem is, if you decode OSC messages from a TCP stream then the OSC specification expects that the size of the message is the first element in the byte-stream:

In a stream-based protocol such as TCP, the stream should begin with an int32 giving the size of the first packet, followed by the contents of the first packet, followed by the size of the second packet, etc.

That's why decode_tcp has failed in your server, and why it's actually named decode_tcp and not just decode. Of course, the doc string could be a bit more explicit and explain this. I might add a note about this condition to the docs.

humm ok. But I have a tcp connection here. If I follow the specification I should set this byte. Is there something to encode tcp packet ? I think I can implement that on my side. Just to be sure.
I didn't read extensively OSC specification, I am reading it right now. I am not sure if this byte is something from TCP or OSC.

no problem. I am looking specification.

Is there something to encode tcp packet ?

There's no method that does that for you, but it might be a good idea to add some utility function like encode_tcp to the API of rosc.

yes I have a local repo. I could do that.
For documentation this is the proper way to send Osc packet with tcp:
use rosc::encoder;
use rosc::{OscMessage, OscPacket, OscType};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpStream;
use tokio::time::{sleep, Duration};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let addr = "127.0.0.1:9000";
    let mut stream = TcpStream::connect(addr).await?;
    let osc_packet = OscPacket::Message(OscMessage {
        addr: "/greet/me".to_string(),
        args: vec![OscType::String("hi!".to_string())],
    });
    if let Ok(buf) = encoder::encode(&osc_packet) {
        println!("send packet");
        println!("{:?}", buf);
        stream.write_all(&(buf.len() as u32).to_be_bytes()).await?;
        stream.write_all(&buf).await?;
        println!("transmitted");
    }
    Ok(())
}

I'll try an implementation this weekend. Thank you !

authors: MikHulk klingtnet


text:
Anonymized DNSCrypt Support

Hello. Does your container support the new anonymized dnscrypt functionality?
I tried the most recent ARM image using anonymization witht the quad9 pri and alt DNScrypt servers but it gave an error.
Does the container need to be started with additional arguments or in a different way to use anonymization (like the official dnscrypt container). This is a link which may give you some info.
Thanks,
Adit

Hey @adit-s , can you provide your configuration file or at least the [anonymized_dns] block? It's not enabled by default in this image but as far as I can tell with the correct configuration it should work as per @jedisct1's instructions.

Hello Kyle. The dnscrypt-proxy.toml file I'm using is attached.
The intent is to use the primary and alternate quad9 filtering DNS servers (via DNSCrypt and not DoH); relayed via the two relays (from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/relays.md)

anon-cs-ca2
Anonymized DNS relay hosted in CA - Vancouver provided by https://cryptostorm.is/
sdns://gRMxNjIuMjIxLjIwNy4yMjg6NDQz

anon-ev-to
Anonymized DNS relay provided by evilvibes.com Location: Toronto, Canada
sdns://gQw2Ni44NS4zMC4xMTU

The container log follows:
[2020-06-24 22:49:59] [NOTICE] dnscrypt-proxy 2.0.44,
[2020-06-24 22:49:59] [NOTICE] Network connectivity detected,
[2020-06-24 22:49:59] [NOTICE] Now listening to 0.0.0.0:5053 [UDP],
[2020-06-24 22:49:59] [NOTICE] Now listening to 0.0.0.0:5053 [TCP],
[2020-06-24 22:49:59] [WARNING] /config/relays.md: open sf-eayecvbucnwm4pfj.tmp: permission denied,
[2020-06-24 22:49:59] [NOTICE] Source [relays] loaded,
[2020-06-24 22:50:00] [WARNING] /config/quad9-resolvers.md: open sf-nxogfglmym7uxc3m.tmp: permission denied,
[2020-06-24 22:50:00] [NOTICE] Source [quad9-resolvers] loaded,
[2020-06-24 22:50:00] [NOTICE] Anonymized DNS: routing [quad9-dnscrypt-ip4-filter-alt] via [sdns://gRMxNjIuMjIxLjIwNy4yMjg6NDQz sdns://gQw2Ni44NS4zMC4xMTU],
[2020-06-24 22:50:00] [NOTICE] Anonymized DNS: routing [quad9-dnscrypt-ip4-filter-pri] via [sdns://gRMxNjIuMjIxLjIwNy4yMjg6NDQz sdns://gQw2Ni44NS4zMC4xMTU],
[2020-06-24 22:50:00] [NOTICE] Firefox workaround initialized,
[2020-06-24 22:50:00] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 104ms,
[2020-06-24 22:50:00] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 104ms - additional certificate,
[2020-06-24 22:50:00] [WARNING] [quad9-dnscrypt-ip4-filter-alt] is incompatible with anonymization,
[2020-06-24 22:50:00] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 102ms,
[2020-06-24 22:50:00] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 102ms - additional certificate,
[2020-06-24 22:50:00] [WARNING] [quad9-dnscrypt-ip4-filter-pri] is incompatible with anonymization,
[2020-06-24 22:50:00] [ERROR] Resolver is incompatible with anonymization,
[2020-06-24 22:50:00] [NOTICE] dnscrypt-proxy is waiting for at least one server to be reachable,
[2020-06-24 22:50:10] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 32ms,
[2020-06-24 22:50:10] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 32ms - additional certificate,
[2020-06-24 22:50:10] [WARNING] [quad9-dnscrypt-ip4-filter-alt] is incompatible with anonymization,
[2020-06-24 22:50:10] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 24ms,
[2020-06-24 22:50:10] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 24ms - additional certificate,
[2020-06-24 22:50:10] [WARNING] [quad9-dnscrypt-ip4-filter-pri] is incompatible with anonymization,
[2020-06-24 22:50:20] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 28ms,
[2020-06-24 22:50:20] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 28ms - additional certificate,
[2020-06-24 22:50:20] [WARNING] [quad9-dnscrypt-ip4-filter-alt] is incompatible with anonymization,
[2020-06-24 22:50:20] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 101ms,
[2020-06-24 22:50:20] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 101ms - additional certificate,
[2020-06-24 22:50:20] [WARNING] [quad9-dnscrypt-ip4-filter-pri] is incompatible with anonymization,
[2020-06-24 22:50:30] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 31ms,
[2020-06-24 22:50:30] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 31ms - additional certificate,
[2020-06-24 22:50:30] [WARNING] [quad9-dnscrypt-ip4-filter-alt] is incompatible with anonymization,
[2020-06-24 22:50:30] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 32ms,
[2020-06-24 22:50:30] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 32ms - additional certificate,
[2020-06-24 22:50:30] [WARNING] [quad9-dnscrypt-ip4-filter-pri] is incompatible with anonymization,
[2020-06-24 22:50:40] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 116ms,
[2020-06-24 22:50:40] [NOTICE] [quad9-dnscrypt-ip4-filter-alt] OK (DNSCrypt) - rtt: 116ms - additional certificate,
[2020-06-24 22:50:40] [WARNING] [quad9-dnscrypt-ip4-filter-alt] is incompatible with anonymization,
[2020-06-24 22:50:40] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 101ms,
[2020-06-24 22:50:40] [NOTICE] [quad9-dnscrypt-ip4-filter-pri] OK (DNSCrypt) - rtt: 101ms - additional certificate,
[2020-06-24 22:50:40] [WARNING] [quad9-dnscrypt-ip4-filter-pri] is incompatible with anonymization,

dnscrypt-proxy.toml.zip

Hi!
This has nothing to do with the Docker image :)
As printed, Quad9 resolvers are currently incompatible with anonymization. This is not intentional, but a bug in the load-balancing software they are using.
The bug has been fixed, and the fix will be part of the next version of that software (dnsdist).

Thanks for the confirmation @jedisct1
I came to the same conclusion and opened a case with quad9. They haven't responded yet.
Can you clarify if quad9 is planning to support anonymization?
(Is that the bug you are referring to?)
Adit

@klutchell
I understand the original issue is not related to the Docker image.
Not related, but in the logs, there's the errors below. Is it a permissions, UID or other issue with how I'm running the image?
[WARNING] /config/quad9-resolvers.md: open sf-nxogfglmym7uxc3m.tmp: permission denied,
[WARNING] /config/relays.md: open sf-eayecvbucnwm4pfj.tmp: permission denied,

I'm assuming it's attempting to create those temp files in the /config folder but @jedisct1 can correct me if I'm wrong.
It looks like the warning is probably due to the limited default nobody user. Since you're mounting your /config directory then yes, it's likely the default UID does not have write access.
One test would be to change the permissions on your local config folder before mounting it. Try 777 to see if the warnings go away.
Another test you could try is running the container with --user 0 to see if the temp files get created. I wouldn't recommend leaving it in this mode but it might answer some questions.
I don't know if these warnings are actually breaking anything either?

Hello @klutchell
Changing the config directory's permission to allow writing by other corrected the problem. Thanks.

source: gharchive/issue

authors: adit-s jedisct1 klutchell

repo: klutchell/dnscrypt-proxy

license: MIT

license_type: permissive

license_source: github-api


text:
Remove extra dependencies

By including chai as a framework dependency, you're wiping out the settings of any frameworks that get set before it.
I think it's better to let people declare chai and sinon as dependencies/frameworks. Another alternative is to use karma-sinon instead of packaging sinon as a bower component. I think that'd be more natural.

I changed it so that the bundled chai (and sinon) only gets loaded if no other frameworks loads it before.

source: gharchive/pull-request

authors: hijonathan kmees

repo: kmees/karma-sinon-chai

license: mit

license_source: bigquery


text:
Support passing VERSION to docker when run make docker

What type of PR is this?

/kind enhancement
What this PR does / why we need it:
Now run make docker VERSION=x.y.z can be passed to builder container, and  kmesh-daemon version can show x.y.z
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

/approve

/lgtm
/approve

authors: YaoZengzeng hzxuzhonghu nlgwcy

repo: kmesh-net/kmesh


text:
Update sbt-sonatype to 3.9.14

Updates org.xerial.sbt:sbt-sonatype from 3.8.1 to 3.9.14.
GitHub Release Notes - Release Notes
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.xerial.sbt", artifactId = "sbt-sonatype" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "org.xerial.sbt", artifactId = "sbt-sonatype" }
}]

labels: sbt-plugin-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #63.

repo: kmizu/pegex


text:
[main] Upgrade to latest dependencies

Cron -knative-prow-robot
/cc knative-sandbox/eventing-writers
/assign knative-sandbox/eventing-writers
Produced by: knative-sandbox/knobots/actions/update-deps
Details:
bumping knative.dev/eventing 58865af...fd10179:
  > fd10179 Update community files (# 6320)
  > bb76b30 Update community files (# 6310)
  > 5accb7a Update actions (# 6303)
  > 2ff606c upgrade to latest dependencies (# 6307)
bumping knative.dev/hack 0e0784b...6ffd841:
  > 6ffd841 Update community files (# 168)
  > 02c525c Update community files (# 167)
bumping knative.dev/pkg 4d62e1d...75629c8:
  > 75629c8 Update community files (# 2487)
  > ca82d2b Add `NewProxyAutoTLSTransport` and `DialTLSWithBackOff` to support TLS proxy (# 2479)
  > e2b4d74 Update community files (# 2486)

/lgtm
/approve

authors: knative-automation lionelvillard

repo: knative-sandbox/eventing-awssqs


text:
Granting RBAC access for the leases

Signed-off-by: Matthias Wessendorf mwessend@redhat.com
Fixes #

Proposed Changes

fixing bug where the dispatcher is not working

Release Note

Docs

/lgtm

authors: devguyio matzew

repo: knative-sandbox/eventing-kafka


text:
Run tests against Istio HEAD

The Istio team is interested in us testing against their HEAD to ensure we catch issues that break us early. We can ensure maximum test coverage by running our tests against Istio HEAD. This should be straightforward by adding a new istio-head folder that installs istio from HEAD.
/cc @howardjohn @ZhiminXiang
/assign

We also want to have a test that runs a Istiod revision as a KNative service - so Istiod revisions can be scaled to zero and installed as easily as any knative service. That's assuming KNative is using a fixed/dedicated istiod ( or something else ), and the Istiods are  used by tenants or namespaces that want dedicated control plane revisions.
I have a set of changes to enable this mode, and Istio Env WG seems ok to evaluate this mode of istiod deployment.

We also want to have a test that runs a Istiod revision as a KNative service - so Istiod revisions can be scaled to zero and installed as easily as any knative service. That's assuming KNative is using a fixed/dedicated istiod ( or something else ), and the Istiods are  used by tenants or namespaces that want dedicated control plane revisions.
I have a set of changes to enable this mode, and Istio Env WG seems ok to evaluate this mode of istiod deployment.

From Istio perspective - the goal is to make sure Istio mater doesn't break something. Doesn't have to be Istio head or KNative head - nightly or weekly is fine, just faster than the ~3 month release cycle we have in Istio.

From Istio perspective - the goal is to make sure Istio mater doesn't break something. Doesn't have to be Istio head or KNative head - nightly or weekly is fine, just faster than the ~3 month release cycle we have in Istio.

Sure, that's one of the reasons we run against nightly.

Sure, that's one of the reasons we run against nightly.

What is the "nightly"? I thought there was istio-latest (ie 1.8.x) and istio-stable (1.7.x) - both are released versions. Running from HEAD would allow us to find breakages before we release something, rather than weeks after

What is the "nightly"? I thought there was istio-latest (ie 1.8.x) and istio-stable (1.7.x) - both are released versions. Running from HEAD would allow us to find breakages before we release something, rather than weeks after

cc @JRBANCEL , but I think this is this: https://github.com/knative-sandbox/net-istio/tree/master/third_party/istio-latest

cc @JRBANCEL , but I think this is this: https://github.com/knative-sandbox/net-istio/tree/master/third_party/istio-latest

My understanding is that we download and run CICD with the latest released istio whenever that is released on github.

My understanding is that we download and run CICD with the latest released istio whenever that is released on github.

Right, the desire is that if we send a commit to Istio master today, it would be first released in Istio 1.10 in ~4 months. it would be ideal to know today that we broke Knative (or improved :slightly_smiling_face: ), rather than 4 months from now

Right, the desire is that if we send a commit to Istio master today, it would be first released in Istio 1.10 in ~4 months. it would be ideal to know today that we broke Knative (or improved :slightly_smiling_face: ), rather than 4 months from now

OK, I guess it's nightly build of net-istio :) my misunderstanding.
Then, yeah — in total support 👍

OK, I guess it's nightly build of net-istio :) my misunderstanding.
Then, yeah — in total support 👍

authors: arturenault costinm howardjohn vagababov

repo: knative-sandbox/net-istio


text:
outdated istio api

I am currently using a DestinationRule with load balancer setting of LEAST_REQUEST which was introduced in Istio 1.14 (changelog)
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: demo-least-request
  namespace: istio-system
spec:
  host: '*.svc.cluster.local'
  trafficPolicy:
    loadBalancer:
      simple: LEAST_REQUEST       # enum not supported by net-istio

This is currently preventing reconciliation of ingress due to the following error:
failed to list *v1alpha3.DestinationRule: unknown value "LEAST_REQUEST" for enum istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB

Turns out that the dependency for istio api is not up to date.

/assign

This has been addressed - https://github.com/knative-sandbox/net-istio/pull/1016


text:
[master] Upgrade to latest dependencies

Produced via:
./hack/update-deps.sh --upgrade
./hack/update-codegen.sh

Cron. -knative-prow-robot
/cc knative-sandbox/source-wg-leads lberk
/assign knative-sandbox/source-wg-leads lberk

/ok-to-test
/lgtm
/approve

authors: knative-automation lberk

repo: knative-sandbox/sample-source


text:
Multitenant GithubSource

Fixes #1131
Still many missing things. I'm opening this PR to let people know I'm working on it and to get some early feedback.

Proposed Changes

Replace single-tenant GithubSource adapter by a multitenant adapter.
Create Webhook of the form host/ns/name

Release Note

Docs

Why this change?

/hold
The receive adapter should not update the status or reset it

/unhold

closing in favor of https://github.com/knative/eventing-contrib/pull/1297
/close

repo: knative/eventing-contrib


text:
chore: add unit test cases for instances

Changes

🧹 adds some tests checking expected error states for function instances, local and remote

/kind chore
Related: https://github.com/knative/func/issues/1275

/override codecov / patch

trying this out...
/override Codecov

Closing and reopening to see if codecov will behave

authors: lance psschwei

repo: knative/func


text:
controller package tests take over 12s to complete

Expected Behavior
Tests inside ./controller take less than 2s to complete.
Actual Behavior
They take about 12s to complete.
Steps to Reproduce the Problem
$ go test ./controller -count=1
ok      knative.dev/pkg/controller      12.590s

Additional Info
I noticed this while working on #1363, will investigate later.

/assign

Slow tests:

TestEnqueues (!)
TestEnqeueAfter (!!)
TestEnqeueKeyAfter (!!)
TestStartAndShutdownWithErroringWork (!!)
TestStartInformersFailure (!!)
TestRunInformersFailure (!!)
TestRunInformersEventualSuccess (!!)
TestImplGlobalResync (!!!)

Breakdown:
=== RUN   TestPassNew
--- PASS: TestPassNew (0.00s)
=== RUN   TestHandleAll
--- PASS: TestHandleAll (0.00s)
=== RUN   TestFilterWithNameAndNamespace
=== RUN   TestFilterWithNameAndNamespace/not_a_metav1.Object
=== RUN   TestFilterWithNameAndNamespace/nil
=== RUN   TestFilterWithNameAndNamespace/name_matches,_namespace_does_not
=== RUN   TestFilterWithNameAndNamespace/namespace_matches,_name_does_not
=== RUN   TestFilterWithNameAndNamespace/neither_matches
=== RUN   TestFilterWithNameAndNamespace/matches
--- PASS: TestFilterWithNameAndNamespace (0.00s)
    --- PASS: TestFilterWithNameAndNamespace/not_a_metav1.Object (0.00s)
    --- PASS: TestFilterWithNameAndNamespace/nil (0.00s)
    --- PASS: TestFilterWithNameAndNamespace/name_matches,_namespace_does_not (0.00s)
    --- PASS: TestFilterWithNameAndNamespace/namespace_matches,_name_does_not (0.00s)
    --- PASS: TestFilterWithNameAndNamespace/neither_matches (0.00s)
    --- PASS: TestFilterWithNameAndNamespace/matches (0.00s)
=== RUN   TestFilterWithName
=== RUN   TestFilterWithName/not_a_metav1.Object
=== RUN   TestFilterWithName/nil
=== RUN   TestFilterWithName/name_matches,_namespace_does_not
=== RUN   TestFilterWithName/namespace_matches,_name_does_not
=== RUN   TestFilterWithName/neither_matches
=== RUN   TestFilterWithName/matches
--- PASS: TestFilterWithName (0.00s)
    --- PASS: TestFilterWithName/not_a_metav1.Object (0.00s)
    --- PASS: TestFilterWithName/nil (0.00s)
    --- PASS: TestFilterWithName/name_matches,_namespace_does_not (0.00s)
    --- PASS: TestFilterWithName/namespace_matches,_name_does_not (0.00s)
    --- PASS: TestFilterWithName/neither_matches (0.00s)
    --- PASS: TestFilterWithName/matches (0.00s)
=== RUN   TestFilterGroupKind
=== RUN   TestFilterGroupKind/not_a_metav1.Object
=== RUN   TestFilterGroupKind/nil
=== RUN   TestFilterGroupKind/no_owner_reference
=== RUN   TestFilterGroupKind/wrong_owner_reference,_not_controller
=== RUN   TestFilterGroupKind/right_owner_reference,_not_controller
=== RUN   TestFilterGroupKind/wrong_owner_reference,_but_controller
=== RUN   TestFilterGroupKind/right_owner_reference,_is_controller
=== RUN   TestFilterGroupKind/right_owner_reference,_is_controller,_different_version
--- PASS: TestFilterGroupKind (0.00s)
    --- PASS: TestFilterGroupKind/not_a_metav1.Object (0.00s)
    --- PASS: TestFilterGroupKind/nil (0.00s)
    --- PASS: TestFilterGroupKind/no_owner_reference (0.00s)
    --- PASS: TestFilterGroupKind/wrong_owner_reference,_not_controller (0.00s)
    --- PASS: TestFilterGroupKind/right_owner_reference,_not_controller (0.00s)
    --- PASS: TestFilterGroupKind/wrong_owner_reference,_but_controller (0.00s)
    --- PASS: TestFilterGroupKind/right_owner_reference,_is_controller (0.00s)
    --- PASS: TestFilterGroupKind/right_owner_reference,_is_controller,_different_version (0.00s)
=== RUN   TestFilterGroupVersionKind
=== RUN   TestFilterGroupVersionKind/not_a_metav1.Object
=== RUN   TestFilterGroupVersionKind/nil
=== RUN   TestFilterGroupVersionKind/no_owner_reference
=== RUN   TestFilterGroupVersionKind/wrong_owner_reference,_not_controller
=== RUN   TestFilterGroupVersionKind/right_owner_reference,_not_controller
=== RUN   TestFilterGroupVersionKind/wrong_owner_reference,_but_controller
=== RUN   TestFilterGroupVersionKind/right_owner_reference,_is_controller
=== RUN   TestFilterGroupVersionKind/right_owner_reference,_is_controller,_wrong_version
--- PASS: TestFilterGroupVersionKind (0.00s)
    --- PASS: TestFilterGroupVersionKind/not_a_metav1.Object (0.00s)
    --- PASS: TestFilterGroupVersionKind/nil (0.00s)
    --- PASS: TestFilterGroupVersionKind/no_owner_reference (0.00s)
    --- PASS: TestFilterGroupVersionKind/wrong_owner_reference,_not_controller (0.00s)
    --- PASS: TestFilterGroupVersionKind/right_owner_reference,_not_controller (0.00s)
    --- PASS: TestFilterGroupVersionKind/wrong_owner_reference,_but_controller (0.00s)
    --- PASS: TestFilterGroupVersionKind/right_owner_reference,_is_controller (0.00s)
    --- PASS: TestFilterGroupVersionKind/right_owner_reference,_is_controller,_wrong_version (0.00s)
=== RUN   TestEnqueues
=== RUN   TestEnqueues/do_nothing
=== RUN   TestEnqueues/enqueue_key
=== RUN   TestEnqueues/enqueue_duplicate_key
=== RUN   TestEnqueues/enqueue_different_keys
=== RUN   TestEnqueues/enqueue_resource
=== RUN   TestEnqueues/enqueue_sentinel_resource
=== RUN   TestEnqueues/enqueue_duplicate_sentinel_resource
=== RUN   TestEnqueues/enqueue_bad_resource
=== RUN   TestEnqueues/enqueue_controller_of_bad_resource
=== RUN   TestEnqueues/enqueue_controller_of_resource_without_owner
=== RUN   TestEnqueues/enqueue_controller_of_resource_with_owner
=== RUN   TestEnqueues/enqueue_controller_of_deleted_resource_with_owner
=== RUN   TestEnqueues/enqueue_controller_of_deleted_bad_resource
=== RUN   TestEnqueues/enqueue_label_of_namespaced_resource_bad_resource
=== RUN   TestEnqueues/enqueue_label_of_namespaced_resource_without_label
=== RUN   TestEnqueues/enqueue_label_of_namespaced_resource_without_namespace_label
=== RUN   TestEnqueues/enqueue_label_of_namespaced_resource_with_labels
=== RUN   TestEnqueues/enqueue_label_of_namespaced_resource_with_empty_namespace_label
=== RUN   TestEnqueues/enqueue_label_of_deleted_namespaced_resource_with_label
=== RUN   TestEnqueues/enqueue_label_of_deleted_bad_namespaced_resource
=== RUN   TestEnqueues/enqueue_label_of_cluster_scoped_resource_bad_resource
=== RUN   TestEnqueues/enqueue_label_of_cluster_scoped_resource_without_label
=== RUN   TestEnqueues/enqueue_label_of_cluster_scoped_resource_with_label
=== RUN   TestEnqueues/enqueue_label_of_deleted_cluster_scoped_resource_with_label
=== RUN   TestEnqueues/enqueue_namespace_of_object
=== RUN   TestEnqueues/enqueue_label_of_deleted_bad_cluster_scoped_resource
--- PASS: TestEnqueues (1.31s)
    --- PASS: TestEnqueues/do_nothing (0.05s)
    --- PASS: TestEnqueues/enqueue_key (0.05s)
    --- PASS: TestEnqueues/enqueue_duplicate_key (0.05s)
    --- PASS: TestEnqueues/enqueue_different_keys (0.05s)
    --- PASS: TestEnqueues/enqueue_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_sentinel_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_duplicate_sentinel_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_bad_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_controller_of_bad_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_controller_of_resource_without_owner (0.05s)
    --- PASS: TestEnqueues/enqueue_controller_of_resource_with_owner (0.05s)
    --- PASS: TestEnqueues/enqueue_controller_of_deleted_resource_with_owner (0.05s)
    --- PASS: TestEnqueues/enqueue_controller_of_deleted_bad_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_namespaced_resource_bad_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_namespaced_resource_without_label (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_namespaced_resource_without_namespace_label (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_namespaced_resource_with_labels (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_namespaced_resource_with_empty_namespace_label (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_deleted_namespaced_resource_with_label (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_deleted_bad_namespaced_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_cluster_scoped_resource_bad_resource (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_cluster_scoped_resource_without_label (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_cluster_scoped_resource_with_label (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_deleted_cluster_scoped_resource_with_label (0.05s)
    --- PASS: TestEnqueues/enqueue_namespace_of_object (0.05s)
    --- PASS: TestEnqueues/enqueue_label_of_deleted_bad_cluster_scoped_resource (0.05s)
=== RUN   TestEnqeueAfter
--- PASS: TestEnqeueAfter (1.01s)
=== RUN   TestEnqeueKeyAfter
--- PASS: TestEnqeueKeyAfter (1.01s)
=== RUN   TestStartAndShutdown
--- PASS: TestStartAndShutdown (0.01s)
=== RUN   TestStartAndShutdownWithWork
--- PASS: TestStartAndShutdownWithWork (0.01s)
=== RUN   TestPermanentError
--- PASS: TestPermanentError (0.00s)
=== RUN   TestStartAndShutdownWithErroringWork
--- PASS: TestStartAndShutdownWithErroringWork (1.00s)
=== RUN   TestStartAndShutdownWithPermanentErroringWork
--- PASS: TestStartAndShutdownWithPermanentErroringWork (0.02s)
=== RUN   TestImplGlobalResync
--- PASS: TestImplGlobalResync (4.00s)
=== RUN   TestStartInformersSuccess
--- PASS: TestStartInformersSuccess (0.00s)
=== RUN   TestStartInformersEventualSuccess
--- PASS: TestStartInformersEventualSuccess (1.10s)
=== RUN   TestStartInformersFailure
--- PASS: TestStartInformersFailure (1.00s)
=== RUN   TestRunInformersSuccess
--- PASS: TestRunInformersSuccess (0.00s)
=== RUN   TestRunInformersEventualSuccess
--- PASS: TestRunInformersEventualSuccess (1.10s)
=== RUN   TestRunInformersFailure
--- PASS: TestRunInformersFailure (1.00s)
=== RUN   TestRunInformersFinished
--- PASS: TestRunInformersFinished (0.00s)
=== RUN   TestGetResyncPeriod
--- PASS: TestGetResyncPeriod (0.00s)
=== RUN   TestGetEventRecorder
--- PASS: TestGetEventRecorder (0.00s)
=== RUN   TestEnsureTypeMeta
=== RUN   TestEnsureTypeMeta/not_a_runtime.Object
=== RUN   TestEnsureTypeMeta/called_with_type_meta
=== RUN   TestEnsureTypeMeta/called_with_deleted_obj
--- PASS: TestEnsureTypeMeta (0.00s)
    --- PASS: TestEnsureTypeMeta/not_a_runtime.Object (0.00s)
    --- PASS: TestEnsureTypeMeta/called_with_type_meta (0.00s)
    --- PASS: TestEnsureTypeMeta/called_with_deleted_obj (0.00s)
=== RUN   TestNewStatsReporterErrors
--- PASS: TestNewStatsReporterErrors (0.00s)
=== RUN   TestReportQueueDepth
--- PASS: TestReportQueueDepth (0.00s)
=== RUN   TestReportReconcile
--- PASS: TestReportReconcile (0.00s)
PASS
ok      knative.dev/pkg/controller      12.671s

repo: knative/pkg


text:
Fix invalid creator or lastModifier annotations on core resources

When the admission request is for a resource with an empty string as
group, which happens on core resources, the creator or lastModifier
annotations are invalid since they become /creator or
/lastModifier.
This patch removes the / when group = "".
Signed-off-by: Pierangelo Di Pilato pierdipi@redhat.com
Fixes #2408

/assign @dprotaso

/lgtm
/approve

authors: dprotaso pierDipi


text:
Class constructor Client cannot be invoked without 'new' during migration rollback

Environment
Knex version: 0.21.15
Database + version: Pgsql 12
OS: Docker running linux
Bug
I am trying to run a migration rollback on a column against a Postgres table.
exports.down = knex => knex.schema
    .table('tablename', (table) => {
        table.dropColumns(
            table.boolean('default'),
            table.boolean('visible')
        );
    });

and for the love of me I am getting the following error
TypeError: Class constructor Client cannot be invoked without 'new'
    at Formatter.compileCallback (/app/node_modules/knex/lib/formatter.js:221:14)
    at Formatter.parseObject (/app/node_modules/knex/lib/formatter.js:253:31)
    at Formatter.wrap (/app/node_modules/knex/lib/formatter.js:181:21)
    at Formatter.parseObject (/app/node_modules/knex/lib/formatter.js:265:27)
    at Formatter.wrap (/app/node_modules/knex/lib/formatter.js:181:21)
    at Formatter.parseObject (/app/node_modules/knex/lib/formatter.js:265:27)
    at Formatter.wrap (/app/node_modules/knex/lib/formatter.js:181:21)
    at /app/node_modules/knex/lib/schema/tablecompiler.js:270:51
    at Array.map (<anonymous>)
    at TableCompiler_PG.TableCompiler.dropColumn (/app/node_modules/knex/lib/schema/tablecompiler.js:269:64)

And this is the complete debug error
Using environment: development
  knex:client acquired connection from pool: __knexUid1 +0ms
  knex:query select * from information_schema.tables where table_name = ? and table_schema = current_schema() undefined +0ms
  knex:bindings [ 'knex_migrations' ] undefined +0ms
  knex:client releasing connection to pool: __knexUid1 +35ms
  knex:client acquired connection from pool: __knexUid1 +2ms
  knex:query select * from information_schema.tables where table_name = ? and table_schema = current_schema() undefined +34ms
  knex:bindings [ 'knex_migrations_lock' ] undefined +34ms
  knex:client releasing connection to pool: __knexUid1 +6ms
  knex:client acquired connection from pool: __knexUid1 +2ms
  knex:query select * from "knex_migrations_lock" undefined +12ms
  knex:bindings [] undefined +11ms
  knex:client releasing connection to pool: __knexUid1 +10ms
  knex:client acquired connection from pool: __knexUid1 +2ms
  knex:query select "name" from "knex_migrations" order by "id" asc undefined +9ms
  knex:bindings [] undefined +9ms
  knex:client releasing connection to pool: __knexUid1 +31ms
  knex:client acquired connection from pool: __knexUid1 +4ms
  knex:query select * from "knex_migrations" where "batch" = (select max("batch") from "knex_migrations") order by "id" desc undefined +38ms
  knex:bindings [] undefined +38ms
  knex:client releasing connection to pool: __knexUid1 +8ms
  knex:tx trx2: Starting top level transaction +0ms
  knex:client acquired connection from pool: __knexUid1 +5ms
  knex:query BEGIN; trx2 +10ms
  knex:bindings undefined trx2 +12ms
  knex:query update "knex_migrations_lock" set "is_locked" = ? where "is_locked" = ? trx2 +8ms
  knex:bindings [ 1, 0 ] trx2 +7ms
  knex:query COMMIT; trx2 +4ms
  knex:bindings undefined trx2 +5ms
  knex:tx trx2: releasing connection +22ms
  knex:client releasing connection to pool: __knexUid1 +23ms
  knex:client acquired connection from pool: __knexUid1 +10ms
  knex:query select max("batch") as "max_batch" from "knex_migrations" trx2 +22ms
  knex:bindings [] trx2 +21ms
  knex:client releasing connection to pool: __knexUid1 +6ms
  knex:tx trx3: Starting top level transaction +23ms
  knex:client acquired connection from pool: __knexUid1 +6ms
  knex:query BEGIN; trx3 +11ms
  knex:bindings undefined trx3 +11ms
  knex:query ROLLBACK trx3 +13ms
  knex:bindings undefined trx3 +14ms
  knex:tx trx3: releasing connection +19ms
  knex:client releasing connection to pool: __knexUid1 +40ms
migration file "20210109184809_add_bank_default.js" failed
migration failed with error: Class constructor Client cannot be invoked without 'new'
  knex:client acquired connection from pool: __knexUid1 +3ms
  knex:query update "knex_migrations_lock" set "is_locked" = ? trx3 +29ms
  knex:bindings [ 0 ] trx3 +27ms
  knex:client releasing connection to pool: __knexUid1 +6ms
TypeError: Class constructor Client cannot be invoked without 'new'
    at Formatter.compileCallback (/app/node_modules/knex/lib/formatter.js:221:14)
    at Formatter.parseObject (/app/node_modules/knex/lib/formatter.js:253:31)
    at Formatter.wrap (/app/node_modules/knex/lib/formatter.js:181:21)
    at Formatter.parseObject (/app/node_modules/knex/lib/formatter.js:265:27)
    at Formatter.wrap (/app/node_modules/knex/lib/formatter.js:181:21)
    at Formatter.parseObject (/app/node_modules/knex/lib/formatter.js:265:27)
    at Formatter.wrap (/app/node_modules/knex/lib/formatter.js:181:21)
    at /app/node_modules/knex/lib/schema/tablecompiler.js:270:51
    at Array.map (<anonymous>)
    at TableCompiler_PG.TableCompiler.dropColumn (/app/node_modules/knex/lib/schema/tablecompiler.js:269:64)

Any help will be greatly appreciated.

@cozzbie What was the issue?

@cozzbie What was the issue?

@kibertoad if you take a look at the syntax I was passing the wrong types into the dropColumns function. I should have been passing strings instead
// Wrong
exports.down = knex => knex.schema
    .table('tablename', (table) => {
        table.dropColumns(
            table.boolean('default'), //Issue was here
            table.boolean('visible') //and here
        );
    });

// Right
exports.down = knex => knex.schema
    .table('tablename', (table) => {
        table.dropColumns(
           'default',
            'visible
        );
    });

@kibertoad if you take a look at the syntax I was passing the wrong types into the dropColumns function. I should have been passing strings instead
// Wrong
exports.down = knex => knex.schema
    .table('tablename', (table) => {
        table.dropColumns(
            table.boolean('default'), //Issue was here
            table.boolean('visible') //and here
        );
    });

// Right
exports.down = knex => knex.schema
    .table('tablename', (table) => {
        table.dropColumns(
           'default',
            'visible
        );
    });

authors: cozzbie kibertoad

repo: knex/knex


text:
Live-comment replay box is visible when no timestamped comments on video

The box is visible when there are no comments on the YouTube video the user is on -- a simple if condition can fix this.

Improved in 27f0819813cad74e906c9672562c57192e02727d as a graphic indicates that there's nothing to display in the live comment section. However, ideally the replay live comment box just never appears.
A bit complicated to just hide it because that will unsync and messup the settings config.


text:
Sometimes payload are mixed up with topic.

I use esp8266 to read values from an electricity meter and publish the data on MQTT in json format with PubSubClient library. When working for a long period of time, sometimes the data is incorrect, as shown in the example.
Topic:
application/24ff957f-c99e-4f15-ade2-f6ed792a1186/device/24e124468c481581/event/status
Example of the correct payload:
{"app_id":"24ff957f-c99e-4f15-ade2-f6ed792a1186","model":"PM3PRL","device_id":"PM3PRL-24E124468C481581-131","devEui":"24e124468c481581","slave_id":131,"time":"2023-09-02 16:18:06","error":0,"log":[{"key":"V_RMS_A","val":233.1},{"key":"I_RMS_A","val":0.0},{"key":"P_A","val": 0},{"key":"Q_A","val": 0},{"key":"S_A","val": 0},{"key":"PF_A","val":0.000},{"key":"WH_A","val":294624},{"key":"Freq_A","val":50.0},{"key":"Op_St","val":21},{"key":"V_RMS_B","val":233.9},{"key":"I_RMS_B","val":0.0},{"key":"P_B","val": 0},{"key":"Q_B","val": 0},{"key":"S_B","val": 0},{"key":"PF_B","val":0.000},{"key":"WH_B","val":1397},{"key":"Freq_B","val":50.5},{"key":"V_RMS_C","val":234.1},{"key":"I_RMS_C","val":0.0},{"key":"P_C","val": 0},{"key":"Q_C","val": 0},{"key":"S_C","val": 0},{"key":"PF_C","val":0.000},{"key":"WH_C","val":21420},{"key":"Freq_C","val":50.0},{"key":"SoftV","val":231}]}
Example of a payload during a problem:
{"app_id":"24ff957f-c99e-4f15-ade2-f6ed792a1186","model":"PM3PRL","device_id":"PM3PRL-24E124468C481581-131","devEui":"24e124468c481581","slave_id":131,"time":"2023-09-02 16:17:37","error":0,"log":[{"key":"V_RMS_A","val":232.8},{"key":0�Uapplication/24ff957f-c99e-4f15-ade2-f6ed792a1186/device/24e124468c481581/event/status{"app_id":"24ff957f-c99e-4f15-ade2-f6ed792a1186","model":"PM3PRL","device_id":"PM3PRL-24E124468C481581-133","devEui":"24e124468c481581","slave_id":133,"time":"2023-09-02 16:17:48","error":0,"log":[{"key":"V_RMS_A","val":234.6},{"key":"I_RMS_A","val":0.4},{"key":"P_A","val":98},{"key":"Q_A","val":15},{"key":"S_A","val":99},{"key":"PF_A","val":0.987},{"key":"WH_A","val":85564},{"key":"Freq_A","val":50.0},{"key":"Op_St","val":21},{"key":"V_RMS_B","val":234.5},{"key":"I_RMS_B","val":0.0},{"key":"P_B","val": 0},{"key":"Q_B","val": 0},{"key":"S_B","val
This problem occurs in MQTT broker or libraries?

Hi!
We have exactly the same problem. There is setBufferSize() function in the release version v2.8. We changed the default buffer size and now it seems to work fine. Maybe it's worth a try.

same here.
anyone a solution?

I am also having something that maybe its the same of this problem. In my case the message gets deliver with diferrent length of bytes. It seems to happen if you use bytes and low amount of data, maybe something wrong with the MQTT_MAX_HEADER_SIZE...

Something I notice, depending of the content in bytes of the message, the size of the delivery changes, example, if I send 23 bytes of 1, it will publish 40 bytes, if I publish 23 bytes of 200, it will publish 21 bytes.
If I publish 1 byte of anything, its crashing and dont send anything, in my case the esp32... very weard.

authors: ElectApp NMarton01 softwarecrash wagfeliz

repo: knolleary/pubsubclient


text:
Removed an unused variable

This variable causes builds to fail when using build flag -Werror

Any reason why this PR is not merged?

I believe @knolleary needs to accept this?

Yup - its in the ever growing backlog of work I have. Given the trivial nature, I'll merge it now. But I won't have time to cut a new release for a while.

Thanks!

@knolleary do you have any plans on making a new release with this fix? We're still getting this complier warning.

authors: Brandon2255p knolleary smartynov weinrank


text:
feat(stale.yml): update issue label and bot comment

This pull request simply updates the stale bots config file to use the new issue labels and added a bit more detail to the stale comment the bot posts.

Pull Request Test Coverage Report for Build 809

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 52.897%

Totals

Change from base Build 805:
0.0%

Covered Lines:
2341

Relevant Lines:
4390

💛  - Coveralls

repo: knsv/mermaid


text:
colored stack backtrace

it would be nice if the stack backtrace was colored, with stack frames that belong to the current crate being highlighted in some way (e.g. bold font)
color-eyre does this for example. (color-eyre also hides less relevant frames by default. I personally would like to avoid having to re-run the program with a different env var to see the complete stack backtrace because re-running the program (or making the program panic again) is relatively expensive: you need to re-flash the program, which takes a while.)

one die note– I think we should make sure to not overdo it and overwhelm our users with too much color because then the important info gets lost as well.
Maybe we could dial down the
  (HOST) INFO  flashing program (5.96 KiB)
  (HOST) INFO  success!

by making that a simple dimmed println instead?
    println!("flashing program ({:.02} KiB)".dimmed(), size as f64 / 1024.0);

authors: Lotterleben japaric

repo: knurling-rs/probe-run


text:
WIP So close yet so far

1st Query Script:
-- Use the kodb database
USE kodb;
-- Update the kind column based on the values from the remote database (1298) UPDATE k
SET k.kind = r.kind
FROM Item k
JOIN [1298].dbo.Item r ON k.Num = r.Num;
2nd query script to fix left over bardish (ITEM_CLASS_POLEARM)etc: UPDATE ITEM
SET Kind = 52
WHERE Kind = 100;
Use the provided skill userdata editor:
https://discord.com/channels/385253339971190794/1004036880444162089/1134510865496932412
Copy 1264 data\skills_magic_main_en.tbl and rename it to skills_magic_main.tbl
Copy 1264 Fx directory
TODO: Inbe4 ShitStorm of fixing every item kind on Ebenezer.
TODO: Figure out mage skills ice_target partparticle version 6 1 bool too much or less. (ReadFile(hFile, &m_bParticleYAxisFix, sizeof(bool), &dwRWC, NULL);)
Description
WIP Experimental branch help is needed with FX loading.
@Steve help needed......
💔Thank you!

ps mage userdata table:
nation 2
race 13
Class 209


text:
fix selectOptions on CheckList to use checkbox value instead of text

#539 fix:

ensure selectOptions method on CheckList compares passed values to the option value instead of its text

Codecov Report

Merging #543 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
+ Coverage   88.61%   88.63%   +0.02%
==========================================
  Files          39       39
  Lines        4470     4470
  Branches      312      313       +1
==========================================
+ Hits         3961     3962       +1
+ Misses        489      488       -1
  Partials       20       20

Impacted Files
Coverage Δ

src/modules/checkList.js
90.79% <100%> (+0.41%)
:arrow_up:

Continue to review full report at Codecov.

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

👍

authors: codecov-io koalyptus

repo: koalyptus/TableFilter


text:
fix(number-field): fix incrementing/decrementing of decimal values in some locales

Fixes #368
This implements the fix proposed in #368 as well as a few tests for formatting and incrementing/decrementing values in the German locale.

Awesome thanks for the fix!
I've merged it in #370.

Great! Thanks for merging it so quickly :)

repo: kobaltedev/kobalte


text:
replace  "/" to "" on expected file's path string when file.separato…

Windows でもテストが実行が成功するようにする
file.separatorが""のときにテスト比較用の結果ファイルにあるパスについて、"/"から""に書き換えてから比較する。
URL が http or https で始まっているときには変換対象としない。
="/about/" というURLがあったので、それも対象外にしているが、絶対パス指定で "/about/a.html" へのリンクがあった場合の対処はできていない。実際にはテスト対象ファイルにはそのようなURLは存在しないので、正規表現をあまり複雑にしないことを考え、問題ないのではないかと思われる。

Thanks!

authors: aeg yamkazu

repo: kobo/gaiden


text:
🛑 man.ovh is down

In 9252747, man.ovh (https://man.ovh) was down:

HTTP code: 0
Response time: 0 ms

Resolved: man.ovh is back up in 1a32e4c after 10 minutes.


text:
🛑 Audiobookshelf is down

In 71b9c4e, Audiobookshelf ($AUDIOBOOKS) was down:

HTTP code: 502
Response time: 3892 ms

Resolved: Audiobookshelf is back up in 5fbfc64 after 8 minutes.

repo: kockabence/upptime


text:
3D NFT Thumbnail Preview

What happened?
Following up on this: the issue is occurring again.
https://github.com/kodadot/nft-gallery/issues/6953
Please reproduce in steps
Following up on this: the issue is occurring again.
https://github.com/kodadot/nft-gallery/issues/6953
Expected Behavior
Following up on this: the issue is occurring again.
https://github.com/kodadot/nft-gallery/issues/6953
What browsers are you seeing the problem on?
Desktop Chrome
At which address did you encounter bug?
kodadot.xyz
Are you logged in?
None
Which wallet you are using?
PolkadotJS
At which chain did you encounter bug?
Kusama
Screenshots
Following up on this: the issue is occurring again.
https://github.com/kodadot/nft-gallery/issues/6953
Relevant log output
Following up on this: the issue is occurring again.

https://github.com/kodadot/nft-gallery/issues/6953

Payment link for reward
https://kodadot.xyz/ksm/transfer/?target=<My_Kusama_Address_check_https://github.com/kodadot/nft-gallery/blob/main/CONTRIBUTING.md#creating-your-ksm-address>
Code of Conduct

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

Reopened https://github.com/kodadot/nft-gallery/issues/6953

authors: vikiival ziga-hash

repo: kodadot/nft-gallery


text:
fix(cart): scroll position resetting & minor code cleanup

PR Type

[x] Bugfix
[ ] Feature
[ ] Refactoring

Context

[x] Closes #6629
[ ] Requires deployment <snek/rubick/worker>

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality

Optional

[ ] I've tested it at </ksm/collection>
[ ] I've tested PR on mobile
[ ] I've written unit tests 🧪
[ ] I've found edge cases

Did your issue had any of the "$" label on it?

[x] Fill up your DOT address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at 769abca
Refactored the code for opening the shopping cart modal from the navbar. Moved the logic and configuration from ShoppingCartModalConfig.ts and ShoppingCartButton.vue to Navbar.vue to improve code organization and performance.

🤖 Generated by Copilot at 769abca

ShoppingCartButton
Simpler, no more emit -
Autumn leaves falling

Hello! would it be possible to apply the same fix for NotificationBox since I'm not able to scroll after notification menu is open.
otherwise code lgtm

Here you go https://github.com/kodadot/nft-gallery/pull/6643

cc @kodadot/qa-guild

pay 20 usd

😍 Perfect, I’ve sent the payout
💵 $20 @ 5 USD/DOT ~ 4 $DOT
🧗 16UcV9V6nVvPYdHz98ymUKmNLkzjCEU5sbKJMi7hxYyTHjzR
🔗 0x65ebc5adbbfa963a38ada72884314b6766aa7454de87d32a7cfadf600c8bfb4d
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

problem still happens on mobile

problem still happens on mobile

Will check it out later and provide a fix for mobile.

authors: prury stephenjason89 vikiival yangwao


text:
Programatic drops

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Bugfix
[ ] Feature
[x] Refactoring

Needs QA check

@kodadot/qa-guild please review

Context

[x] Closes #7194
[ ] Requires deployment <snek/rubick/worker>

Did your issue had any of the "$" label on it?

[x] My DOT address: Payout

Screenshot 📸

[ ] My fix has changed UI

Copilot Summary

🤖 Generated by Copilot at f56cf48
No summary available (Limit exceeded: required to process 97572 tokens, but only 50000 are allowed per call)

🤖 Generated by Copilot at c5c0c36

Oh we're the crew of Kodadot, and we're sailing on the web
We're fetching drops and collections, from the useDrops hook
We're refactoring our components, to use the drop prop
And we're changing all the prefixes, from ahk to ahp

Could you please add the preview env to the cors header? @vikiival

Could you please add the preview env to the cors header? @vikiival

Updated ^-^

huge! looking forward to see this merged
pay 80 usd

😍 Perfect, I’ve sent the payout
💵 $80 @ 3.82 USD/DOT ~ 20.942 $DOT
🧗 16SjUbGKSdjCdWTy3NNT3JxbRVGGqD4mwkHpc6BD9U2Rp29Z
🔗 0x7d465f547af9806eedb3c32ed1c152c2f5e0537c650dd308788084c8d8b45100
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

AYE waifu gone?

AYE waifu gone?

It is as expected. cc @vikiival

AYE waifu gone?

It was just for the testing purposes

if i enter a page and click on drops on the navbar, drops don't load(or entering a drop and hitting the back button on browser), same as #7558

showing 0.9 DOT instead of 1 DOT

cycling trough examples not working properly

Berlin blockchain waifu drop fails when trying to mint

if i enter a page and click on drops on the navbar, drops don't load(or entering a drop and hitting the back button on browser), same as 🔧 drops watcheffect #7558

✅ Fixed

showing 0.9 DOT instead of 1 DOT

✅ 0.9 DOT is as expected.

cycling trough examples not working properly

This bug also occurs on the nuxt branch. I would make a separate issue for it.

Berlin blockchain waifu drop fails when trying to mint

It happens in canary env also. After some research, I found there are some errors on-chain. @vikiival Could you please take a look?
https://assethub-polkadot.subscan.io/account/15CoYMEnJhhWHvdEPXDuTBnZKXwrJzMQdcMwcHGsVx5kXYvW

Yup account is out of balance :) i will pass some tokens to it

It happens in canary env also. After some research, I found there are some errors on-chain. @vikiival Could you please take a look?

Updated with 60 DOT :)

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed
Dot drop working ✔

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

Maybe because 1 per addr rule?

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

Maybe because 1 per addr rule?

tried with fresh account

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

We should open issue for more friendly errors ^-^

authors: Jarsen136 prury vikiival yangwao


text:
Loads of very useful ModbusTCP parameters, like a dream

By chance I dedected a bunch of new parameters in the ModbusTCP description for the IDM heatpump. This should give us a lot more possibilities:
You can check the values and addresses yourself by activating the "Service-Ebene", and then
Service - Gebäudeleittechnik - GLT Monitor
In here you see following new, (not yet described) parameters, even some of them for writing:

ID 76 Leistung E-Heizstab, RW reading and writing, not sure what is that for
ID 82 Hausverbrauch RW, that may activate us the statistics in the IDM GUI, worth to try
ID 84 Batterieentladung RW
ID 86 Batterie Füllstand RW ,,, All this values may give us the activation of IDM statistics, I want to try...

and now the very important parameters:

ID 4108 Leistungsbegrenzung Wärmepumpe RW, o my God, this is the desired value; I need this to write. I lack of the unit, but guess kW, because all other power values are in kW.
ID 4112 Leistungsbegrenzung Kaskade RW, no I do not have a "Kaskade" but may be useful for somebody.
ID 4124 elektrische Gesamtleistung, no idea why it is there again, worth to check. will observe and report. Probably only if you have a Kaskade
ID 4126 thermische Leistung no idea why this is there again, the original ID was 1790

I think the ID 4108 Leistungsbegrenzung and ID 82, 84 and 86 are gamechangers...

Interesting, I will take a look as soon as I find some time to work on the integration.

I could not wait and activiated my old modbus writing script.
It actually works and you get a lot more details in the IDM GUI. In the previous ModbusTCP integration you just had seen the overproduction and based on that, the heatpump activation more activities.
With the additional parameters, you got a full Photovoltaik-Integration in IDM. You see the battery, if you have one and your house power. Actually writing these values had been a little bit tricky, since I expected the usage differently.
So here my findings:
ID 76 Leistung E-Heizstab, RW reading and writing, not sure what is that for
... not tried, no idea what it is good for. Anybody an idea?
ID 82 Hausverbrauch RW,
Yes this is a float value, will be written like all other kW values for the PV production. Unit is kW.
This is actually the consuption including the heatpump. What the IDM GUI does, it substracts its own power consuption from that value and assigns the rest to the house. Be caseful to set this value including the consuption of the heatpump, since otherwise it reduces the power from its own consuption and the house consuption is 0.
ID 84 Batterieentladung RW
Is just used for the GUI and nice to see. It is not part of any IDM calculation, just used for statistics. Value is again a float in in kW
ID 86 Batterie Füllstand RW
This is an integer value (I just passed the value without converting to float). I think -1 is interpreted not to have a battery, and it will be removed from display and statistics. Otherwise it is the SOC (state of charge) in %. So valid parameters are from 0 to 100.
The very great thing is, once writing these values, there appear a lot more settings in the IDM GUI. You have now the possiblity to specify a minimum battery level for setting PV mode in IDM. Not exactly understood, how this works, but these values activates a lot more statistics and values in the IDM GUI. Really nice.
Have fun and I look forward to have it integrated here...

ID 76 Leistung E-Heizstab, RW reading and writing, not sure what is that for

Most (if not all) heat pumps have a resistive heating element to assist the actual heat pump in very cold weather (e.g. -10°C). So I guess reading the value tells you whether the heating element is in use. It is in kW and not a simple on/off value, since some IDM models (including mine) have multiple heating elements with different resistances (and therefore wattage), so the heat output can be regulated better.
Not sure what writing would do. Maybe you can manually enable the heating element, maybe it just limits the power, who knows. Without documentation, I don't think I will support writing this value in the integration.

ID 82 Hausverbrauch RW,
ID 84 Batterieentladung RW
ID 86 Batterie Füllstand RW

I added them to #50

yes exactly, I use the parameter of the battery with the excess of solar power. If I have surplus and the SOC is at least 30% I run an additional domestic hot water load for example.

Interesting, I will take a look as soon as I find some time to work on the integration.

By calling id86 I can correctly see the INT value of the battery charge. Great and trying it works

Great work. I will delete my modbus sensors to see soc percentage. Thanks

I will try, but I assume no change. Maybe that is linked to a special contract for your grid provider? Maybe a smart grid contract needs to be active? I am just guessing...

Just checked my previous tries. I already did what you proposed. So I have written 1200.0 to that register, without any success. Still ignored and nothing shown in the GLT Monitor. Further ideas?

Further ideas?

Nope sorry, you'll have to ask IDM how that parameter works.

Correct and thanks for support. I asked my iDM support today, to ask iDM the question about that parameters. My hope is very low they give an reasonable answer, as everything I asked till now, including detailed bug reports had been ignored. iDM no longer is touchable for customers, .... Let's see maybe we got surprised ;-)

I got a response, but the expected one. These parameters are only for iDM themselves. Nothing a user should know about.
Of course, thanks iDM for not helping us, like nowadays always....

Ah this issue can be closed, nothing else to do here...

New upgrade for IDM navigator
Release Notes_Nav_2.0_en.pdf

Cool Krasto82, where you got this document from? Do you have a reasonable contact to iDM, or you found it on internet?

@Krasto82 Very interested in the source.

Cool Krasto82, where you got this document from? Do you have a reasonable contact to iDM, or you found it on internet?

The pdf was shared with me by my installer. He told me that idm always sends a changelog to them when they release a new firmware

Did you got more files, or just the description file? The company name of the installer is Nothaft or a different company?

Only this file, the installer updated the firmware via OTA. Company Name of the installer is Valsolar located in Italy.

Ah finally a different contact. Will they forward requests to iDM? How helpful are they? I struggly a little bit with my contacts...

Ah finally a different contact. Will they forward requests to iDM? How helpful are they? I struggly a little bit with my contacts...

they are a local company and are in contact with idm italia.
If you want I'll leave you their website
https://valsolar.eu/

repo: kodebach/hacs-idm-heatpump


text:
Question: use only focus switch, not auto-layout?

I've lately come into situation where I only needed to switch between windows on the same desktop, but wished that chunkwm would not try to arrange them. I agree that's probably very rare for users of this tool.
But is there a way to configure chunkwm to leave window arrangement alone and only do things like, e.g., move focus to the window east-ward?
This is not a request to add this feature if there isn't.

This is currently not possible, no. I believe hammerspoon exposes an implementation in lua that allows you to do this, although I have not tested it: http://www.hammerspoon.org/docs/hs.window.html#focusWindowEast

Thanks for getting back to me so speedily, and for the advice. I think we can close this one! Thanks again!

authors: koekeishiya ralphholz-usyd

repo: koekeishiya/chunkwm


text:
Fullscreen windows break the space number when starting service with rule

Reproduce steps:

I have a builtin screen and external monitor, the builtin screen is set to be the main screen, and arranged at the left
the builtin screen holds spaces 1,2,3,4, and external screen holds 5,6,7,8
if there's a full screen window right after space 4, on the builtin screen
my .yabairc has rulesyabai -m config layout                       bsp
yabai -m config --space 1 layout             float
yabai -m config --space 2 layout             float
yabai -m config --space 7 layout             float
yabai -m config --space 8 layout             float

and run yabai --start-service
what is expected behavior: space 1,2,7,8 should be float, and 3,4,5,6 should be bsp
what is the actual behavior: space 6 becomes float, and space 8 becomes bsp

There might be some bugs counting the space numbers. For example, what first came up to me is that yabai might think the full screen window is space5, and space5->6, space6->7(which makes it float according to the rule), space7->8, and space8->9(which fall back into the default bsp). The space numbers I'm referring to are the ones determined by the OS and showing in the mission control interface under the thumbnails of the spaces.

This space ordering is intentional, because it needs to be possible to do yabai -m space --focus 7 to focus a native-fullscreen space.

authors: koekeishiya lethefrost

repo: koekeishiya/yabai


text:
type.d.ts

hello
thank you for this ausome library
i maked this file  react-nano-state.d.ts to be useful in my library
i want make a simple help for typescript
This file may be useful to you
type.d.ts
and thanks again
^_^

feel free to add it to https://github.com/DefinitelyTyped/DefinitelyTyped
thanks

feel free to add it to https://github.com/DefinitelyTyped/DefinitelyTyped
thanks

authors: ibrahemDev kof

repo: kof/react-nano-state


text:
Problems of Community

feedback on bug and issues

Added the mod in the existing world in 1.21, located it with commands, but upon teleporting or approaching to the location and its surroundings, the game kicks me out of the single player world and disappeared, only to solved by removing the current level.dat and replacing it with level.dat old. Creating a new world with the mod only to stuck at loading screen with 100% and unable to take a single glance of the world.

Is there a video of this happening?

I have a few screenshots of the error and other mods I've installed with the mod.
The Error :

Mods installed with your mod :

authors: Sublimehurdle kogtyv

repo: kogtyv/kogtyv-TAV


text:
pam_tally2 does not reset tally on successful login

When the PAM module pam_tally2 is in use, it tallies the login attempts, in order to lock out accounts after a sequence of consecutive failed attempts. It is supposed to reset the count after a successful login, but it uses calls to pam_setcred to know that the full PAM stack succeeded in pam_authenticate, and libpam4j does not call this.

Ran into this issue. Would you consider making a new patch release?
http://mvnrepository.com/artifact/org.kohsuke/libpam4j

authors: NilSet robrez


text:
Zuka

The TioAnime and Monoschinos code was migrated to the new implementation of the classes in the API, and the Monoschinos Jest test was added.
Next modification in the documentation:

Removed the letter option in the Monoschinos filter function.
Added last request to query for latest anime and episodes published. The request can receive one of the following options: episodes and animes

I've seen that the tests of TioAnime and Monoschinos cause an error. I made sure to have reinstalled node modules and having the newest commits. May you fix them? (The excedeed time taken for each test is only on my computer, cuz it's slow xd)

The changes have been applied 😎, my mistake I put to validate a name that does not correspond to the anime of the test xd 😂

Great job, Zuka 😃👍

authors: Zukaritasu barrientosvctor


text:
TypeError: Cannot read properties of undefined (reading 'id')

{
  messageId: '7291993637397281169',
  id: '7291993637397281169',
  elements: [ Element { type: 'text', attrs: [Object], children: [] } ],
  content: '我喜欢的队伍输了'
}

2023-10-20 18:59:33 [W] chat TypeError: Cannot read properties of undefined (reading 'id')
                            at Object.fromUniversal (D:\develop\koishi-dev\node_modules\koishi-plugin-messages\lib\message.js:62:40)
                            at SyncChannel.syncHistory (D:\develop\koishi-dev\node_modules\koishi-plugin-messages\lib\channel.js:74:60)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async SyncChannel._init (D:\develop\koishi-dev\node_modules\koishi-plugin-messages\lib\channel.js:121:13)
                            at async D:\develop\koishi-dev\node_modules\koishi-plugin-messages\lib\channel.js:41:17
                            at async SyncChannel.ensure (D:\develop\koishi-dev\node_modules\koishi-plugin-messages\lib\channel.js:54:20)

这是哪个平台的消息？按理说应该包含 user 的。

authors: idanran shigma

repo: koishijs/koishi-plugin-messages


text:
🛑 Leo Pizza is down

In f8ed517, Leo Pizza (https://leo-pizzaservice.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Leo Pizza is back up in f701d0b after 9 minutes.

repo: koko-io/up


text:
iCloud Photo Not Displaying

Good evening!  I have been trying to configure this module to work with my public iCloud Photos album for a few days now (off and on).  I have not been successful in getting the source to work for it.  When I use Bing or Chromecast as the source, it works great!
This is likely user error, but I would greatly appreciate any help you are able to provide!
I've tried the following for the source line:
source: "icloud:https://www.icloud.com/sharedalbum/<assigned#>" - This give me a black screen
source: "https://www.icloud.com/sharedalbum/<assigned#>" - This give me a black screen
source: "icloudphoto:https://www.icloud.com/sharedalbum/<assigned#>" - This defaults back to bing
source: "icloudphotos:https://www.icloud.com/sharedalbum/<assigned#>" - This defaults back to bing
Entire Module for reference:
modules: [
{//https://github.com/kolbyjack/MMM-Wallpaper
module: "MMM-Wallpaper",
position: "fullscreen_below",
config: {
source: "icloud:https://www.icloud.com/sharedalbum/<assigned#>",
filter: "grayscale(0.5) brightness(0.5)",
orientation: "auto",
crossfade: true,
updateInterval: 60 * 60 * 1000,
slideInterval: 5 * 60 * 1000 // Change slides every minute
}
},

It should be just be icloud:<assigned#>

That worked! Just for reference, the iCloud link had a # sign starting that specific code.  I tried it with the # sign and it dit not work.  I removed it and it did!  This just made my weekend!  Thanks!

Where can I get the Assigned ID please? I can not find it anywhere. Thanks

I got it. Thanks

For assigned ID, you have to use a Mac device and open Photos. There you can identify the shared folder and the ID will be embedded on the URL when you view the shared album on a browser. The ID is the number following the # symbol.

authors: JEHIVES geekqq kolbyjack vatonerd

repo: kolbyjack/MMM-Wallpaper


text:
Audit / Access Logging

I'm finding the logging for fleet is inadequate for diagnosing / tracking down issues, so I'd like to request adding additional info to fleet's logs.
For each action taken by users, supplement with the following fields:

user id (to see who performed the action)
IP address (w/ X-Forwarded-For handling) for better access logs
endpoint / full URL
method (GET, POST, DELETE, etc)

Additionally for distributed queries in particular:

actual queries that were run
the target / count of hosts that will run the query (something like: "targets": [0, 3, 13] or maybe "target_count": 1600)

Addressed by #2155

repo: kolide/fleet


text:
🤖 patch: make it more like terminal, when we enter without anything! ++ Fix unthemed scrollbar

before

after

before (unthemed scrollbar ) looks awfull, fixed now

squash

awww fkk

You can add the styles to styles.css

Sorry :/

repo: kom-senapati/KomPortfolioShell


text:
Create a hook for admin validation

Perhaps create a new config setting that takes a function that is passed the UserID and the DocumentId  and can be used to validate whether or not a user has admin privileges to edit/remove the comment.  This way administrators could remove offensive content.  I will be working on this today in my own build, and am happy to submit a pull request if you are interested in incorporating the feature.

Added the functionality described above in Pull Request #77

Awesome, will have a look at this next week!

I'm closing this as there's basic comment moderation now available. Very thankful for the implementation you have provided though.

authors: matteodem oohaysmlm

repo: komentify/meteor-comments-ui


text:
Hover over @editorjs/table trigger mutationDebouncer

On hover action the column and row creator toolbars show and hide causing the attribute mutation. I have added exclusion for this toolbar's class.

Grettings @applegrew
Could you please provide us a sandbox where you test this code, we were testing your implementation, and couldn't make it works, maybe some additional context could help us chek this PR.
Best regards.

@applegrew Thanks for your Pull Request, it is available editorjs-undo v2.0.4. Best regards.

repo: kommitters/editorjs-undo


text:
Upgraded stellar_base dependency to v0.8.7

We need to upgrade the stellar_base dependency to the v0.8.7 version in order to have the latest changes and bug fixes.

Pull Request Test Coverage Report for Build 41e0843ee9fcd5cd98507671d99c86a4697f0107-PR-257

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 99.745%

Totals

Change from base Build 9e9b50f31e5f915ef41eedbb1970e35c0709d96c-PR-256:
0.0%

Covered Lines:
1174

Relevant Lines:
1177

💛  - Coveralls

Pull Request Test Coverage Report for Build 41e0843ee9fcd5cd98507671d99c86a4697f0107-PR-257

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 99.745%

Totals

Change from base Build 9e9b50f31e5f915ef41eedbb1970e35c0709d96c-PR-256:
0.0%

Covered Lines:
1174

Relevant Lines:
1177

💛  - Coveralls

authors: CristhianRodriguezMolina coveralls


text:
Repository page basic UI

Implement Repository page basic UI

[ ] The title of my pull request is a short description of the changes
[ ] This PR relates to some issue: #286

@chad11111
repository page basic UI is ready

repo: komodorio/helm-dashboard


text:
Paper: DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction

DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
Summary by Copilot

DIN-SQL stands for Decomposed In-Context Learning of Text-to-SQL with Self-Correction. It is a method that breaks down the text-to-SQL task into multiple steps and feeds the intermediate results to LLMs to improve their performance and accuracy¹².
Text-to-SQL is a challenging task that aims to translate natural language utterances into SQL queries that can be executed on a relational database. For example, given the utterance "find employees who make more than their managers" and the schema of tables, one may want to generate a query in SQL that retrieves those employees from a database¹².
LLMs are pre-trained neural models that can generate natural language and code based on a given context or prompt. Examples of LLMs are GPT-4, CodeX, and BART¹². LLMs can perform text-to-SQL tasks using zero-shot or few-shot prompting, which means they do not require any fine-tuning or additional training data¹².
Self-Correction is a technique that allows LLMs to correct their own mistakes by comparing the generated SQL query with the natural language utterance and the database schema. If there is a mismatch, the LLM can revise the query until it matches the intended meaning¹².
The paper claims that DIN-SQL outperforms existing methods on two text-to-SQL benchmarks: Spider and BIRD. On the Spider dataset, DIN-SQL achieves an execution accuracy of 85.3%, surpassing the previous state-of-the-art of 79.9%. On the BIRD dataset, DIN-SQL achieves an execution accuracy of 55.9%, setting a new state-of-the-art¹².
The paper was submitted to NeurIPS 2023, a prestigious conference on neural information processing systems¹. The paper is available on arXiv¹ and GitHub³.

Summary: DIN-SQL is a novel method for generating SQL queries from natural language using large language models and self-correction. It achieves state-of-the-art results on two text-to-SQL benchmarks. The paper is submitted to NeurIPS 2023 and can be accessed online.
reference
Source: Conversation with Bing, 2/28/2024
([1](https://arxiv.org/abs/2304.11015)) DIN-SQL: Decomposed In-Context Learning of Text-to-SQL .... https://arxiv.org/abs/[2](https://ar5iv.labs.arxiv.org/html/2304.11015)304.11015.
(2) DIN-SQL: Decomposed In-Context Learning of Text-to-SQL .... https://ar5iv.labs.arxiv.org/html/2304.[1](https://arxiv.org/abs/2304.11015)1015.
(3) GitHub - madhup-google/DIN-SQL: https://arxiv.org/pdf/[2](https://ar5iv.labs.arxiv.org/html/2304.11015)304. .... https://github.com/madhup-google/DIN-SQL.
(4) DIN-SQL: Decomposed In-Context Learning of Text-to-SQL .... https://deepai.org/publication/din-sql-decomposed-in-context-learning-of-text-to-sql-with-self-correction.
(5) undefined. https://doi.org/[1](https://arxiv.org/abs/2304.11015)0.48550/arXiv.[2](https://ar5iv.labs.arxiv.org/html/2304.11015)304.[1](https://arxiv.org/abs/2304.11015)1015.
(6) undefined. https://arxiv.org/pdf/[2](https://ar5iv.labs.arxiv.org/html/2304.11015)304.
(7) undefined. https://arxiv.org/pdf/2304.[1](https://arxiv.org/abs/2304.11015)[1](https://arxiv.org/abs/2304.11015)0[1](https://arxiv.org/abs/2304.11015)5.pdf.

Spider dataset

Use two official evaluation metrics

execution accuracy
exact set match accuracy

Models: Codex family (Davinci and Cushman), and GPT-4

Bird Benchmark

introduced valid efficiecy score (VES)

Methodology

Schema Linking Module

Identifying references to database schema and condition values in natural language queries.

Classification & Decomposition Module

Challenge: Select correct table to be joined.
Classify each query into "easy", "non-nested complex", and "nested complex".

SQL Generation Module

repo: konabuta/my-survey


text:
底部弹出对话框挡住了虚拟导航键

底部弹出对话框挡住了虚拟导航键

底部弹出对话框挡住了虚拟导航键

demo也存在这个问题

您好，首先虚拟导航键并不能被第三方APP遮盖，其次，DialogX中这个效果叫做沉浸式，并不是“挡住了虚拟导航键”，因此并不算bug。

可以加你联系方式吗？

Readme中有反馈群号：590498789

暂时关闭了此问题，如有疑问可继续回复

测试，在dialogfragment模式中会出现，在view模式中正常。

不建议使用实验性功能，在文档中已经提示过了

发件人: AreYReady @.>
发送时间: Wednesday, August 17, 2022 5:00:51 PM
收件人: kongzue/DialogX @.>
抄送: Kongzue @.>; State change @.>
主题: Re: [kongzue/DialogX] 底部弹出对话框挡住了虚拟导航键 (#98)
测试，在dialogfragment模式中会出现，在view模式中正常。
[image]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F13625746%2F185078944-bccd2421-d3af-4ded-9edb-570717e718d7.png&data=05|01||f074c36400404cc7db4b08da802efc78|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637963236543990707|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=yyY3%2FsouKvaGPyx3xdtNlEw0C0mxqiVKQK2MzO9M930%3D&reserved=0
―
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkongzue%2FDialogX%2Fissues%2F98%23issuecomment-1217713205&data=05|01||f074c36400404cc7db4b08da802efc78|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637963236543990707|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=BH%2FzYJVYwNTORDPVhfdEWJqKcCBjX5Hz%2F9JvIPg9Ueg%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACNFSH4RAQVS3L2ZRQ4OVOTVZSS4HANCNFSM5CJKMSHA&data=05|01||f074c36400404cc7db4b08da802efc78|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637963236543990707|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=MYIIiTKw2u66HHou%2F4Nxo79bCwn2kHBGOduN5QuuDlk%3D&reserved=0.
You are receiving this because you modified the open/close state.Message ID: @.***>

ok。

authors: AreYReady kongzue lumia1999

repo: kongzue/DialogX


text:
Minor typo's and grammar adjustments in the README

Thanks for the thorough explanation in the README!

Thanks! :)

authors: konmik sethgho

repo: konmik/Phlux


text:
Upgrade NiGoApi to v0.0.10

Q
A

Bug fix?
no

New feature?
yes

API breaks?
no

Deprecations?
no

Related tickets
-

License
Apache 2.0

What's in this PR?

Upgrade the NiGoApi module to v0.0.10.
Why?

To have all the latest modification from the NiFi Api from the 1.24.0 version.
Checklist

[ ] Implementation tested
[X] Error handling code meets the guideline
[X] Logging code meets the guideline
[X] User guide and development docs updated (if needed)
[x] Append changelog with changes

LGTM

repo: konpyutaika/nifikop


text:
Class replacements outside of java.*

Hi,
I noticed that TeaVM does not do class replacements for classes like org.lwjgl.opengl.GL11C if I put a class named org.teavm.classlib.org.lwjgl.opengl.TGL11C in my project. I also found a comment (https://github.com/konsoletyper/teavm/pull/911#discussion_r1580017972) where this seems to be confirmed. Is there a reason why only java.* is considered? I would be able to improve my code if I could override LWJGL's classes this way.

There are several ways to replace lwjgl:

You can just create another jar and replace with it original dependency
You can apply some configuratoin for TeaVM by providing your own META-INF/teavm.properties. See example. Note that this format is ugly and subject of change in some future (see #791).
You can replace classes from within custom plugin.

authors: konsoletyper xupwup

repo: konsoletyper/teavm


text:
Use latest decode_raw

Use latest decode_raw
Handle None case of try_parse_entries properly (this is broken protobuf, not an empty list)

I added code for error-handling, and this strips that. Is this better than "console_error_panic_hook::set_once()"? I like that console_error_panic_hook shows a stack and helpful info about where the error was. Does this do that?

This PR does not change the error handling. console_error_panic_hook is still used to convert errors to console logs.
What is happening here is that the None case of try_parse_entries is not converted to an empty list anymore. This is what .unwrap_or_default() does (the empty vector is the default value of a vector). I added this call before. However, this was a mistake because None does not mean no entries, it means the bytes cannot be parsed correctly as protobuf.

This PR does not change the error handling.

It does as far as I can tell. You need to call console_error_panic_hook::set_once() to trigger error-handling, so I did that in parse_raw, which is removed in this PR. It doesn't matter, I can just add it back, if it doesn't go into merge. I have seen what you are talking about (bad binary will just return an empty array, in JS side)and I see what you are doing here. Looks good. Merging.

oh, yep, it's still there after merge.

repo: konsumer/rawprotorust


text:
Kontena 1.2 cadvisor with rshared bind-mounts is broken on distros running Docker in a non-shared mount namespace

Kontena 1.2 changed the kontena-cadvisor container to use rshared bind-mounts (#2005) in order to fix netns leaks (#2004).  However, this means that on distros that run the Docker engine in a separate non-shared mount namespace, the kontena-cadvisor container will fail to start with an error: linux mounts: Path / is mounted on / but it is not a shared mount
The kontena-agent creates the kontena-cadvisor container, but it is not running, and the Kontena::Launchers::Cadvisor does not log any errors (#2134 is only fixed for service containers, not node containers).
Symptoms
All kontena service stats are missing for containers running on the host node.
Diagnosis
The kontena-cadvisor container exists in docker ps -a, but it is not running, and docker inspect -f '{{.State.Error}}' kontena-cadvisor shows an error like: linux mounts: Path / is mounted on / but it is not a shared mount.
Workaround
If the kontena-cadvisor container causes other issues (like Dead containers when using the devicemapper storage driver), consider using -e CADVISOR_DISABLED=true to disable the kontena-cadvisor container, avoiding Docker issues at the cost of missing container stats.
To fix the kontena-cadvisor container, edit the docker.service systemd unit to run in a shared mount namespace:
systemctl edit docker.service
[Service]
MountFlags=shared

Affected

CentOS 7 with the distro yum install docker 1.12.6 package
Ubuntu 14.04?

Not affected:

CoreOS
Ubuntu 16.04?

Not really clear (for me at least) how we should address the issue. Should we "just" document this more clearly?

Not really clear (for me at least) how we should address the issue. Should we "just" document this more clearly?

Not sure either. There could potentially be some method to run cadvisor in a container that works even with a MountFlags=slave dockerd, such as using rslave for the cadvisor container, if it behaved as I would understand the docs to say it should behave?
But I think it's more likely that we'll just have to live with this limitation until we figure out some replacement for cadvisor that doesn't suffer from the same architectural design flaws related to /var/lib/docker bind mounts...

Dropped this from the milestone, but leaving it open.

authors: SpComb jnummelin

repo: kontena/kontena


text:
Flaky spec: Rpc::ContainerHandler#save updates container info if container is found by container_id

Failures:

  1) Rpc::ContainerHandler#save updates container info if container is found by container_id
     Failure/Error: expect(container.reload.running?).to eq(true)

       expected: true
            got: false

       (compared using ==)
     # ./spec/services/rpc/container_handler_spec.rb:26:in `block (3 levels) in <top (required)>'

Finished in 2 minutes 28.3 seconds (files took 4.18 seconds to load)
1327 examples, 1 failure

Failed examples:

rspec ./spec/services/rpc/container_handler_spec.rb:7 # Rpc::ContainerHandler#save updates container info if container is found by container_id

Randomized with seed 20273

I wonder if running with the same seed gives the same result

Nope, at least not locally:
Finished in 2 minutes 24 seconds (files took 3.04 seconds to load)
1327 examples, 0 failures

Randomized with seed 20273

authors: jnummelin kke


text:
grid default affinity not working

service gets scheduled to a node that should be banned by the default affinity
$ kontena node ls
NAME                            VERSION   STATUS       INITIAL   LABELS
⊛ i-1   1.4.0     online 26h   1 / 1     node=initial

$ kontena grid current
mygrid:
  default_affinity:
    - label!=node=initial

$ kontena service show mystack/service
  affinity:
    - label==~node=sticky
    - label==~node=ephemeral
    - label!=node=persistent
  instances:
    mystack/service/1:
      scheduled_to: i-1

Default affinity is used only if service does not specify any affinity rules.

misunderstood the word default.

https://github.com/kontena/docs/issues/51 this should also be clarified in the docs, the wording on there isn't very clear about this:

The default affinity rule is applied to all Kontena Stacks on this Kontena Platform by default.

authors: SpComb jakolehm matti


text:
Use correct IP address on quick start guide

This PR fixes Quick Start guide where currently user is asked to pick up the private IP address of the service. He/she should use private IP address of the node instead.
Fixes #976

LGTM!

authors: jakolehm nevalla


text:
Fix typo calling endpoint url for register auth

Typo calling url api endpoint, in go sdk auth register call endpoint like this /logout and in javascript sdk call endpoint for register like this /register.
js sdk
async register<T = any>(body: {
    firstName: string;
    lastName?: string;
    email: string;
    password: string;
    role?: string;
  }): Promise<AuthResponse<T>> {
    return new Promise(async (resolve, _reject) => {
      try {
        const { data, status, statusText } = await axios.post<TokenResponse<T>>(
          `${this.url}/auth/register`,
          body,
        );
        this.saveToken(data.token);

        const user = data.user;
        resolve({
          user,
          status,
          statusText,
          token: data.token,
        });
      } catch (error) {
        resolve(this._error(error));
      }
    });
  }

go sdk
func (a *AuthClient) Register(body RegisterParams) (*AuthResponse, *KontenbaseError) {
	resp, err := a.httpClient.Post("/logout", body, nil) // typo here
	if err != nil {
		return nil, err
	}

thank you @restuwahyu13

Thank you @restuwahyu13 for the fix!
Forward my hello (titip salam) to Fadli Kayo if you guys are still in RebelWorks :)

You're welcome

yo @mhaidarhanif cheers!

yo @fadlykayo awesome!

authors: exneval fadlykayo mhaidarhanif restuwahyu13

repo: kontenbase/kontenbase-go


text:
Publish

Motivation
Fixes typos and orphaned comments, adds github files to comply with community standards.
Checklist

[ ] Code follows coding conventions held in this repo
[ ] Automated tests have been added
[ ] Tests are passing
[ ] Docs have been updated (if applicable)
[ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test
If manual testing is required, what are the steps?

We sould validate text in code of conduct and contributing (and possibly create a repo template for theese) to include License and Readme structure. Not sure if part of the PR, I might rather split it into the task.

I used the templates from previous org but it will require some updates. created a task for new repo template

So are we going to adjust the files now for this one, or remove them from this PR?

So are we going to adjust the files now for this one, or remove them from this PR?

I added the updated repo template we can use, though there are still some matters left to discuss (devrel contact, stackoverflow tags..)

removed contributing and code of conduct from the PR

repo: kontent-ai/kontent-react-components


text:
feat(14063): Create map Breadcrumbs component

https://kontur.fibery.io/Tasks/My-tasks-3575#Task/Create-map-breadcrumbs-component-14063

Summary by CodeRabbit
Release Notes

New Features

Introduced a BreadcrumbsPanel for enhanced navigation within the map interface.
Added ADMIN_BOUNDARY_BREADCRUMBS feature for improved administrative boundary management.

Improvements

Updated the @konturio/ui-kit package for better performance and stability.
Enhanced breadcrumb navigation with responsive styling and improved visibility for hidden items.

Styles

Added new CSS classes for breadcrumb items and layout adjustments for better responsiveness across devices.

I don't see a crosshair in the center of the map but it's not critical.

authors: albaranau alesiahil

repo: konturio/disaster-ninja-fe


text:
[RFE] Surface the Task Manager in the UI

What is the problem?
There's no way for the user to understand which tasks are being executed and the queue of pending tasks.
Why is this a problem?
By not knowing what is being executed and scheduled at a given moment, users might feel like the system is unresponsive, especially in multi-user environments.
Proposed solution
Surface information about what is queued for execution by the task manager. This view should provide a way for users to:

Browse the task queue. For each task the following information should be provided:

Task ID.
Task type: Analysis, discovery...
User that created the task.
Status: Scheduled, In progress...

Cancel background tasks like automatic language/technology stack discovery (see #170 for more information about this). Cancelled background tasks will be rescheduled again automatically at the end of the queue.
Cancel the tasks created by the current user. Tasks created by other users can't be cancelled.

@jortel @mansam @JustinXHale for your consideration.

Related UI work:

https://github.com/konveyor/tackle2-ui/issues/1931
https://github.com/konveyor/tackle2-ui/issues/1934

Hub work:

https://github.com/konveyor/tackle2-hub/pull/640

authors: jortel rromannissen sjd78

repo: konveyor/enhancements


text:
Create data_analysis_1.ipynb

Practice using analysis code (python)   - simple data analysis

데이터 읽고 쓰기 확인


text:
Update to Rails 5

Make changes to generate rails5 app

Remove puma generation
Remove quite assets
minor improvements

Coverage increased (+0.7%) to 51.152% when pulling b452264333d18c44b216d9d5dd7c5b02dcdb2e06 on rails5 into 0a4d35eb01d796c0f6bfdb76a0e095b2cca170d4 on master.

http://gph.is/NY2QTR

authors: carlos-contreras coveralls gssbzn

repo: koombea/generapp


text:
[proposal] Use libpfm4 in perf collector

What is your proposal:
Improve observability by adding more core events. Refactor the perf module to support perf group to calculate metrics more accurately.
Why is this needed:
perf-utils can only collect limited events and it cannot collect group events, we can use libpfm4 to get more core events and refactor the perf module.
libpfm4 is developed by Google, and it can parse all kinds of core/uncore events. We can use CGO to use it in golang without adding too much dependency.
Some events need to be measured at the same time(such as CPI and MPKI), and limited PMUs may lead to PMU multiplexing, resulting in large deviations in measurement data.
Is there a suggested solution, if so, please add it:
We can use libpfm4 to parse events in perf collector.
Steps:

Init libpfm4 library, create perfValue pool and byte buffer pool
Create perf collector for each container
Use syscall perf_event_open to create fd for perf group and save the id for each event
Enable leader perf group to start events schedule in kernel space
Wait a period and stop all perf group, read data from leader group fd
Close all fds and cgroup fd

/area koordlet

If the frequency of libpfm4 library collecting perf events is too high, it will interfere with the business process, so it is necessary to control the collection frequency. Our current collection period of perf event is 2min.

The libpfm4 library collects perf event frequency too high, which will interfere with the biz process, and the collection frequency needs to be controlled. Our current collection frequency is 2 minutes.

I just use libpfm4 to convert event name to unix.PerfEventAttr struct like this:
// https://man7.org/linux/man-pages/man3/pfm_get_os_event_encoding.3.html
func pfmGetOsEventEncoding(event string, perfEventAttrPtr unsafe.Pointer) error {
	arg := pfmPerfEncodeArgT{}
	arg.attr = perfEventAttrPtr
	fstr := C.CString("")
	defer C.free(unsafe.Pointer(fstr))
	arg.size = C.ulong(unsafe.Sizeof(arg))
	eventCStr := C.CString(event)
	defer C.free(unsafe.Pointer(eventCStr))
	if err := C.pfm_get_os_event_encoding(eventCStr, C.PFM_PLM0|C.PFM_PLM3, C.PFM_OS_PERF_EVENT, unsafe.Pointer(&arg)); err != C.PFM_SUCCESS {
		return fmt.Errorf("failed to get event encoding: %d", err)
	}
	return nil
}

I think it will not cause any interference compared to before.

Any suggestions and questions is welcome. @xigang @songtao98 @zwzhang0107

The libpfm4 library collects perf event frequency too high, which will interfere with the biz process, and the collection frequency needs to be controlled. Our current collection frequency is 2 minutes.

I just use libpfm4 to convert event name to unix.PerfEventAttr struct like this:
// pfmPerfEncodeArgT represents structure that is used to parse perf event name
// into perf_event_attr using libpfm4.
type pfmPerfEncodeArgT struct {
	attr unsafe.Pointer
	fstr unsafe.Pointer
	size C.size_t
	_    C.int // idx
	_    C.int // cpu
	_    C.int // flags
}

// https://man7.org/linux/man-pages/man3/pfm_get_os_event_encoding.3.html
func pfmGetOsEventEncoding(event string, perfEventAttrPtr unsafe.Pointer) error {
	arg := pfmPerfEncodeArgT{}
	arg.attr = perfEventAttrPtr
	fstr := C.CString("")
	defer C.free(unsafe.Pointer(fstr))
	arg.size = C.ulong(unsafe.Sizeof(arg))
	eventCStr := C.CString(event)
	defer C.free(unsafe.Pointer(eventCStr))
	if err := C.pfm_get_os_event_encoding(eventCStr, C.PFM_PLM0|C.PFM_PLM3, C.PFM_OS_PERF_EVENT, unsafe.Pointer(&arg)); err != C.PFM_SUCCESS {
		return fmt.Errorf("failed to get event encoding: %d", err)
	}
	return nil
}

I think it will not cause any interference compared to before.

@Rouzip If you only use pfmGetOsEventEncoding to get *unix.PerfEventAttr, the performance overhead is small. If you use the unix.PerfEventOpen api, the system overhead will be large (when the calling frequency is high).

If the real-time requirements of IPC metric are not very high (minute level), there is no problem using libpfm4.

authors: Rouzip saintube xigang

repo: koordinator-sh/koordinator