BGPv1 - Reject all inbound BGP advertisements

Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[ ] All code is covered by unit and/or runtime tests where feasible.
[ ] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[x] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[x] Provide a title or release-note blurb suitable for the release notes.
[x] Are you a user of Cilium? Please add yourself to the Users doc
[x] Thanks for contributing!

BGPv1 - Reject all inbound BGP advertisements
Overview
Cilium's BGPv1 Control Plane accepts all BGP Paths advertised to it.  However, these paths do not program the datapath.
This PR modifies Cilium's BGPv1 implementation to reject all inbound BGP advertisements.
The desire for this change is:

To reduce confusion by administrators of a Cilium installation.  When viewing cilium bgp routes, the current output, which shows all received BGP paths, gives the impression that these paths/routes are being used for routing by the CNI (programmed into the dataplane).  For Cilium, this is not true and they are simply ignored.
To move a potential failure point in Cilium's BGP stack.  In the BGPv1 implementation, a GoBGP server is instantiated by Cilium's directly in Go.  It does not run as an external process.  If GoBGP experiences a memory leak or panic, it has the potential to disrupt Cilium as well.  One point of failure that I've seen in the past is when using GoBGP in environments containing millions of BGP paths.  While it's an unlikely use case for a CNI, the potential exists that one could try to pass full Internet tables into their CNI.  As these are unused, it would be ideal to drop them.

Description

In pkg/bgpv1/manager/reconciler/route_policy.go, a new func named defaultImportPolicy() was added which generates a default import policy for a given BGP peer.  It rejects all imported (received) routes.
In pkg/bgpv1/manager/reconciler/route_policy.go, Reconcile() was modified to add the above default import policy to each peer.  The existing var named policy was renamed to exportPolicy.

Testing
Manual Testing
For testing of this change, I first referenced https://docs.cilium.io/en/latest/contributing/development/bgp_cplane/ to bring up a local Kind K8s cluster with Cilium.  The exact steps were:
make kind-bgp-v4

KIND_CLUSTER_NAME=bgp-cplane-dev-v4 make kind-image
cilium install --chart-directory install/kubernetes/cilium -f contrib/containerlab/bgp-cplane-dev-v4/values.yaml --set image.override="localhost:5000/cilium/cilium-dev:local" --set image.pullPolicy=Never --set operator.image.override="localhost:5000/cilium/operator-generic:local" --set operator.image.pullPolicy=Never

Next, I brought up a "hello world" service using:
kubectl create deployment hello-node --image=registry.k8s.io/e2e-test-images/agnhost:2.39 -- /agnhost netexec --http-port=8080

kubectl expose deployment hello-node --type=LoadBalancer --port=8080

Then, in the FRR container (clab-bgp-cplane-dev-v4-router0), I added additional routes and advertised those into BGP using:

docker exec -ti clab-bgp-cplane-dev-v4-router0 bash

bash-5.1# ip route add <IP_ADDRESS>/24 dev lo
bash-5.1# ip route add <IP_ADDRESS>/24 dev lo
bash-5.1# ip route add <IP_ADDRESS>/24 dev lo
bash-5.1# ip route add <IP_ADDRESS>/24 dev lo
bash-5.1# ip route add <IP_ADDRESS>/24 dev lo

bash-5.1# vtysh

Hello, this is FRRouting (version 8.4_git).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

router0# conf t
router0(config)# router bgp 65000
router0(config-router)# network <IP_ADDRESS>/24
router0(config-router)# network <IP_ADDRESS>/24
router0(config-router)# network <IP_ADDRESS>/24
router0(config-router)# network <IP_ADDRESS>/24
router0(config-router)# network <IP_ADDRESS>/24

These were observed in:
router0# show ip bgp
...
   Network          Next Hop            Metric LocPrf Weight Path
*> <IP_ADDRESS>/32   <IP_ADDRESS>                               0 65002 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i

[BEFORE] On Cilium's side, before this PR, these were observed in:
$  cilium bgp peers
Node                              Local AS   Peer AS   Peer Address   Session State   Uptime   Family         Received   Advertised
bgp-cplane-dev-v4-control-plane   65001      65000     <IP_ADDRESS>       established     7m42s    ipv4/unicast   6          0
                                                                                ipv6/unicast   0          0
bgp-cplane-dev-v4-worker          65002      65000     <IP_ADDRESS>       established     7m40s    ipv4/unicast   6          2
                                                                                ipv6/unicast   0          1

$  cilium bgp routes
(Defaulting to vailable ipv4 unicastroutes, please see help for more options)

Node                              VRouter   Prefix             NextHop    Age     Attrs
bgp-cplane-dev-v4-control-plane   65001     <IP_ADDRESS>/24   <IP_ADDRESS>   4m19s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65001     <IP_ADDRESS>/24   <IP_ADDRESS>   4m16s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65001     <IP_ADDRESS>/24   <IP_ADDRESS>   4m15s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65001     <IP_ADDRESS>/24   <IP_ADDRESS>   3m15s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65001     <IP_ADDRESS>/24   <IP_ADDRESS>   3m29s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65001     <IP_ADDRESS>/32     <IP_ADDRESS>   7m38s   [{Origin: i} {AsPath: 65000 65002} {Nexthop: <IP_ADDRESS>} {Communities: 65002:100} {LargeCommunity: [ 65002:100:1]}]
bgp-cplane-dev-v4-worker          65002     <IP_ADDRESS>/24   <IP_ADDRESS>   4m19s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65002     <IP_ADDRESS>/24   <IP_ADDRESS>   4m16s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65002     <IP_ADDRESS>/24   <IP_ADDRESS>   4m15s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65002     <IP_ADDRESS>/24   <IP_ADDRESS>   3m15s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65002     <IP_ADDRESS>/24   <IP_ADDRESS>   3m29s   [{Origin: i} {AsPath: 65000} {Nexthop: <IP_ADDRESS>} {Med: 0}]
                                  65002     <IP_ADDRESS>/32     <IP_ADDRESS>    7m38s   [{Origin: i} {Nexthop: <IP_ADDRESS>}]

[AFTER] On Cilium's side with this PR, I saw:
$  cilium bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

Node                       VRouter   Prefix           NextHop   Age     Attrs
bgp-cplane-dev-v4-worker   65002     <IP_ADDRESS>/32   <IP_ADDRESS>   2m34s   [{Origin: i} {Nexthop: <IP_ADDRESS>}]

Inspecting Cilium using cilium-dbg on bgp-cplane-dev-v4-worker:
root@bgp-cplane-dev-v4-worker:/home/cilium# cilium-dbg bgp peers
Local AS   Peer AS   Peer Address   Session       Uptime   Family         Received   Advertised
65002      65000     <IP_ADDRESS>:179   established   4m13s    ipv4/unicast   6          2
                                                           ipv6/unicast   0          1

root@bgp-cplane-dev-v4-worker:/home/cilium# cilium-dbg bgp route-policies
VRouter   Policy Name                                   Type     Match Peers   Match Prefixes (Min..Max Len)                        RIB Action   Path Actions
65002     <IP_ADDRESS>/32-CiliumLoadBalancerIPPool-cae...   export   <IP_ADDRESS>/32   {<IP_ADDRESS>/22 (32..32)} {<IP_ADDRESS>/22 (32..32)}   none         {AddCommunities: [65002:100]} {AddLargeCommunities: [65002:100:1]}
65002     <IP_ADDRESS>/32-import                            import   <IP_ADDRESS>/32                                                        reject

root@bgp-cplane-dev-v4-worker:/home/cilium# cilium-dbg bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

VRouter   Prefix           NextHop   Age     Attrs
65002     <IP_ADDRESS>/32   <IP_ADDRESS>   4m25s   [{Origin: i} {Nexthop: <IP_ADDRESS>}]

Inspecting Cilium using cilium-dbg on bgp-cplane-dev-v4-control-plane:
$  k exec cilium-lrmbw -n kube-system bash -ti
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.

root@bgp-cplane-dev-v4-control-plane:/home/cilium# cilium bgp peers
Local AS   Peer AS   Peer Address   Session       Uptime   Family         Received   Advertised
65001      65000     <IP_ADDRESS>:179   established   4m56s    ipv4/unicast   6          0
                                                           ipv6/unicast   0          0

root@bgp-cplane-dev-v4-control-plane:/home/cilium# cilium bgp route-policies
VRouter   Policy Name          Type     Match Peers   Match Prefixes (Min..Max Len)   RIB Action   Path Actions
65001     <IP_ADDRESS>/32-import   import   <IP_ADDRESS>/32                                   reject
root@bgp-cplane-dev-v4-control-plane:/home/cilium# cilium bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

VRouter   Prefix   NextHop   Age   Attrs

[AFTER] Inspecting Cilium's advertised BGP route on the FRR container:
router0# show ip bgp
BGP table version is 6, local router ID is <IP_ADDRESS>, vrf id 0
Default local pref 100, local AS 65000
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
*> <IP_ADDRESS>/32   <IP_ADDRESS>                               0 65002 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i
*> <IP_ADDRESS>/24 <IP_ADDRESS>                  0         32768 i

Displayed  6 routes and 6 total paths
router0# show ip bgp <IP_ADDRESS>/32
BGP routing table entry for <IP_ADDRESS>/32, version 1
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  <IP_ADDRESS> <IP_ADDRESS>
  65002
    <IP_ADDRESS> from <IP_ADDRESS> (<IP_ADDRESS>)
      Origin IGP, valid, external, best (First path received)
      Community: 65002:100
      Large Community: 65002:100:1
      Last update: Tue Jun 11 02:09:53 2024

Unit Tests
Fixes: #32826
BGPv1 - Reject all inbound BGP advertisements

@harsimran-pabla
I am seeing something that looks off in my testing.  I thought this was just about ready, aside from one test.  But, one aspect looks like it may be a regression.  I'm not sure.
With the BGP development environment (containerlab via make kind-bgp-v4), on main and recently rebased against upstream I see:
$  cilium bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

Node                              VRouter   Prefix           NextHop    Age   Attrs
bgp-cplane-dev-v4-control-plane   65001     <IP_ADDRESS>/32   <IP_ADDRESS>   6s    [{Origin: i} {AsPath: 65000 65002} {Nexthop: <IP_ADDRESS>} {Communities: 65002:100} {LargeCommunity: [ 65002:100:1]}]
bgp-cplane-dev-v4-worker          65002     <IP_ADDRESS>/32   <IP_ADDRESS>    14s   [{Origin: i} {Nexthop: <IP_ADDRESS>}]

This is taken before announcing any routes toward Cilium from the FRR container.  It was configured w/ the bgpp.yaml below.  On this PR, I see only:
$  cilium bgp routes
(Defaulting to vailable ipv4 unicastroutes, please see help for more options)

