Inconsistent behaviors with SO_REUSEPORT on Linux and *BSD

SO_REUSEPORT enables duplicate address and port bindings across various
Unix-like OSs, whereas there is platform-specific inconsistency:
Linux implemented SO_REUSEPORT with load balancing for incoming connections
while *BSD implemented it for only binding to the same address and port, which
makes it pointless to enable SO_REUSEPORT on *BSD and Darwin for gnet with
multiple event-loops because only the first event-loop will be constantly woken
up to accept incoming connections while the rest of event-loops remain idle.
Thus, we disable SO_REUSEPORT on *BSD and Darwin by default.

Note that FreeBSD 12 introduced a new socket option named SO_REUSEPORT_LB
with the capability of load balancing, it's the equivalent of Linux's SO_REUSEPORT.

References

The SO_REUSEPORT socket option
SO_REUSEPORT_LB on FreeBSD
How do SO_REUSEADDR and SO_REUSEPORT differ?

@panjf2000 are these related?
https://github.com/panjf2000/gnet/pull/565
remarked here.
not sure if u have seen this repo
https://github.com/luyu6056/tls
https://github.com/luyu6056/gnet

even the http2 is working but i cant seem to get so-reuseport to work. no idea why even when i set it to true.

honestly, if i can get luyu6056's tls to work with so reuseport, i'll be contented with the older version use.
@panjf2000 should we wait for the tls on gnet? been waiting for this feature for years. but i'm not rushing u. i understand it's insane among of work.
p.s. : i got it "working" with tls here but not with the soreuseport option... need soreuseport. can see if i can use it now on the older version?
tlsserver.go
package main

import (
        "log"
        "time"

        //"github.com/panjf2000/gnet"
        "github.com/kolinfluence/gnet"
        "github.com/luyu6056/tls"

)

type echoServer struct {
        *gnet.EventServer
}

func (es *echoServer) OnInitComplete(s gnet.Server) (action gnet.Action) {
        log.Printf("Echo server started on %s (loops: %d)", s.Addr, s.NumEventLoop)
        return
}

func (es *echoServer) React(frame []byte, c gnet.Conn) (action gnet.Action) {
        // Echo the incoming data back to the client
        c.AsyncWrite(frame)
        return
}

func main() {

        // Create TLS configuration using certificates
        tlsConfig := &tls.Config{
                Certificates:             make([]tls.Certificate, 1),
                PreferServerCipherSuites: true,
                MinVersion:               tls.VersionTLS12,
        }

        // Load server certificate and private key
        var err error
        tlsConfig.Certificates[0], err = tls.LoadX509KeyPair("./cert.pem", "./key.pem")
        if err != nil {
                log.Fatalf("Failed to load key pair: %v", err)
        }

        // Configure server options
        options := []gnet.Option{
                gnet.WithTCPKeepAlive(time.Minute * 5),
                gnet.WithTls(tlsConfig),
                gnet.WithReusePort(true),
                //gnet.WithMulticore(true),
        }

        // Start the server
        log.Fatal(gnet.Serve(new(echoServer), "tcp://:8443", options...))
}

tlsclient.go
package main

import (
    "bufio"
    "crypto/tls"
    "fmt"
    "log"
    "time"
)

func main() {
    // Connect to the server with TLS
    conf := &tls.Config{
        InsecureSkipVerify: true, // Use this for testing with self-signed certs
    }

    conn, err := tls.Dial("tcp", "localhost:8443", conf)
    if err != nil {
        log.Fatalf("Failed to connect to server: %v", err)
    }
    defer conn.Close()

    fmt.Println("Connected to server.")

    // Create a reader to read responses from the server
    reader := bufio.NewReader(conn)

    // Variables for counting requests and responses
    var requestsSent int
    var responsesReceived int

    // Start a ticker to display req/s every second
    ticker := time.NewTicker(1 * time.Second)
    go func() {
        for range ticker.C {
            fmt.Printf("Requests sent: %d, Responses received: %d\n", requestsSent, responsesReceived)
            // Reset counters
            requestsSent = 0
            responsesReceived = 0
        }
    }()

    // Loop indefinitely
    for {
        // Send "hello" to the server
        _, err := conn.Write([]byte("hello\n"))
        if err != nil {
            log.Fatalf("Failed to write to server: %v", err)
        }
        requestsSent++

        // Read the server's response
        data, err := reader.ReadString('\n')
        if err != nil {
            log.Fatalf("Failed to read from server: %v", err)
        }
        responsesReceived++
        fmt.Printf("data = %s\n",data)
    }
}

req/s only. very good in fact. just need soreuseport working ...
package main

import (
    "bufio"
    "crypto/tls"
    "fmt"
    "log"
    "time"
)

func main() {
    // Connect to the server with TLS
    conf := &tls.Config{
        InsecureSkipVerify: true, // Use this for testing with self-signed certs
    }

    conn, err := tls.Dial("tcp", "localhost:8443", conf)
    if err != nil {
        log.Fatalf("Failed to connect to server: %v", err)
    }
    defer conn.Close()

    fmt.Println("Connected to server.")

    // Create a reader to read responses from the server
    reader := bufio.NewReader(conn)

    // Variables for counting requests and responses
    var requestsSent int
    var responsesReceived int

    // Start a ticker to display req/s every second
    ticker := time.NewTicker(1 * time.Second)
    go func() {
        for range ticker.C {
            fmt.Printf("Requests sent: %d, Responses received: %d\n", requestsSent, responsesReceived)
            // Reset counters
            requestsSent = 0
            responsesReceived = 0
        }
    }()

    // Loop indefinitely
    for {
        // Send "hello" to the server
        _, err := conn.Write([]byte("hello\n"))
        if err != nil {
            log.Fatalf("Failed to write to server: %v", err)
        }
        requestsSent++

        // Read the server's response
        _, err = reader.ReadString('\n')
        if err != nil {
            log.Fatalf("Failed to read from server: %v", err)
        }
        responsesReceived++
        //fmt.Printf("data = %s\n",data)
    }
}

Did it work on Linux? If so, then it's irrelevant.

@panjf2000 ubuntu 22.04. amd ryzen 5
anyway... i definitely need so_reuseport. if u cant get the tls working in 5 days, possible to take a quick look at the repos and see why it cant run more than 1 instance? it's strange coz i've already set so_reuseport to true and in the package it is also enabled... not sure why.

this tls on "old version" is working so fine now in fact (other than so reuseport) that i can really live with it if so reuseport is enabled.
i'm sound so desperate for this feature coz i've stuck with even worst results from this:
https://github.com/0-haha/gnet-tls-go1-20/
i really wont be asking for a lot. just tls working with so reuseport... if u know what i mean from testing gnet for so long and needing this tls + so reuseport so badly.

@panjf2000 also, do u know if you made my version work with so_reuseport, "officially" this is a very good working version of tls for gnet (older version but still gnet)

I'd suggest you look for other alternatives if you're so urgent.


RigidBody2D passes through walls/objects when pushed by a KinematicBody2D

Godot version:
3.1
Issue description:
Rigid Bodies pass through walls when pushed by Kinematic Bodies. This doesn't happen in 3.0.6.
In 3.0.6: https://i.imgur.com/k7vJdoM.mp4
In 3.1: https://i.imgur.com/BhkKt0G.mp4
It doesn't just happen in the platformer demo, I noticed this problem in other projects as well.

The same thing is happening to me, but in my 2D project.
3.0.6

3.1

Similar experiences, and with CCD enabled they can still tunnel.

Happens to me on my 3D game project also.

Is there a possibility this will be fixed soon (in 3.1.1, perhaps)? The Rigid Bodies are basically unusable because of this and 3.2 won't come out for quite some time probably.

