Bgp evpn

View the proposed changes using the redocly API viewer
This PR models BGP EVPN VXLAN support in Open Traffic Generator (OTG)
This is the proposal to add BGP EVPN VXLAN support to the OTG model as per earlier brainstorming and discussions.
With this modelling we can add multile evpn ethernet_segments per Bgp Peer.
Multiple EVI per Ethernet Segments.
Multiple Broadcast Domains per EVI.
Multiple MAC/IP ranges per Broadcast Domain.
Demo Review meeting notes addressed :

The "ethernet_segments" name to be changed to "evpn_ethernet_segments". The hierarchy is "devices->bgp->ipv4_interfaces->peers->evpn_ethernet_segments"

AS number: Value. ==> formatted as tuple "AS number: Value".

In future the other VPNs(L2VPN/L3VPN/MVPN) would be included in a separate container under "peers".
So they would come under devices->bgp->ipv4_interfaces->peers->vrfs.
Unders "VRFs" we can have separate nodes for l2vrf, l3vrfs etc.
It was specially noted that we should try to avoid adding a new parent to any node as that will break the existing scripts.
So special attention needs to be taken for that while modelling. Adding new childs are fine.

It was decided to let the user configure both evpn_vxlan as well as evpn_mpls on the same ethernet_segment index.
So the modelling has been changed to evpn_ethernet_segments[] -> evis [] .
Here each "evi" will have a choice to set either "evpn_vxlan" or "evpn_mpls" or anything else which can be added later to the choice.

"choice" is a special attribute which is being used specially for some UX. hence it was decided to have the options to select the evi types as a "choice" field
and not as a generic enum field.

So each evi will have a --> {choice: "evpn_vxlan" , evpn_vxlan: {object} }

The container description should show the major EVPN Routes that it advertises.

It was suggested to write a sample script for reference purpose and autogenerate the json config from that script.

Additional modifications :

Removed active from all the objects

Added dummy evpn_mpls to check how to access --
currently it has to be accessed by -->
evpn_vxlan_obj = p1_es_1.evis.evpn_vxlan()[-1]
evpn_mpls_obj = p1_es_1.evis.evpn_mpls()[-1]

Removed "required" for "mac_addresses" container

The below script configures a singlehome scenario on 2 ports and 2Devicegroup with connected interface.
1 BGP Peer.
1 Ethernet Segment/ Peer
1 EVI / Ethernet Segment
1 Broadcast Domain / EVI
1 MAC Range/ Broadcast Domain
Example SCRIPT
from random import choice
import otg
#Only BGP Config.

#Creating Ports
api = otg.api(location="https://localhost")
config = api.config()
p1 = config.ports.port(name='p1', location='<IP_ADDRESS>:50071')[-1]
p2 = config.ports.port(name='p2', location='<IP_ADDRESS>:50071')[-1]

#Create BGP running on connected interface.

p1_d1 = config.devices.device(name='p1_d1')[-1]
p2_d1 = config.devices.device(name='p2_d1')[-1]

p1_eth1 = p1_d1.ethernets.ethernet(port_name=p1.name)[-1]
p2_eth1 = p2_d1.ethernets.ethernet(port_name=p2.name)[-1]

p1_eth1.name = 'p1_eth1'
p1_eth1.mac = '00:11:00:00:00:01'
p1_ip1 = p1_eth1.ipv4_addresses.ipv4(name = 'p1_ip1', address = '<IP_ADDRESS>', gateway = '<IP_ADDRESS>')[-1]

p2_eth1.name = 'p2_eth1'
p2_eth1.mac = '00:12:00:00:00:01'
p2_ip1 = p2_eth1.ipv4_addresses.ipv4(name = 'p2_ip1', address = '<IP_ADDRESS>', gateway = '<IP_ADDRESS>')[-1]

#bgp Port 1
p1_bgp = p1_d1.bgp
p1_bgp.router_id = "<IP_ADDRESS>"
p1_bgp_iface = p1_bgp.ipv4_interfaces.v4interface(ipv4_name=p1_ip1.name)[-1]
p1_bgp_peer = p1_bgp_iface.peers.v4peer(name="bgp1", peer_address = '<IP_ADDRESS>', as_type='ibgp', as_number=100)[-1]

#Adding 1 Ethernet Segment per Bgp Peer
p1_es_1 = p1_bgp_peer.evpn_ethernet_segments.ethernetsegment()[-1]

#Adding 1 EVI on the Ethernet Segment
p1_es1_evisV4_1 = p1_es_1.evis.evi_vxlan()[-1]
#test = p1_es_1.evis.evpn_mpls()[-1] #For evpn_mpls object [to be incoorporated in future]

p1_es1_evisV4_1.route_distinguisher.rd_type = p1_es1_evisV4_1.route_distinguisher.AS_2OCTET
p1_es1_evisV4_1.route_distinguisher.rd_value = "1000:1"

export_rt = p1_es1_evisV4_1.route_target_export.routetarget()[-1]
import_rt = p1_es1_evisV4_1.route_target_import.routetarget()[-1]
export_rt.rt_type = export_rt.AS_2OCTET
export_rt.rt_value = "100:20"

import_rt.rt_type = import_rt.AS_2OCTET
import_rt.rt_value = "100:20"

#Adding 1 Broadcast Domain per EVI
p1_es1_evisV4_1_bd_1 = p1_es1_evisV4_1.broadcast_domains.broadcastdomain()[-1]

#Adding 1 MAC Range Per Broadcast Domain
p1_es1_evisV4_1_bd_1_mac_Pool1 = p1_es1_evisV4_1_bd_1.cmac_ip_range.cmaciprange(l2vni=16)[-1]
p1_es1_evisV4_1_bd_1_mac_Pool1.mac_addresses.address = "10:11:22:33:44:55"

#bgp Port 2
p2_bgp = p2_d1.bgp
p2_bgp.router_id = "<IP_ADDRESS>"
p2_bgp_iface = p2_bgp.ipv4_interfaces.v4interface(ipv4_name=p2_ip1.name)[-1]
p2_bgp_peer = p2_bgp_iface.peers.v4peer(name="bgp2", peer_address = '<IP_ADDRESS>', as_type='ibgp', as_number=100)[-1]

#Adding 1 Ethernet Segment per Bgp Peer
p2_es_1 = p2_bgp_peer.evpn_ethernet_segments.ethernetsegment()[-1]

#For adding multiple ethernet segments we can add the objects in a loop
#for i in range(0, 9):
#    p2_es = p2_bgp_peer.evpn_ethernet_segments.ethernetsegment()

#Adding 1 EVI on the Ethernet Segment
p2_es1_evisV4_1 = p2_es_1.evis.evi_vxlan()[-1]

#Adding RD and RT on EVI
p2_es1_evisV4_1.route_distinguisher.rd_type = p2_es1_evisV4_1.route_distinguisher.AS_2OCTET
p2_es1_evisV4_1.route_distinguisher.rd_value = "3000:1"

export_rt = p2_es1_evisV4_1.route_target_export.routetarget()[-1]
import_rt = p2_es1_evisV4_1.route_target_import.routetarget()[-1]
export_rt.rt_type = export_rt.AS_2OCTET
export_rt.rt_value = "300:20"

import_rt.rt_type = import_rt.AS_2OCTET
import_rt.rt_value = "300:20"

#Adding 1 Broadcast Domain per EVI
p2_es1_evisV4_1_bd_1 = p2_es1_evisV4_1.broadcast_domains.broadcastdomain()[-1]

#Adding 1 CMAC Range Per Broadcast Domain
p2_es1_evisV4_1_bd_1_mac_Pool1 = p2_es1_evisV4_1_bd_1.cmac_ip_range.cmaciprange(l2vni=16)[-1]
p2_es1_evisV4_1_bd_1_mac_Pool1.mac_addresses.address = "20:11:22:33:44:55"