Node                       VRouter   Prefix           NextHop   Age     Attrs
bgp-cplane-dev-v4-worker   65002     <IP_ADDRESS>/32   <IP_ADDRESS>   21m5s   [{Origin: i} {Nexthop: <IP_ADDRESS>}]

The route that was previously announced by bgp-cplane-dev-v4-control-plane no longer exists.
I think each instance of Cilium is announcing its own paths directly to it's configured peer(s).  It looks to me though that the instance of bgp-cplane-dev-v4-worker  is peered with bgp-cplane-dev-v4-control-plane internally and is also announcing the same path to it.  With my PR, that internal announcement is not being accepted.  Does it need to be?
---
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPPeeringPolicy
metadata:
  name: control-plane
spec:
  nodeSelector:
    matchLabels:
      kubernetes.io/hostname: bgp-cplane-dev-v4-control-plane
  virtualRouters:
  - localASN: 65001
    neighbors:
    - peerASN: 65000
      peerAddress: <IP_ADDRESS>/32
---
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPPeeringPolicy
metadata:
  name: worker
spec:
  nodeSelector:
    matchLabels:
      kubernetes.io/hostname: bgp-cplane-dev-v4-worker
  virtualRouters:
  - localASN: 65002
    #exportPodCIDR: true
    serviceSelector:
      #matchLabels:
      #  name: hello-node
      matchExpressions:
       - { key: app, operator: In, values: [hello-node, hello-node2, hello-node3] }
    serviceAdvertisements:
      - LoadBalancerIP # <-- default
      #- ClusterIP      # <-- options
      #- ExternalIP     # <-- options
    neighbors:
    - peerASN: 65000
      peerAddress: <IP_ADDRESS>/32
      #holdTimeSeconds: 180
      #keepAliveTimeSeconds: 60
      #eBGPMultihopTTL: 1
      gracefulRestart:
        enabled: true
        restartTimeSeconds: 60
      advertisedPathAttributes:
      - selectorType: CiliumLoadBalancerIPPool
        selector:
          matchLabels:
            environment: mgmt
        communities:
          standard:
          - 65002:100
          large:
          - 65002:100:1
          #wellknown:
          #- no-export
---
apiVersion: "cilium.io/v2alpha1"
kind: CiliumLoadBalancerIPPool
metadata:
  name: "mgmt"
  labels:
    environment: mgmt
spec:
  blocks:
    - cidr: "<IP_ADDRESS>/22"
  cidrs:
    - cidr: "<IP_ADDRESS>/22"

@harsimran-pabla Replying to my last comment, I think the missing route is actually the original from bgp-cplane-dev-v4-worker being re-advertised by the FRR container back toward Cilium's bgp-cplane-dev-v4-control-plane instance.   I'll do more testing tomorrow to confirm.

Hi @dswaffordcw , thanks a lot for this PR, I think it makes a lot of sense to filter inbound advertisements while we don't need them.
However, instead of doing that per neighbor, I think it would be better to just change the default import policy to reject the routes - see GoBGP Policy docs - 4.1 Attach policy to global rib - the equivalent of:
default-import-policy = "reject-route"

This way we can save some processing on the number of policies in case of many neighbors, and future-wise, we can still enable import per-neighbor if we need to implement such a feature.
You will probably need to add a Policy Assignment in the import direction like here: https://github.com/cilium/cilium/blob/main/pkg/bgpv1/gobgp/server.go#L186

Hi @dswaffordcw , thanks a lot for this PR, I think it makes a lot of sense to filter inbound advertisements while we don't need them.
However, instead of doing that per neighbor, I think it would be better to just change the default import policy to reject the routes - see GoBGP Policy docs - 4.1 Attach policy to global rib - the equivalent of:
default-import-policy = "reject-route"

This way we can save some processing on the number of policies in case of many neighbors, and future-wise, we can still enable import per-neighbor if we need to implement such a feature.
You will probably need to add a Policy Assignment in the import direction like here: https://github.com/cilium/cilium/blob/main/pkg/bgpv1/gobgp/server.go#L186

Thanks @rastislavs!  That's a good suggestion.  I'll update the PR and let you know when it's ready to look over again.

@rastislavs I fought through this all day and am at a wall.  I've figured out how to configure the global policy but GoBGP is not handling it as expected.
Could you look through this and let me know your thoughts?
In https://github.com/cilium/cilium/pull/33035/commits/8714116f8d16df121cacfb8ac85704618ad3c15c, I believe that is the correct way to configure the global policies.  However, it is silently ignored.  I found another report last December of the same in https://github.com/osrg/gobgp/issues/1768#issuecomment-1839399167.  I logged a new issue under https://github.com/osrg/gobgp/issues/2814.
Then, I walked through GoBGP's configuration file parsing code.  It configures the default in a different way (see https://github.com/osrg/gobgp/blob/master/pkg/config/config.go#L45).  I did that in https://github.com/cilium/cilium/pull/33035/commits/f028b2bf5e63e0227fb748ce2c491d2497e84200 using SetPolicyAssignment() but that too is not working correctly.  With that commit in place, I see the following:
$  cilium bgp peers
Node                              Local AS   Peer AS   Peer Address   Session State   Uptime   Family         Received   Advertised
bgp-cplane-dev-v4-control-plane   65001      65000     <IP_ADDRESS>       established     9m12s    ipv4/unicast   0          0
                                                                                ipv6/unicast   0          0
bgp-cplane-dev-v4-worker          65002      65000     <IP_ADDRESS>       established     9m14s    ipv4/unicast   0          1
                                                                                ipv6/unicast   0          1

00x0 dswafford@dswafford-2 2024/06/11 17:00:49
☸ kind-bgp-cplane-dev-v4:
> cilium-fork on  GH32826-import-none [$]
$  cilium bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

Node   VRouter   Prefix   NextHop   Age   Attrs

And on the FRR instance, no paths/routes:
router0# show ip bgp sum

IPv4 Unicast Summary (VRF default):
BGP router identifier <IP_ADDRESS>, local AS number 65000 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 2, using 1434 KiB of memory
Peer groups 1, using 64 bytes of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
<IP_ADDRESS>        4      65001        21        21        0    0    0 00:09:35            0        0 N/A
<IP_ADDRESS>        4      65002        23        22        0    0    0 00:09:37            0        0 N/A

Total number of neighbors 2
router0# show ip bgp
No BGP prefixes displayed, 0 exist

Hi @dswaffordcw,

I fought through this all day

Sorry to hear that, but I can understand it - GoBGP can be a bit tricky, you almost always need to look into source code to understand the details.

I did that in https://github.com/cilium/cilium/commit/f028b2bf5e63e0227fb748ce2c491d2497e84200 using SetPolicyAssignment()

Yeah, that is what I suggested in my first comment. That is the correct way to do it.

but that too is not working correctly

So I looked into the source code :) and it seems that GoBGP applies policies also on locally installed routes, see:
AddPath calls addPathList: https://github.com/osrg/gobgp/blob/master/pkg/server/server.go#L2269
addPathList calls propagateUpdate: https://github.com/osrg/gobgp/blob/master/pkg/server/server.go#L2242
propagateUpdate calls ApplyPolicy: https://github.com/osrg/gobgp/blob/master/pkg/server/server.go#L1224
The solution is to add an import policy that allows local routes. Something like this seems to be working for me:
diff --git a/pkg/bgpv1/gobgp/server.go b/pkg/bgpv1/gobgp/server.go
index ab8a2ba52b..45088080da 100644
--- a/pkg/bgpv1/gobgp/server.go
+++ b/pkg/bgpv1/gobgp/server.go
@@ -74,7 +74,7 @@ func NewGoBGPServer(ctx context.Context, log *logrus.Entry, params types.ServerP
 		SubSys:    "bgp-control-plane",
 	})