I have a script that "pushes" a RigidBody (Cube) with the mouse.
I inserted a print (RigidBody.get_translation ()) into func _input ( to detect any movement of the mouse by pushing the RigidBody.
And I connected a body_entered signal in the RigidBody to show any RigidBody collision with the floor (StaticBody).
As you can see in the animation, in the beginning, the RigidBody is resting (in a collision) with the StaticBody.
Then I start to push the RigidBody down and as you can see, the body_entered signal fires only multiple _input events after.
In my understanding, the body_entered signal should be triggered at the very moment the collision occurs. But this does not seem to be happening.
How to solve this?

Body_entered fires every time the other body is entered. I don't know what the resolution of the check is, why it detects so late.
Check not only for body_entered, but also for a boolean of your own creation.
Switch the boolean the moment body_entered first fires.

I'm here to confirm that this also happened to me in a simple 2D project I was implementing. A KinematicBody2D pushes the RigidBody2D through walls and floors as if it were nothing.

Is there a possibility this will be fixed soon (in 3.1.1, perhaps)? The Rigid Bodies are basically unusable because of this and 3.2 won't come out for quite some time probably.

Not too likely.  I wish I could say otherwise, but personally I have benched these for most uses since 2.1, and over the previous year I have the impression it is an area that lacks contribution.
Juan may dabble a bit in the 2D physics here and there to patch things up, and it is something he talks of fully rewriting, but it has been bumped to the next version with each stable release.  He may be the only one currently that can take the job on, but I imagine his priorities are necessarily between things like rendering work and general maintenance.

Maybe Godot will have new physic engine ? Nvidia flex ? https://www.youtube.com/watch?v=agEjyOTigF8

Maybe this hopefully could resolved the problem ? https://github.com/godotengine/godot/pull/27415

This seems not physics related as does not happen with normal Bullet physics objects with separate project. I think a problem is due to infinite inertia and other stuff related to KinematicBody. It is very hard to implement collision so that it prevents Kinematic-Rigid collisions as it hits RigidBody with inadequate momentum. Would be nice if it was possible to avoid collisions completely (consider RigidBody a wall) or be able to override momentum or mass and force for Kinematic-Rigid collision.

I think there is a need for tutorial for dynamic character controller based on RigidBody as for other engines, this will make collisions much more natural. Dunno how to merge that with root motion but as NaughtyDog did that I think everybody else can do it too.

@slapin At least for 2D, one isn't going to have much success at creating a stable and reliable dynamic body character of any complexity with the presently outstanding issues.  I'm not sure what the state of affairs is for 3D.

Same here #27593

Turns out the problem is with infinite_inertia value which was introduced as an addditional parameter in move_and_slide function in 3.1. In order to fix the issue, you need to set it to false and then write code that will move rigid bodies on collision with the kinematic.
Thanks to KidsCanCode for figuring this out (his video).
I wish someone announced that there was a new parameter added :/ It would save some of us a lot of confusion.

I also saw this video @rdmtt ! I always thought this infinite inertia aspect of Godot's Kinematic Bodies had something to do with this weird behavior, but I never got to investigating it further! KidsCanCode rocks!

This is indeed not a bug but a configuration option as pointed out by https://github.com/godotengine/godot/issues/27652#issuecomment-519927731.
This API has been improved significantly in 4.0 IIRC, so this might be less confusing now.


[Task]: Update roadmap for Spark runner

What needs to happen?
The Spark related roadmap is far outdated and needs some attention.

Spark 3 is fully supported.
Spark dataset runner is on it's way.

Issue Priority
Priority: 2
Issue Component
Component: runner-spark

I think this refers to this page: https://beam.apache.org/roadmap/spark-runner/


[roi] Provide an action to create new ROIs

This PR rework the QAction of the ROI manager in order to have independent actions.
As result:

2 actions using the same ROI class will not be triggered simultaneously
It is possible custom the way each actions behave
Resolve the issue with parent and getInteractionModeAction

I created sigInteractiveRoiCreated̀ and sigInteractiveRoiFinalized to catch the live cycle of a ROI from the manager. There is maybe better names.
We maybe could move the new action with the plot actions (maybe not nice for dependancies)

Also, _MODE_ACTIONS_PARAMS could be dispatched into the ROI classes. It is what i did for the profile PR. It's just convenient.
I think it was the case before, and i change it.

Fixed minor typos in docstrings.
LGTM, this fixes inconsistency introduced by PR  #3008 and improves over previous state.


Show a server disconnected message

Closes #33

:bell: @marcosnils

@xetorthio it's super nice. Maybe a different background color like light yellow or red would be better as the grey kind of confuses with the white background. But it looks amazing!.

Can you suggest a color code you like?
On Tue, Nov 15, 2016, 18:53 Marcos Nils<EMAIL_ADDRESS>wrote:

@xetorthio https://github.com/xetorthio it's super nice. Maybe a
different background color like light yellow or red would be better as the
grey kind of confuses with the white background. But it looks amazing!.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/franela/play-with-docker/pull/38#issuecomment-260781753,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIhp9U3a-TqRy34PQByw5Gn_Sj8ZPOCks5q-inWgaJpZM4KzARY
.

#FDF4B6 ?


Can you add UserAgent Extension?

Can you add UserAgent Extension?

Done by programmatically..no extension is needed


Switch Travis to the stable Dart SDK

Hopefully this will make Travis green.

lgtm, but didn't help Travis...

ooh never mind, it did help. new problems now.


AWS EKS cilium can allocate fewer IP addresses than EC2 can allocate pods

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
For example: EC2 allows 58 pods
But the cilium of this node can only get 14 IP addresses. Is there any way to solve this problem?
node info：
Capacity:
  cpu:                4
  ephemeral-storage:  209702892Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16181704Ki
  nvidia.com/gpu:     1
  pods:               58
Allocatable:
  cpu:                3920m
  ephemeral-storage:<PHONE_NUMBER>24
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             15164872Ki
  nvidia.com/gpu:     1
  pods:               58

cilium pod info：
root@ip-10-144-0-119:/home/cilium# cilium status
KVStore:                 Ok   Disabled
Kubernetes:              Ok   1.28+ (v1.28.9-eks-036c24b) [linux/amd64]
Kubernetes APIs:         ["cilium/v2::CiliumClusterwideNetworkPolicy", "cilium/v2::CiliumEndpoint", "cilium/v2::CiliumNetworkPolicy", "cilium/v2::CiliumNode", "core/v1::Namespace", "core/v1::Node", "core/v1::Pods", "core/v1::Service", "discovery/v1::EndpointSlice", "networking.k8s.io/v1::NetworkPolicy"]
KubeProxyReplacement:    Strict   [eth0 <IP_ADDRESS> (Direct Routing)]
Host firewall:           Disabled
CNI Chaining:            none
CNI Config file:         CNI configuration file management disabled
Cilium:                  Ok   1.13.1 (v1.13.1-a6be57eb)
NodeMonitor:             Listening for events on 4 CPUs with 64x4096 of shared memory
Cilium health daemon:    Ok
IPAM:                    IPv4: 6/14 allocated,
IPv6 BIG TCP:            Disabled
BandwidthManager:        Disabled
Host Routing:            Legacy
Masquerading:            IPTables [IPv4: Enabled, IPv6: Disabled]
Controller Status:       35/35 healthy
Proxy Status:            OK, ip <IP_ADDRESS>, 0 redirects active on ports 10000-20000
Global Identity Range:   min 256, max 65535
Hubble:                  Ok   Current/Max Flows: 4095/4095 (100.00%), Flows/s: 6.75   Metrics: Ok
Encryption:              Disabled
Cluster health:          9/9 reachable   (2024-07-05T08:56:52Z)

Cilium Version
1.13.1
Kernel Version
5.10.219-208.866.amzn2.x86_64
Kubernetes Version
v1.28.9-eks-036c24b
Regression
No response
Sysdump
No response
Relevant log output
No response
Anything else?
No response
Cilium Users Document

[X] Are you a user of Cilium? Please add yourself to the Users doc

Code of Conduct

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

I see you're running with version 1.13.1, which is quite outdated by this point. Could you try the latest version? We have made improvements and updates to the AWS ENI code over several releases.

I see you're running with version 1.13.1, which is quite outdated by this point. Could you try the latest version? We have made improvements and updates to the AWS ENI code over several releases.

Thanks,I'll try


Complete the bindings, try to describe shift-enter

Search All Panes is a difficult concept to explain succinctly but I tried...  Open to any suggestions.

@lee-dohm agreed!  Better?  And definitely tell me if you have formatting advice.

Thanks!


CMake support

Created CMakeLists.txt
Added build/ to .gitignore

/assign @cofyc

Now it can be loaded as cmake external project and run even on windows

How to build standalone:
mkdir build
cd build
cmake .. -DENABLE_TESTS=ON
make

Also tests can be added by default

looks like CMake support is a strong need (https://github.com/cofyc/argparse/pull/21, https://github.com/cofyc/argparse/pull/13)
/lgtm
/approve

FYI @dxramax @hxingpax


RDKTV-19382 : Change QualifiedName() to HostAddress()

Reason for change: Avoiding WebProcess to become unresponsive due to getnameinfo timeout
Test Procedure: See Jira Ticket
Risks: Low
Signed-off-by: Karthick S<EMAIL_ADDRESS>

@pwielders  & @ks734  can you take this change to master/R4 as well. As Comcast is working on R4.1 upgrade, this will be needed.


Error while importing detector on TRAIN_gluon_yolo3_darknet53_coco.ipynb

when i ran import cell I am getting below error.
I tried to install other mxnet version also[ CUDA100=1.4.1]. still getting same error
from detector_prototype import Detector

ImportError                               Traceback (most recent call last)
 in ()
1
----> 2 from detector_prototype import Detector
/content/Monk_Object_Detection/1_gluoncv_finetune/lib/detector_prototype.py in ()
6 import mxnet as mx
7 from mxnet import autograd, gluon
----> 8 import gluoncv as gcv
9 from gluoncv.utils import download, viz
10 import pandas as pd
/usr/local/lib/python3.6/dist-packages/gluoncv/init.py in ()
10 _require_mxnet_version('1.4.0', '2.0.0')
11
---> 12 from . import data
13 from . import model_zoo
14 from . import nn
/usr/local/lib/python3.6/dist-packages/gluoncv/data/init.py in ()
29 from .sampler import SplitSampler, ShuffleSplitSampler
30 from .otb.tracking import OTBTracking
---> 31 from .kitti.kitti_dataset import KITTIRAWDataset, KITTIOdomDataset
32
33 datasets = {
/usr/local/lib/python3.6/dist-packages/gluoncv/data/kitti/init.py in ()
1 # pylint: disable=missing-module-docstring
----> 2 from .kitti_dataset import *
3 from .kitti_utils import *
/usr/local/lib/python3.6/dist-packages/gluoncv/data/kitti/kitti_dataset.py in ()
19
20 from ...utils.filesystem import try_import_skimage
---> 21 from .kitti_utils import generate_depth_map
22 from .mono_dataset import MonoDataset
23
/usr/local/lib/python3.6/dist-packages/gluoncv/data/kitti/kitti_utils.py in ()
10
11 import mxnet as mx
---> 12 from mxnet.util import is_np_array
13
14
ImportError: cannot import name 'is_np_array'

NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
link --- https://github.com/venkatchintha/ObjectDetection/blob/master/TRAIN_gluon_yolo3_darknet53_coco.ipynb

The issue is with the base library of gluoncv. The latest version of gluoncv has removed is_numpy_array utility. Switch down to gluoncv version 0.5 or 0.4; Mxnet version can be kept the same.


Problem: don't know the best way to test the evm

Potential solution # 1:

build an executable like ethereumclassic/gaslighter

gaslighter responsibilities:
behaviour common between dev and ci mode

reads a clone of ethereumclassic/tests every time gaslighter is called and depending on the arguments to gaslighter the relative test in ethereumclassic/tests is called. e.g.

$ gaslighter dev sputnikvm --path <path/to/sputnikvm> --test hierarchical_name_to_test_in_ethereumclassic/tests channel --sockets tcp://localhost:1920

gaslighter supports different methods of connecting channel --socket tcp://localhost:1920 --sharedobject <path> --cli <path> --crate <path> arguments. (still thinking about the crate argument as Rust has no ABI). Thus allowing the tests to be run over those channels

dev mode:

gaslighter calls cargo and compiles sputnikvm every time gaslighter is called.
gaslighter becomes the primary means to compile sputnikvm when in development mode.
gaslighter could accept other params like geth parity and reproduce the same test against those vms.

CI mode:

gaslighter doesn't compile sputnikvm if in CI mode. nix will ensure this is done with exact dependencies.
the full battery of tests will be run against the compiled sputnikvm artefact. Which (will later) include fuzzy tests etc.

pros

convenient to fire off xyz test as you're developing certain parts of the vm
add new tests to the ethereumclassic/tests repo
gaslighter can now become the CI test bootstrapper to be run by upon each pull request.
becomes a testbed to put fuzzy testing and other fancy techniques.

cons

too much overhead and could easily be described as unit tests in sputnikvm, taking this path means we have no gaslighter executable to test other vms.

extra work

convert the entire ethereumproject/tests into human readable format  i.e.

PUSH
MLOAD
GAS
JUMPDEST
etc

instead of this
@sorpaas any opinions?
Potential solution # 2
Keep the above functionality and add a new build artefact to sputnikvm called gaslighter. Other ethereum vms will need to clone sputnikvm if they want to use gaslighter. Secondly this now enables us to test the crate option.

I think solution # 1 would be the ultimate goal -- it looks elegant and enables many testing techniques. However, I would worry that it's a lot of work especially when right now we haven't finished the essential of EVM... So it might be a good idea to do # 2 first and then gradually move to # 1 when we have time. What do you think?
For convert the entire ethereumproject/tests into human readable format, my concern is that most EVM code would be compiled from higher-level languages. As a result, even we make it human readable, it might not help us to understand the test... However, I do think this is useful for short EVM programs -- only a few lines probably. Besides, this is not hard to implement -- some string replacement would do. So I would suggest to implement both and use the one that seems appropriate for different tests. How about this?

Yes exactly, no 2.
It will be difficult to test crate fuctionality (unless we use nixcrates) if we go down path 1.
Anyway, I think we've found the right balance!


[language] use StructTag instead of TypeTag in TransactionEffect

As a result, TransactionEffect is more strongly typed and easier to work with.

Yep, StatusCode::INTERNAL_TYPE_ERROR is an internal invariant violation.

/land


Add employee users endpoint

#3164

Coverage increased (+0.09%) to 90.304% when pulling 03d4b15dd37cc82704de0c3337277a1b4a339c8d on dev-3164-digital-signature-drfo-validation into 89f8746e62f4f68c18bb3c74ec5afcd1e9322a7d on develop.


[atip] Update startswith and endswith to use innerHTML

For textarea element, innerText will be empty string when set its content,
it's better to use innerHTML for most elements.
Impacted tests(approved): new 0, update 2, delete 0
Unit test platform: Crosswalk Project for Android 16.45.410.0
Unit test result summary: pass 2, fail 0, block 0
https://crosswalk-project.org/jira/browse/XWALK-4877

LGTM


Home page link edit

Fixes #437 When we click on home page on navbar it show 404 page error because their path is mapped to "/" instead of "./index.html" now i'm edit the path in correct way and also test the again functionality!

@mansiruhil13 Please review my PR and merge accordingly with the labels:)

but that's assigned already. you can't make pr without assigned

@mansiruhil13  I agree this issue is assigned but this issue can be resolved in 1 or 2 minutes but if someone is not going to contribute to this issue then this issue will be take time to solve and nobody is going to resolve that issue because it's already assigned??

@mansiruhil13 I agree this issue is assigned but this issue can be resolved in 1 or 2 minutes but if someone is not going to contribute to this issue then this issue will be take time to solve and nobody is going to resolve that issue because it's already assigned??

but you are not assigned for this issue. sorry but i can't merge


Getting Coverage information without calling the command line

Component
Other (please describe)
Describe the feature you would like
Feature: Getting coverage information from anywhere by attaching a CoverageInspector to the Executor.
I'm trying to find coverage during a run of a transaction, so I tried adding a Coverage Inspector to the ExecutorBuilder. I'm able to see that the coverage bool is set in the Executor, but after I run a transaction on the Executor and I run collect on the InspectorStack I get an empty HitMap.
I'm thinking that this is happening because the Analyzer is never called on the source contracts, so there are no Anchors but I'm not sure.
Let me know if this is out of scope or if it's already possible and I've missed something.
Thanks!
Additional context
No response

The coverage inspector is 20 lines of code, are you getting Some() with an empty hitmap when coverage is set to true?

Yes, I've set coverage to true in the ExecutorBuilder, and called call_raw_comitting. I figured I would see some information of what was passed through the Interpreter, but I got Some(HitMaps({})).

I figured I would try to write my own inspector and pass it to inspect_ref just to see what happens. I have a CoverageInspector that overrides step and just attempts to print out the current opcode. I am unable to see that information. Here's what the call looks like from my rust code (bear in mind this is supposed to just wrap the call_raw call, but I wanted to make sure that my CoverageInspector gets passed in):
        _self: PyRef<'_, Self>,
        caller: &str,
        to: &str,
        value: Option<U256>,
        data: Option<Vec<u8>>,
    ) -> PyResult<String> {
        let res = _self
            .0
            .call_raw(
                addr(caller)?.into(),
                addr(to)?.into(),
                data.unwrap_or_default().into(),
                value.unwrap_or_default().into(),
            )
            .map_err(pyerr)?;

        let mut db: FuzzBackendWrapper<'_> = FuzzBackendWrapper::new(&_self.0.backend);
        let mut env = _self.0.env.clone();
        let mut cov = CoverageInspector::new();
        let result = db.inspect_ref(&mut env, &mut cov);

        print!("RESULT: {:?}", result);
        print!("COVERAGE: {:?}", cov);

    }

So, when I execute run this call_raw I see an empty CoverageInspector is printed. How is that possible if I've just executed the call to inspect_ref? Is there something else I need to call? Or does step never get called from my transaction?


refactor(model)! move related modules out of application

move interaction to root
move command to http
move command::permissions to guild::command_permissions

Part of #1791

This can be rebased now

I'm unsure if this PR, in it's current state, makes sense. command::permissions is currently guild only, but they could be expanded in the future (and the Docs support this in their wording); and application::command should not be in http due to some HTTP methods returning commands (meaning Commands can be sent and received).
My current idea is for application to be removed (the name can be confused with oauth::Application), with command and interaction moving to root. Any thoughts on this?

I'm more inclined to keep the application module since it makes it clear that these are the types you want to use for "applications" instead of "bots." we should rename it to OauthApplication which predicts a greater refactoring into incoming (which might stay at the root anyway), outgoing (instead of http), and oauth which i think would be good overall

I'm more inclined to keep the application module since it makes it clear that these are the types you want to use for "applications" instead of "bots."

I think this is a blurry separation.

we should rename it to OauthApplication which predicts a greater refactoring into incoming (which might stay at the root anyway), outgoing (instead of http), and oauth which i think would be good overall

OauthApplication seems like good rename.

I'll close this PR then.


istio-proxy - high CPU usage

Bug description
I enabled istio injection on a service with a high traffic load. Once the pod restarted and istio-proxy enabled, we noticed a huge memory consumption:

The query running is avg(rate(container_cpu_usage_seconds_total)).
You can see that envoy used twice the resources of the main container. This API sends a lot of outgoing requests to other service and to the storage if that's relevant.
While on this question - inspection istio container request and limit, and the default value is pretty high:
    Limits:
      cpu:     2
      memory:  1Gi
    Requests:
      cpu:      100m
      memory:   128Mi

Why the limit is so high? 2 core CPU is a lot...
Also, we enabled it also on some other services, but didn't experience the same issue.
** Edit **
Looking at Istio Performanc and Scalability, look like istio should take 0.6vCPU for 1000r/s. We had 600 RPS at pick (according to istio own metrics - istio_requests_total), and we had ~20 pods - so it makes sense - ~0.5vCPU per pod?
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[X] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Expected behavior
Low CPU usage
Steps to reproduce the bug
Version (include the output of istioctl version --remote and kubectl version)
istioctl version --remote:
client version: 1.2.2
citadel version: 1.2.2
galley version: 1.2.2
pilot version: 1.2.2
pilot version: 1.2.2
policy version: 1.2.2
policy version: 1.2.2
sidecar-injector version: 1.2.2
telemetry version: 1.2.2
telemetry version: 1.2.2

kubectl version:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-03-01T23:34:27Z", GoVersion:"go1.12", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.7", GitCommit:"6f482974b76db3f1e0f5d24605a9d1d38fad9a2b", GitTreeState:"clean", BuildDate:"2019-03-25T02:41:57Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

How was Istio installed? Helm
Environment where bug was observed (cloud vendor, OS, etc)
Azure, Kubernetes
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

From what I have seen, Istio is pretty CPU-intensive. By design, it uses iptables to bounce packets from your application to another user-level app (Envoy), and on their way back. This involves a lot of packet copying: user-to-kernel and kernel-to-user, which uses CPU. Moreover, by default it collects telemetry data for every request and sends it to the telemetry server. This also requires more CPU. Additionally, if your application operates at one of the higher level protocols, e.g., http, Envoy's plugin that handles http traffic (encoding/decoding) has been known to be not very CPU efficient. I don't know if tracing is enabled in your environment, but that could also contribute toward more CPU usage.
You could turn off some of these features, e.g., telemetry and tracing, if you don't really need them. That could help. But even if you turn off most of the features, the fact that there's a user-level proxy that intercepts all user packets says CPU overhead of using Istio will be significant. Just to give a data point - when I was using fortio to test Istio latency, where fortio server acts as a simple echo server, the sidecar (i.e., istio-proxy) was using more CPU than my app (fortio).

I'm using istio for those features :) do you know if I can fine-tune tracing for example, e.g. trace only a small percentage of the requests?

I believe the default tracing percentage is already set to 1% (https://github.com/istio/istio/blob/release-1.2/install/kubernetes/helm/istio/charts/pilot/values.yaml#L12), unless you modified the default value

We also thinking it might be because the request is too small (100m). I just discovered you can request more by using the sidecar.istio.io/proxyCPU annotation. Going to try that and see how this will behave.

Is there a way to track performance improvement features
Also, in case this wasn't clear - we have services with similar traffic where istio proxy behave significantly differently - we see services where the proxy consume ~0.5 CPU and cases where it takes ~0.003. We will be happy to better understand why it happens.
I'm aware of the annotation and already used it.


⚠ Bofrost.be has degraded performance

In 130483c, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1292 ms

Resolved: Bofrost.be performance has improved in 4b9b922 after 9 minutes.


OpenThread daemon is not running

I am trying to run OpenThread Border Router on Ubuntu 18.04. I cloned latest master branch of ot-br-posix. Followed steps given on https://openthread.io/guides/border-router/build. Installation is successful and I can see otbr-web and otbr-agent services running. Still, when I give ot-ctl state command, it says "OpenThread daemon is not running". Guide says that use adapter instead of USB port, but I am running it on a PC, so the workaround given is not applicable. Searched Google group and StackOverflow but didn't find anything related to this issue. Please provide some information to resolve this issue.

Did you run ot-ctl with sudo?

Yes.

I just tried the same steps on Rasperry Pi 4 with Raspbian OS. In that too it gives same error. OpenThread daemon is not running. Something is wrong. Please help here.

Could you double check if the otbr-agent is running? If not, maybe you have to check what's happening by manually run the command:
service otbr-agent stop
# Note: /dev/ttyUSB0 should be the path to the serial device of the RCP dongle
otbr-agent -I wpan0 -d7 -v spinel+hdlc+uart:///dev/ttyUSB0

darshan@Ubuntu18:~$ sudo service otbr-agent status
[sudo] password for darshan:
● otbr-agent.service - Border Router Agent
   Loaded: loaded (/lib/systemd/system/otbr-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-06-20 12:53:03 CDT; 25s ago
 Main PID: 6391 (otbr-agent)
    Tasks: 1 (limit: 4666)
   CGroup: /system.slice/otbr-agent.service
           └─6391 /usr/sbin/otbr-agent -I wpan0 spinel+hdlc+uart:///dev/ttyACM0

Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: Thread is down
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: Check if Thread is up: OK
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: Stop publishing service
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: PSKc is not initialized
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: Check if PSKc is initialized: OK
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: Initialize OpenThread Border Router Agent: OK
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: Border router agent started.
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: [INFO]-CORE----: Notifier: StateChanged (0x00038200) [NetData PanId NetName ExtPanId]
Jun 20 12:53:04 Ubuntu18 otbr-agent[6391]: [INFO]-PLAT----: processNetifLinkEvent: OK
Jun 20 12:53:07 Ubuntu18 otbr-agent[6391]: [WARN]-PLAT----: Error decoding hdlc frame: Parse
darshan@Ubuntu18:~$

Note that NCP device is at /dev/ttyACM0 and not at ttyUSB0.
After that running it manually:

darshan@Ubuntu18:~$ otbr-agent -I wpan0 -d7 -v spinel+hdlc+uart:///dev/ttyACM0
otbr-agent[6810]: Running 0.2.0-a9acf4a-dirty
otbr-agent[6810]: Thread interface wpan0
darshan@Ubuntu18:~$

Still sudo ot-ctl state gives "OpenThread daemon is not running"

Looked at detailed logs of the otbr-agent service. It seems like its failing and keep restarting.

Jun 17 15:19:40 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 17 15:19:40 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 26.
Jun 17 15:19:40 Ubuntu18 systemd[1]: Stopped Border Router Agent.
Jun 17 15:19:40 Ubuntu18 systemd[1]: Started Border Router Agent.
Jun 17 15:19:40 Ubuntu18 otbr-agent[2305]: Running 0.2.0-c111798
Jun 17 15:19:40 Ubuntu18 otbr-agent[2305]: Thread interface wpan0
Jun 17 15:19:42 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jun 17 15:19:42 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
Jun 17 15:19:47 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 17 15:19:47 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 27.
Jun 17 15:19:47 Ubuntu18 systemd[1]: Stopped Border Router Agent.
Jun 17 15:19:47 Ubuntu18 systemd[1]: Started Border Router Agent.
Jun 17 15:19:47 Ubuntu18 otbr-agent[2306]: Running 0.2.0-c111798
Jun 17 15:19:47 Ubuntu18 otbr-agent[2306]: Thread interface wpan0
Jun 17 15:19:49 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jun 17 15:19:49 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
Jun 17 15:19:54 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 17 15:19:54 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 28.

It seems the RCP is not compatible with the daemon. Could you try building the RCP from the latest code?

RCP Firmware for nrf52840 is built from latest master branch. I also tried Firmware provided by Nordic SDK. No luck so far. Please try OTBR on Ubuntu 18.04 (64 bit) and nrf52840. You will observe the problem.

@iDarshan, please make sure you are connecting to J3 connector of the PCA10056 board to your Ubuntu, and the SW9 switch is switched to 'USB', but not 'Li-Po or VDD'. That means, you need to use the 'Native' USB port of 52840, but not the USB port of the segger interface MCU at J2.

@TaTiTuTeKo I am following the guide in which the information you gave is there. So I am using the right connector.

I am observing that after build and install I don't see wpantund service running. I see otbr-agent, otbr-web and avadhi daemon running. Is that a cause of failure?
I also saw another issue filed for this problem at https://github.com/openthread/ot-br-posix/issues/214
Point 3 in that issue.
Please let me know what needs to be done here to make this work.

@bukepo Do you need more information or logs for this issue?

From the logs you provided, the root cause is RCP is incompatible with otbr-agent. We just added backward compatibility to it. Could you try rebuild otbr-agent:
git pull origin master
git submodule update --init

@bukepo Just rebuilt the ot-br-posix after updating and installed. Rebooted the system. Still the same error. Following is the log of otbr-agent service:
darshan@Ubuntu18:~$ journalctl -u otbr-agent.service -n 20
-- Logs begin at Wed 2020-04-08 15:16:21 CDT, end at Wed 2020-06-24 23:01:06 CDT. --
Jun 24 23:00:49 Ubuntu18 otbr-agent[3009]: Running 0.2.0-f93719a
Jun 24 23:00:49 Ubuntu18 otbr-agent[3009]: Thread interface wpan0
Jun 24 23:00:51 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jun 24 23:00:51 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
Jun 24 23:00:56 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 24 23:00:56 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 25.
Jun 24 23:00:56 Ubuntu18 systemd[1]: Stopped Border Router Agent.
Jun 24 23:00:56 Ubuntu18 systemd[1]: Started Border Router Agent.
Jun 24 23:00:56 Ubuntu18 otbr-agent[3033]: Running 0.2.0-f93719a
Jun 24 23:00:56 Ubuntu18 otbr-agent[3033]: Thread interface wpan0
Jun 24 23:00:58 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jun 24 23:00:58 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
Jun 24 23:01:03 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 24 23:01:03 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 26.
Jun 24 23:01:03 Ubuntu18 systemd[1]: Stopped Border Router Agent.
Jun 24 23:01:03 Ubuntu18 systemd[1]: Started Border Router Agent.
Jun 24 23:01:04 Ubuntu18 otbr-agent[3057]: Running 0.2.0-f93719a
Jun 24 23:01:04 Ubuntu18 otbr-agent[3057]: Thread interface wpan0
Jun 24 23:01:06 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jun 24 23:01:06 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
darshan@Ubuntu18:~$

I also pulled openthread repo master branch to the latest and built nrf52840 firmware with the following command:
make -f examples/Makefile-nrf52840 BORDER_AGENT=1 BORDER_ROUTER=1 COMMISSIONER=1 \
  DHCP6_CLIENT=1 DHCP6_SERVER=1 JOINER=1 MAC_FILTER=1 REFERENCE_DEVICE=1 \
  UDP_FORWARD=1 USB=1

@bukepo Just rebuilt the ot-br-posix after updating and installed. Rebooted the system. Still the same error. Following is the log of otbr-agent service:

darshan@Ubuntu18:~$ journalctl -u otbr-agent.service -n 20

-- Logs begin at Wed 2020-04-08 15:16:21 CDT, end at Wed 2020-06-24 23:01:06 CDT. --

Jun 24 23:00:49 Ubuntu18 otbr-agent[3009]: Running 0.2.0-f93719a

Jun 24 23:00:49 Ubuntu18 otbr-agent[3009]: Thread interface wpan0

Jun 24 23:00:51 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED

Jun 24 23:00:51 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.

Jun 24 23:00:56 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.

Jun 24 23:00:56 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 25.

Jun 24 23:00:56 Ubuntu18 systemd[1]: Stopped Border Router Agent.

Jun 24 23:00:56 Ubuntu18 systemd[1]: Started Border Router Agent.

Jun 24 23:00:56 Ubuntu18 otbr-agent[3033]: Running 0.2.0-f93719a

Jun 24 23:00:56 Ubuntu18 otbr-agent[3033]: Thread interface wpan0

Jun 24 23:00:58 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED

Jun 24 23:00:58 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.

Jun 24 23:01:03 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.

Jun 24 23:01:03 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 26.

Jun 24 23:01:03 Ubuntu18 systemd[1]: Stopped Border Router Agent.

Jun 24 23:01:03 Ubuntu18 systemd[1]: Started Border Router Agent.

Jun 24 23:01:04 Ubuntu18 otbr-agent[3057]: Running 0.2.0-f93719a

Jun 24 23:01:04 Ubuntu18 otbr-agent[3057]: Thread interface wpan0

Jun 24 23:01:06 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=6/NOTCONFIGURED

Jun 24 23:01:06 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.

darshan@Ubuntu18:~$

I also pulled openthread repo master branch to the latest and built nrf52840 firmware with the following command:

make -f examples/Makefile-nrf52840 BORDER_AGENT=1 BORDER_ROUTER=1 COMMISSIONER=1 \

  DHCP6_CLIENT=1 DHCP6_SERVER=1 JOINER=1 MAC_FILTER=1 REFERENCE_DEVICE=1 \

  UDP_FORWARD=1 USB=1

Did you flashed RCP or NCP? The otbr-agent only works with RCP. The binary file is ot-rcp. Besides, since you built it with USB=1, you should connect the USB port instead of the jlink port. If it still not working, could you try building with USB=0 and use the jlink port instead?

@bukepo I cloned the ot-br-posix repo again. Seems like submodule update didn't work. And yes I am using RCP firmware as mentioned in the guide. After new repo build of ot-br-posix, otbr-agent worked for a while and crashed again. Here is the log:

darshan@Ubuntu18:~$ journalctl -u otbr-agent.service -n 20
-- Logs begin at Wed 2020-04-08 15:16:21 CDT, end at Thu 2020-06-25 11:25:26 CDT. --
Jun 25 11:25:16 Ubuntu18 otbr-agent[1745]: [INFO]-MAC-----: Sending Beacon Request
Jun 25 11:25:16 Ubuntu18 otbr-agent[1745]: [CRIT]-PLAT----: Write() at ../../third_party/openthread/repo/src/posix/platform/hdlc_interface.cpp:247: Inp
Jun 25 11:25:16 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=5/NOTINSTALLED
Jun 25 11:25:16 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
Jun 25 11:25:21 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 25 11:25:21 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 3.
Jun 25 11:25:21 Ubuntu18 systemd[1]: Stopped Border Router Agent.
Jun 25 11:25:21 Ubuntu18 systemd[1]: Started Border Router Agent.
Jun 25 11:25:21 Ubuntu18 otbr-agent[4717]: Running 0.2.0-f93719a
Jun 25 11:25:21 Ubuntu18 otbr-agent[4717]: Thread interface wpan0
Jun 25 11:25:21 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 25 11:25:21 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
Jun 25 11:25:26 Ubuntu18 systemd[1]: otbr-agent.service: Service hold-off time over, scheduling restart.
Jun 25 11:25:26 Ubuntu18 systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 4.
Jun 25 11:25:26 Ubuntu18 systemd[1]: Stopped Border Router Agent.
Jun 25 11:25:26 Ubuntu18 systemd[1]: Started Border Router Agent.
Jun 25 11:25:26 Ubuntu18 otbr-agent[4737]: Running 0.2.0-f93719a
Jun 25 11:25:26 Ubuntu18 otbr-agent[4737]: Thread interface wpan0
Jun 25 11:25:26 Ubuntu18 systemd[1]: otbr-agent.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 25 11:25:26 Ubuntu18 systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
lines 1-21/21 (END)

I am having the same issue and I would like to share te build switches I am using. Maybe that's the culprit.
make -f examples/Makefile-nrf52840 BORDER_AGENT=1 BORDER_ROUTER=1 COMMISSIONER=1 UDP_FORWARD=1 USB=1 BOOTLOADER=USB LINK_RAW=1
Is this ok?

By the way I am running the otbr on a orangePi running Armbian Buster (Debian Buster) and the problem is the same

I'm trying to gather as much information as I can, here is a list:

nrf52840 (E73 module from ebyte) connected via USB and powered by OrangePi Zero LTS pins
Permissions: crw-rw---- 1 root dialout 166, 0 Jun 25 22:23 /dev/ttyACM0
groups user belongs to: tty disk dialout sudo audio video plugdev games users systemd-journal input netdev ssh
ot-br-posix commit: f93719a08c9ff2aee7295c6297c8d54b525656ca
openthread commit: 2ebdf874eb874ccb2d30c96c171878f1ce607c17
flashed nrf52840 with RCP with the following switches BORDER_AGENT=1 BORDER_ROUTER=1 COMMISSIONER=1 UDP_FORWARD=1 USB=1 (different than earlier post)
script used to configure OrangePi -> setup-otbr.txt

From the logs, It seems the RCP crashed. I remember there are some unstable issue in USB=1 mode. Could you try build the RCP according to the link?
https://github.com/openthread/openthread/tree/master/src/posix#nrf52840
Please use USB=0 mode, only connect the jlink port. And could you share the hardware version of your nrf52840?

Thank you for the suggestion. What are the default UART pins in the Px.xx format?

@iDarshan I don't know the board you're using but maybe you can do the same as me and use a USB to serial converter. It seems that USB as a serial transport is being dropped support... Even in Nordic's Infocenter, they mention that it's preferable to use either UART or SPI.

Well, I am getting exactly the same issue and the exit code is: (code=exited, status=6)

Well, I am getting exactly the same issue when using UART and the exit code is: (code=exited, status=6)

@G-Pereira , are you able to test with a Raspberry Pi 3B+ running Raspbian Stretch Lite and an nRF52840 USB Dongle? That configuration seems to work for me. It would be useful to see if some difference in environment is contributing to the issue.

@bukepo I cloned the ot-br-posix repo again. Seems like submodule update didn't work. And yes I am using RCP firmware as mentioned in the guide. After new repo build of ot-br-posix, otbr-agent worked for a while and crashed again.

@iDarshan , can you provide more detail on how you are exercising the Thread network? That would help us reproduce the issue.

Well, I am getting exactly the same issue when using UART and the exit code is: (code=exited, status=6)

@G-Pereira , are you able to test with a Raspberry Pi 3B+ running Raspbian Stretch Lite and an nRF52840 USB Dongle? That configuration seems to work for me. It would be useful to see if some difference in environment is contributing to the issue.

I don't have a Raspberry for the time being.

@bukepo I cloned the ot-br-posix repo again. Seems like submodule update didn't work. And yes I am using RCP firmware as mentioned in the guide. After new repo build of ot-br-posix, otbr-agent worked for a while and crashed again.

@iDarshan , can you provide more detail on how you are exercising the Thread network? That would help us reproduce the issue.

I am trying to configure the border router as the first node on my network so no more devices are involved

Well, I am getting exactly the same issue when using UART and the exit code is: (code=exited, status=6)

@G-Pereira , are you able to test with a Raspberry Pi 3B+ running Raspbian Stretch Lite and an nRF52840 USB Dongle? That configuration seems to work for me. It would be useful to see if some difference in environment is contributing to the issue.

What a second @bukepo just said here that USB is unstable at the moment, how come?

@G-Pereira , are you able to test with a Raspberry Pi 3B+ running Raspbian Stretch Lite and an nRF52840 USB Dongle? That configuration seems to work for me. It would be useful to see if some difference in environment is contributing to the issue.

What a second @bukepo just said here that USB is unstable at the moment, how come?

@G-Pereira , FWIW, the nRF52840 USB Dongle seems to work well enough for me for testing. I agree that in a production system, SPI would be preferred.

@G-Pereira , are you able to test with a Raspberry Pi 3B+ running Raspbian Stretch Lite and an nRF52840 USB Dongle? That configuration seems to work for me. It would be useful to see if some difference in environment is contributing to the issue.

What a second @bukepo just said here that USB is unstable at the moment, how come?

@G-Pereira , FWIW, the nRF52840 USB Dongle seems to work well enough for me for testing. I agree that in a production system, SPI would be preferred.

That's nice to know! At the moment I've trashed my custom board because of a design issue I've made. So I will gather what I've learned to the second iteration and will have your SPI suggestion in mind. Thanks for the support.
To sum it up, I would like to ask you to disregard the issues I've reported since I've noticed that I had other problems with my board.
Thank you all for the support!

@bukepo I cloned the ot-br-posix repo again. Seems like submodule update didn't work. And yes I am using RCP firmware as mentioned in the guide. After new repo build of ot-br-posix, otbr-agent worked for a while and crashed again.

@iDarshan , can you provide more detail on how you are exercising the Thread network? That would help us reproduce the issue.

@jwhui The only difference in standard setup mentioned on openthread.io and mine is that I am using a PC running Ubuntu 18.04 (64 bit) instead of RPi3. I have also tried the same steps with RPi4 instead of RPi3. Same results. otbr-agent is starting for some time and then crashes, maybe because PC goes to sleep. Please let me know if you need more information.

Well, I am getting exactly the same issue when using UART and the exit code is: (code=exited, status=6)

@G-Pereira , are you able to test with a Raspberry Pi 3B+ running Raspbian Stretch Lite and an nRF52840 USB Dongle? That configuration seems to work for me. It would be useful to see if some difference in environment is contributing to the issue.

FWIW, I successfully built a fresh system today RPi3B+ Raspbian Buster with an nRF52840 Dongle (v1.2.0). https://github.com/openthread/ot-br-posix/commit/ad268823f2f5a019b93741da462fa74beabea21f
Below is the step-by-step (sorry) written like a hardware engineer.  I used much fewer switches:
@jwhui I couldn't build the latest ot-br-posix on Raspbian Stretch Lite anymore
I second the use of SPI in production, having seen too many spurious disconnects with cdc-acm.  I build this system to kick the tires on otbr-agent while I figure out how to get SPI working correctly with this version.

Prepared new v1.2.0 nRF52840 Dongle using Ubuntu 16.04 on WSL
git clone https://github.com/openthread/openthread
cd openthread
./script/bootstrap
./bootstrap
make -f examples/Makefile-nrf52840 USB=1 BOOTLOADER=USB
copied file to Windows and programmed with nRF Connect programmer
Do not plug the dongle into the RPI yet
SD Card - Fresh Raspbian Buster
change pw
setup wifi country
change locale,keyboard,timezone to US Eastern
enable ssh
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
git clone https://github.com/openthread/ot-br-posix
cd ot-br-posix
./script/bootstrap
./script/setup
ls /dev/tty*
(plugged in dongle)
ls /dev/tty*
(new device is at /dev/ttyACM0)
sudo nano /etc/default/otbr-agent
(confirmed path is correct already)
sudo reboot
login
(confirmed services are running:  avahi-daemon.service, otbr-agent.service, otbr-web.service)
sudo ot-ctl state returns:
disabled
Done
Connect laptop wifi to SSID = BorderRouter-AP; Password = 12345678
Operate the border router using the web GUI
-done-

@jwhui I couldn't build the latest ot-br-posix on Raspbian Stretch Lite anymore

@rcrouthamel , interesting. I just tried building on Raspbian Stretch Lite on latest master (ad26882) and everything worked as expected.
My steps on a fresh Raspbian Stretch Lite image:
sudo apt-get update
sudo apt-get install git
git clone https://github.com/openthread/ot-br-posix
cd ot-br-posix
./script/bootstrap
./script/setup
sudo reboot

Can you provide any details on what failed for you?

@jwhui Hmm, I'll try again first thing tomorrow.  Come to think of it, I did run the installation for our cellular manager before ot-br-posix, but I can't see how that would be a problem.  Should I be planning to stick with Stretch for Thread Group compliance reasons?

Should I be planning to stick with Stretch for Thread Group compliance reasons?

@rcrouthamel , Stretch is simply our reference platform and what we have tested in the past and is what we recommend in the Border Router Setup Guide, but there is reason otherwise to stick with Stretch. If something else works for you, feel free to use that.

@jwhui Hmm, I'll try again first thing tomorrow. Come to think of it, I did run the installation for our cellular manager before ot-br-posix, but I can't see how that would be a problem. Should I be planning to stick with Stretch for Thread Group compliance reasons?

@jwhui Sorry, my bad.  I built https://github.com/openthread/ot-br-posix/commit/ad268823f2f5a019b93741da462fa74beabea21f today on Stretch Lite with no issues. I'll stick with Stretch while I work out my SPI issues (at least).

Should I be planning to stick with Stretch for Thread Group compliance reasons?

@rcrouthamel , Stretch is simply our reference platform and what we have tested in the past and is what we recommend in the Border Router Setup Guide, but there is reason otherwise to stick with Stretch. If something else works for you, feel free to use that.

@jwhui Raspbian stretch is old. Not getting newer releases of it. Also its not supported on RPi4. So why to stick with old platform and not support the latest one? For broader use of this border router code, it should support various new platforms and build systems. Should be able to build on a custom Linux distro using Yocto as a build system, just an example. That will make porting of this border router on newer platform much easier.

@jwhui Raspbian stretch is old. Not getting newer releases of it. Also its not supported on RPi4. So why to stick with old platform and not support the latest one? For broader use of this border router code, it should support various new platforms and build systems. Should be able to build on a custom Linux distro using Yocto as a build system, just an example. That will make porting of this border router on newer platform much easier.

@iDarshan , the latest versions of Raspbian or Raspberry Pi OS are not stable. One example is the USB problems on Raspberry Pi 4. Another example is when Buster first came out, there were some incompatibilities between network manager and the Wi-Fi driver.
Like I said in https://github.com/openthread/ot-br-posix/issues/486#issuecomment-652210022, Stretch is simply something we've tested and is known to work, which serves as a useful reference for those trying to debug issues. If other (newer) distributions work for you, go ahead and use that. We can look into updating the Border Router Setup Guide once we've validated a given reference platform.

@jwhui So how to use this border router on Linux machine which does not use aptutils or brew for dependency package installation? In the guide it is said that it can be used on any Linux machine.

@jwhui So how to use this border router on Linux machine which does not use aptutils or brew for dependency package installation? In the guide it is said that it can be used on any Linux machine.

@iDarshan , an arbitrary Linux-based platform has far too much variability. A "getting started" guide needs to rely on some kine of reference platform. For us, that is currently Raspberry Pi 3B+ and Docker. Where the guide mentions "any Linux-based machine" that was in reference to Docker.
That said, this is an open-source, community-based project. We welcome all contributions! If there is a reference platform you are passionate about, please feel free to contribute it. For example, the BeagleBone platform support in OTBR was a community contribution.

Closing stale issue.


[Bug]: Optional dependency on llama-index-llms-openai causes import errors

Bug Description
I've encountered an issue with the llama-index-postprocessor-rankgpt-rerank package that seems to stem from its handling of dependencies, specifically llama-index-llms-openai. Despite not using any OpenAI related functionality directly in my code, the mere instantiation of RankGPTRerank causes a ModuleNotFoundError unless llama-index-llms-openai is installed. This behaviour suggests an unconditional import of OpenAI within the RankGPTRerank class, which leads to a hard dependency on the llama-index-llms-openai package.
Version
0.10.1
Steps to Reproduce

Environment Setup: Ensure that llama-index-core, llama-index-postprocessor-rankgpt-rerank, and other related llama-index packages are installed, except for llama-index-llms-openai.

Code Sample: Use the following sample code snippet, which attempts to instantiate RankGPTRerank without directly requiring OpenAI functionalities.

Details
import os
from typing import List

import nest_asyncio
from dotenv import load_dotenv
from google.oauth2 import service_account  # noqa
from llama_index.core.indices import VectorStoreIndex
from llama_index.core.schema import Node
from llama_index.core.schema import QueryBundle
from llama_index.llms.gemini import Gemini
from llama_index.postprocessor.rankgpt_rerank import RankGPTRerank
from llama_index.response_synthesizers.google import set_google_config
from llama_index.vector_stores.google import GoogleVectorStore

load_dotenv()

nest_asyncio.apply()

# Define settings
llm = Gemini(api_key=os.getenv('GEMINI_API_KEY'))
embed_model = llm

credentials = service_account.Credentials.from_service_account_file(
    'service_account_key.json',
    scopes=[
        'https://www.googleapis.com/auth/generative-language.retriever',
    ],
)
set_google_config(auth_credentials=credentials)

corpus_id = os.getenv('CORPUS_ID')

# Set up the Google Vector Store
store = GoogleVectorStore.from_corpus(
    corpus_id=corpus_id,
)

index = VectorStoreIndex.from_vector_store(
    vector_store=store,  # noqa
    embed_model=embed_model,
    chunk_size=256,
)

retriever = index.as_retriever(
    chunk_size=256,
    similarity_top_k=40,
)

def get_retrieved_nodes(query_str: str, retriever_to_use, reranker_top_n: int = 3,
                              with_reranker: bool = True) -> List[Node]:
    query_bundle = QueryBundle(query_str)
    # Configure retriever
    retrieved_nodes = retriever_to_use.retrieve(query_bundle)

    if with_reranker:
        # Configure reranker
        reranker = RankGPTRerank(
            llm=Gemini(
                api_key=os.getenv('GEMINI_API_KEY'),
                temperature=0.0,
            ),
            top_n=reranker_top_n,
            verbose=True,
        )
        retrieved_nodes = reranker.postprocess_nodes(
            retrieved_nodes, query_bundle)

    return retrieved_nodes

retrieved_nodes = get_retrieved_nodes(
    query_str='What is LlamaIndex?',
    retriever_to_use=retriever,
    reranker_top_n=3,
    with_reranker=True,
)

Execution: Run the script. Without llama-index-llms-openai installed, the execution should fail with a ModuleNotFoundError.

Expected Behavior: The library should either handle the absence of llama-index-llms-openai gracefully when an alternative LLM is provided or document the necessity of its presence.

Actual Behavior: The script raises a ModuleNotFoundError indicating that llama_index.llms.openai module cannot be found, despite not using any OpenAI-specific functionality.

Relevant Logs/Tracbacks
Traceback (most recent call last):
  File "C:\Users\User\Projects\project\temp.py", line 17, in <module>
    from llama_index.postprocessor.rankgpt_rerank import RankGPTRerank
  File "C:\Users\User\Projects\project\venv\lib\site-packages\llama_index\postprocessor\rankgpt_rerank\__init__.py", line 1, in <module>
    from llama_index.postprocessor.rankgpt_rerank.base import RankGPTRerank
  File "C:\Users\User\Projects\project\venv\lib\site-packages\llama_index\postprocessor\rankgpt_rerank\base.py", line 12, in <module>
    from llama_index.llms.openai import OpenAI
ModuleNotFoundError: No module named 'llama_index.llms.openai'

Process finished with exit code 1

Suggested Solutions:
I understand the utility of providing a default LLM for ease of use, but it might be beneficial for the library's flexibility and usability to adopt one of the following approaches:

Lazy Importing: Delay the import of OpenAI until it's explicitly needed. This could prevent the error from occurring in scenarios where OpenAI is not used.

Conditional Importing: Implement a mechanism to conditionally import OpenAI based on the runtime configuration or through explicit user action, ensuring that the import only occurs if OpenAI functionality is required.

Dependency Injection: Allow users to inject their preferred LLM instance (e.g., Gemini) at runtime, avoiding the need for a default import altogether.

Documentation Update: If maintaining the current implementation is preferable, it may be helpful to explicitly document this dependency requirement to guide users in setting up their environment correctly.

Thank you for considering this issue.


More informative page titles

I don't think our templates currently let us set the page title. But then our demos end up with this:

I should have added a more informative title in case someone linked to it.

i added these to the routes, although it won't help for the case mentioned above because we are using angularjs the title won't be rendering in such preview mode, unless the js is fully loaded


Docker cleanup cron task

This runs the commands listed in the opsmanual to clean up docker space
that is built up from dangling images.
A more thorough alternative to this could be to look at something like:
https://github.com/meltwater/docker-cleanup

Thanks @SamLR - I've made those changes, it looks a lot cleaner (less need for comments)


SIGSEGV 11 on Beta and Dev suddenly

[        ] F/libc    ( 6901): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 7008 (are.myguide.app), pid 6901 (are.myguide.app)
[ +206 ms] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[        ] Build fingerprint: 'motorola/river_amz/river:10/QPUS30.52-23-4/6de4a:user/release-keys'
[        ] Revision: 'PVT'
[        ] ABI: 'arm64'
[   +1 ms] Timestamp: 2020-09-12 08:54:59-0400
[  +23 ms] pid: 6901, tid: 7008, name: are.myguide.app  >>> care.myguide.app <<<
[   +1 ms] uid: 10266
[        ] signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
[  +49 ms] Cause: null pointer dereference
[        ]     x0<PHONE_NUMBER>000000  x1<PHONE_NUMBER>000000  x2<PHONE_NUMBER>000000  x3  00000079f6fe0658
[        ]     x4  0000007a5d002538  x5  0000007a5d01ab00  x6  00000079f6fe02cc  x7<PHONE_NUMBER>000000
[  +26 ms]     x8  00000079f6fe0688  x9<PHONE_NUMBER>000000  x10<PHONE_NUMBER>000000  x11 0000007a40000000
[        ]     x12<PHONE_NUMBER>000060  x13<PHONE_NUMBER>e00100  x14<PHONE_NUMBER>000001  x15 000048644f4dcb18
[   +1 ms]     x16 0000007aec5bc8f0  x17 0000007aec5ae81c  x18 00000079f5a5a000  x19 00000079f6fe0718
[        ]     x20<PHONE_NUMBER>000000  x21 00000079f6fe0678  x22<PHONE_NUMBER>000800  x23<PHONE_NUMBER>00065a
[  +61 ms]     x24 00000079fb19ec5b  x25 00000079f6fe0d50  x26<PHONE_NUMBER>000001  x27<PHONE_NUMBER>000055
[   +2 ms]     x28 00000079fc9669a0  x29<PHONE_NUMBER>000000
[  +29 ms]     sp  00000079f6fe0670  lr  00000079fc32c1f4  pc  00000079fc32c1f4
[        ] backtrace:
[   +1 ms]       #00 pc<PHONE_NUMBER>3461f4  /data/app/care.myguide.app-O7cK1M2OPwg6mKUxTUw6zw==/lib/arm64/libflutter.so (BuildId: ed61359865ec8404e21864594776b9dcbe60a137)

DoctorV
    • Flutter version 1.22.0-9.0.pre at C:\Users\dabon\Documents\development\flutter
    • Framework revision 7a43175198 (2 weeks ago), 2020-08-28 23:18:04 -0400
    • Engine revision 07e2520d5d
    • Dart version 2.10.0 (build 2.10.0-73.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\dabon\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.48.2)
    • VS Code at C:\Users\dabon\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.14.1

[√] Connected device (1 available)
    • moto g 7 (mobile) • ZY2267J7QD • android-arm64 • Android 10 (API 29)

• No issues found!

The app manages to launch but immediately crashes, spitting out this error.

Hi @Puretie
Can you please provide your flutter run --verbose, your pubspec.yaml and a complete reproducible minimal code sample
Thank you

i have the same issue in stable channel, i don't get this error any time:
Performing hot reload...
Syncing files to device WAS LX1A...
F/libc    (18690): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x36013f in tid 22036 (2.ui)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'HUAWEI/WAS-LX1A/HWWAS-H:8.0.0/HUAWEIWAS-LX1A/395(C185):user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 18690, tid: 22036, name: 2.ui  >>> com.example.app <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x36013f
    x0   00000071eb221600  x1   00000071eb221b50  x2   00000071eb221740  x3<PHONE_NUMBER>000000
    x4<PHONE_NUMBER>000000  x5<PHONE_NUMBER>000000  x6   ffffffffffffffff  x7<PHONE_NUMBER>000001
    x8<PHONE_NUMBER>360138  x9   00000071f8800041  x10<PHONE_NUMBER>9affff  x11  00000071f46fb8b0
    x12<PHONE_NUMBER>f7a6e8  x13  00000071f46fb9c0  x14  00074d310f496153  x15  00004417a3ffd360
    x16  00000071fc08b8c0  x17  000000721ae68948  x18<PHONE_NUMBER>000000  x19  00000071f46fb418
    x20  00000071eb221b50  x21<PHONE_NUMBER>000000  x22  00000071fc16a130  x23  00000071eb221600
    x24  00000071fa8965c2  x25  00000071ed392800  x26  00000071f46fba48  x27  00000071f46fba68
    x28  00000071fc02bbd0  x29  00000071eb221740  x30  00000071fbe1dca4
    sp   00000071f46fb380  pc   00000071fbf34dbc  pstate<PHONE_NUMBER>000000
backtrace:
    #00 pc<PHONE_NUMBER>633dbc  /data/app/com.example.app-2OHRSaHLPfIforBPzoBjfQ==/lib/arm64/libflutter.so (offset 0x1240000)
    #01 pc<PHONE_NUMBER>51cca0  /data/app/com.example.app-2OHRSaHLPfIforBPzoBjfQ==/lib/arm64/libflutter.so (offset 0x1240000)

flutter --version
Flutter 1.20.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision fba99f6cf9 (5 days ago) • 2020-09-14 15:32:52 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2

Hi @Puretie
Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

@flutter-symbolizer-bot

@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/65686#issuecomment-695759536 debug

@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/65686#issuecomment-695759536 engine#d1bc06f032 debug

@flutter-symbolizer-bot

Without a reduced test case or a complete stack trace, this issue is not actionable.


addKmlOverlay callback does not return everything on Android

Hi,
on android, the addKmlOverlay callback return only the Polyline items, but not the Marker items.
On iOS it works like a charm, the callback contain polylines and markers.
This is my config :
cordova android 5.1.1
cordova ios 4.1.1
ionic 1.3.1 (=> angular 1.5.3)
plugin name="cordova-plugin-googlemaps" spec="https://github.com/mapsplugin/cordova-plugin-googlemaps"
and this is my code :
class MapCtrl {

    /**
     * @ngInject
     */
    constructor() {

        this.mapDiv = document.getElementById("map_canvas"); // Define a div tag with id="map_canvas"
        this.map = plugin.google.maps.Map.getMap(this.mapDiv); // Initialize the map plugin

        this.onMapInit = function(map) {
            map.clear(); //Removes all markers, polylines, polygons, overlays, etc
            map.off(); //Removes event listeners

            map.addKmlOverlay({
                'url': "http://myrally.io/kml/test.kml",
                'animation': false
            }, function(kmlOverlay) {

                _.each(kmlOverlay.getOverlays(),
                    function(value) {
                        console.log(value);
                    }
                );
            });
        };

        // You have to wait the MAP_READY event.
        this.map.on(plugin.google.maps.event.MAP_READY, this.onMapInit);
    }
}

I am stucked...Do you have any idea ?
I hope you have enough informations to help.
Thanks in advance.

Another information : the Marker items are loaded on the map, but I don't have access their instance.
My goal is to change the icon of some markers (it works on iOS like I said !)
The weirdest part is if I display the callback parameter (kmlOverlay) in the javascript console, I can see the Marker items (but the array length does not "count" them) :

Do you have any idea ?
Thanks a lot.

https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/v1.2.1/example/DemoApp/www/pages/kmlOverlay.html#L219-L244

If you just change the marker icon, you can do like this (I haven't tested this, but should work):
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
    <Document>
        <Style id="My_Style">
            <IconStyle>
                <Icon>
                    <href>http://dagik.org/images/dagik_logo.png</href>
                </Icon>
            </IconStyle>
        </Style>
        <Placemark>
            <name> New point</name>
            <description>This is a new point to learn KML format.</description>
            <styleUrl> #My_Style</styleUrl>
            <Point>
                <coordinates>135.2,35.4,0</coordinates>
            </Point>
        </Placemark>
    </Document>
</kml>

Hello,
thank you for your answer.
This is exactly what I do to load the kml. The kml is loaded correctly. But
At the kml loading I want to change some marker icons and set the anchor, but it does not work because I can't have access to Marker items in the kmlLayer parameter. I tried with the example :
loadKml(map, url) {

        map.addKmlOverlay({
            url: url,
            preserveViewport: false,
            animation: true
        }, function(kmlLayer) {

            console.table(kmlLayer);

            kmlLayer.on(plugin.google.maps.event.OVERLAY_CLICK, function(overlay, latLng) {
                switch (overlay.type) {
                    case "Marker":
                        overlay.setSnippet("Marker clicked!");
                        overlay.showInfoWindow();
                        break;
                    case "Polygon":
                        overlay.setFillColor("red");
                        break;
                    case "Polyline":
                        var width = overlay.getWidth();
                        overlay.setWidth(10);
                        setTimeout(function() {
                            overlay.setWidth(width);
                        }, 3000);
                        break;
                }

            });
        });
    }

This line displays only the polyline Items
console.table(kmlLayer);

addKmlOverlay is designed similar with kmlLayer of the Google Maps API v3.
Since that, there is no option to access each elements directly.
Instances are managed internally.

But it works on iOS, I have access to Polyline and Marker items. But on Android just Polyline items, that's the problem

Please read the code before asking, and try debugging by yourself. It's full open source.
https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/www/googlemaps-cdv-plugin.js

Ok I am gonna try...But I am wondering, maybe there is another solution.
Is it possible to change several properties of several markers at the same time ?
For example a click on a button will change several marker icons

You can do.

addMarkers(data, function(markers) {
  markers.forEach(function(marker) {
    map.on("myCustomEvent", function() {
      onMyPropertyChanged(marker);
    });
  });
});

function onMyPropertyChanged(marker) {
  var myProperty = marker.get("myProperty");
  if (myProperty == "Yes") {
    marker.setIcon("new icon");
  }
}

button.addEventListener("click", function() {
  map.trigger("myCustomEvent");
});

Check out the addMarkers() function at here
https://github.com/mapsplugin/cordova-plugin-googlemaps/wiki/Marker#create-multiple-markers

Also read this page.
https://github.com/mapsplugin/cordova-plugin-googlemaps/wiki/BaseClass

Ok thank you I will try it.
Another information about my issue. You said :

addKmlOverlay is designed similar with kmlLayer of the Google Maps API v3.
Since that, there is no option to access each elements directly.
Instances are managed internally.

But I used the getOverlays() function. It's supposed to return an Array.<Polyline | Polygon | Marker.
I insist because it's a strange behavior. I mean, the markers are loaded and displayed on the Map, but they are not in the array returned by the getOverlays() function, only on Android. I really don't understand that behavior...It should work, like on iOS.
This is my full function, with the getOverlays() function, that's quite easy :
loadKml(map) {

        map.addKmlOverlay({
            'url': "http://m[...]v1.kml",
            'animation': false
        }, function(kmlOverlay) {

            _.each(kmlOverlay.getOverlays(),
                function(value) {

                    if(value.type === "Marker") {

                        if(value.getTitle().includes("Départ")){
                            value.setIcon("images/departureMarker.png");
                            value.setIconAnchor(57, 57);
                        }
                        else if(value.getTitle().includes("Arrivée")){
                            value.setIcon("images/arrival.png");
                            value.setIconAnchor(57, 57);
                        }
                        else {
                            value.setIcon("images/zp_ok.png");
                        }
                    }
                }
            );

            kmlOverlay.on(plugin.google.maps.event.OVERLAY_CLICK, function(overlay) {

            });
        });
    }

What do you think ?
Thanks a lot.

I don't remember exactly, and I have no enough time to debug it.
That's why I said, "please read the code before asking".

About the other solution to change several properties of several markers at the same time :

You can do.
addMarkers(data, function(markers) {
markers.forEach(function(marker) {
map.on("myCustomEvent", function() {
onMyPropertyChanged(marker);
});
});
});
function onMyPropertyChanged(marker) {
var myProperty = marker.get("myProperty");
if (myProperty == "Yes") {
marker.setIcon("new icon");
}
}
button.addEventListener("click", function() {
map.trigger("myCustomEvent");
});
Check out the addMarkers() function at here
https://github.com/mapsplugin/cordova-plugin-googlemaps/wiki/Marker#create-multiple-markers

I can do that even if my markers are already added on the map ?


Update PULL_REQUEST_TEMPLATE.md: sha256

Nice idea of changing “updating a cask” to “updating the sha256 only”. Makes the whole section more obvious.
Made a few consistency changes (“if” and “:” not bold) and shortened the link (it was such a long stretch, I feel it would be ignored as it looked more like blue text than a link).


Fix #2776 - Add implicit [BindRequired] for value type properties

/cc @dougbu
Main changes here are to tests which depending on the old behavior. I've tried to clean things up as much as possible while retaining the spirit of the tests.

ping @dougbu

:watch:

Updated

:shipit: after fixing cut 'n paste issues


computeSegmentIndexForLayoutDirection: instructionsTopView.bounds.size.width is 0, segmentIndex is +Inf

computeSegmentIndexForLayoutDirection: instructionsTopView.bounds.size.width is 0, segmentIndex is +Inf
I'm getting the error:
attachToViewController: Instructions could not be properly attached to the window, did you callstartOninsideviewDidLoadinstead ofViewDidAppear?
Although I put the startOn on viewdidappear...

+1

If I add an afterDelay of 0 when I run the function it works
self.performSelector(#selector(BattleViewController.initInstructions), withObject: nil, afterDelay: 0)

Hello @galharth, thanks for reporting the problem. This is a nasty one, few people have been ecountering the issue, but I have neither been able to reproduce the issue, nor track down the problem. It's especially interesting that dispatching the call on the main queue removes the issue. I'll look into it.

Closing, as the issue has probably become irrelevant following the numerous refactoring.


Not working on Windows systems

Describe the bug
When I trying to run the jscpd an erro occurs
To Reproduce
Steps to reproduce the behavior:
Run the jscpd on Windows 10
Expected behavior
Error to read path
Screenshots

Desktop (please complete the following information):

OS: [Windows]
OS Version [10]
NodeJS Version [8.15.0]
jscpd version [3.2.0]

Additional context
Add any other context about the problem here.

Thank you for the report, looks like the issue with version of node.js, not with Windows OS

Thank you for the report, looks like the issue with version of node.js, not with Windows OS

Yes, it does not work on Node 8, see #346.

fixed at<EMAIL_ADDRESS>


Inspector values cannot be modified after "Play" window is closed

Godot version: 3.1.1 (Mono)
OS version: Ubuntu 19.04
Issue description: After "Playing" and closing the window, fields cannot be modified until another node is selected first.
Steps to reproduce:

Select a node (I think it must have a script attached)
Press Run (F5)
Close the running game
Attempt to edit a text field

Can anyone still reproduce this bug in Godot 3.2.2 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

No answer, so closing. Please comment if you can still reproduce the issue in Godot 3.3 or later.


Component context should be cleaned up between integration tests?

I've reproduced my issue in a repo here: https://github.com/samueljseay/test-component-issue
Sorry I would've done it with ember twiddle but having a bit of trouble with it.
It looks from the ember test helper code and from the behaviour of the repo above that component context is not cleaned up properly between tests. Is this intended? it feels to me like context should be completely isolated and it leads to unexpected results in my tests.
a snippet of the tests from the repo above:
the test:
test('it adds some items', function(assert) {
  this.render(hbs`{{my-component}}`);

  this.$('#adder').click();
  this.$('#adder').click();

  assert.equal(this.$('.thing').length, 2, 'should be 2 things');
});

test('it does not still have those items on the next test', function(assert) {
  this.render(hbs`{{my-component}}`);
  assert.equal(this.$('.thing').length, 0, 'should be no things to begin with');
  // fails, there are still 2 things from the last test
});

test('I see if I override the context that it works as expected', function(assert) {
  this.set('things', []);
  this.render(hbs`{{my-component things=things}}`);
  assert.equal(this.$('.thing').length, 0, 'should be no things to begin with');
  //passes, there are no things
});

the component:
export default Ember.Component.extend({
  things: [],
  actions: {
    addThing: function() {
      this.get('things').pushObject(Ember.Object.create({
        text: 'a thing'
      }));
    }
  }
});

This is the issue:
 things: [],

You are storing a mutable object on the component prototype, which is shared by all instances. This is not a bug in Ember or ember-test-helpers, it is just how JavaScript's inheritance works (I know it is kinda bonkers when you first run up against it).
The fix is something like this:
export default Ember.Component.extend({
  init() {
    this._super(...arguments);
    this.things = [];
  },

  actions: {
    addThing: function() {
      this.get('things').pushObject(Ember.Object.create({
        text: 'a thing'
      }));
    }
  }
});

Read more in https://dockyard.com/blog/2014/04/17/ember-object-self-troll.

Thanks so much! That helps a lot to clarify that! Not sure how I ran so long with Ember and didn't run into that.


Disabling input update when scrolling through suggestions

I'm using typeahead.js as more of a quick navigation tool rather than a search engine (think spotlight on Mac OS X). Therefore, I don't want the input to update when the user scrolls through suggestions. I want the user's original query to stay there and not change (only clear when appropriate).
Is there a way to do that?

Duplicated:
https://github.com/twitter/typeahead.js/issues/884#issuecomment-52456111

Can you close this one and continue in the other one. Thanks


Preprocessor directives don't flow from the IDE to the compiler

When the new Roslyn tokenizer is enabled in the compiler, it also requires a CSharpParseOptions to be provided. Currently the IDE does not serialize this information across the wire, so the language server cannot supply the right one for IDE scenarios, and users get default behaviour.
It would be good if we can focus the compiler dependency down to just what is needed (proprocessor directives is a best guess) and then ensure we are including that information in the RazorConfiguration that the IDE provides.
And if we're changing how UseRoslynTokenizer gets to the compiler, it would be worth reviewing this comment too:
https://github.com/dotnet/razor/pull/11092#discussion_r1817052920

❓ is there a reason we don't just add CSharpParseOptions to RazorConfiguration? Is it just serialization problems or something else?

Yes, just serialization. We need Json and MessagePack serialization for it, which it doesn't natively support, so we'd have to write out own formatters, and that would mean keeping up with new properties added to it, which sounds like a future bug farm when someone pulls on a random property from CSharpParseOptions, not realising we didn't serialize that one, so they get the default value in the IDE, and expected value in the command line.

@333fred Please take a look.

@davidwengier @chsienki I'm sorry, but I have absolutely no idea what the actual ask here is. What is this issue actually tracking, and what are we expecting to do about it?

Also likely relevant pieces of existing Roslyn code: https://github.com/dotnet/roslyn/blob/main/src/Workspaces/CSharp/Portable/Serialization/CSharpOptionsSerializationService.cs, https://github.com/dotnet/roslyn/blob/main/src/Workspaces/Core/Portable/Serialization/AbstractOptionsSerializationService.cs#L77-L104

What is this issue actually tracking, and what are we expecting to do about it?

Right now the Razor compiler takes in CSharpParseOptions which is something the LSP server cannot provide, so in the IDE everything will just use the default. From your comments in https://github.com/dotnet/razor/pull/11091#discussion_r1815986717 it seemed like only PreprocessorSymbolNames were actually needed, however. So if the compiler can be changed to only take that value, then we can plumb it around everywhere, and IDE will reflect the users real project intentions.

So if the compiler can be changed to only take that value, then we can plumb it around everywhere, and IDE will reflect the users real project intentions.

This isn't something we can do; we should use the real CSharpParseOptions, either from cohosting where no serializer is required, or from exposing the serializer/deserializer that the Roslyn IDE already uses via EAP. We are passing the entire parse options object to the Roslyn tokenizer, and I do not think the Razor compiler can or should make guarantees about which pieces of that object it needs; it is likely to get it wrong.


Remove validations on inherited operations

I have two operations where one inherits from the other. The create operation requires data that the update operation does not, so there are a few validators defined on create that should not be on update. Is there a way to have update inherit from create and then remove the unnecessary validations, or do I need to consider an alternative inheritance/reuse strategy?

hi @AndrewSwerlick ,
When it happens, I do one of the following:

create a reform module and use composition if make sense in real world (eg. AddressForm / TelephoneForm are composed in a ProfileForm)

if I just need to change a field (think its your case), I do

class Thing
  class Create < Trailblazer::Operation
    contract do
      property :x
      property :y
    end
  end

  class Update < Create
    contract do
      property :y, readable: false # can use writeable, or virtual
    end
  end
end

helped you?

@fernandes Good idea with the form module.
@AndrewSwerlick As Celso says, you have to use Reform::Form::Module. This is documented [here](https://github.com/apotonick/reform#forms-in-modules( (not in the book, so far, and not sure if I should mention it).
In the module, you can have shared logic and then include it in both contracts.
In Reform 2.1 (or 2.2, not sure if I will manage to push that into the upcoming 2.1), you can have validation groups: https://github.com/apotonick/reform/wiki/Rich-Validations They will be removeable when inheriting.
Let me know if you need more help here! :beers:

No that's clear. I suspected modules were going to be the approach, and that's what I meant by alternative inheritance/reuse strategy. I just wanted to make sure.

:+1: :smile_cat:


Check whether element is in document before calling jQuery.fn.offset()

This pull request includes a

[X] Bug fix
[ ] New feature
[ ] Translation

The following changes were made
As of jQuery 3.0, jQuery.fn.offset() requires an element connected to a document. In earlier versions of jQuery, the .offset() method would return a value of { top: 0, left: 0 } for some cases of invalid input. jQuery 3.0 throws errors in some of these cases.
This PR checks whether the element is within the document. If not, it sets the offset to { top: 0, left: 0 } which is what was happening before. I believe this covers all valid scenarios but perhaps someone else can comment?
See the jQuery migrate documentation for more info. https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryfnoffset-requires-an-element-connected-to-a-document

I know this might be tough, since our positioning logic is not the easiest to read and test, but would it be possible for you to create a test for this?
It wouldn't be a whole lot different from
https://github.com/select2/select2/blob/2fce8ae6c4937b88c332ad3e30e135cf24504cf1/tests/dropdown/positioning-tests.js#L61-L119
Except you don't need to play around with the CSS and you don't need to attach it to the QUnit fixture (since that would add it into the document).

I will see what I can do.
On Tue., Jul. 23, 2019, 05:18 Kevin Brown<EMAIL_ADDRESS>wrote:

I know this might be tough, since our positioning logic is not the easiest
to read and test, but would it be possible for you to create a test for
this?
It wouldn't be a whole lot different from
https://github.com/select2/select2/blob/2fce8ae6c4937b88c332ad3e30e135cf24504cf1/tests/dropdown/positioning-tests.js#L61-L119
Except you don't need to play around with the CSS and you don't need to
attach it to the QUnit fixture (since that would add it into the document).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/select2/select2/pull/5584?email_source=notifications&email_token=ABBVGEKHKIN27SPWTQNRPTTQA3ZIXA5CNFSM4IGA6KZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2S5M3A#issuecomment-514184812,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABBVGEILKJCNXRVJJZZX3ADQA3ZIXANCNFSM4IGA6KZA
.

@kevin-brown should this test live within select2/tests/dropdown/positioning-tests.js

should this test live within select2/tests/dropdown/positioning-tests.js

That sounds like a good place for it, yes.

In the interest of getting 4.0.9 out the door without procrastinating even further, I'm moving this PR to land in 4.0.10.

Sorry. I have been swamped with work lately.
I will try to get to this soon.
On Wed, Aug 21, 2019 at 5:31 PM Kevin Brown<EMAIL_ADDRESS>wrote:

In the interest of getting 4.0.9 out the door without procrastinating even
further, I'm moving this PR to land in 4.0.10.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/select2/select2/pull/5584?email_source=notifications&email_token=ABBVGEJYGU5ZILH7IT544WTQFXM5LA5CNFSM4IGA6KZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD43QHMQ#issuecomment-523699122,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABBVGEM6ORWSBYPLMKLLFYDQFXM5LANCNFSM4IGA6KZA
.


WIP: updates to zig 0.9.0

Hi! I am very new to Zig and I have very little idea of what I am doing as I had never touched anything Zig (or C, for that matter) up until a couple of hours ago.
That said, I've tried running a couple of examples from this repo using the latest Zig nightly build and got a few compilation errors. Guessing I was looking at issues brought by the changes in the latest versions of Zig I through I'd try my hand at updating the code.
So far I got the following examples working:

[ ] tilescript
[ ] tilemap
[ ] editor
[ ] texture_packer_cli
[ ] texture_packer
[X] empty
[ ] offscreen_rendering
[X] todo
[ ] docking

Questions:

what to do with the missing  edge.zig file imported by src/math/rect.zig?
unused params such as fn hello(world: T) {} should be ignored using fn hello(_: T) {} or fn hello(world: T) { _ = world; }?

The commits are looking good to me so far! To answer your questions:

Edge struct is below
It’s probably cleaner and easier to do fn hello(_: T)

pub const Edge = enum(u8) {
    right,
    left,
    top,
    bottom,

    pub fn opposing(self: Edge) Edge {
        return switch (self) {
            .right => .left,
            .left => .right,
            .top => .bottom,
            .bottom => .top,
        };
    }

    pub fn horizontal(self: Edge) bool {
        return self == .right or self == .left;
    }

    pub fn vertical(self: Edge) bool {
        return self == .top or self == .bottom;
    }

    pub fn max(self: Edge) bool {
        return self == .right or self == .bottom;
    }
};

Thank you!
WRT ignoring unused parameters, turns out that it's not currently possible to use _ multiple times as a way to ignore unused params (although I think Zig is moving in that direction). I guess I'll have to keep using a mix of both!

Got all examples working with the exception of tilescript, for which I am getting a error: evaluation exceeded 1000 backwards branches. I guess it has something to do with infinite recursion/looping but my understanding of Zig is not quite there yet. I'm moving to using zig-upaya for a little project of mine and hopefully come back here with a higher degree of competency. Feel free to comment upon this PR if you'd like me to change anything or merge this, I'll open a new one for tilescript if/when I get around to it.

Looks good! Thanks! The tilescript issue probably just needs a @setEvalBranchQuota call so the compiler doesnt give up.


[Win - v1.3.1] Some issues after update

After I updated to 1.3.1 the program no longer shows at the task bar, and it's also removed from "ALT + TAB"-choices. The only way to open the window now is to click the symbol in the tray:

Same issue here. Would be nice to still have it in the ALT+TAB choices - especially when a window is open!

Same here! :(
It would be nice to continue to have the program minimized in the task bar...

Sorry, this wasn't intended. Fixed in 1.3.2.


Filter secrets for TLS cert watcher

Fixes https://github.com/istio/istio/issues/35231
WIP because I need to clean it up + fix the .Run code

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
51e956e9560015ed7c9e53df539f5b7184ba34cc
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
51e956e9560015ed7c9e53df539f5b7184ba34cc
link
/test unit-tests_istio

integ-pilot-multicluster-tests_istio
51e956e9560015ed7c9e53df539f5b7184ba34cc
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

cc @istio/wg-security-maintainers


Exclude websites & folders in getDataSourceUsage

We want to be able to filter out websites and folders when retrieving datasources usage (see here)

This is actually already the case as we filter out non managed data sources.