print(config.serialize())

JSON Output
{
  "devices": [
    {
      "bgp": {
        "ipv4_interfaces": [
          {
            "ipv4_name": "p1_ip1",
            "peers": [
              {
                "as_number": 100,
                "as_number_width": "four",
                "as_type": "ibgp",
                "evpn_ethernet_segments": [
                  {
                    "active_mode": "all_active",
                    "esi": "00000000000000000000",
                    "esi_label": 0,
                    "evis": [
                      {
                        "choice": "evi_vxlan",
                        "evi_vxlan": {
                          "ad_label": 0,
                          "broadcast_domains": [
                            {
                              "cmac_ip_range": [
                                {
                                  "active_tenant": true,
                                  "include_default_gateway": false,
                                  "l2vni": 16,
                                  "l3vni": 0,
                                  "mac_addresses": {
                                    "address": "10:11:22:33:44:55",
                                    "count": 1,
                                    "prefix": 48,
                                    "step": 1
                                  }
                                }
                              ],
                              "ethernet_tag_id": 0,
                              "vlan_aware_service": false
                            }
                          ],
                          "pmsi_label": 16,
                          "replication_type": "ingress_replication",
                          "route_distinguisher": {
                            "rd_type": "as_2octet",
                            "rd_value": "1000:1"
                          },
                          "route_target_export": [
                            {
                              "rt_type": "as_2octet",
                              "rt_value": "100:20"
                            }
                          ],
                          "route_target_import": [
                            {
                              "rt_type": "as_2octet",
                              "rt_value": "100:20"
                            }
                          ]
                        }
                      }
                    ]
                  }
                ],
                "name": "bgp1",
                "peer_address": "<IP_ADDRESS>"
              }
            ]
          }
        ],
        "router_id": "<IP_ADDRESS>"
      },
      "ethernets": [
        {
          "ipv4_addresses": [
            {
              "address": "<IP_ADDRESS>",
              "gateway": "<IP_ADDRESS>",
              "name": "p1_ip1",
              "prefix": 24
            }
          ],
          "mac": "00:11:00:00:00:01",
          "mtu": 1500,
          "name": "p1_eth1",
          "port_name": "p1"
        }
      ],
      "name": "p1_d1"
    },
    {
      "bgp": {
        "ipv4_interfaces": [
          {
            "ipv4_name": "p2_ip1",
            "peers": [
              {
                "as_number": 100,
                "as_number_width": "four",
                "as_type": "ibgp",
                "evpn_ethernet_segments": [
                  {
                    "active_mode": "all_active",
                    "esi": "00000000000000000000",
                    "esi_label": 0,
                    "evis": [
                      {
                        "choice": "evi_vxlan",
                        "evi_vxlan": {
                          "ad_label": 0,
                          "broadcast_domains": [
                            {
                              "cmac_ip_range": [
                                {
                                  "active_tenant": true,
                                  "include_default_gateway": false,
                                  "l2vni": 16,
                                  "l3vni": 0,
                                  "mac_addresses": {
                                    "address": "20:11:22:33:44:55",
                                    "count": 1,
                                    "prefix": 48,
                                    "step": 1
                                  }
                                }
                              ],
                              "ethernet_tag_id": 0,
                              "vlan_aware_service": false
                            }
                          ],
                          "pmsi_label": 16,
                          "replication_type": "ingress_replication",
                          "route_distinguisher": {
                            "rd_type": "as_2octet",
                            "rd_value": "3000:1"
                          },
                          "route_target_export": [
                            {
                              "rt_type": "as_2octet",
                              "rt_value": "300:20"
                            }
                          ],
                          "route_target_import": [
                            {
                              "rt_type": "as_2octet",
                              "rt_value": "300:20"
                            }
                          ]
                        }
                      }
                    ]
                  }
                ],
                "name": "bgp2",
                "peer_address": "<IP_ADDRESS>"
              }
            ]
          }
        ],
        "router_id": "<IP_ADDRESS>"
      },
      "ethernets": [
        {
          "ipv4_addresses": [
            {
              "address": "<IP_ADDRESS>",
              "gateway": "<IP_ADDRESS>",
              "name": "p2_ip1",
              "prefix": 24
            }
          ],
          "mac": "00:12:00:00:00:01",
          "mtu": 1500,
          "name": "p2_eth1",
          "port_name": "p2"
        }
      ],
      "name": "p2_d1"
    }
  ],
  "ports": [
    {
      "location": "<IP_ADDRESS>:50071",
      "name": "p1"
    },
    {
      "location": "<IP_ADDRESS>:50071",
      "name": "p2"
    }
  ]
}

Put some observation:

not found flow.tx_rx.devices endpoint for EVPN.
We are ok with only bgp metrics (#/components/schemas/Bgpv4.Metrics.Request) or have plan to expose bgp_evpn metrics

Actual use case from @ByReaL was kind of VXLAN decoupled with BGP as below. Not sure the existing model covers this.
@ByReaL , please add more comments from your end

Hi Anish,
Need clarification on the following topology screenshot.
Here BGP (no VPN) is configured on connected dg which is connected to dut/sut. Standalone vxlan is configured on loopback interface (DG->L0_D_VTEP_01).

This is not related to BGP-EVPN-VXLAN. Most probably this comment is for standalone vxlan support. Please clarify.

If it is related to BGP-EVPN-VXLAN then there are more clarification required.

Regards,
Mano
From: ANISH-GOTTAPU @.>
Sent: Tuesday, 15 February, 2022 12:02 PM
To: open-traffic-generator/models @.>
Cc: Manomugdha Biswas @.>; Review requested @.>
Subject: Re: [open-traffic-generator/models] Bgp evpn (PR #209)
CAUTION: This message originates from an external sender.
Actual use case from @ByReaLhttps://urldefense.com/v3/__https:/github.com/ByReaL__;!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3ynkTEeVL6$ was kind of VXLAN decoupled with BGP as below. Not sure the existing model covers this.
@ByReaLhttps://urldefense.com/v3/__https:/github.com/ByReaL__;!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3ynkTEeVL6$ , please add more comments from your end
[image]https://urldefense.com/v3/__https:/user-images.githubusercontent.com/48308607/154005402-d6128b9d-12f9-4119-9b4a-f1d069c6ab84.png__;!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3ynrxobqgZ$
—
Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/open-traffic-generator/models/pull/209*issuecomment-1039907009__;Iw!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3ynjW2ughn$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AVZBNXUWRKHRXRMT5JO5SEDU3HXNDANCNFSM5NO2PIPQ__;!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3ynpVageNh$.
Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3yno1779Mn$ or Androidhttps://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!I5pVk4LIGAfnvw!23JVR-Zl5Hs0NkNhfuPl0nJ_gMp1ArUPReZv0d-O4NLvucPwwAPLrZS6_BgmAZ3ynsiCgrZr$.
You are receiving this because your review was requested.Message ID<EMAIL_ADDRESS>


HintAssist

Have you removed HintAssist?
I am using:

Nope.

Weird. I can't find it at all.

Ah - when I installed MaterialDesignThemes.MahApps it installed an old version of MaterialDesignThemes


User Agent & Programmatic Configuration

Add Java version to default User Agent
Add the library version to the user agent
Add the OTJ version to the user agent
Allow User Agent to be customizable via config
Allow config to be passed in via code as an alternative to config
based setup (useful for adding config based on runtime)

Maven Project good, test with demo
user agent is inflexible, lots of code, and major security issue.
Ability to programmatically - try Immutables

All cients need implementation (jaxrs rest, reactive)


[ML] refactor: Expose some AutoML enums publicly

Description
This pull request addresses some feedback from our ApiView, and ensures that some enums are publicly exposed.
All SDK Contribution checklist:

[ ] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-ai-ml


Draw outside the image

Is it possible to let the user draw in the black spaces outside the image? I mean, if an image is taller then larger, there are two black spaces to the left and to the right of the image, and I would like the user to be able to draw (a rectangle, an ellipse etc.) there.
Is there any option to do it or can you point me in the right direction to change the code in order to reach the goal? Is it also possible to align the image to the left instead of centering it in the viewer?
Thanks!

For the first question, you just need to edit the tool to set "allowedOutsideImage" to true for all of the tool's handles:
https://github.com/chafey/cornerstoneTools/search?utf8=✓&q=allowedOutsideImage&type=Code
For the second question, aligning the image to the left or right of the viewer, this is a bit tricky. I've done it once but it felt a bit hacky:
// Find the left and right boundaries of the canvases in the document
var enabledElement = cornerstone.getEnabledElement(element);
var left = $(enabledElement.canvas).offset().left;
var right = left + enabledElement.canvas.width;

If you want to position the image to snap to the right side of the canvas:
// Set X translation to Canvas max in image pixels - image width
// This places it on the right side of the screen
position = cornerstone.pageToPixel(element, right, 0);
enabledElement.viewport.translation.x = position.x - enabledElement.image.width;
cornerstone.setViewport(element, enabledElement.viewport);

Or to the left side:
// Use pageToPixel to and jQuery to find pixel coordinates of leftmost
// side of the current canvas
position = cornerstone.pageToPixel(element, left, 0);
enabledElement.viewport.translation.x = position.x;
cornerstone.setViewport(element, enabledElement.viewport);

Thank you!
I updated the "cornestoneTools.js" file to the latest version and I noticed that the parameter "allowedOutsideImage" was already set to true for every tool that support it, including the Elliptical tool, but when I try to draw outside the image it still doesn't work.
Please find attached the screenshot of my viewer, can I draw where I put the green arrows using that parameter?
Thanks!

Yes I understand the question, but it seems you didn't understand my earlier answer. As I stated above, the allowedOutsideImage flag is set on the tool's handles, not on the tool itself. If you look at the search result I posted, you can see that the tools create measurements with measurement data that looks something like this:
var measurementData = {
    visible: true,
    active: true,
    invalidated: true,
    handles: {
        start: {
            x: mouseEventData.currentPoints.image.x,
            y: mouseEventData.currentPoints.image.y,
            highlight: true,
            active: false
        },
        end: {
            x: mouseEventData.currentPoints.image.x,
            y: mouseEventData.currentPoints.image.y,
            highlight: true,
            active: true
        },
        textBox: {
            active: false,
            hasMoved: false,
            movesIndependently: false,
            drawnIndependently: true,
            allowedOutsideImage: true,
            hasBoundingBox: true
        }
    }
};

You can see that by default, the only handle that is allowed to be drawn outside the image is the textbox associated to the tool. If you add this same flag to the other handles, they too can be drawn outside the image.
Hope that helps!

Thanks for your patience, yes, I didn't understand.
I added it to the other handles and it worked like a charm!
I'll try to align the image to the left then. Thanks again for all your help!


Adding integration tests

I am not sure, if we should add an integration-tests module to our standard CAP Java example. I think it just makes the app more complicated to understand. We already showcase how to write an Spring MockMVC integration test in https://github.com/SAP-samples/cloud-cap-samples-java/blob/master/srv/src/test/java/my/bookshop/CatalogServiceTest.java
@AndreasSchoesser any opinion?

I think we should also show how integration tests could look like. We already mention the Maven goal to add such an integration test module in Capire. So, why not show it in our sample application.

The integration-tests module is mainly required by Cloud SDK Pipeline. From my perspective it confuses beginners more than it actually helps. So I would prefer if we show it only in conjunction with the Cloud SDK Pipeline. We should anyway think about splitting up our sample into multiple smaller samples like the Node.js colleagues have done. However that's just my opinion :)

The integration tests are working fine without the Cloud SDK Pipeline. But why not split into several projects that show different aspects of CDS / CAP development.

The integration-tests module is mainly required by Cloud SDK Pipeline.

Yes.  The reason for why we created along w/ the samples and not w/ the pipeline config, is that the test code needs to match to the sample model and custom handlers.

But why not split into several projects that show different aspects of CDS / CAP development.

We could give it a try.  The downside is that the project structure no longer reflects one-to-one the structure that people see after creating new projects.  That's something we can mitigate w/ documentation/readme.  Same than in node.js
However, I am not sure the SDK pipeline itself can handle this multi-multi-module project.  We should find out, though.


Removing checklist point from pull_request_template.md

Fixes #357
Removed a redundant point from pull_request_template.md
DCP21

Fill the google form.


hide db passowrd in the log print

This change is

Coverage increased (+0.1%) to 52.449% when pulling f7bc73da4b162dd030d864b6439aa84d90e19cdd on db_pass_log_liort into b407f67cc768aff5c38acd7f4493dd7b017f22c1 on dev.

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.

database/init.go, line 93 at r1 (raw file):

    newslc := slc[:0]
    for _, x := range slc {
        if !strings.HasPrefix(x, "password") {

use "password="  just to be more specific to the key

Comments from Reviewable

database/init.go, line 93 at r1 (raw file):
Previously, shay-berman wrote…
use "password="  just to be more specific to the key

its redundant since all the prefixes are keys in the slice

Comments from Reviewable


Focus the Searchbar by pressing slash (/)

there is an icon which suits our needs perfectly, what do you think?

smaller looks better IMO

Perfect, was basically hoping for something like that. Could be a few more pixels to the left I think.

this looks great to me, balances the smaller size of the icon

chrome shows a litte blue cross icon if the input is type search, I had to hide the icon if the user is filling the input

This seems to play fine with other text inputs.
One more thing, I think we should not show this for mobile devices. As I think this only makes sense on the desktop?

With the current implementation, the icon is hidden for mobile devices (see the md:flex class), but the event listener is enabled; however, mobile devices should't be able to generate keydown events if they are not focusing on a text input

Your right, I just didn't make my window small enough :D

This needs some fixes for RTL languages

This needs some fixes for RTL languages

We have two options here:

use the experimental RTL modifier in Tailwind, which is working flawlessly for me: https://tailwindcss.com/docs/hover-focus-and-other-states#rtl-support, which under the hood reads the direction property in the html tag
increase the right margin for all desktop users, which unfortunately adds some gap when chrome inserts its own "clear all" button


Converted preprocessor meta examples

The are two more undocumented examples that I didn't convert because I need the changes from #4423
If the changes here are fine I can later add the generated data files.

Great! I will add the data files too.

could you rebase this, as there is a merge conflict right now (data was changed in another commit)

Ok, no problem.

Ah yes, I know why it fail. Will fix it tomorrow. I forgot to debase why data PR...

rebase and merge?

Rebased and tests passed. We could merge it if it's ok with you.

There is a problem with the pca results. The cause is the different sign. I could manually fix that so it can pass the CI tests because I cannot do my machine to return the same result as the CI ones. What do you think?

CI now fails, not sure what is happening there, should be passing if you add the files. Maybe forgot to update the data submodule?

ah we wrote at the same time ...

give the manual fix a try. But I bet this has to do with the eigensolver backend. We had sign issues with those before ...

Yes, that is the problem. I am trying different libraries all day but no luck. I will give a try the manual fix.

ah this is annoying, it is a known problem with the integration tests.... I am not sure we can even fix this. In the unit tests we make the tests invariant for sign...but meta examples we cannot do this.
One option is to make the CI pass and then use those as reference (while they fail for other archs)... maybe give it a try

If the manual fix doesnt work, don't loose sleep. Then we need to make the eigensolvers signs platform independent first

OK, test passed now.

Ok let’s see how this goes on the buildbot....


lib/services/messenger/translators/front: Fix fetchContactName

fetchContactName fails because the front-sdk's method getFromLink
malforms the URL it uses to request the contact from Front.
See here https://github.com/balena-io-modules/front-sdk/blob/800205025e8ff8946fbd0908ec1003afdabbc9e4/lib/index.ts#L434
The malformed URL looks like
https://api2.frontapp.com/https://resin.io.api.frontapp.com/contacts/<contact_id>
instead it should be
https://api2.frontapp.com/contacts/<contact_id>

@balena-ci I self-certify!


Initial Implementation Feedback

Consider annotating this workflow to indicate derived skills should replace the name
https://github.com/OpenVoiceOS/skill-template-repo/blob/dev/.github/workflows/unit_tests.yml#L66
Consider running build tests on changes to MANIFEST.in to validate those changes
https://github.com/OpenVoiceOS/skill-template-repo/blob/0b4f5103fcc81e4567b68d7057bb6fa37f5a06b2/.github/workflows/build_tests.yml#L17
Consider moving metadata generation to an external package managed independently
https://github.com/OpenVoiceOS/skill-template-repo/blob/0b4f5103fcc81e4567b68d7057bb6fa37f5a06b2/.github/workflows/prepare_skillstore.yml#L24

metadata generation is already handled by OSM, which this helper script imports, a new package would be bloat....
manifest.in is a good suggestion, but that file should be static
Re annotation, the readme tells you all strings you need to search and replace across all files

manifest.in is a good suggestion, but that file should be static

Should be, but changes aren't covered by tests anywhere else so they won't show up until automation tries to push an alpha after merge of a breaking PR.
Didn't look at the script, but if it's using OSM that addresses my maintenance concern.
Also didn't look at the README, but that sounds like it addresses that concern


sensor.trash_day_after_tomorrow error. shows up 12 times and going up.

Hi!
I've updated to the new version 4.3.0 with HACS. I'm getting an error wich I haven't got before. The error is only about sensor.trash_day_after_tomorrow.
Here is the error:
2020-06-16 20:52:38 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for afvalwijzer which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-06-16 20:53:14 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.trash_day_after_tomorrow fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/config/custom_components/afvalwijzer/sensor.py", line 142, in async_update
if item['value'] != 'None':
KeyError: 'value'
2020-06-16 20:53:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.trash_day_after_tomorrow fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/config/custom_components/afvalwijzer/sensor.py", line 142, in async_update
if item['value'] != 'None':
KeyError: 'value'
2020-06-16 20:54:15 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.trash_day_after_tomorrow fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/config/custom_components/afvalwijzer/sensor.py", line 142, in async_update
if item['value'] != 'None':
KeyError: 'value'
2020-06-16 20:54:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.trash_day_after_tomorrow fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/config/custom_components/afvalwijzer/sensor.py", line 142, in async_update
if item['value'] != 'None':
KeyError: 'value'
Environment
Frontend version: 20200603.3 - latest

arch
armv7l

chassis
embedded

dev
false

docker
true

docker_version
19.03.8

hassio
true

host_os
HassOS 4.10

installation_type
Home Assistant

os_name
Linux

os_version
4.19.126-v7l

python_version
3.7.7

supervisor
227

timezone
Europe/Amsterdam

version
0.111.3

virtualenv
false

I just noticed the same indeed, I`ll look into it and fix it asap

Thanks!
Did not made it an “official” integration yet? :) People where asking about where to find it, I sayed yeah you need to install hacs... :)

Done, release 4.3.1 fixed the issue.
I'd like to make it official, but as a lonewolf I don't have enough time to integrate it...

Ah.
Oke. Seems whe're fine again with 4.3.1
I thank u and close this issue :-)


Use node 14 instead of node 16 as node 14 is LTS

The recent change in node 16 has caused jest to break and thence our CI.
This PR changes to use Node 14 instead of 16.
Closes #16591
Signed-off-by: Andrew Thornton<EMAIL_ADDRESS>

Codecov Report

Merging #16592 (cfbdf03) into main (72738f0) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main   #16592      +/-   ##
==========================================
- Coverage   45.35%   45.35%   -0.01%
==========================================
  Files         750      750
  Lines       85096    85096
==========================================
- Hits        38599    38597       -2
- Misses      40252    40254       +2
  Partials     6245     6245

Impacted Files
Coverage Δ

modules/process/manager.go
72.83% <0.00%> (-2.47%)
:arrow_down:

modules/queue/workerpool.go
53.05% <0.00%> (-1.53%)
:arrow_down:

services/pull/pull.go
41.73% <0.00%> (ø)

modules/git/blame.go
67.14% <0.00%> (+1.42%)
:arrow_up:

modules/util/timer.go
85.71% <0.00%> (+42.85%)
:arrow_up:

Continue to review full report at Codecov.

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


Rename private function Adc::read to Adc::inner_read

The name conflicts with the public trait method OneShot::read. This isn't an issue with correct programs, as rustc just uses the visible function when called from other crates.
But if you forget importing OneShot, you get a confusing error message:
error[E0624]: method `read` is private
   --> rp2040-hal/examples/adc.rs:116:45
    |
116 |         let temp_sens_adc_counts: u16 = adc.read(&mut temperature_sensor).unwrap();
    |                                             ^^^^ private method
    |
   ::: /home/jan/rp2040/rp-rs/rp-hal/rp2040-hal/src/adc.rs:302:5
    |
302 |     fn read(&mut self, chan: u8) -> u16 {
    |     ----------------------------------- private method defined here
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
15  + use cortex_m::prelude::_embedded_hal_adc_OneShot;
    |

Note that the referenced method in line 302 is not the one that should be called, and also has different parameters.
(This was noticed in https://github.com/rp-rs/rp-hal-boards/issues/42)

For comparison, with this change, the error message becomes:
error[E0599]: no method named `read` found for struct `Adc` in the current scope
   --> rp2040-hal/examples/adc.rs:116:45
    |
116 |         let temp_sens_adc_counts: u16 = adc.read(&mut temperature_sensor).unwrap();
    |                                             ^^^^ method not found in `Adc`
    |
   ::: /home/jan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embedded-hal-0.2.7/src/adc.rs:97:8
    |
97  |     fn read(&mut self, pin: &mut Pin) -> nb::Result<Word, Self::Error>;
    |        ---- the method is available for `Adc` here
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
15  + use cortex_m::prelude::_embedded_hal_adc_OneShot;
    |


Bazel 1.0.0 compatibility

Trying to build a project with the latest version of this project and LLVM 9.0.0 on Bazel 1.0.0 gives the following error:
src/main/tools/linux-sandbox-pid1.cc:427: "execvp(external/llvm_toolchain/bin/llvm-ar, 0x13748f0)": No such file or directory

The file mentioned exists for me; I suspect something changed with the sandboxing in the new version of Bazel.
Same BUILD files work fine on older versions of Bazel.

Thanks for the report. I will try to get to it over this weekend.

more specifically, something like this fails:
/home/laptop/.cache/bazel/_bazel_laptop/install/a4696acfbd71b79376c811717f94d1ac/_embedded_binaries/linux-sandbox -t 15 -w /home/laptop/.cache/bazel/_bazel_laptop/9e74040f84b92184f3149fef1e79ff7d/sandbox/linux-sandbox/123/execroot/__main__ -w /tmp -w /dev/shm -D -- external/llvm_toolchain/bin/llvm-ar @bazel-out/host/bin/external/boost/libchrono.a-2.params

The external path(external/llvm_toolchain/bin/llvm-ar) is no longer there.  Somehow no longer copied into the sandbox.

I think we need to add an ar action in cc_toolchain_config.bzl
https://docs.bazel.build/versions/master/cc-toolchain-config-reference.html#ar-actions

It seems the execroot occasionally doesn't include the external/ folder where the llvm tools are (clang and ar), but I've seen it show up for things like clang++
temporary hack: --strategy=CppCompile=standalone --strategy=CppLink=standalone.
It leaves the sandbox which is undesirable.

This ticket explains the issue well.
https://github.com/bazelbuild/bazel/issues/8531
I've solved the problem with:
--incompatible_use_specific_tool_files=false
To fix this, we could probably change native.cc_toolchain to use ar_files
https://github.com/grailbio/bazel-toolchain/blob/f2d0aeca399e70297414341d228c7be460b4d6a0/toolchain/internal/configure.bzl#L126
But at the same time, the docs say ar_files is currently not used.
https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library

Thank you for the investigation. Your help made this an easy task for me.


[Feature-14839][Alert]Add Webhook Alert Plugin to support Enterprise WeChat notifications by robot

Add Webhook Alert Plugin to support Enterprise WeChat notifications by robot
#14839

Purpose of the pull request
The purpose of this PR is to support Enterprise WeChat notifications by robot. This pull request adds webhook alert plugin.
Brief change log

Add dolphinscheduler-alert-webhook to the module dolphinscheduler-alert-plugins.
Add classes on which alarms rely, including WebHookSender, WebHookAlertChannel, WebHookAlertChannelFactory, WebHookAlertConstants, and WebHookAlertMessage.
Modify the pom.xml file of the dolphinscheduler alert plugins module.
Add pom.xml file for dolphinscheduler alert webhook module and introduce corresponding dependencies
Write test classes and methods required for message sending.

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

(or)
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

Hi @ahuljh Please add the documents of this new feature.

Hi @ahuljh Please add the documents of this new feature.

Thank you for your reminder. I will supplement the guidance document, verify the code is correct, and then upload it again. After all have been uploaded, I will remind you to check again. Thanks.

Hi @ahuljh Please add the documents of this new feature.

Hi  @caishunfeng The documents and code have been supplemented and verified. Could you please continue with the merge process? Thanks.

About this feature, we already have http and wechat plugin, this webhook looks like another way to use wechat by HTTP. How about we modify HTTP plugin and add a simple way to use HTTP, the same as just a HTTP URL or we modify wechat plugin to support this way?

And wechat webhook can @ someone, maybe we modify wechat plugin is better

 And wechat webhook can @ someone, maybe we modify wechat plugin is better

In fact, we conducted an evaluation before adding the webhook plugin, and if we add the webhook method to the wechat plugin, the Secret and CropId options will be redundant and cannot be adapted based on this. If using the Http plugin, it is necessary to modify the source code of the Http plugin, which will affect the use of other alerts through HTTP. After a comprehensive decision, we have decided to add the Webhook method. This is also the cheapest way.

Hi, @qingwli Thank you for your suggestion. I will consider adding options for @ everyone and @ designated person. If additional options are needed, I will resubmit the Pull Request

About Wechat plugin, we add a send type webhook and add an input field, let the Secret and CropId options not required is a good way? We can support two WeChat way and adapt pervious way

About Wechat plugin, we add a send type webhook and add an input field, let the Secret and CropId options not required is a good way? We can support two WeChat way and adapt pervious way

This method is acceptable for WeChat, but is it no longer supported for other places that require inputting webhooks. Through webhook plugin, it can be flexibly applied to other places, rather than just WeChat.

About webhook plugin can support different webhook request, but like wechat have @ function, the field is not common in different webhook request, so it's different to be a common plugin if you add some config. If do that it's similar to HTTP plugin.
In my opinion, for ds we support so many plugins, and for any alert ways always have different request combinations, The root way is HTTP too, we just support usage way for easy use. And for user side, If I want to use wechat , I always click Wechat button not webhook. So I think we should enhance wechat plugin.

Hi, @caishunfeng @zhongjiajie @EricGao888 My company has already used this method, and many people have this need. Do you think it is necessary to add webhook plugins to adapt to different platforms? Or is it to modify the WeChat plugin to only meet the needs of WeChat?

cc @SbloodyS

It's better to rename it to WeChat-webhook, rather than webhook. Not all webhooks can support markdown.

It's better to rename it to WeChat-webhook, rather than webhook. Not all webhooks can support markdown.

Yes, your opinion is very good. I will rename the plugin this week.

Expect my code to be quickly merged

@caishunfeng @ruanwenjun plz run CI

还没有合并吗？

Are you still working on this? @ahuljh


v2.0.0 jsDelivr CDN link does not work

The jsDelivr CDN link for version 2 (https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>is not working properly.
When navigating to the URL, the following error appears: Couldn't find the requested release version 2.
Here is a link to the relevant section in the new documentation: https://v2.picocss.com/docs#install-from-cdn

I just pre-released the v2 😎🚀

Online documentation
NPM pre-release
GitHub pre-release
Website code
v2 branch


User name attribute name configure for aad b2c

Configure attribute  user-name-attribute-name  for aad-b2c
task link
issue link

change task link to issue link

done

change task link to issue link

done


Input seems to ignore underlineColorAndroid TextInput prop

🐛 Bug Report

Used underlineColorAndroid but a line still shows which does not respect any valid color I specify.
To Reproduce
Steps to reproduce the behavior:
Pass underlineColorAndroid to Input with any valid color.
Snippet of my code which render fields shown in following screenshot:
    <>
      <Input
        label={t('formFieldLabelEmail')}
        accessoryRight={EmailIcon}
        value={email}
        textContentType="emailAddress"
        onChangeText={setEmail}
<EMAIL_ADDRESS>        keyboardType="email-address"
        autoCorrect={false}
        autoCapitalize="none"
        returnKeyType="next"
        // android
        autoCompleteType="email"
        importantForAutofill="yes"
        underlineColorAndroid="transparent"  // <-------HERE
        // ios
        enablesReturnKeyAutomatically
      />

      <Input
        label={t('formFieldLabelPassword')}
        caption={PasswordFieldCaption}
        style={styles.passwordInput}
        accessoryRight={LockIcon}
        value={password}
        textContentType="password"
        secureTextEntry={!passwordVisible}
        onChangeText={setPassword}
        defaultValue="amildlylongpassword"
        returnKeyType="done"
        autoCorrect={false}
        autoCapitalize="none"
        // android
        autoCompleteType="password"
        underlineColorAndroid="transparent"  // <-------HERE
        // ios
        enablesReturnKeyAutomatically
      />
    </>

Expected behavior

On Android, text underline color should match the props.
Link to runnable example or repository (highly encouraged)
None

UI Kitten and Eva version

Package
Version

@eva-design/material
2.0.0

@ui-kitten/components
5.0.0

Environment information

  System:
    OS: Windows 10 10.0.18363
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: 14.4.0 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
    Watchman: 20200424.164118.0 - C:\redacted\path\to\watchman.EXE
  IDEs:
    Android Studio: Version  <IP_ADDRESS> AI-193.69<IP_ADDRESS>14223
  npmPackages:
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2

It seems that you're missing the concept of that property. It doesn't configure the text underline as you probably think. See an example
You may also see the code used to provide any props to TextInput component
You probably won't using that property to remove the underline


Places AutoComplete Not Working

I'm using following code to get places based on Country but always return no data. Kindly advice me.
Intent intent = new PlaceAutocomplete.IntentBuilder()
.accessToken(Mapbox.getAccessToken())
.placeOptions(PlaceOptions.builder()
.country("IN")
.limit(10)
.build(PlaceOptions.MODE_CARDS))
.build(MapsActivity.this);
startActivityForResult(intent, REQUEST_CODE_AUTOCOMPLETE);

From the request, everything looks correct. Can you confirm that the country param is the issue? It might be that we only have places data for India and not addresses (see https://www.mapbox.com/geocoding/#coverage). Also try writing the country code in lower case. There's also the geocodingType which can be used to specify what kind of geocoding data is returned https://github.com/mapbox/mapbox-plugins-android/blob/master/plugin-places/src/main/java/com/mapbox/mapboxsdk/plugins/places/autocomplete/model/PlaceOptions.java#L108.

Going ahead and closing this ticket, if you are still having issues, feel free to comment back and I can look further into it.


Avoid copying the full grpc_byte_buffer into NSData

When receiving a message from the C layer, a byte_buffer is read in its entirety and copied into a newly allocated char array, with which a NSData is initialized (in NSData+GRPC.m).
This copy can be avoided by using grpc_byte_buffer_reader_next instead of grpc_byte_buffer_reader_readall. In combination with GPR_SLICE_START_PTR and GPR_SLICE_START_PTR, each of the slices can be passed to dispatch_data_create to get a dispatch_data_t object that points to the gpr_slice. The chain of dispatch_data_t's such created can be linked together with dispatch_data_create_concat, and the result can be transparently cast as NSData * and returned to the app.
Alternatively, the copy and the traversal can be avoided by creating a subclass of NSData to wrap the grpc_byte_buffer. NSData subclasses have to implement length and bytes. But importantly we can also override enumerateByteRangesUsingBlock:, with which the user of the NSData can read the contents in the same iteration in which we read and decompress the grpc_byte_buffer for the first time. Protobuf parsing can leverage that (even though I think it currently doesn't - @ThomasVL to confirm for ObjC protos).
This goes the other way too: When receiving a NSData to pass to the C layer as a grpc_byte_buffer, creating gpr_slices by iterating the data with enumerateByteRangesUsingBlock: will potentially eliminate one copy. Further, all copies whatsoever can be eliminated if instead of using gpr_slice_from_copied_buffer to create each slice, we use:
[data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange range, BOOL *stop) {
  // ...
  // (bytes is a valid pointer until data is dealloc'd)
  gpr_slice new_slice = gpr_slice_new_with_user_data(bytes,
                                                     range.length,
                                                     // Release data when the slice is released.
                                                     CFRelease,
                                                     // Retain data now.
                                                     (__bridge_retained void *)data);
  // ...
}];

This should be done once performance measurements are in place, so we can speak of specific numbers.

I don't believe you need to make an NSData subclass (and it likely wouldn't hurt to avoid it), instead you can create a composite out of the chunks.  We explicitly did this in some of our tests to ensure we got parsing with enumerateByteRangesUsingBlock correct.  The only catch is making sure your pointers stay valid as long as the data does.
Those tests also show casting to an NSData to take advantage of the toll free bridging.
To your questions - no, the ObjC protobuf code would end up causing NSData to auto merge this, but we can revisit seeing if we could use enumerateByteRangesUsingBlock.  Even without the protobuf code being changed, it seems like it might be worth doing in grpc just so anyone using it has the option of doing better code.

To create a composite of dispatch_data_t out of the chunks, we need to traverse the whole grpc_byte_buffer. Which is cheaper than a copy (O(num of chunks) instead of O(num of bytes)), but is avoidable. C gRPC's interface for reading grpc_byte_buffer's  is similar to NSData's enumerateByteRangesUsingBlock: but, conveniently, uses an external iterator. So implementing the internal iteration of enumerateByteRangesUsingBlock with it might end up being pretty simple (famous last words).


First pass updating the Sample Viewer(s) to Quick Controls 2

Fair warning - this is a large(ish) review, and it covers a variety of changes.
Please do not merge this pull request just yet.
Introduction
There are some known issues in this pull request, and I will try and cover them here.
These commits covers the minimum body of work required to upgrade QtQuickControls 1 to QtQuickControls 2. All syntax errors have been eradicated, and the worst of the GUI glitches have been resolved. This is not to say that some GUI glitches may yet remain, but most have been fixed.
There are some vestiges of QtQuickControls 1 left in this branch. Namely the use of the QtQuick.Dialogs, which relies on QtQuickControls 1. This is almost always for incorporating message boxes into a sample. These will be cleared as part of another pass, but I have not done this yet.
These samples should be viewed as part of the sample viewer, as they now assume that the flag QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling) is enabled, and that there is a material file provided to style the QuickControls 2 widgets. I will perform another pass at a later date to include these two items for independent samples. You will notice that scaleFactor is being removed from several samples due to this.
Below I will explain the main body of work done, to give more context to these changes you see. If not listed here, then a sample will normally fall under one of these two categories of updates:

QML has been updated because the QuickItems were rendering incorrectly.
C++ has been updated to reflect the new signal/slot call order of QuickControls 2. Access-to-nullptr crashes were caused by accessing an uninitialised MapQuickView or Map object.

Other non-trivial Sample Updates
Analysis/AnalysizeHotspots
This is the most complicated sample in terms of changes. The Calendar QML type has been deprecated and replaced with Qt.labs calendar components. My localé was also set to something obscure, and this was playing merry havoc with the date/time formats, so the date/time calculations and formatting have been updated to be more robust.
EditData/EditFeatureAttachments and RasterLayerFile
This sample uses a Qt.labs.platform for a FileDialog, replacing the old QtQuick.Dialogs FileDialog.
There are 2 issues that this highlighted and were fixed:

Qt.labs.platform requires an ApplicationWindow to have the FileDialog run correctly. As such a boilerplate main.qml was introduced.

Qt.labs.platform uses Qt widgets to fall back on when a native FileDialog is not available. As such the application needed to upgrade QGuiApplication to QApplication, and the config required CONFIG += widgets line for Qt.labs.platforms to work correctly on all platforms.

This change should probably be applied to all samples for future-proofing.
RasterRgbRenderer
Spinboxes are now integers only, and requires an enhancement to work with real numbers.
Maps/DisplayLayerViewDrawStatus
TableViews are not available in QuickControls 2, a major restructuring was required to make (in C++) a better data model to hold two columns of data, and in both the C++ and QML apps changing the rendering to Repeaters instead.
Maps/ChangeBaseMap / Maps/ChangeVIewpoint / MapsManageBookmarks
Comboboxes do not fit the text they surround. ComboBoxes now correctly fit the length of the largest text they could surround.
Animate3D
This sample is broken. It is still being investigated.

@anmacdonald good writeup on the changes. I haven't reviewed the code yet.

CONFIG += widgets..

That seems like a problem for Qml/Quick ui samples. Is there any way to avoid that?

Animate3D
This sample is broken. It is still being investigated.

Do you have an idea of how long that will take to get working again? We should try to avoid leaving anything in a broken state.
I'll review the code.

@JamesMBallard
Good question! FileDialog and MessageDialog are the labs widgets we use that cause this requirement. FileDialog has a native equivalents on all platforms we target. (Provided Linux is running the GTK+ platform theme).
But MessageDialog only has native equivalents for:

iOS
Android
WinRT

So if we deprecated the use of MessageDialog in our samples, and display the same info in a different way, then we probably wouldn't need the widgets requirement. Provided we were comfortable that FileDialog would no longer appear on Linux platforms running KDE....
Is there a particular reason you don't want this dependency in the QML samples?

@JamesMBallard, @anmacdonald - I've got a feeling we need to bring in widgets in some samples currently (for web engine or something related)

Is there a particular reason you don't want this dependency in the QML samples?

Mainly library bloat and we want to remain consistent with Qt's ui divisions. Widgets with Widgets UI, Qml/Quick with that UI.

I've got a feeling we need to bring in widgets in some samples currently (for web engine or something related)

If we're already doing this it's not a concern.

I inconsistently used the new "suggestion" feature. So some feedback includes a suggestion that you can accept/reject and some are just comments.

@JamesMBallard I've been mulling your comments about CONFIG += widgets. There are about 2 samples that use FileDialog, if those samples used widgets and QApplication, but the rest of the samples did not, do you think this would be permissible?
We would deprecate all the message dialogs still in use, that way we'd limit the number of samples that would require a widgets dependency.

All good to go. @anmacdonald more merge conflicts to resolve.


Make GitHub not detect *.fs as Forth.

Hello,
Please merge this, if you'd like GitHub not to detect your .fs files as Forth.
Thanks!

thanks @larsbrinkhoff


Documentation for video capture script

Note to self: Should add a section in the README to explain how the video capture script can be used

Is this still necessary, now that SenseStudio supports video recording?

Not in the main README but if we still want to keep the standalone script we could add a small description in the wiki.


Images always have "margin"

Hello,
Thank you so much for this library.  I have a question regarding the images.  It seems that no matter what size I make the container, the images end up with a "margin" around one of the edges that shouldn't have one.  This image is actually 5000px tall, and the container is around 500px tall.  Still, it has the empty space at the bottom.  I would like to have the images expand to fill the container's total width OR height (depending on the orientation).  Could you please suggest how I might accomplish this?

I figured this out.  It was the "dots".  The space is allocated even if there is only one image, and no dots.  I added logic to hide the dots if there is only one image, and that did it.


⚠ Bofrost.de has degraded performance

In 19d40a3, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 943 ms

Resolved: Bofrost.de performance has improved in 4fc3346.


[IMPORTANT] Relicense bevy_prototype_lyon under dual MIT/Apache 2.0

I, as the repository owner, would like to make a few simple but important changes to bevy_prototype_lyon:

relicense it under the "dual MIT / Apache 2.0 license",
remove the copyright notice that now resides in the LICENSE file, which incorrectly attributes the work to only me.

Each contributor holds copyright for their additions. Therefore, I cannot relicense without explicit consent from past contributors, unless I remove their contributions. The purpose of this issue is seeking compliance for these changes from all the contributors.
Why I am going to relicense
The Bevy game engine, which this library depends on, is currently under the same process (bevyengine/bevy#2373) and its current contribution guidelines suggests to license eligible assets under the same license as Bevy. Also, there is a remote possibility that at least some parts of bevy_prototype_lyon will be included in a future version of Bevy. Relicensing would be of great help in this case.
How to comply
If you decided to comply to the changes described in the first paragraph of this issue, I really appreciate it. Thanks! You just need to post the following comment as a reply to this issue:
I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

By posting this comment, everyone can safely assume that you agree with the relicense process. Please notice that other forms of support, like reacting with a 👍🏻 or posting a comment with a different formula will NOT be considered valid.
What if you don't want to comply
I don't want to force you to comply to these changes. You will need to know however that if you don't comply, your contributions will be removed (or reimplemented in a way that respects your copyright) in order to keep the relicense process going on. Please let me know under this issue or privately if you take this choice. It would help me a lot speeding up the process. Still, thanks for having contributed to this repository!
Changes after the relicense
README.md
the following paragraphs will be added to the end of the file:
### License

Licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

License files
LICENSE will be replaced by LICENSE-MIT and LICENSE-APACHE with their respective contents.
Rust package manifest (Cargo.toml)
the license field will be changed to the following:
license = "MIT OR Apache-2.0"

Contributor checklist
The following is a checklist featuring every GitHub account that have committed at least once in this repository, aside from myself (order is alphabetical):

[ ] @alec-deason
[x] @alyti
[x] @carrascomj
[ ] @davidB
[ ] @faassen
[x] @nside
[ ] @pka
[ ] @ssbr
[x] @TheLeonsver1
[ ] @will-hart

This issue will be closed once every contributor took their decision, or in prolonged absence of a response. Then, it will start the final phase of the relicense process, featuring a pull request with the needed changes.

I license past and future contributions to this repository under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions to this repository under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0
license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.
(Sorry for delay, had to check with employer as they own the copyright.)

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.

Thank you all for your fast responses. I'll proceed as soon as possible.
I am going to edit the closing conditions for this issue. The issue will be closed when the PR will be merged.


Virtual Routers Configuration Enhancements

Author Name: Kristian Feldsam (Kristian Feldsam)
Original Redmine Issue: 5023, https://dev.opennebula.org/issues/5023
Original Date: 2017-02-14
Original Assignee: Javi Fontan

Hello, I did som eupdates in aplpine context scripts to support loadbalanacing, email notifications etc.. and I like to see it  integrated in OpenNebula.
Proposal of changes in OpenNebula

Virtual Router - Add support by adding checkbox for set interface as gateway
** @ETHx_VROUTER_GATEWAY@
Virtual Router - Add support by adding email notifications fields
**  @VROUTER_KEEPALIVED_NOTIFY_EMAIL@
**  @VROUTER_KEEPALIVED_FROM_EMAIL@
Virtual Router - Add support for configure sync interface and also not allocate addresses if sync is on other interface, but just VIP
**  @ETHx_VROUTER_KEEPALIVED_INF@
Virtual Router - Add support for define Load Ballancers
**  @VROUTER_LBx_ALGO@
**  @VROUTER_LBx_DELAY_LOOP@
**  @VROUTER_LBx_DEV@
**  @VROUTER_LBx_KIND@
**  @VROUTER_LBx_PORT@
**  @VROUTER_LBx_PROTOCOL@
**  @VROUTER_LBx_SERVERy_IP@
**  @VROUTER_LBx_SERVERy_PORT@
**  @VROUTER_LBx_SERVERy_WEIGHT@
**  @VROUTER_LBx_SERVERy_CHECKz_TYPE@
**  @VROUTER_LBx_SERVERy_CHECKz_PORT@
**  @VROUTER_LBx_SERVERy_CHECKz_TIMEOUT@
Services - Add support for virtual routers / load ballancers
**  also add support by some context var to real servers with direct routing LB mode, so can be updated context scripts which add arp filtering and VIP to interface.
Virtual Routers - remove keepalived_id - no need this, we can relay on vrouter_id. VRRP communication is based on VIP and ID have effect only if multiple instances are running on same NIC
Virtual Routers - keepalived_password should be auto generated

Full thread about this https://forum.opennebula.org/t/contribution-vrouter-enhacements-and-load-ballancing/3679

Original Redmine Comment
Author Name: Kristian Feldsam (Kristian Feldsam)
Original Date: 2017-08-30T20:12:48Z

Hello, are you counting with this in release 5.6? I will be very happy and I am fully available to assist, test and contribute code. thank you.

Hello, this is probably related to #1383

Relate to #3375

LVS/IPVS LoadBalancer implemented by:

https://github.com/OpenNebula/one-infra/pull/272
https://github.com/OpenNebula/one-infra/pull/286
https://github.com/OpenNebula/one-infra/pull/299

Docs and Marketplace:

https://github.com/OpenNebula/marketplace/pull/42
https://github.com/OpenNebula/marketplace-docs/pull/30


Add token support for API calls

The context behind this PR is my desire to support token based authentication for API calls.
The following changes were made to support token authentication according to token documentation.
elasticsearch.go:

Add Token field to elasticsearch.Config struct
In function elasticsearch.NewClient, add Token field in call to estransport.New for initialization of variable tp

estransport/estransport.go

Add Token field to estransport.Config struct
Add token field to estransport.Client struct
In function estransport.New, add token field to Client return
In func (c *Client) setAuthorization(u *url.URL, req *http.Request) *http.Request, add logic supporting token headers similar what is done for apikey.

Hello, thanks for the patch! I'm on vacation currently, I'll have a look when I'm back. The changes themselves look good, I'll just have to think through the order of precedence between the various authentication values.

@karmi Did the precedence match what you expected?

Hi, sorry for such a long delay! I've been thinking about the feature a little bit more, and I've realized it would actually make the client diverge from the other official clients, which don't support such a feature out of the box.
Since Elasticsearch itself doesn't support a token-based authentication, and it's applicable only when some kind of proxy sits in front of it, I think it qualifies as a "custom environment". Therefore, I'd suggest creating a custom transport, wrapping the default one, and setting the request header — as in the following example:
//+build ignore

package main

import (
	"fmt"
	"log"
	"net/http"
	"os"

	"github.com/elastic/go-elasticsearch/v8"
	"github.com/elastic/go-elasticsearch/v8/estransport"
)

const (
	serverToken = "abc123"
	clientToken = "xyz456" // <<< Change to the same value for successful authorization
)

type AuthorizedTransport struct{}

func (t *AuthorizedTransport) RoundTrip(req *http.Request) (*http.Response, error) {
	req.Header.Set("Authorization", "Bearer "+clientToken)
	fmt.Println(">>> ", req.Header.Get("Authorization"))
	return http.DefaultTransport.RoundTrip(req)
}

func main() {
	log.SetFlags(0)

	defaultHandler := func(w http.ResponseWriter, r *http.Request) {
		fmt.Println("<<< ", r.Header.Get("Authorization"))
		if r.Header.Get("Authorization") != "Bearer "+serverToken {
			http.Error(w, "Invalid credentials", 403)
			return
		}
		fmt.Fprintln(w, "OK")
	}

	go func() {
		log.Fatalln(http.ListenAndServe("localhost:10100", http.HandlerFunc(defaultHandler)))
	}()

	es, _ := elasticsearch.NewClient(
		elasticsearch.Config{
			Addresses: []string{"http://localhost:10100"},
			Transport: &AuthorizedTransport{},
			// >>>>> Wrap the transport >>>>>>>>>>>>>>>>>>>>>>>>
			Logger: &estransport.ColorLogger{Output: os.Stdout},
			// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
		})

	res, err := es.Info()
	if err != nil {
		log.Fatalf("Error getting response: %v", err)
	}
	defer res.Body.Close()

	if res.IsError() {
		log.Fatalf("Error response: %s", res)
	}

	log.Println(res)
}

With this reasoning, I'd like to close the PR without merging. Please re-open or comment if you would like to discuss it further.

Hi @geoffmore , I was wrong about Elasticsearch itself not supporting the bearer/token authentication — sorry about that.
There's a broader discussion happening in https://github.com/elastic/go-elasticsearch/issues/106#issuecomment-557060934 now about custom HTTP headers, which is related to the bearer/token authentication feature.

@karmi I don't know enough about custom HTTP headers to contribute anything meaningful to #106 , but I am following the conversation to see where I can contribute.

Custom global HTTP request headers have been added in https://github.com/elastic/go-elasticsearch/commit/3f39d542adc013c69c7818092e6ac0d428e1b9a7.


IndexError: list index out of range

2018-01-21 15:24:48 [scrapy.core.scraper] ERROR: Spider error processing <GET https://www.pornhub.com/embed/ph59a628740c49c> (referer: https://www.pornhub.com/)
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/scrapy/utils/defer.py", line 102, in iter_errback
yield next(it)
File "/Library/Python/2.7/site-packages/scrapy/spidermiddlewares/offsite.py", line 29, in process_spider_output
for x in result:
File "/Library/Python/2.7/site-packages/scrapy/spidermiddlewares/referer.py", line 22, in
return (_set_referer(r) for r in result or ())
File "/Library/Python/2.7/site-packages/scrapy/spidermiddlewares/urllength.py", line 37, in
return (r for r in result or () if _filter(r))
File "/Library/Python/2.7/site-packages/scrapy/spidermiddlewares/depth.py", line 58, in
return (r for r in result or () if _filter(r))
File "/private/var/py/WebHubBot/PornHub/PornHub/spiders/pornHubSpider.py", line 59, in parse_ph_info
_ph_info_json = json.loads(_ph_info[0])
IndexError: list index out of range

in pornHubSpider.py
line 56 =>:
_ph_info = re.findall('var flashvars =(.*?),\n', selector.extract())

可以尝试分析下。 应该就是正则变掉了。

也是这个问题
正在分析中
@xiyouMc

@rover5056  刚合并了一个修复这块的 PR ,麻烦你这边 pull 测试下 同时把结果同步过来。

出现同样问题

我也是这个问题

目前还是不行，正则化怎么搞


[stable/concourse] credhub credential manager options

What this PR does / why we need it:
Adds Credhub as a credentials manager. Currently we have most of the "official" credentials providers implemented as options except Credhub.
Which issue this PR fixes

fixes concourse/hush-house#32

Special notes for your reviewer:

This implementation allows Concourse to talk to Credhub via client_id and client_secret . I'm under the impression you could do mTLS an auth model(see also: CONCOURSE_CREDHUB_CLIENT_CERT, CONCOURSE_CREDHUB_CLIENT_KEY)? ... But ultimately I decided to stick to what's included in the doc, which is a CA_Cert and client-id/client-secret

I did local testing to the best of my abilities && tried to keep the scope focused. Would appreciate an honest overview/review of this work; I’m by no means a helm pro or have deep experience with this chart. If this doesn't meet quality standards && someone else wants to implement this as they see fit, rock and roll, please do.. But having Credhub be an option would be massively helpful for my team.

Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

Apologies if I'm doing this wrong: /cc @cirocosta @YoussB

Apologies, not trying to pester, but considering there's PR for Concourse 5.3.0 flags which bumps the chart's minor version to 6.3.0, I hope someone from the Concourse team also takes a look at this PR as it likely also warrant a minor version bump.

Hi @aegershman , thanks for the PR!!
Nothing wrong at all 😁
I added some comments to the changes, please let me know what you think 👍
Thanks!

@cirocosta Now that the Chart version is at 6.3.0, is it appropriate to bump to 6.4.0 or 6.3.1?

Thanks for following up with the comments, @aegershman !
I'd say 6.4.0 as specifying that'd be adding some new functionality that couldn't be done before assuming that the values.yaml declares the interface by which the semantic versioning applies to.
Wdyt?
thanks!

Not a problem @cirocosta thanks for the time, I appreciate it.
I've updated the Chart to be 6.4.0 👍 let me know if there's anything else I can do to help.

Thanks, @aegershman !
I think the bump in the image name could fit in a separate PR (where we'd be performing a patch then).
Wdyt?
thanks!

/ok-to-test

Alrighty @cirocosta sounds good, will leave this PR as-is. Let me know if there's anything else you need me to do to help get this merged in 👍 thanks a ton (cc @dashaun)

/lgtm

Thank you!


Taking a semaphore is not guaranteed to succeed

Calling xSemaphoreTake might not succeed, so it might be best to check the result and only continue when the lock really succeeded.
This would require quite a bit of a rewrite and error handling, but atm all the calls to i2cStart, spiStart and displayStart seem pretty useless as the code continues regardless whether the lock succeeded or not.
// make displayStart return a boolean
#define displayStart() xSemaphoreTake(mutexDisplay, portMAX_DELAY) == pdTRUE

// then check if the lock rly succeeded
if (displayStart()) {
    display.selectDisplayMode(INKPLATE_3BIT); // set grayscale mode
    display.clearDisplay();                   // refresh the display buffer before rendering.
    displayEnd();
} else {
  // log the lock failure and maybe reschedule the current task?
}

Good find.
While there is definitely a bug here, as long as the calls don't time out and block for the brief moments while the i2c bus is active I've never encountered a problem.
I added i2cStart, spiStart and displayStart because the underlying inkplate library does not have any sort of mutual exclusion for multiple API calls that use the same bus and conflict with each other. Adding these checks resolved the issue for me. Each blocking sequence should always be very short, so I'd imagine its would be incredibly rare for xSemaphoreTake to return false.
Have you observed any problems with the current behavior?