-	s := server.NewBgpServer(server.LoggerOption(logger))
+	s := server.NewBgpServer(server.LoggerOption(logger), server.GrpcListenAddress("<IP_ADDRESS>:50051"))
 	go s.Serve()

 	startReq := &gobgp.StartBgpRequest{
@@ -95,11 +95,40 @@ func NewGoBGPServer(ctx context.Context, log *logrus.Entry, params types.ServerP
 		return nil, fmt.Errorf("failed starting BGP server: %w", err)
 	}

+	allowLocalPolicy := &gobgp.Policy{
+		Name: "allow-local",
+		Statements: []*gobgp.Statement{
+			{
+				Conditions: &gobgp.Conditions{
+					RouteType: gobgp.Conditions_ROUTE_TYPE_LOCAL,
+				},
+				Actions: &gobgp.Actions{
+					RouteAction: gobgp.RouteAction_ACCEPT,
+				},
+			},
+		},
+	}
+	err := s.AddPolicy(ctx, &gobgp.AddPolicyRequest{Policy: allowLocalPolicy})
+	if err != nil {
+		return nil, fmt.Errorf("failed to add %s policy: %w", allowLocalPolicy.Name, err)
+	}
+	err = s.SetPolicyAssignment(ctx, &gobgp.SetPolicyAssignmentRequest{
+		Assignment: &gobgp.PolicyAssignment{
+			Name:          globalPolicyAssignmentName,
+			Direction:     gobgp.PolicyDirection_IMPORT,
+			DefaultAction: gobgp.RouteAction_REJECT,
+			Policies:      []*gobgp.Policy{allowLocalPolicy},
+		},
+	})
+	if err != nil {
+		return nil, fmt.Errorf("failed configuring BGP server's global import policy: %w", err)
+	}
+
 	// will log out any peer changes.
 	watchRequest := &gobgp.WatchEventRequest{
 		Peer: &gobgp.WatchEventRequest_Peer{},
 	}
-	err := s.WatchEvent(ctx, watchRequest, func(r *gobgp.WatchEventResponse) {
+	err = s.WatchEvent(ctx, watchRequest, func(r *gobgp.WatchEventResponse) {
 		if p := r.GetPeer(); p != nil && p.Type == gobgp.WatchEventResponse_PeerEvent_STATE {
 			logger.l.Debug(p)
 		}

Note that I temporarily configured GrpcListenAddress on the server so that I can debug this with gobgp CLI, it might be helpful for you as well - e.g. this is the result of running the above code:
$ gobgp --host <IP_ADDRESS> global policy
Import policy:
    Default: REJECT
    Name allow-local:
        StatementName allow-local_stmt0:
          Conditions:
            Route Type: local
          Actions:
             accept

Thanks @rastislavs!  That worked!
One follow-up Q, I'd like to include an update the cilium-dbg and cilium CLIs to distinguish between "Received" and "Accepted" route counts when looking at cilium bgp peers.  I thought this change would do it, but it too didn't work :-D!  Thoughts on where I should look next?
$  git diff
diff --git a/cilium-dbg/cmd/bgp_peer_get.go b/cilium-dbg/cmd/bgp_peer_get.go
index b40978ee3f..5168d06326 100644
--- a/cilium-dbg/cmd/bgp_peer_get.go
+++ b/cilium-dbg/cmd/bgp_peer_get.go
@@ -54,7 +54,7 @@ func printSummary(peers []*models.BgpPeer) {
                return peers[i].LocalAsn < peers[j].LocalAsn || peers[i].PeerAddress < peers[j].PeerAddress
        })

-       fmt.Fprintln(w, "Local AS\tPeer AS\tPeer Address\tSession\tUptime\tFamily\tReceived\tAdvertised")
+       fmt.Fprintln(w, "Local AS\tPeer AS\tPeer Address\tSession\tUptime\tFamily\tReceived\tAccepted\tAdvertised")
        for _, peer := range peers {
                fmt.Fprintf(w, "%d\t", peer.LocalAsn)
                fmt.Fprintf(w, "%d\t", peer.PeerAsn)
@@ -72,6 +72,7 @@ func printSummary(peers []*models.BgpPeer) {
                        // AFI and SAFI are concatenated for brevity
                        fmt.Fprintf(w, "%s/%s\t", afisafi.Afi, afisafi.Safi)
                        fmt.Fprintf(w, "%d\t", afisafi.Received)
+                       fmt.Fprintf(w, "%d\t", afisafi.Accepted)
                        fmt.Fprintf(w, "%d\t", afisafi.Advertised)
                        fmt.Fprintf(w, "\n")
                }

After building and copying that into one of the cilium containers, I saw:
root@bgp-cplane-dev-v4-control-plane:/home/cilium# /tmp/cilium-dbg-david bgp peers
Local AS   Peer AS   Peer Address   Session       Uptime     Family         Received   Accepted   Advertised
65001      65000     <IP_ADDRESS>:179   established   1h51m22s   ipv4/unicast   10         10         0
                                                             ipv6/unicast   0          0          0
root@bgp-cplane-dev-v4-control-plane:/home/cilium# /tmp/cilium-dbg-david bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

VRouter   Prefix   NextHop   Age   Attrs
root@bgp-cplane-dev-v4-control-plane:/home/cilium# /tmp/cilium-dbg-david bgp route-policies
VRouter   Policy Name   Type     Match Peers   Match Prefixes (Min..Max Len)   RIB Action   Path Actions
65001     allow-local   import                                                 accept

I was expecting to see 0 for "Accepted".  It looks like the response that comes back through the API's client.Bgp.GetBgpPeers() is unaware of the global policies and their effect.

@dswaffordcw

I'd like to include an update the cilium-dbg and cilium CLIs to distinguish between "Received" and "Accepted" route counts when looking at cilium bgp peers. I thought this change would do it, but it too didn't work

Interesting, in my setup your proposed CLI change seems to be working fine - it matches the output of gobgp neighbor:
gobgp --host <IP_ADDRESS> neighbor
Peer         AS  Up/Down State       |#Received  Accepted
<IP_ADDRESS> 65000 00:02:05 Establ      |        2         1

cilium-dbg bgp peers
Local AS   Peer AS   Peer Address    Session       Uptime   Family         Received   Accepted   Advertised
65001      65000     <IP_ADDRESS>:179   established   2m32s    ipv4/unicast   2          1          1
                                                            ipv6/unicast   0          0          0

Could you check what gobgp neighbor returns in your case?

Hey @rastislavs
They match for me as well.   With adding the global policy to reject all routes, I was expected to see "Accepted: 0".  Though, technically this is correct.  The per-neighbor policies accepted the routes and they are being rejected later on.
I am not seeing a way to extract the fact that "Neighbor X's routes were later rejected by the global import policy".  Do you think this is worth pursuing further?  One idea for now, is that we add the "Accepted" column but statically set the value to 0.  My desire is to eliminate confusion -- by making it clear that Cilium does nothing with received routes.
root@bgp-cplane-dev-v4-control-plane:/home/cilium# /tmp/gobgp neigh
Peer        AS  Up/Down State       |#Received  Accepted
<IP_ADDRESS> 65000 00:20:25 Establ      |        6         6

root@bgp-cplane-dev-v4-control-plane:/home/cilium# /tmp/gobgp global rib
Network not in table
root@bgp-cplane-dev-v4-control-plane:/home/cilium#

root@bgp-cplane-dev-v4-control-plane:/home/cilium# /tmp/gobgp global rib summary
Table afi:AFI_IP  safi:SAFI_UNICAST
Destination: 0, Path: 0
root@bgp-cplane-dev-v4-control-plane:/home/cilium#

root@bgp-cplane-dev-v4-control-plane:/home/cilium# cilium-dbg bgp peers
Local AS   Peer AS   Peer Address   Session       Uptime   Family         Received   Accepted   Advertised
65001      65000     <IP_ADDRESS>:179   established   21m16s   ipv4/unicast   6          6          0
                                                           ipv6/unicast   0          0          0

root@bgp-cplane-dev-v4-control-plane:/home/cilium# cilium-dbg bgp routes
(Defaulting to `available ipv4 unicast` routes, please see help for more options)

VRouter   Prefix   NextHop   Age   Attrs

Hi @dswaffordcw

They match for me as well. With adding the global policy to reject all routes, I was expected to see "Accepted: 0". Though, technically this is correct. The per-neighbor policies accepted the routes and they are being rejected later on.

Right, it seems the "Accepted" stats for a peer are sourced from adj-rib-in state: https://github.com/osrg/gobgp/blob/master/pkg/server/server.go#L3092
which is before the import policies are applied.
I checked how FRR displays "accepted" stats for BGP peers, if you filter-out incoming routes via a route-map, and it also shows the routes that do not get into route table in the "accepted" counter in the "sh bgp neighbors" output - so at least it is consistent.

Do you think this is worth pursuing further? One idea for now, is that we add the "Accepted" column but statically set the value to 0.

I would not do this - I think we should be consistent with gobgp stats, but more importantly, it will become an issue once we actually start importing routes. I think for now the best option probably is to keep just the Received and Advertised columns.

@dswaffordcw please note that this change now affects BGPv2 as well, could you please test with BGPv2 enabled, and update the title & release note accordingly?

@rastislavs Testing for BGPv2 --
Using only a BGPv2 configuration, I see the same result as with BGPv1.  I advertised 10 BGP paths from an FRR instance toward Cilium and all were rejected.  Cilium continued to announce a path toward FRR and FRR accepted it.
I'll update the PR's description to include this as well.
Here's  the bgpp.yaml I used:
$  cat bgppv2.yaml
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPClusterConfig
metadata:
  name: cilium-bgp
spec:
  nodeSelector:
    matchLabels:
      kubernetes.io/hostname: bgp-cplane-dev-v4-control-plane
  bgpInstances:
  - name: "control-plane"
    localASN: 65001
    peers:
    - name: "frr"
      peerASN: 65000
      peerAddress: <IP_ADDRESS>
      peerConfigRef:
        name: "cilium-cp-frr-peer"
---
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPPeerConfig
metadata:
  name: "cilium-cp-frr-peer"
spec:
  transport:
    localPort: 179
    peerPort: 179
  #timers:
  #  connectRetryTimeSeconds: 12
  #  holdTimeSeconds: 9
  #  keepAliveTimeSeconds: 3
  #authSecretRef: bgp-auth-secret
  gracefulRestart:
    enabled: true
    restartTimeSeconds: 15
  families:
    - afi: ipv4
      safi: unicast
      advertisements:
        matchLabels:
          advertise: "bgp"
---
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPAdvertisement
metadata:
  name: "bgp-advertisements"
  labels:
    advertise: "bgp"
spec:
  advertisements:
    #- advertisementType: "LoadBalancerIP"
    - advertisementType: "PodCIDR"
      #serviceSelector:
      #matchLabels:
      #  name: hello-node
      #  matchExpressions:
      #  - { key: app, operator: In, values: [hello-node, hello-node2, hello-node3] }
      attributes:
        communities:
          standard: [ "65001:100" ]
        localPreference: 99
---
apiVersion: "cilium.io/v2alpha1"
kind: CiliumLoadBalancerIPPool
metadata:
  name: "mgmt"
  labels:
    environment: mgmt
spec:
  blocks:
    - cidr: "<IP_ADDRESS>/22"
  cidrs:
    - cidr: "<IP_ADDRESS>/22"
  #serviceSelector:
  #  matchExpressions:
  #    - {key: app, operator: In, values: [hello-node]}
---

@rastislavs This is ready for review.
Thanks for all of your help!

I would propose to not change the CLI output at his point, otherwise LGTM!

@rastislavs ACK.  I reverted those changes.  Thanks for the thorough review!

/test


Ability to resume video when the view is visible

I found some code here https://github.com/piemonte/Player/blob/master/Source/Player.swift#L239-L245 to pause the video in viewDidDisappear. Is there any way to resume the video when the view is visible again?

there should be a switch to set if it shoud resume after the view appears again, it happens because you lose control of the view controller

@piemonte Is this solved? i don't see any related code in #63 pull request. It works ok for didEnterForeground, but it's not resuming video if view just disappear.

hey @AntonReality, at one point in time i added these properties to control this behavior, if something is not as expected, let me know.
https://github.com/piemonte/Player/blob/master/Sources/Player.swift#L159-L163

@piemonte Thanks for a quick reply!
Yes, i've seen this,  but this is working only on application enter background/foreground, not the viewDidAppear. You have to override viewDidAppear for this.


Xamarin Forms requirements

I wanted to know what version(s) of Xamarin Forms is supported by Xamarin.Essentials.
I'm currently using Xamarin.Forms <IP_ADDRESS>0 and cannot chance an update to this version.
Please advise

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 78e6dee8-1182-bf1e-fd3a-e8d1aecc094a
Version Independent ID: 81202c69-317a-f0fa-7324-5316f7c1ceb7
Content: Get Started with Xamarin.Essentials - Xamarin
Content Source: docs/essentials/get-started.md
Product: xamarin
GitHub Login: @jamesmontemagno
Microsoft Alias: jamont

Xamarin.Essentials works with any version of Xamarin or Xamarin.Forms. You may need to adjust some of your settings and ensure your support libraries when installing: https://montemagno.com/resolving-android-support-library-nuget-installation-issues/


menu drop down doesn't dismiss when clicking after changing menus

When I click a menu (e.g. File), mouse over to a different menu (e.g. Edit) and click again, I expect the menu to be dismissed.  Instead, it flickers and I need to click again to dismiss it.  If I click the same menu I clicked the first time (File in the example above), the drop down is dismissed as expected.
I'm using Atom 1.2.4 on Windows 10.  The bug is also present in Visual Studio Code.

This is a duplicate of #2243.


[BUG]: 运行 train_prompts.py prompts.csv --strategy naive 失败

🐛 Describe the bug
I download  prompts.csv  and run：
python train_prompts.py prompts.csv --strategy naive --lora_rank 16
Traceback (most recent call last):
File "train_prompts.py", line 122, in
main(args)
File "train_prompts.py", line 32, in main
actor = GPTActor().cuda()
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 688, in cuda
return self._apply(lambda t: t.cuda(device))
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 578, in _apply
module._apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 578, in _apply
module._apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 578, in _apply
module._apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 601, in _apply
param_applied = fn(param)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 688, in
return self._apply(lambda t: t.cuda(device))
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
root@autodl-container-98b3119d3c-f07453a6:~/autodl-tmp/ColossalAI/applications/ChatGPT/examples#

RuntimeError: CUDA error: out of memory
我使用 A5000 GPU 24GB 显存，训练使用GPU内存需要多少？是否我运行参数有问题？请求大家帮助！
Environment
使用ChatGPT0.1.0版本

Thanks for your feedback.
We suggest you to use colossalai_zero2 strategy to train instead of naive which may save GPU mem for you.
You can also use train_prompt.sh for training demo.

Thank you！I'll try again！

@ht-zhou  Could not find 'RANK' in the torch environment
这个策略需要多少的显存？我试了一下，发现了额这个报错
Traceback (most recent call last):
File "train_prompts.py", line 122, in
main(args)
File "train_prompts.py", line 25, in main
strategy = ColossalAIStrategy(stage=2, placement_policy='cuda')
File "/opt/conda/lib/python3.8/site-packages/chatgpt/trainer/strategies/colossalai.py", line 77, in init
super().init(seed)
File "/opt/conda/lib/python3.8/site-packages/chatgpt/trainer/strategies/ddp.py", line 25, in init
super().init()
File "/opt/conda/lib/python3.8/site-packages/chatgpt/trainer/strategies/base.py", line 23, in init
self.setup_distributed()
File "/opt/conda/lib/python3.8/site-packages/chatgpt/trainer/strategies/colossalai.py", line 110, in setup_distributed
colossalai.launch_from_torch({}, seed=self.seed)
File "/opt/conda/lib/python3.8/site-packages/colossalai/initialize.py", line 215, in launch_from_torch
raise RuntimeError(
RuntimeError: Could not find 'RANK' in the torch environment, visit https://www.colossalai.org/ for more information on launching with torch
root@8b69ccfeec2f:/gpt/applications/ChatGPT/examples#

Rank error may be fixed by executing as torchrun rather than directly as python.
torchrun --standalone --nproc_per_node=2 train_prompts.py <Insert args here>

@chingfeng2021, has the issue been resolved?


Minimum speed for moving obstacle

Hi Guys,
I am trying to generate a moving obstacle in the dreamview interface by publishing message to the Prediction module.
However if I give a speed below 2.5 looks like it is considering it as static obstacle. Could you please let me know if there is a minimum speed for the moving obstacle. And I hope the units are in Km/h.
Note: I define the speed and heading of the obstacle then calculate the speed in X and Y co-ordinates.
Thank you,
KK

Can you share the content of the file?

@jinghaomiao   Thank you for the suggestion...
I guess I found the point where the minimum speed is defined for an obstacle to consider it as moving.
DEFINE_double(static_obstacle_speed_threshold, 2.0,
              "obstacles are considered as static obstacle if its speed is "
"less than this value (m/s)");

Correct me if I am wrong.

@kk2491 please also refer to modules/prediction/container/obstacles/obstacle.cc:SetMotionStatus() for details.

@jinghaomiao .. Thanks for the information. I am going through the code to get some insight. Meanwhile could you please also let me know whether similar kind of condition defined for bike/bicycles?
DEFINE_double(still_pedestrian_speed_threshold, 0.5,
              "Speed threshold for still pedestrians");

Also what would be the behavior of the car when there is Bicycle going in front of it ?
Follow or Stop and go ?
If needed I will raise a new case for this question.

@jinghaomiao .. Could you please provide me clarification on this?

You can configure gflag parameter "--still_obstacle_speed_threshold=2.5" in prediction.conf as you like. ——Reply reference comes from the Apollo developer community issue master contest https://apollo.auto/developer/questiondata_cn.html?target=669


Return to simplicity

Given that many forks of kube-cert-manager exists I wish to simplify this project and reduce it's scope to a single DNS provider and remove the support for watching events.

Going forward the only DNS provider I plan to support is Google Cloud DNS and drop support for DNS exec plugins.
Given that a sync loop is required to ensure all certificates get processed in a timely manner I'm planning to drop watch support. This will impact the responsiveness of the system. When certificate objects are created it will take up to 30 seconds before they are processed.

People who want more features will be directed to one of the popular forks in the README.

Another option is to fork this repo and create the gcp-letsencrypt-manager.


HTML

HTML
User Story
As a bootcamp student
I want the prework notes to be structured on a webpage
so that I can easily find and read infromation.
Acceptance Criteria
GIVEN a prework study guide website
WHEN I visit the website in my browser
THEN I see four boxes titled HTML, CSS, Git and JavaScript with associated notes listed

Done, per assignment instructions.


IDE Completion / Interface Processes?

I have been using k8s-alpha and ksonnet for a while, it can be annoying to work with based on the complexity of objects and it's structure. Do you guys have any recommendations for how to deal with this library from an IDE perspective? Can you  possibly talk about how developers in your company interface with this library (possibly any tooling that you use to aid in field discovery)?

Hi
For now it is mostly just vim + knowing it. I think it'd be fairly easy to build an autocompletion based on the docsonnet. I started looking into LSPs but that's sort of a mystery for me right now. Possibly the vim omnicomplete is another option

The generator project might be able to render the source files needed for a language server to work, but the language server is out-of-scope for this project. I'd suggest we take this to the discussions section on the Tanka repo (related issue: https://github.com/grafana/tanka/discussions/503) or the different channels in the wider Jsonnet community.
As for finding docs, with recent changes to the generator here, we rendered new docs (for example: https://jsonnet-libs.github.io/k8s-libsonnet/) that hopefully have a more user friendly experience now (contributions welcome).


Release for 1.7.2?

I just recently updated a large chunk of my dependencies to fix some issues I was having. Once I updated however, react-css-themr started breaking my build. After some investigation, it appears the issue has already been fixed with this commit.
Wondering when react-css-themr is going to get the hotfix uploaded to npm, or if there is an alternate solution for dealing with the undefined mixinValue variable.
Thanks

Done! Sorry for taking this long

Thanks a bunch!


One editor per .ipynb file

Currently a workspace is able to open a ipynb file more than once. This leads to unintended difficulties such as not being able to easily delete a .ipynb file. You have to select it with the keyboard and then delete.

Thanks for reporting this issue, we'll be looking into this

This issue has stopped happening for me, when I click a fully loaded notebook for the second time, it will open it as a json file.


Improve the vm-fdt abstractions for v0.2.0

We can improve the vm-fdt abstractions after we publish an initial version of the crate so that we do not block the first release.
The current interface was built on purpose to be similar to the libfdt one, but we can optimize it (slightly) for Rust.
Things that can be improved are better abstractions for nodes. For example, we can have the property_* functions on the FdtWriterNode instead of FdtWriter so that we can disallow properties to be added in non valid locations (see #19).

This sounds like a good idea to me - anything we can do to enforce valid DT output using API design is welcome.
I think it might be possible to use Rust's ownership/lifetime semantics to help with this as well; it would be good to ensure that a FdtWriterNode can only be passed to end_node on the FdtWriter that created it, for example. I tried to add a reference back to FdtWriter in FdtWriterNode when initially writing the Rust API, but I got stuck trying to get right lifetime annotations to make the borrow checker happy; maybe somebody with more Rust experience or more perseverance can help to figure this out.


Autoformat files on save

What steps will reproduce the problem?

I'm trying to use the feature of autoformat file on save for autopep8. It usually worked fine in 4.2.5, but now when I save the file, some lines are duplicated at the end of the script.
It does not seems to have a pattern of how many lines it will repeat. Also sometimes, trying to save again will not reproduce the problem.
To try to reproduce you can simply
import numpy as np

And save.
In my case it will append a line
 as np

in the end of my script.
I'm using python 3.8.6 and Windows 7

Probably a duplicate of #16123?

Probably a duplicate of #16123?

Indeed,it looks like the same problem.


High Latency

Hey, stumbled on this solution after days of trying to figure out an effective way to stream Audio (and video) from Windows to Linux...for free.
I tried it out and it does in fact work!
However, there's really high latency, like around 5 seconds.
Any suggestions for reducing latency?
Either way, thanks for putting this out there!

I know it was the only bummer when I got it working. As I was broadcasting to my orange pi hooked on my sound system and listening Spotify on Windows it didn't bother so much and I didn't research a way to make it faster. I'm not sure if it's possible to lower the signal latency. My first attempt would be connecting both Windows and Linux systems through a wired network or increase somehow the band-width between them to see if there's any effect. Try to find a program other than linco that can potentially work better piping the data wave, I think it uses TCP and probably it'd work better with UDP. Try something different than pacat. Other than that I don't think there's a better way capturing audio of an output device like WLStream does. Matthew van Eerde would know better. At last programmatically speaking I think if you could set a smaller number of frames than IAudioCaptureClient provides you would be able to increase the number of packets sent to the output and start to broadcast sooner but unfortunately there's no option to set the number of audio frames to be read.
I'm glad to help and if you find a better way to stream the audio please let me know here in the comments.

Update: I checked out the man page of pacat:
https://sarata.com/manpages/pacat.1.html
Specifically this section:

--latency=BYTES
Explicitly configure the latency, with a time specified in bytes in the selected sample format. If left out the server will pick the latency, usually relatively high for power saving reasons. Use either this option or --latency-msec, but not both.
--latency-msec=MSEC
Explicitly configure the latency, with a time specified in milliseconds. If left out the server will pick the latency, usually relatively high for power saving reasons. Use either this option or --latency, but not both.

The default is high latency, but you can reset it down. I set it to 1ms and it worked perfectly!
As it says in the man page, low latency will strain your system, but my machine can take it. (Definitely haven't stress tested, so I have no idea what the threshold is.)
Thanks again for putting this out there!

Such easy fix, thank you for sharing too! =)


User profile styling fixes and gradient-text bug fix

Couple of bug and styling fixes:
-gradient-text buttons were not showing in certain browsers.
-added User member since info.
-fixed spacing between share and edit button
-user profile selected tab bottom border only as per figma design.
Before:

After:

Before:

After:

nice job, Rob! lgtm


Interfacing PTX130W NFC frontend with the ESP32C3 MCU for custom application. (IDFGH-12215)

Is your feature request related to a problem?
I am developing a wireless charger with the PTX130W NFC frontend interfaced with the ESP32C3 MCU. The MCU and NFC frontend communicate using SPI on reception of interrupts from the NFC frontend. I have non-OS SDK for the Renesas eval kit with the R7FA4M2AB3CNE#AA0 MCU and PTX130W NFC frontend.
Describe the solution you'd like.
I want a reference for the PTX130W Zephyr-based SPI driver. Is there any reference available?
Will it be possible to get support for developing a driver on my own if there is no reference available?
Describe alternatives you've considered.
No response
Additional context.
No response

@rana-roy I could not find any PTX130W Zephyr-based SPI driver. Is there any? Anyway, having some code reference like non-OS SDK would be enough to support it on esp-idf. Probably you would need to take care of timing (delay, ticks), interrupt and semaphores.

Thank you @sylvioalves for your quick response. I am trying to port the SDK code into Zephyr based driver. In doing so, I find any roadblock, your support will be very grateful to me.

Hi!
If I understood the request, we are talking about a Zephyr Driver for a peripheral connected to an Espressif device.
For sanity check, if you are not familiar with Zephyr, I recommend the Pull-Up Resistor Channel. Although they are not affiliated with Espressif, their content is good and they even have the starting information steps about writing a driver.
Once you have that, given this is not necessarily an Espressif / ESP-IDF related issue, you will find a whole community around zephyr to help you. We are pretty active there as well. You can also try the Discord Channel.
If you meet a roadblock, let us know.
In time: since this is preemptive action and not a request/report, I suggest either moving to discussion or closing the topic.

Thank you @rftafas for guiding me!


Update dependencies + 3 steps Dockerfile

To keep the boilerplate up-ro-date, let’s update the dependencies for both Elixir and Node.

I also made a gap analysis between the boilerplate setup and a vanilla project created with mix phx.new; a few things out of line so I updated those.

To simplify the Docker setup, I added an initial build step to bundle static assets using Webpack in a dedicated image instead of adding node to the elixir:1.9-alpine one.

🦀 Requesting reviewers for this pull request:

@Boubalou (contributor with 0 commits in the last 90 days and 2 commits overall)
@pmartel12 (expert reviewer for the elixir stack)


Add Yuanyuan Sheng to Contributors list

Hey @yuanyuansheng,  I'm quite elated about your PR. I wanna evolve this project to addresses various problems faced by first time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a PR and learned that I accepted it?


Upgrade pandas to 1.1.3 for CI.

pandas 1.1.3 has been released on October 5, 2020.

https://pandas.pydata.org/docs/whatsnew/v1.1.3.html

pandas 1.1.3 is not on the conda repository yet. Let's see.

Cool !

Nice should be good to go once the tests pass.

The package was uploaded to conda-forge and tests passed.

I'd merge this now.


Adding radar_omnipresense to documentation index for distro

I'd like radar_omnipresense to be indexed and documented on ros.org

@garrenhendricks thanks for contributing your package.
CI is currently failing because the repository urls are missing the .git at the end.
If you just want to index your package you don't need the release section.
If you want to release your package, you will need to follow the release process detailed here

@mikaelarguedas would you mind elaborating what CI is? I would like to release my package so I will try to follow the bloom tutorial

pr #17378 was made using bloom-release, so I'm closing this one.

would you mind elaborating what CI is?

I was referring to the travis test that runs on incoming pull requests on this repository. It was reported as failing on this PR (red cross next to the commit message, https://travis-ci.org/ros/rosdistro/builds/363372477?utm_source=github_status&utm_medium=notification)

I would like to release my package so I will try to follow the bloom tutorial

:+1:


feat: add datadog_trace 0.98.0 release

update datadog_trace with release 0.98.0

:tada: This PR is included in version 1.294.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Update README.md to improve grammar

Improves SPAG in a sentence.

@swift-ci please smoke test and merge


[TablePlus] Add option to open existing or new

Extension
https://www.raycast.com/pernielsentikaer/tableplus
Description
Right now 'open database' does not check wether the connection is already open.
Once a connection is already open it would be better to have 'open new database' - 'show existing window' or something.
Who will benefit from this feature?
No response
Anything else?
No response

up vote! That's good idea!

@whitespacecode
are you working on this issue now?
if not, i can handle for this issue.

I'm not working on the issue
On Sun, 17 Sept 2023 at 14:23, Michitoshi Yano @.***>
wrote:

@whitespacecode https://github.com/whitespacecode
are you working on this issue now?
if not, i can handle for this issue.
—
Reply to this email directly, view it on GitHub
https://github.com/raycast/extensions/issues/7689#issuecomment-1722465386,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI3LLYA7Q6TILJHEQ4MHN7DX23TTNANCNFSM6AAAAAA23HCJHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Vriendelijke groeten,
Joeri

I'm not sure that we're able to catch that 🫠 Do you know a way?

same with you. I don't have ideas to achive this...


Set bearer token after create client

In the root of application I create a provider with define a GraphQLClient:
My grapql configuration
class GraphQLConfiguration {
  static HttpLink httpLink = HttpLink(
    uri: "https://randomdata.herokuapp.com/graphql",
  );

  ValueNotifier<GraphQLClient> client = ValueNotifier(
    GraphQLClient(
      link: httpLink,
      cache: OptimisticCache(dataIdFromObject: typenameDataIdFromObject),
    ),
  );
  GraphQLClient clientToQuery() {
    return GraphQLClient(
      cache: OptimisticCache(dataIdFromObject: typenameDataIdFromObject),
      link: httpLink,
    );
  }
}

Root of my application
  GraphQLConfiguration graphQLConfig = new GraphQLConfiguration();
  @override
  Widget build(BuildContext context) {
    return GraphQLProvider(
      client: graphQLConfig.client,
      child: MaterialApp(
        title: 'Temp App',
        theme: ThemeData(
          primarySwatch: Colors.green,
        ),
        home: LoginScreen(),
      ),
    );
  }
}

After my first register mutation in my child LoginScreen I receive Bearer token in response.
How can I modify my graphql client after get the bearer token and add  to headers for later requests??

You can watch the authentication state and then once it changes to authenticated, change the value of the client accordingly. Once you do this, your app will rebuild automatically with the new client containing the authentication link.

@mainawycliffe really thank you for reponse :) How can I change the value of the client accordingly after authentication?

You can use an AuthLink for that:
    final AuthLink authLink = AuthLink(
      getToken: () async { return 'Bearer ' +  await _authTokenRepository.getJWT(); }
    );

Is there any specific reason for making the clients properties immutable?
Me (and I guess a lot of other devs) would highly appreciate an option to set headers for each individual request instead of having to replace the whole client every time.
Apart from that, replacing the client also makes it quite hard to test and to mock.
When my client wrapper is able to interchange the whole client at any time, it seems uncertain to me whether I am working with a mock client still.

@wiktoriasobczyk I am on the same issue, Would you please help me out this by sharing how did you resolve the problem?

same issue

@abdulwahid24 , @brokercl sorry for my late response, it was my first project in flutter, but I've that configuration of GraphQLClient
https://github.com/wiktoriasobczyk/Planner/blob/master/lib/src/graphql/graphql-config.dart
class GraphQLConfiguration {
  static Link link = null;
  static HttpLink httpLink = HttpLink(
    uri: "http://<IP_ADDRESS>:3001/graphql",
  );

  static void setToken(String token) {
    AuthLink alink = AuthLink(getToken: () async => 'Bearer ' + token);
    GraphQLConfiguration.link = alink.concat(GraphQLConfiguration.httpLink);
  }

  static void removeToken() {
    GraphQLConfiguration.link = null;
  }

  static Link getLink() {
    return GraphQLConfiguration.link != null
        ? GraphQLConfiguration.link
        : GraphQLConfiguration.httpLink;
  }

  ValueNotifier<GraphQLClient> client = ValueNotifier(
    GraphQLClient(
      link: getLink(),
      cache: OptimisticCache(dataIdFromObject: typenameDataIdFromObject),
    ),
  );

  GraphQLClient clientToQuery() {
    return GraphQLClient(
      cache: OptimisticCache(dataIdFromObject: typenameDataIdFromObject),
      link: getLink(),
    );
  }
}

@wiktoriasobczyk Thank you very much, I was waiting for your response and till then I continued with anonymous users. :)

Seems like this is resolved, but if any of y'all need more help troubleshooting, come to the support channel in the discord

hello there
when I run
static void setToken(String token) {
print('token ' + token);
AuthLink alink = AuthLink(getToken: () => 'Bearer ' + token);
GraphQLConfiguration.link = alink.concat(GraphQLConfiguration.httpLink);
}
the flutter SDK response :
String operator +(String other) native "String_concat";
Exception has occurred.
ArgumentError (Invalid argument(s))
I printed the token and looks fine
what could be the issue ?
greetings

@brokercl looks like that is an issue with 'token ' + token, like maybe token is null or something.


feat: add csv-rag poc

Summary

Basic POC where we tried out the RAG model for question and answer from a CSV file
This uses the langchain csv agent
Under the hood it creates the pandas queries to give back the answers
A readme is also provided for users to be able to setup this on their machine

Doing a self merge since it is a POC.


Raises an error when rendering a partial from another template.

Raises a Lotus::View::MissingTemplateError when rendering a partial from another template.

great thanks

To you! Lotus is awesome, thanks!

@mrubi Thank you! :+1:


Delete duplicate issue template file

A conflict between two PRs:

#5116
#5136

was not properly resolved, resulting in a duplicate issue template.
This PR removes the duplicate template.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Tree View component now expands/collapses if is not selectable

Tree View component now expands/collapses if it's not selectable and clicked.
Updated the version of the tree view since it supports this functionality added an example of it's working.
Fixes https://github.com/ManageIQ/manageiq-ui-classic/issues/6010
@miq-bot add_label bug
@miq-bot add_reviewer @skateman
@miq-bot add_reviewer @karelhala

:tada: This PR is included in version 0.11.45 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


GoAccess writes all output to stderr

Hi,
There should be a separation between normal output (ie: Parsing... [nnn] [xxx/s]) and error messages with stdout and stderr.
I'm using GoAccess within a wrapper script and I'd like to capture only the errors output instead of all the "normal" (ie: non error) output.

Currently you can disable the progress metrics using --no-progress.

Apologies for missing that! As a long time Unix user, I searched the man page for "--quiet" and such which suppresses all output but errors. Consider this issue closed :-)

No worries. I think it's great you brought this up in case somebody else has the same question.

I still think this is an issue. Running v1.5.5 using -no-progress option I still see one line of output:
Cleaning up resources...

This is obviously not an error and should therefore not be written to stderr.
I am trying to run GoAccess in a cronjob, so I need to have the process be completely silenced, if everything works well. With all its output being sent to stderr, I would need to silence it by doing goaccess … 2>/dev/null . But this would then also silence real errors, e.g. when a logfile was not found.


Add support for compatibility attributes

Cluster/Service/Provider Templates now have support for compatibility attributes
Managed/Management Clusters now have support to report the compatibility attributes
amends to the templates controller in regards of the API changes
amends to other parts of the code

Closes #354

Closing in favor of the #422 to simplify the review


Update message to JSON data format

Previously, string/text is fetched and added to the DOM. Now, the page uses fetch to request comments data and the server responds with JSON data (three hard coded messages). Then the page adds the comments.

A demo here would be great too


Need Help with the Generation of QR Code

Hi there,
You did an amazing work, but wich Software does I need to convert the json to a QRCode? I tried different website with converters but doesn't work.
Can you give me a tip?
Thanks

Are there any update news? Pls help

Any tips and tricks would be greatly appreciated. Pease help..

What are you actually looking for?
Only the respective health and government authorities can generate the signed QR code string with their authorised private key.

Yea, so it seems to be. We were trying to see if we can crack a QR code string but it seems to be well encrypted and nearly impossible to crack. Appreciate the reply.


Maximum payment tries exceeded error incorrect

Seems that users are getting maximum payment retires error incorrectly. Need to work on capturing error better.

rewrote payment, eliminated this error.


Add support for running tests in test folder with dune

The current repository could be improved with support for continuous integration.  Additionally, some parts of the program are not really covered by tests, for example, parameter binding.
This PR adds the following:

Define all tests using ppx_inline_test library ( https://github.com/janestreet/ppx_inline_test )
Tests now run from the command line using cd test; dune runtest

Thanks for your contribution!  I'll not make a release yet since the testing framework isn't used outside development (yet), and developers who might run testing will check out the development branch anyway.


[inja] Update to v2.1.0

Update inja to the newest version.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: pantor sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Compiling RaftLib for Windows

Currently RaftLib is using the Makefile system, which works well for Linux and OS X.  However, I also need to have RaftLib available in Windows, and available for Visual Studio projects.
At the moment, how can I compile RaftLib in such a way that it can be readily used by Visual-Studio-based projects?  If I compile using cygwin Makefile system, then can the library still be usable by Visual Studio?
In the long run, would it be a good idea to migrate RaftLib to Cmake, so that it can automatically generate  build scripts for any systems?

That actually sounds like a good idea. I've had numerous requests for Windows support. I'll start porting sometime this week. I had another good suggestion to break the dependencies up into "packages" so that things like GNU GSL (needed for the random number generation kernels) won't be needed to get the basic system working (right now the Makefile blindly adds -lgsl regardless).

Adding CMAKE support now, Adi had a good suggestion about setting up github modules. Might also make since to do something like checking out using homebrew or ports on OS X.

Thanks!  so where can I find the CMAKE code? In which branch?

Not committed yet. I'm working on dividing the system into modules vs. having everything in a single package in addition to CMAKE.....shortly.

ok, initial cmake beta added to main repo. tested it on OS X tonight. I've gotta get a new windows build VM to start debugging there. should work (minus the random number generation). I removed the dependency on Scotch for the main branch. The GSL libraries were alway optional. I'll look into alternatives. I would use the C++11 random generators, but seems they are quite a bit slower than the C GSL equivalents (at least last I checked, perhaps they've gotten better).

I have just tested your code in Windows 8 with Visual Studio 2013.
First, I ran the cmake gui to configure and generate the visual studio solution.
Then I opened the generated RaftLib.sln, which opens four projects, namely ALL_BUILD, INSTALL, raft and ZERO_CHECK
When I tried to build ALL_BUILD or raft, they both failed with this log:
1>------ Build started: Project: raft, Configuration: Debug Win32 ------
1>cl : Command line warning D9002: ignoring unknown option '-O0'
1>cl : Command line warning D9002: ignoring unknown option '-g3'
1>cl : Command line warning D9002: ignoring unknown option '-std=c++11'
1>  allocate.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  map.cpp
1>z:\git\windows\raftlib\common.hpp(23): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  graphtools.cpp
1>Z:\git\windows\RaftLib\graphtools.cpp(26): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
1>  port.cpp
1>Z:\git\windows\RaftLib\port.cpp(27): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  portexception.cpp
1>z:\git\windows\raftlib\portexception.hpp(28): error C3646: 'noexcept' : unknown override specifier
1>Z:\git\windows\RaftLib\portexception.cpp(29): error C3646: 'noexcept' : unknown override specifier
1>  schedule.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  simpleschedule.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  stdalloc.cpp
1>z:\git\windows\raftlib\kernelkeeper.tcc(26): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
1>  portiterator.cpp
1>Z:\git\windows\RaftLib\portiterator.cpp(24): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
1>  dynalloc.cpp
1>z:\git\windows\raftlib\kernelkeeper.tcc(26): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
1>  roundrobin.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  kernel.cpp
1>Z:\git\windows\RaftLib\kernel.cpp(2): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  mapbase.cpp
1>z:\git\windows\raftlib\common.hpp(23): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  submap.cpp
1>z:\git\windows\raftlib\mapbase.hpp(33): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  globalmap.cpp
1>z:\git\windows\raftlib\map.hpp(24): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  systemsignalhandler.cpp
1>z:\git\windows\raftlib\systemsignalhandler.hpp(39): error C3646: 'noexcept' : unknown override specifier
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  poolschedule.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  kernelcontainer.cpp
1>z:\git\windows\raftlib\systemsignalhandler.hpp(39): error C3646: 'noexcept' : unknown override specifier
1>z:\git\windows\raftlib\kernelkeeper.tcc(26): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
1>  common.cpp
1>z:\git\windows\raftlib\common.hpp(23): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory
1>  basicparallel.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  Generating Code...
1>  Compiling...
1>  noparallel.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  affinity.cpp
1>Z:\git\windows\RaftLib\affinity.cpp(76): fatal error C1021: invalid preprocessor command 'warning'
1>  portmap_t.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  port_info.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  parallelk.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  clockimpl.cpp
1>z:\git\windows\raftlib\fifo\SystemClock.tcc(29): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
1>  fifo.cpp
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  pointer.cpp
1>Z:\git\windows\RaftLib\fifo\pointer.cpp(22): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
1>  procwait.cpp
1>z:\git\windows\raftlib\fifo\procwait.hpp(11): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
1>  resolution.cpp
1>z:\git\windows\raftlib\fifo\blocked.hpp(51): error C3861: 'aligned': identifier not found
1>z:\git\windows\raftlib\fifo\bufferdata.tcc(29): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  shm.cpp
1>z:\git\windows\raftlib\fifo\shm.hpp(18): error C3646: 'noexcept' : unknown override specifier
1>Z:\git\windows\RaftLib\fifo\shm.cpp(8): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
1>  signal.cpp
1>z:\git\windows\raftlib\fifo\signal.hpp(41): error C3646: 'noexcept' : unknown override specifier
1>Z:\git\windows\RaftLib\fifo\signal.cpp(55): error C3646: 'noexcept' : unknown override specifier
1>  systeminfo.cpp
1>Z:\git\windows\RaftLib\fifo\systeminfo.cpp(25): fatal error C1083: Cannot open include file: 'sys/utsname.h': No such file or directory
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
So do I need to specify flags for CMAKE?

looks like I'm going to have to do a lot of system specific #defines for non-unix/linux/os x header files to get to work. will fix and re-compile tonight.

Ok, finally figured out a good path. I'm changing the pthread dep. to std::thread. There are a few complications with this, but I'll deal with them. The cxxabi.h is only used for demangling. It looks like there's a boost package that can manage this in a relatively platform agnostic way. I'll have some time tomorrow to work on so I'll add this in. The utsname file is only used to get system info. I'm still looking for a better way to do this on Windows machines. It might come down to simply  not using system info for Windows, or recoding with #defines for native hooks into the OS.

ok, looks like now I'm down to "demangle" as the main issue. well, getting the boost lib to work with the cmake and msvc. took a bit longer than I expected, but looks like we're coming down the home stretch.

I am currently running windows 7 with Visual Studio 2013.
I have just pulled from the master (1e25e71ca7613227d5c4ddb85c86abd6bba6422a) from the repository.  When I tried to configure through cmake,  I have downloaded boost_1_58_0, but it cannot find the boost repository, so it uses the internal one.
Then I went ahead with CMake and generated configuration filed, and then opened RaftLib.sln with VS 2013, right-clicked the project "ALL_BUILD" and clicked build.
Then it shows 1474 errors, with the first one on:
error C3646: 'noexcept': unknown override specifier in signal.hpp line 41 column 1.
Could you please have a look?
Also on cmake, how can I set the parameters on Boost_DIR and Boost_INCLUDE_DIR?  Is it correct to set Boost_INCLUDE_DIR to the base directory where I unzip the file?

Of course
Sent from my iPhone

On Feb 22, 2016, at 5:06 PM, kcleung<EMAIL_ADDRESS>wrote:
I am currently running windows 7 with Visual Studio 2013.
I have just pulled from the master (1e25e71) from the repository. When I tried to configure through cmake, I have downloaded boost_1_58_0, but it cannot find the boost repository, so it uses the internal one.
Then I went ahead with CMake and generated configuration filed, and then opened RaftLib.sln with VS 2013, right-clicked the project "ALL_BUILD" and clicked build.
Then it shows 1474 errors, with the first one on:
error C3646: 'noexcept': unknown override specifier in signal.hpp line 41 column 1.
Could you please have a look?
Also on cmake, how can I set the parameters on Boost_DIR and Boost_INCLUDE_DIR? Is it correct to set Boost_INCLUDE_DIR to the base directory where I unzip the file?
—
Reply to this email directly or view it on GitHub.

I'll have time to check out tonight....it looks like the appropriate C++11 compiler flag isn't getting flipped by CMake. Might have to manually add based on OS. The Boost include locations can be modified by using the CMake hints: https://cmake.org/cmake/help/v3.0/module/FindBoost.html (the third box down) when invoking the CMake generator...

Ok, still playing with CMake to get the compiler flags correct. Will update shortly.

I just tried the git master again (bac9c19).  I noticed that (on linux) the system simply checks out the git components of boost.
However when I tried to run cmake 3.5.2 gui on Windows 8, with Visual Studio 2015, and I set the target to VS 2015 and native compiler, it fails with:
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.
So how can I set these variables?
Actually I run in a VM with Windows guest.  Would it be possible if you also install virtualbox and install a Windows VM with visual studio to test the build mechanism?
Thanks!

Actually, that's exactly what I have set up. I'm running Windows 10 with MS Visual Studio community ed. on a VMWare hosted virtual machine. I'm also assuming you've installed git. The bzip example is set not to build for windows, I'm making the assumption that not that many windows users have the bzip library installed. I have RaftLib compiling at least (not yet passing all regression tests on Win64) using the following commands (and using the visual studio native tools command line):
mkdir build
cd build
cmake ../RaftLib -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug

You can just as easily use Release vs. Debug. To build the library you can run
nmake

To run tests
nmake test

I'll see if I can get cdb up and running tonight. If not it'll likely be next weekend before I have a chance to debug further.
-J

I am using Visual Studio 2015 with Windows 8.
I have just updated to commit 201282e.  I followed your instructions, and I can go as far as running "nmake".  However at 33$ Building CXX object examples/cppalgo/search/CMakeFiles/bmh.dir/bmh.cpp.obj
bmh.cpp
c:\users\abc\git\raftlib./raftinc/units.hpp(37): eror C2440: 'initializing': cannot convert from 'const char [2]' to 'const char'
Can you please have a look?
Thanks!

Of course. Will be later in the week, but most certainly.
Sent from my tiny screen, powered by ARM awesomeness.

On May 30, 2016, at 22:15, kcleung<EMAIL_ADDRESS>wrote:
I am using Visual Studio 2015 with Windows 8.
I have just updated to commit 201282e. I followed your instructions, and I can go as far as running "nmake". However at 33$ Building CXX object examples/cppalgo/search/CMakeFiles/bmh.dir/bmh.cpp.obj
bmh.cpp
c:\users\abc\git\raftlib./raftinc/units.hpp(37): eror C2440: 'initializing': cannot convert from 'const char [2]' to 'const char'
Can you please have a look?
Thanks!
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.

Having a look now, for some odd reason on Windows 10 with VS 2015 I go past that error. I'll see if I can run on my Win7 VM and duplicate. I'll keep debugging tonight, but can you confirm that you're using the latest head? Thanks!
-J


[RFC] is numexpr really an optional dependency?

cc @mrocklin
Hi,
Context:
Right now, pandas treats numexpr as an optional dependency. I'm a packager for archlinux, and recently, I got a feedback on the dask package saying that numexpr was missing as a dependency of this package. https://aur.archlinux.org/packages/python-dask/
However, dask does not explicitly on  numexpr. The reason is detailed below.
Analysis:
In pandas.computations, eval() takes an optional argument engine='numexpr'.
If numexpr is not install, then any call with default arguments will raise an exception importError from the function _check_engine in pandas/computations/eval.py.
eval() is called (at least) from query, that's why we are in trouble if we run dask's test without numexpr.
RFC:
Here is the question: is numexpr really an optional dependency since it's the default argument?
I would say no, but comments are open :)
From the dask devs point of view, they do not have to mark numexpr as a dependency because they do not use it explicitly. To me, they can expect that default arguments from pandas work out of the box.
From the pandas packager (not me), pandas says that numexpr is optional, treated as optional. No problem here too, he followed the guidelines.
I see two options:

pandas changes the default backend
or pandas adds numexpr as a true dependency.

this was fixed in 0.18.0. previously if you tried to use .eval and numexpr wasn't installed it would bork.

xref https://github.com/pydata/pandas/pull/12511

The problem is obviously not fixed for the case I describe because it happens with pandas 0.18.0. It's annoying to see a post closed without discussion. :(

Note that I also read the code in master before opening this issue.

@sciunto so what is the reproducible example then. are you sure you are using 0.18.0

also you didn't read our issue submission guidelines. I don't see pd.show_versions()

I suppose you are doing this?
In [1]: pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8

pandas: 0.18.0
nose: 1.3.7
pip: 8.0.3
setuptools: 20.2.2
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: 0.7.2
IPython: 4.1.1
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.5.2
pytz: 2016.1
blosc: 1.2.8
bottleneck: 1.0.0
tables: None
numexpr: None
matplotlib: 1.5.0
openpyxl: 2.2.6
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.7.7
lxml: 3.4.4
bs4: 4.3.2
html5lib: 0.999
httplib2: 0.9.2
apiclient: 1.4.1
sqlalchemy: 1.0.11
pymysql: 0.6.6.None
psycopg2: 2.6.1 (dt dec pq3 ext)
jinja2: 2.8
boto: 2.39.0

In [2]: df = DataFrame({'A' : [1,2,3]})

In [3]: df.query('A>0')
ImportError: 'numexpr' is not installed or an unsupported version. Cannot use engine='numexpr' for query/eval if 'numexpr' is not installed

I guess that could be more friendly.

        Parameters
        ----------
        engine : str

        Raises
        ------
        KeyError
          * If an invalid engine is passed
        ImportError
          * If numexpr was requested but doesn't exist
        """
        if engine not in _engines:
            raise KeyError('Invalid engine {0!r} passed, valid engines are'
                           ' {1}'.format(engine, list(_engines.keys())))

        # TODO: validate this in a more general way (thinking of future engines
        # that won't necessarily be import-able)
        # Could potentially be done on engine instantiation
        if engine == 'numexpr':
            if not _NUMEXPR_INSTALLED:
>               raise ImportError("'numexpr' is not installed or an "
                                  "unsupported version. Cannot use "
                                  "engine='numexpr' for query/eval "
                                  "if 'numexpr' is not installed")
E               ImportError: 'numexpr' is not installed or an unsupported version.
    Abandon...

Please, read carefully my first post.

well, you can submit a pull-request if you would like.
I DID read your first post. we have 1600 issues.


Clicking on sidebar menu item results in target page containing sidebar menu

I am converting an old (very old) site into this template, but I can't do that all at once. So some pages don't have the correct CSS/JS included to correctly display the sidebar menu.
When a user clicks on an item in the sidebar menu, the resulting page has the sidebar menu inserted (using the DOM?).
Is there a way to disable this behaviour on some menu items?
--
Andreas

More specifically, these are links to pages (on the same server) that do not use Bootstrap or similar framework.

I just noticed this was all my own fault. The files where the menu was showing up were including the main index file for some reason. Just goes to show what a mess those old code bases can be. Not a problem with the template :-)


Anchira: titles with one author display the author list incorrectly

Source information
Anchira 1.4.11
Source language
English
Steps to reproduce
Open a title with only one author
Expected behavior
Author list doesn't have a , at the beginning
Actual behavior
Artist list starts with ,

Mihon/Tachiyomi version
TachiyomiJ2k 1.7.4
Android version
Android 12
Other details
This issue only happens in titles with one author. Titles with multiple authors display correctly:

Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 0.15.3.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

Apparently J2K is joining the Artist and Author fields into one without accounting when one of them is empty. It seems to handle null and duplicates though, so it's an easy fix


Thanks man 👍, that's a lot of typo fixes and language improvements.

No problem, happy to help. I'm planning on looking into adding some more features once I get the hang of golang.

heh, i warn you though, the code is a little messy.


Fix links in docs, fix/ignore some doctests

@bors-servo r+

:pushpin: Commit 1df5537 has been approved by jdm

Does this project have CI? If it does, then might be worth adding a cargo doc run to find warnings like this. (I'd need to look up the exact command)

Oh, shoot, I forgot that we disabled travisci and haven't migrated to GitHub actions yet. I knew I was putting that off for a good reason.

:hourglass: Testing commit 1df553794097ddc9ef60210294bad1e2165c6e0a with merge d7ede79afdbb8adaa107679441426b5a9a60169a...

:sunny: Test successful - checks-github
Approved by: jdm
Pushing d7ede79afdbb8adaa107679441426b5a9a60169a to master...


Added support for specifying web part data, solving #701

Added support for specifying web part data, solving #701

Coverage decreased (-0.007%) to 99.993% when pulling 6782e4261157d1fa92f4c5f72ebaa6c30b289e84 on waldekmastykarz:ext-spo-clientsidewebpart-add into 57f2e07e32b7e71aa169f043225adfd30966ef88 on pnp:dev.


Shouldn't it be "agent pool" instead of "agent"?

In following the sentence, shouldn't agent be replaced by agent pool?
The maintenance is done per agent, not per machine; so if you have multiple agents on a single machine, you may still run into disk space issues.
See FAQ section: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/pools-queues?view=azure-devops&tabs=yaml%2Cbrowser#what-is-a-maintenance-job

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 4f6f63ad-e95d-0105-c73a-de6e904edc09
Version Independent ID: c97bfa1a-5aca-80a9-d9aa-8cca9987ad82
Content: Agents pools - Azure Pipelines
Content Source: docs/pipelines/agents/pools-queues.md
Product: devops
Technology: devops-cicd-agents
GitHub Login: @steved0x
Microsoft Alias: sdanie

@chcomley -- please review this update in private PR 2990.

Thank you for your feedback.  I have updated the documentation and it should be live by tomorrow.

Thanx


Game Crash 1.18.2 - "Critical injection failure"

I don't quite know why it would crash updating from 1.18.1 to 1.18.2 because there wasn't a huge amount of changes between the two versions, but here we are.
This mod makes a huge difference in enjoying Minecraft! I really hope this continues to be worked on. :)
I've attached the crash log. Here's a key part of it:
Critical injection failure: Callback method setFogFalloff(Lnet/minecraft/class_4184;Lnet/minecraft/class_758$class_4596;FZLorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;Lnet/minecraft/class_5636;Lnet/minecraft/class_1297;)V in custom-fog.mixins.json:RendererMixin from mod custom-fog failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap custom-fog-refmap.json
crash-2022-03-06_13.06.36-client.txt

Please fix this for 1.18.2.
The game looks so weird without this mod.

I can't survive with my Beta setup without this

I believe there is a working 1.18.2 version available on their Discord server.
No idea why it hasn't been uploaded to Github yet.

Here is the download for the jar but Seta said he wasn't satisfied with it so be careful.
https://cdn.discordapp.com/attachments/767238841429786630/953012302528016444/custom-fog-2.1.0-1.18.2.jar


TAJO-1766: Improve the performance of cross join

Please don't start review until #702 is committed.

This patch is not ready for review.

This patch is ready for review. Sorry for a large patch.
Here are some highlights of changes.

Added a session variable to set the limitation of broadcast table size for cross join. This value is valid only when TEST_BROADCAST_JOIN_ENABLED is set.
Cross join is always executed with broadcast join. To do so, at least one input of cross join should be the relation which is smaller than BROADCAST_CROSS_JOIN_THRESHOLD.
Added PostLogicalPlanVerifier to verify that cross join is executable or not.
Fixed some bugs in BroadcastJoinRule.
Fixed some bugs in QueryTestCaseBase.
Removed BNL and NL join executors. Instead, each task executes cross join with hash join. This is because one of inputs of cross join is always cached in the broadcast cache holder.
Improved unique key generation for a scan executor in TaskAttemptContext.

I've tested cross join performance with a cluster consisting of a master and 5 workers. Each worker equips 48 cores, 80 GB memory, and 24 disks.
Data

partsupp: 80000000 rows (12.2 GB in TEXT file)
supplier_small: 100000 rows (14.1 MB in TEXT file)

Query
select count(*) from partsupp, supplier_small

Result
1 hrs, 14 mins, 33 sec is taken with this patch. The above query runs forever without this patch because a single worker executes cross join.

Awesome!!
I've test your query on Tez and same cluster. but I've stop the query after 5h
hive> select count(*) from partsupp, supplier_small;
Warning: Shuffle Join MERGEJOIN[11][tables = [partsupp, supplier_small]] in Stage 'Reducer 2' is a cross product
Query ID = hadoop_20150825100744_8e11a2d9-d918-473f-bad2-36e403d6eca3
Total jobs = 1
Launching Job 1 out of 1

Status: Running (Executing on YARN cluster with App id application_1440464539141_0001)

--------------------------------------------------------------------------------
        VERTICES      STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED
--------------------------------------------------------------------------------
Exiting the JVM.   SUCCEEDED    224        224        0        0       0       0
Interrupting... Be patient, this might take some time.0        0       0       0
Map 1 ..........   SUCCEEDED    224        224        0        0       0       0
Map 4 ..........   SUCCEEDED      1          1        0        0       0       0
Reducer 2            RUNNING      1          0        1        0       0       0
Reducer 3             INITED      1          0        0        1       0       0
--------------------------------------------------------------------------------
VERTICES: 02/04  [=========================>>-] 99%   ELAPSED TIME: 22510.28 s

Here is my +1. The patch looks good to me.

Thanks guys!


release calendar?

Should we discuss how often we do releases?  And is the released version on pip? How can I tell?

And where is the version number set? Should it be in the pyproject.toml file?


Bump @babel/cli and @babel/preset-env to 7.6.0 in package.json

after being bumped by Dependabot in package-lock.json

Superseded by https://github.com/bring/hedwig/pull/681


Accept dropping strings and URLs to the bookmarks bar menu

Task/Issue URL: https://app.asana.com/0/1204006570077678/1208262956542588/f
Tech Design URL:
CC:
Description
Acceptance criteria
AC#1
Given a user on a website
When the user drags the URL in the address bar to the bookmarks bar menu or any sub-folder of it and the URL is not part of the bookmarks
Then it should add the bookmark to the dropped position
AC#2
Given a user on a website
When the user drags the URL in the address bar to the bookmarks bar menu or any sub-folder of it and the URL is part of the bookmarks
Then it should not add the bookmark to the dragged position
AC#3
Given a user on the browser
When the user drags a URL or string to the bookmarks bar or any sub-folder of it
Then it should add the bookmark to the dropped position
Steps to test this PR:

Follow the acceptance criteria

Definition of Done:

[ ] Does this PR satisfy our Definition of Done?

Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@mallexxx I’m adding you as a review, given that you worked on this part of the code. In the current production app (before the new bookmarks menu implementation, we were able to drop strings and URLs, and they were transformed into bookmarks. Now with this change is possible, let me know what you think and if I’m missing something.


Instrument servlet invocations with BCI

Related elastic/apm-agent-java#62

Codecov Report

Merging #80 into master will increase coverage by 0.14%.
The diff coverage is 79.41%.

@@             Coverage Diff              @@
##             master      #80      +/-   ##
============================================
+ Coverage     76.41%   76.55%   +0.14%
- Complexity      749      760      +11
============================================
  Files            83       84       +1
  Lines          2730     2755      +25
  Branches        245      245
============================================
+ Hits           2086     2109      +23
  Misses          510      510
- Partials        134      136       +2

Impacted Files
Coverage Δ
Complexity Δ

...rc/main/java/co/elastic/apm/servlet/ApmFilter.java
79.83% <100%> (+3.1%)
31 <3> (+3)
:arrow_up:

...main/java/co/elastic/apm/bci/ElasticApmAdvice.java
100% <100%> (ø)
2 <1> (+1)
:arrow_up:

.../main/java/co/elastic/apm/bci/ElasticApmAgent.java
84.44% <60%> (-2.74%)
5 <3> (+1)

...ain/java/co/elastic/apm/servlet/ServletAdvice.java
80% <80%> (ø)
6 <6> (?)

Continue to review full report at Codecov.

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


Add remote profile

It's more convenient to have this as a profile rather than have users edit a template yaml file.

@ostromart: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gencheck_operator
517b3d5f5fa7ae59d3cd3afadce4a449d266642a
link
/test gencheck_operator

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.

@ostromart: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gencheck_operator
517b3d5f5fa7ae59d3cd3afadce4a449d266642a
link
/test gencheck_operator

e2e_operator
517b3d5f5fa7ae59d3cd3afadce4a449d266642a
link
/test e2e_operator

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.

/test gencheck_operator

@ostromart: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

e2e_operator
517b3d5f5fa7ae59d3cd3afadce4a449d266642a
link
/test e2e_operator

gencheck_operator
517b3d5f5fa7ae59d3cd3afadce4a449d266642a
link
/test gencheck_operator

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.

/test gencheck_operator

/test e2e_operator

@ostromart: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

e2e_operator
517b3d5f5fa7ae59d3cd3afadce4a449d266642a
link
/test e2e_operator

gencheck_operator
1ffd2eea0a1a42b70782ad7cb534a947c165a6d6
link
/test gencheck_operator

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.

@ostromart: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gencheck_operator
5b7d2979072ee122543f9cd88f3471e39ad6ab55
link
/test gencheck_operator

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.

/cherrypick release-1.4

@ostromart: new pull request created: #496

In response to this:

/cherrypick release-1.4

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.


Update readme.md and CONTRIBUTING.md

This is an alternative of PR-44.

@daisy-ycguo I have squash all the old commits in this PR for your 44.

we should have consistent contributing docs across our repos - perhaps a top level contributing doc that is consistent across all the repos and then a repo specific doc for details that are relevant only to a specific repo.
also we should be reviewing the language a bit more slowly and carefully before merging.

another point of consistency: an issue template (we adopted one for openwhisk).

I believe this one is OK to merge, since we need to update the instructions for this catalog.
For further issues on doc, we can fix by other bugs.


chore: bump to nightly-2022-07-24

Fixes required for https://github.com/leanprover/lean4/pull/1323 and https://github.com/leanprover/lean4/pull/1335.

bors merge


Duplicate way bug

A few months ago I was trying out the v3 editor. I must have fixed some issues about footways crossing highways without being connected.
Today, I look at Osmose and Osmose tells me that 2 ways I edited produced 2 exact way geometries and tags on top of each other. The nodes for the ways were connected.

The two ways
Changeset:
https://osmcha.org/changesets/84280014
The iD version was iD 0328e10.

@lectrician1 While relatively stable, that v3 prototype was never "finished" and may have bugs. We've stopped development of that branch, so I'm closing this unless you've seen this bug on a release version of iD.


Remove the serialized_data_interface dependency

At present, this charm depends on the serialized-data-interface (SDI) library to perform version negotiation and schema validation on relation data.
While this has some attractive properties, the implementation is such that it obscures the way that relations are actually formed, and how charms really communicate through the use of 'relation data bags'. Concepts such as requests and responses do not really exist in the context of relations, and including such language will be confusing to the ecosystem.
Juju will soon include the native ability to perform some of the function that SDI aims to provide, and this charm is likely to proliferate beyond just internal Canonical products, and as such we should aim to implement what we need using constructs natively available in ops.
My suggestion is that we fix ingress-per-unit first, and then ingress - in line with the Observability team's current priorities.

Key points for discussion:

Version checking or not? We can still validate relation data bag contents and surface reasonable errors without

If possible, I'd like to move away from explicit versioning. It is not in the Juju core, and it is likely to cause us issues later

Validation of relation role and relation limits
Validation of schema for relation data bag contents

There is also the relation meta validation: relation interface, relation role and relation limit. See https://github.com/canonical/prometheus-k8s-operator/blob/98ec8278fda13bf23091ffab18d00b23ebceeada/lib/charms/prometheus_k8s/v0/prometheus_scrape.py#L372 and related code for an example of we perform this validation in other charm libs.

About "Version checking or not" oh yes! Each of these issues, on their own, effectively warrant a new version to work properly:

#6
#7
#18


Add menu uischema for ContinueConversation and GetConversationReference

Fixes #
Description

Add menu uischema for ContinueConversation and GetConversationReference to enable them in Composer.
Specific Changes

Add uischema for ContinueConversation and GetConversationReference
Update tests.schema / tests.uischema

Testing

@cwhitten @boydc2014
If we think it's not worthy to trigger another rc release with this PR only, as an alternation, we can patch the uischema in Composer.


Android NDK Build - TensorFlow protobuf definitions generation fails with TensorFlow master branch

Hi ARM Team,
We need a tensorflow/contrib/makefile/tf_proto_files.txt from TensorFlow to generate TensorFlow protobuf definitions. This file not available from TensorFlow master branch.
We have to use commit ID a0043f9262dc1b0e7dc4bdf3a7f0ef0bebc4891e.
git checkout a0043f9262dc1b0e7dc4bdf3a7f0ef0bebc4891e

We have to update the BuildGuideAndroidNDK.md file.
Thank You,
Jegathesan S

I hit the same problem on a native Linux compile on Arm. Thank you for reporting it as it saved me a lot of debugging time.

@MatthewARM We need to update this on the doc.

@nullbyte91 Thanks for reporting this issue.
I'll make sure the BuildGuideAndroidNDK.md gets updated.
Thanks,
Telmo

This tutorial could also use the update: https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides/cross-compiling-arm-nn-for-the-raspberry-pi-and-tensorflow/building-the-google-protobuf-library

@jishminor Thanks for pointing this out. I'll add the changes to both guides.

Both guides mentioned in this ticket have been updated.
We are working on a more long term solution for 20.02 Release onwards.