Stack overflow on inputs having more than 256(?) values.

use serde_json::json;
use std::error::Error;
use tokio::time::Instant;
use zen_engine::model::DecisionContent;
use zen_engine::DecisionEngine;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let decision_content: DecisionContent =
        serde_json::from_str(include_str!("resource/issue_more_than_256_values.json")).unwrap();
    let start_time = Instant::now();
    let engine = DecisionEngine::default();
    println!("creating engine in {:?}", start_time.elapsed());

    let decision = engine.create_decision(decision_content.into());
    println!("loading decision {:?}", start_time.elapsed());

    let start_time = Instant::now();
    let available_connectors: Vec<i32> = vec![1, 3, 4, 5, 8, 2, 6, 7];

    for vendor_id in available_connectors {
        let rule_param = json!({
            "vendor": {
                "id": vendor_id
            },
            "route": "SINHKG"
        });
        println!("evaluating for : {}", vendor_id);

        let search_rule_output = decision.evaluate(&rule_param).await;
        match search_rule_output {
            Ok(search_rule_output) => {
                println!(
                    "search_rule_output vendor {}: {:?} in {:?}",
                    vendor_id,
                    search_rule_output,
                    start_time.elapsed()
                );
            }
            Err(e) => {
                println!("error evaluating rule: {}", e);
            }
        };
    }

    println!("ends in {:?}", start_time.elapsed());
    Ok(())
}

this caused stack overflow:
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Is there any limitation on the number of the input array values?
route.issue_more_than_256_values.json
I managed to make it run by increasing the stack size in a new thread, but I think this is ugly--I had no idea why putting 40MB of stack size works, just trial & error:
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let child = thread::Builder::new()
        .stack_size(40 * 1024 * 1024)
        .spawn(move || {
            // Create a new Tokio runtime
            let rt = Runtime::new().unwrap();

            // Execute async code using the runtime
            rt.block_on(async {
                // Your async code here
                let decision_content: zen_engine::model::DecisionContent = serde_json::from_str(
                    include_str!("resource/route.issue_more_than_256_values.json"),
                )
                .unwrap();
                let start_time = Instant::now();
                let engine = zen_engine::DecisionEngine::default();
                println!("creating engine in {:?}", start_time.elapsed());

                let decision = engine.create_decision(decision_content.into());
                println!("loading decision {:?}", start_time.elapsed());

                let start_time = Instant::now();
                let available_connectors: Vec<i32> = vec![1, 3, 4, 5, 8, 2, 6, 7];

                for vendor_id in available_connectors {
                    let rule_param = json!({
                        "vendor": {
                            "id": vendor_id
                        },
                        "route": "SINHKG"
                    });
                    println!("evaluating for : {}", vendor_id);

                    let search_rule_output = decision.evaluate(&rule_param).await;
                    match search_rule_output {
                        Ok(search_rule_output) => {
                            println!(
                                "search_rule_output vendor {}: {:?} in {:?}",
                                vendor_id,
                                search_rule_output,
                                start_time.elapsed()
                            );
                        }
                        Err(e) => {
                            println!("error evaluating rule: {}", e);
                        }
                    };
                }

                println!("ends in {:?}", start_time.elapsed());
            });
        });

    let _ = child.unwrap().join();

    Ok(())
}

Appreciate any inputs. Thanks!

Hi @iman38,
Cause
We will look into the best way we want to solve this internally. The issue you are facing is caused by stack filling up during recursion in compiler.rs.
We would be able to rewrite the function to use iterative approach, but we likely won't go for this yet since we aim for zen-expressions to be super simple and mostly short. Iterative function will reduce readability and maintainability of our project. Also there's a good and simple workaround. 👇
Solution
Instead of using "VAL1", "VAL2",... you can use array directly, e.g. ["VAL1", "VAL2",...]. This will avoid creating a heavily nested AST and in turn dramatically reduce recursion.
Attached is the JSON file with corrected values (now uses array instead): route.issue_more_than_256_values.json. (Please double check the values and ensure that model is working as expected)
Internally we'll have a chat at how we want to tackle large records within decision tables in these cases. If you have some ideas/thoughts on how this can be achieved, feel free to share.

Hi @stefan-gorules ,
Thanks for your prompt response. I overlooked the fact that I can make the values as an array, I looked at the predefined examples in https://editor.gorules.io/ use simple commas and thought those was example of arrays.
Your solution works for my case and you're correct, the processing time is reduced significantly (18ms vs 7ms) in dev build. This is fantastic.
I tried forking your repo and looking into potential solution (you mentioned it--changing it into iterative approach), but I believe it will take a big chunk of my time for now to understand everything under the hood and actually proposing some solutions.
I use drools in java and find gorules is awesome. Thank you!


Split code up into more manageable pieces

Currently, lib.rs is a monstrosity that contains everything.
Some ideas for modules:

lexer
parser
dependency and assignment resolution
execution

Also, I question my decision to have an empty main.rs that just calls into just::app(). I did this to avoid making anything but app public, but I'm not sure why it's necessary. It would be better if main.rs contained what app.rs contains now.

Done. Most everything is split into hopefully easy to understand modules.


"Get Guest Adapters Info" returns unusable IP address if IPv6 is enabled

If IPv6 is enabled on the Linux guest, the "Get guest adapters info" API call [1]  has a tendancy to return a link-local IPv6 address.
This is an address that starts with fe80: and that is unusable from any host that is not directly on same (switched) link.
=> If there is a router between the client and the guest, the address returned by "get guest adapters info" is unusable.
The problem is even deeper: a host adapter can have several IP addresses; several IPv4 and several IPv6. The current API method assumes each adapter is identified by only one address.
Typical output is:
    "output":
    {
        u'adapters': [{u'lan_owner': u'SYSTEM',
                       u'adapter_address': u'1000',
                       u'lan_name': u'VSC11590',
                       u'adapter_status': u'02',
                       u'mac_address': u'02:55:36:5D:48:57',
                       u'mac_ip_version': u'4',
                       u'mac_ip_address': u'<IP_ADDRESS>'}]
    }

but the last fields should be a list of addresses, ideally.
How to fix it?
SMAPI call Virtual_Network_Adapter_Query_Extended returns something like:
mac_count=7

mac_address=01005E000001
mac_address_type=01
mac_status=00

mac_address=023AFC42002A
mac_address_type=00
mac_status=00
mac_ip_version=4
mac_ip_address=<IP_ADDRESS>

mac_address=023AFC42002A
mac_address_type=00
mac_status=00
mac_ip_version=6
mac_ip_address=2a07:de40:b208:2:3a:fcff:fe42:2a

mac_address=023AFC42002A
mac_address_type=00
mac_status=00
mac_ip_version=6
mac_ip_address=fe80::3a:fcff:fe42:2a

mac_address=333300000001
mac_address_type=01
mac_status=00

mac_address=3333FF42002A
mac_address_type=01
mac_status=00

mac_address=3333FFC48072
mac_address_type=01
mac_status=00

mac_info_end

The current code in smtclient.py overwrites every IP address in this output with the next one :crying_cat_face: .

Solution 1 (breaks compatibility):
return a full list with all this information [ {mac1, ip1, iptype1}, {mac2, ip2, iptype2} ...];
this is the best solution as it matches both SMAPI and network reality.

Solution 2: (keeps compatibility):
refrain from returning a link-local address
for example by always stopping at first valid IP address (seems to be the IPv4).

I can provide a PR for whatever solution you prefer (including not listed).
[1] https://cloudlib4zvm.readthedocs.io/en/latest/restapi.html#get-guest-adapters-info

Yes, it's a valid issue.
I only wondering under what situation can Virtual_Network_Adapter_Query_Extended output include the IPv6 address?
E.g. I have a z/VM guest which has NIC as following, seems it has an IPv6 address, but Virtual_Network_Adapter_Query_Extended output doesn't include this IPv6 address, only IPv4.
2: enc1000: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:01:03:14:3d:b1 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/17 brd <IP_ADDRESS> scope global noprefixroute enc1000
       valid_lft forever preferred_lft forever
    inet6 fe80::1:3ff:fe14:3db1/64 scope link
       valid_lft forever preferred_lft forever

adapter_count=1
adapter_address=1000
port_type=0
extended_port_status=00
adapter_type=2
network_device_count=3
adapter_status=02
lan_owner=SYSTEM
lan_name=VSICIC
device_options=C1000000
router_status=00
mac_count=4
mac_address=01005E000001
mac_address_type=01
mac_status=00
mac_address=020103143DB1
mac_address_type=00
mac_status=00
mac_ip_version=4
mac_ip_address=<IP_ADDRESS>
mac_address=333300000001
mac_address_type=01
mac_status=00
mac_address=3333FF143DB1
mac_address_type=01
mac_status=00
mac_info_end
adapter_info_end

Hello,
fe80:... is a link-local address, therefore unusable outside of this segment. That could be a reason for not returning it.
However if you look at the output I detailed in my original message, I get the fe80:... address, in addition to routable addresses.
I can see two possible explanations:

either Virtual_Network_Adapter_Query_Extended intentionally refrains from returning any IPv6 address if there is only the link-local
or a simple bug ?

Could you try getting a routable IPv6 address ? You need to set this up on your router. You might also try to fool the system by adding a routable static IPv6 address.
In any case, that does not change anything to the problem I mention, nor to the patch I propose.

For the static IPv6 "cheat", from the guest Linux:
# ip -6 address add 2a07:de40:b208:0:1:3ff:fe14:3db1/64 dev enc1000

This address will of course not be usable, but maybe that's enough to fool Virtual_Network_Adapter_Query_Extended call.

For the static IPv6 "cheat", from the guest Linux:
# ip -6 address add 2a07:de40:b208:0:1:3ff:fe14:3db1/64 dev enc1000

This address will of course not be usable, but maybe that's enough to fool Virtual_Network_Adapter_Query_Extended call.

Thanks. I did this way, but still the Virtual_Network_Adapter_Query_Extended  output only contains version 4 IP address. Maybe there are other reasons.
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enc1000: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:01:03:14:3d:b1 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/17 brd <IP_ADDRESS> scope global noprefixroute enc1000
       valid_lft forever preferred_lft forever
    inet6 2a07:de40:b208:0:1:3ff:fe14:3db1/64 scope global dadfailed tentative
       valid_lft forever preferred_lft forever
    inet6 fe80::1:3ff:fe14:3db1/64 scope link
       valid_lft forever preferred_lft forever
# smcli Virtual_Network_Adapter_Query_Extended -T IAAS020F -k 'image_device_number=*'

adapter_count=1
adapter_address=1000
port_type=0
extended_port_status=00
adapter_type=2
network_device_count=3
adapter_status=02
lan_owner=SYSTEM
lan_name=VSICIC
device_options=C1000000
router_status=00
mac_count=4
mac_address=01005E000001
mac_address_type=01
mac_status=00
mac_address=020103143DB1
mac_address_type=00
mac_status=00
mac_ip_version=4
mac_ip_address=<IP_ADDRESS>
mac_address=333300000001
mac_address_type=01
mac_status=00
mac_address=3333FF143DB1
mac_address_type=01
mac_status=00
mac_info_end
adapter_info_end

Yes. This is indeed strange. I'm not sure how we could contact SMAPI developers to tell them about the issue.
I understand this is something that prevents you from properly testing with IPv6. Don't hesitate to ask me if you need any IPv6-related tests in the future.


Native

Libraries update to run with Android Studio 2021.3.1
Updated methods for searching and sending commands, including the option to send saved commands, in order to work with new versions of Traccar!

Libraries update to run with Android Studio 2021.3.1 Updated methods for searching and sending commands, including the option to send saved commands, in order to work with new versions of Traccar!


Error Building and Packaging

Thank you for the other issue resolution!
But, I get these warnings when building and packaging the program:
PS C:\Users\joesc\GitHub\Node-RED-SFE> npm run-script build

> build
> npm run-script clean && node build.js

> clean
> rimraf ./build/

PS C:\Users\joesc\GitHub\Node-RED-SFE> npm run-script package

> package
> cd ./build && pkg ./package.json --compress gzip -t host --targets node20 --output ./dist/node-red-sfe

><EMAIL_ADDRESS>compression:  GZip
> Warning Cannot resolve 'moduleDir'
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js
  Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.
> Warning Cannot resolve 'relPath'
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js
  Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.
> Warning Cannot resolve 'parsedModule.module + parsedModule.subpath'
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js
  Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.
> Warning Cannot resolve 'mod'
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js
  Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.
> Warning Cannot resolve 'moduleInfo.path'
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js
  Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.
> Warning Cannot resolve 'path.join(__dirname, "..", "package.json")'
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js
  Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.
> Warning Cannot stat, ENOENT
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-ask-pass.sh
  The file was required from 'C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js'
> Warning Cannot stat, ENOENT
  C:\Users\joesc\GitHub\Node-RED-SFE\build\authWriter.js
  The file was required from 'C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js'
> Warning Cannot stat, ENOENT
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-ask-pass.sh
  The file was required from 'C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js'
> Warning Cannot stat, ENOENT
  C:\Users\joesc\GitHub\Node-RED-SFE\build\authWriter.js
  The file was required from 'C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js'
> Warning Cannot stat, ENOENT
  C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-ssh.sh
  The file was required from 'C:\Users\joesc\GitHub\Node-RED-SFE\build\node-red-bundle.js'

This is the output when trying to launch the executable:
PS C:\Users\WDAGUtilityAccount\Desktop> .\node-red-sfe.exe
undefined:0

Error: No native build was found for platform=win32 arch=x64 runtime=node abi=115 uv=1 libc=glibc node=20.11.1
    loaded from: C:\snapshot\Node-RED-SFE

    at Function.<anonymous> (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at load (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at<EMAIL_ADDRESS>(C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at __require (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at<EMAIL_ADDRESS>(C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at __require (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at<EMAIL_ADDRESS>(C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at __require (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at node_modules/serialPort/dist/serialport.js (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)
    at __require (C:\snapshot\Node-RED-SFE\build\node-red-bundle.js)

Node.js v20.11.1
PS C:\Users\WDAGUtilityAccount\Desktop>

Here is an archive of my project: https://jschroedl.com/wp-content/uploads/2024/08/Node-RED-SFE.zip

I added serialport to the dependencies in package.json
	"dependencies": {
		"@yao-pkg/pkg": "^5.12.0",
		"esbuild": "^0.23.0",
		"node-red": "^4.0.2",
		"winston": "^3.13.1",
		"winston-daily-rotate-file": "^5.0.0",
		"node-red-node-serialport": "^2.0.2"
	},

It also shows up in the editor:

Oh!! you don't need to load it manual then.....
Sorry.. you were trying to use it by including it in settings - that is not the 'norm'

Remove it from the main package file

Don't declare it in functionGlobalContext

instead  juts install it form the module install UI in Node RED

I do need to use functionGlobalContext though. I'm trying to access the package through a function block.
const { SerialPort } = global.get('serialPortModule')

SerialPort.list().then(function (data) {
  console.log(data);
  node.send({payload: data});
});

Instead of const { SerialPort } = require('serialPort') I need to use const { SerialPort } = global.get('serialPortModule') since you can't use require() in a node-red function block.

I tried adding all additional packages from serialport but I get the same errors.
	"dependencies": {
		"@yao-pkg/pkg": "^5.12.0",
		"esbuild": "^0.23.0",
		"node-red": "^4.0.2",
		"winston": "^3.13.1",
		"winston-daily-rotate-file": "^5.0.0",
		"node-red-node-serialport": "^2.0.2",
		"@serialport/bindings-cpp": "^12.0.1",
		"@serialport/binding-mock": "^10.2.2",
		"@serialport/bindings-interface": "^1.2.2",
		"@serialport/stream": "^12.0.0",
		"@serialport/list": "^12.0.0"
	},

OK - seems at the moment, native modules (that serialport is) is only possible with standard install routines.
The reason is, the Users Home Dir is embedded, and this will include the native modules.
See : https://github.com/marcus-j-davies/Node-RED-SFE/blob/3974e2da5b6d7c507e6adad9c487e9ef761f1dad/build.js#L161
if installing native modules outside the Home Dir - it wont be able to find native modules (.node files) that serial port needs
Error: No native build was found for platform=win32 arch=x64 runtime=node abi=115 uv=1 libc=glibc node=20.11.1
    loaded from: C:\snapshot\Node-RED-SFE

Where would I put the folder containing my custom module .js and package.json files? How would I make sure it's loaded along with packages downloaded from the internet?

If you create a custom Node that is designed to provide the list of serial ports.

Develop the Node RED Module as normal
https://nodered.org/docs/creating-nodes/first-node#creating-a-simple-node
Package it up (npm package)
Upload it via the UI (during design) - this will also install dependancies  (i.e serialport)

As this will install into the NRUserDir - it should work.

Closing as currently no capacity to spend time in getting Native modules working outside the user directory


show when a client connects/disconnects

add a header above the banner to show when a client connects/disconnects

in order to achieve this i need to add some sort of Register/Unregister functionality to the protocol buffer so that's what i'll be doing now
protocol buffers are located here


USB-I2C bridge

I'm fairly sure this page used to say the code would work on a PC (Win 10 Pro) using a USB-I2C bridge, that would be my use case.
I have a FTDI module - UMFT201 - but it only supports a virtual COM port interface, could someone please clarify what bridge module you tested this code with?

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

ID: 7ff08644-8fb0-e13d-3aad-f68aedfec39e
Version Independent ID: f0bd6988-bd90-e7a8-2d58-bde20a93dc01
Content: Read environmental conditions from a sensor
Content Source: docs/iot/tutorials/temp-sensor.md
Product: dotnet
GitHub Login: @CamSoper
Microsoft Alias: casoper

Okay so this issue is literally years old, and I don't know how I missed it for this long. @bjthomson, if you're still out there, please accept my apologies.
The answer to your question lies here but I'll also work up a new doc to cover it.

Thanks, I'm actually retired now, but I like to keep my hand in and tinker.


Feature request: tap tooltip to dismiss

Super tooltip has been great so far - thank you! One thing we've noticed is that users sometimes expect to be able to dismiss the tooltip by tapping the tooltip itself, not the barrier.
Could this be added as an option? Happy to help implement as well.

Great,
Contribution is welcome. i preview ur PR and merge
@ingridwang

Hey @bensonarafat, could you create a new release with these changes? Thank you!

@ingridwang
Thanks for the reminder, i'll do that shortly


WIP: Process one bag at a time

I've (inelegantly) modified the BagDiscoverer routine so that it processes one bag at a time, and modified the associated test so that it passes. However, the associated view is now failing. I think what's happening is that the view (which is from asterism) is expecting a list, which it's not getting. Should I return something different in the routine, or should I use a different view?

@helrond the tests are still failing, but after adding a bunch of print statements (which are not pushed up---I can if that would be useful) I think the issue is with the tests. It's failing at testing that the right number of bags are processed. This:
            discover = BagDiscoverer().run()
            print(count)
            count += 1
        self.assertIsNot(False, discover)
        print(expected)
        print(len(discover))
        self.assertEqual(len(discover), expected, "Wrong number of bags processed.")```
Yields that 16 bags were processed, and 4 bags were discovered. I'm about to take a look at how to count the number of bags processed, but wanted to make sure I'm on the right track.


Navbar Enhancements + Initial Priority+ Nav Implementation

This PR tackles the component enhancements to the Navbar, Navlink and new Priority Nav components required for http://vjira2:8080/browse/BDS-204 CC @theSadowski
More specifically, this PR makes the following changes / additions to Bolt:
Simplify + polish up the Navbar component

Removes the deeply nested Band component in lieu of a simpler component layout / internal structure

Related to the previous bullet, this PR also updates the Navbar's internal CSS layout to allow for child components to position themselves via CSS Grid if supported (technically if display: contents is supported since we're dealing with nested layers of component UI here): https://github.com/bolt-design-system/bolt/blob/0487a7111953ff21763cab3b811be0c5e6a7e8b2/packages/components/bolt-navbar/src/navbar.scss#L33

This crucially allows for nested content (the Priority Nav component in this case, primarily) to hook into this Grid layout when determining how to position the toggle button / dropdown menu on the smallest of screen sizes (while defaulting to a simple, absolutely positioned dropdown if not supported):
Enhanced Layout:

"Default" Layout:

Add a new center option to the Navbar component
https://feature-navbar-improvements-sans-theming.bolt-design-system.com/pattern-lab/?p=components-navbar--centered

Update Navlink CSS

Polishes up the Navlink's CSS to better work with the new Priority Nav component's styling

Add new (1st Pass) Priority Nav component
https://feature-navbar-improvements-sans-theming.bolt-design-system.com/pattern-lab/?p=components-priority-nav

Demo Links for Reference:

Demo with sticky functionality: https://feature-navbar-improvements-sans-theming.bolt-design-system.com/pattern-lab/?p=components-sticky-with-content-example
Priority Nav component (by itself): https://feature-navbar-improvements-sans-theming.bolt-design-system.com/pattern-lab/?p=components-priority-nav
Centered Navbar with Priority Plus nav: https://feature-navbar-improvements-sans-theming.bolt-design-system.com/pattern-lab/?p=components-navbar--centered
Navbar + Navbar variations: https://feature-navbar-improvements-sans-theming.bolt-design-system.com/pattern-lab/?p=viewall-components-navbar

Side notes:

I'm still working on getting the Nav component's "active" link behavior baked into this as well (so the Nav component itself is merged in with this new Priority Nav component -- still in progress!)

Additional deep work on the Theming system has been stripped out of this initial PR -- lmk if you have any questions on this!

Looking good!  Regarding the refactor of nav to nav-indicator, what are your thoughts on also refactoring priority-nav as nav-priority?  See discussion at https://digitalteam-pegait.slack.com/archives/G97JG5V62/p1527000784000726?thread_ts=1526939909.000461&cid=G97JG5V62

Looking good! Regarding the refactor of nav to nav-indicator, what are your thoughts on also refactoring priority-nav as nav-priority? See discussion at https://digitalteam-pegait.slack.com/archives/G97JG5V62/p1527000784000726?thread_ts=1526939909.000461&cid=G97JG5V62

@remydenton I think that's a smart move (and keeps the collection of nav-related pieces all in one place) -- lemme get that change in and we should be pretty darn close on this!


Wi-Fi issues (multiple SSID?)

I have latest firmware on my cams and strange situation.
In garage and base floor when they were placed - cameras are not connecting to WiFi anymore.
They are working as I can hear IR switching on/off depending on light.
When I took them away for debugging - they are connecting with no issues.
Both of cameras are near 2 new APs which are WiFi6/AX (but with WPA2, no WPA3 enabled).
They are connecting to 3rd new AP which is also WiFi6/AX (same WPA2 pass).
All AP have same SSID and 802.11r turned on.
Has anyone else got same issues? How to avoid it?
I did not change SSID or password when migrating from WiFi 5, all other IoTs connect with no issues (no single device have issues except cameras lost).

100%, most of my esphome devices run on that network (and only mostly phones and laptop on 5GHz)

Never seen anything like this.

Do you have any ideas how could I debug this or at least get some more info on what's happening?
Except for the AP logs which I will try to gather later

Do you have any ideas how could I debug this or at least get some more info on what's happening?
Except for the AP logs which I will try to gather later
So far on AP I see only this in log on openwrt AP:
Wed Oct 19 10:37:17 2022 daemon.info hostapd: phy1-ap0: STA 38:00:25:xx:xx:xx IEEE 802.11: authenticated
Wed Oct 19 10:37:17 2022 daemon.info hostapd: phy1-ap0: STA 38:00:25:xx:xx:xx IEEE 802.11: associated (aid 4)
Wed Oct 19 10:37:17 2022 daemon.notice hostapd: phy1-ap0: STA-OPMODE-SMPS-MODE-CHANGED 38:00:25:xx:xx:xx off
Wed Oct 19 10:37:26 2022 daemon.info hostapd: phy1-ap0: STA 38:00:25:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request

You should try to increase debug log using "-dd" option.
In wifi.sh and wificonnect.sh.

Is there any place that BSSID of AP is saved within?
I can see from logs that camera tries to connect to the AP that far-far-away instead of the one that is 1 meter away...

Is there any place that BSSID of AP is saved within?

Yi saves these configs in a raw flash partition.
CURRENT_SSID=$(dd bs=1 skip=28 count=64 if=/dev/mtdblock6 2>/dev/null)
CURRENT_KEY=$(dd bs=1 skip=92 count=64 if=/dev/mtdblock6 2>/dev/null)

Those are SSID and KEY, proper ones. Can't still figure out why it's trying to connect to 'old' BSSID (MAC of AP) instead of the one Yi has next to it

AFAIK the cam doesn't save the mac address of the AP.
Only SSID and key.
Maybe a wrong channel...
Are you using a channel not licensed for your country?

As I had to repair SD card (not able to upgrade), I've taken some steps after the upgrade to investigate more.
Camera was in same room as AP although having only 37% WiFi signal strength. I went to the panel and I can see two networks detected with same SSID.
I've selected the first from the top, saved the password and rebooted camera - it has reconnected to the 'closer' AP.
What I would recommend then is to add BSSID/MAC address of AP near to the SSID name or at least it's signal strength.
It would allow to fix that and choose proper network if few with same SSID are detected.

Unfortunately this process is not under my control: Yi manages the wifi connection.
And the firmware saves only SSID and password.


swipe right to reply

Use gesture library to make swipe right to reply happen.

I need to perf test to see if we're thrashing any

a quick glance the perf seems fine. i think the upstream components do a good job of stopping the renders. i think ux wise it might make sense to color the background the action. a lot of apps do this so you can tell there's actions and to differentiate it


Add missing requirements and other intro info for 3270 metadata artifact design

Hi @haroldcampos,
Please take a look and approve if all looks good. This info was in the original connector how-to doc. Thanks!

@haroldcampos: Just a nudge to review and approve this PR, if all looks good, thanks!

[like]  Esther Fan reacted to your message:

From: Harold Campos @.>
Sent: Wednesday, November 8, 2023 8:04:07 PM
To: MicrosoftDocs/biztalk-docs @.>
Cc: Esther Fan @.>; Author @.>
Subject: Re: [MicrosoftDocs/biztalk-docs] Add missing requirements and other intro info for 3270 metadata artifact design (PR #940)
@haroldcampos approved this pull request.
Thank you!
—
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/biztalk-docs/pull/940#pullrequestreview-1721177794, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADEYJDZFTZ4EX5IZNLN4YZTYDPQTNAVCNFSM6AAAAAA7AD6VFSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMRRGE3TONZZGQ.
You are receiving this because you authored the thread.Message ID: @.***>


how to make videosprite event

Describe your problem here.
i have removed the 1st pic's string of value1
1st pic is old tho
but keeps not working

Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No response

idk

This is not an issue you should be posting on Psych Github, contact the script author or whatever.


Wallet: Change style of delete account button

Summary
Change style of delete account button

Before:

After:

Mobile screenshots please?

I think that if there is a lot of existing devices we should make the content scrollable. The screen shouldn't be higher than desktop.

I think that if there is a lot of existing devices we should make the content scrollable. The screen shouldn't be higher than desktop.

Agree, max-width with overflow: scrollable or something

@JustynaBroniszewska @rzadp I implemented your propositions

The newest version:


Add load_relation to the adapter docs

Description & motivation
In https://github.com/dbt-labs/dbt-utils/issues/444#issuecomment-972879922, @jtcohen6 mentioned an undocumented convenience wrapper to load a Relation given a Relation as input. (Why would you want to do this? Mostly to check whether it exists or has been dropped).
This PR documents it!
Pre-release docs
Is this change related to an unreleased version of dbt?

[ ] Yes: please

update the base branch to next
add Changelog components: <Changelog>[New/Changed] in v0.x.0</Changelog>
add links to the "New and changed documentation" section of the latest Migration Guide

[x] No: please ensure the base branch is current
[ ] Unsure: we'll let you know!

I found the same undocumented convenience wrapper in some code earlier today. A user was looking for the recommended method to test if a relation exists (or not) within the database.
I was hesitant to recommend load_relation as the solution because I couldn't find it in the documentation.


feat: Refine Noir.js API

Description
Main additions to the API are generateWitness and serialization methods so that the backend will receive a Uint8Array
Problem*

Resolves
Summary*

Documentation

[ ] This PR requires documentation updates when merged.

[ ] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

[ ] I have tested the changes locally.
[ ] I have formatted the changes with Prettier and/or cargo fmt on default settings.

Should this be documented as a part of / after https://github.com/noir-lang/docs/issues/371?


Feature/dac validation

Description

Types of Changes

[ ] Tech Debt (Code improvements)
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Dependency upgrade (A change in substrate or any 3rd party crate version)

Migrations and Hooks

[x] This change requires a runtime migration.
[x] Modifies on_initialize
[ ] Modifies on_finalize

Checklist

[ ] Change has been tested locally.
[ ] Change adds / updates tests.
[ ] Changelog doc updated.

https://github.com/Cerebellum-Network/blockchain-node/pull/342


[AutoComplete] Component force sets html attribute autocomplete='off'

Problem description
This should be allowed to be optionally set by a property just like a TextField
Steps to reproduce
return _react2.default.createElement(
        'div',
        { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
        _react2.default.createElement(_TextField2.default, _extends({}, other, {
          ref: 'searchTextField',
          **autoComplete: 'on',**
          value: searchText,
          onChange: this.handleChange,
          onBlur: this.handleBlur,
          onFocus: this.handleFocus,
          onKeyDown: this.handleKeyDown,
          floatingLabelText: floatingLabelText,
          hintText: hintText,
          fullWidth: fullWidth,
          multiLine: false,
          errorStyle: errorStyle
        })),

Versions

Material-UI: 0.15.1
React: 15.1.0
Browser: Chrome 52.0.2743.60 beta-m (64-bit)

I use autocomplete as part of a form. This would be a useful feature. Easy fix. I can provide a PR.

I agree, I think that we should all users to override the autoComplete property.
Actually, I think that it's a more general issue where we spread the `{...other} properties at the beginning and not at the end of the component. Hence, losing precedence.

Closed by #4783


WIP: Add a new changelog

TODO: We need to pull in the tags from @fabn's repo in order to generate a better changelog.

Hi @swanandp thanks for making me a collaborator.
I pushed the tags and created some new issue labels to use to categorize issues according to generator rules
Also I tagged some issues to remove them from changelog at least for unreleased changes.
Now I think can be regenerated and added to master branch.
Let me know.

Go for it!

Done in master.


stake-pool: Add new fee fields for liquid staking and arbitrage prevention

In order to launch their stake pool, @lieuzhenghong and co. would like to be able to assess a fee for liquid deposits (for a fair price), and on withdrawals (to prevent arbitrage).
They will do the work to integrate the fees, but this at least adds the new fields to avoid backwards compatibility issues whenever their work is ready.
Let me know how it looks!

Hey @joncinque , thanks!
For increased safety, I would think there ought to be a maximum withdrawal fee, since if the fee is set at 100%, or anything significant, withdrawals are essentially unsafe, and we can't rely on users being attentive enough to notice when the fee massively spikes, potentially irreversibly.
Do you think a hard cap at 3% fee makes sense here? I think this is good enough to cap the maximum damage to a non-attentive staker.
On the other hand, I also think requiring withdrawal fee changes to take about 3 epochs (6-9 days) to activate would also give an extra buffer for people to become aware of potential bad-actor behaviour.
I'm quite uncertain whether you think a cap/delay hard-coded in the software, or a configurable cap/delay that is permanent upon initiation of the stakepool makes more sense?

Do you think a hard cap at 2 or 3% fee makes sense here? I think this is good enough to cap the maximum damage to a non-attentive staker. On testnet, it seems the per-epoch rewards is about 1.xx%.

We shouldn't enforce a maximum fee at the protocol level.  There are use cases for a 100% withdrawal fee stake pool, just like there are usecases for a 100% commission validator.  You can fake a lockup in your pool with a 100% withdrawal fee, which could certainly have uses.  For example, I can create a pool with a 100% withdrawal fee, promising higher returns than normal, and set the future withdrawal fee to 0% in 50 epochs.
We could, however, enforce a gradual change in the withdrawal fee whenever it's increased.  For example, you can only increase it by maximum 2% every epoch.

I think I'll go with a maximum multiplier per epoch. This means, if it starts small, it'll stay small for a few epochs. But once the fee is big, it can increase quite quickly to 100%.
I'll go with the multiplier 2x.
So if it is 0.5%, it can increase to maximum 1% in the next epoch, 2% in the following epoch, 4%, 8% etc.
It kills two birds with one stone in also protecting inattentive stakers.
Let me know if this sounds good to you @joncinque

@jon-chuang yep that's a great idea.  Do these structure changes look good to you then? Let me know and I'll merge / release this

@joncinque, I made a modification so that the next_withdrawal_fee is Option instead, since the maximum multiplier already serves the purpose of giving delegators time to catch on to fee increases.
Do you think that's ok or do we still need an Epoch to accompany it?

We'd also like to be able to add referral fees, which are a portion of the deposit/liquid staking fees which go to the referrer, similar to the referral fees offered by Serum for trades.
The invariant is referral_fee <= deposit_fee

@jon-chuang

I made a modification so that the next_withdrawal_fee is Option instead, since the maximum multiplier already serves the purpose of giving delegators time to catch on to fee increases.

Yep, that makes sense.

We'd also like to be able to add referral fees, which are a portion of the deposit/liquid staking fees which go to the referrer, similar to the referral fees offered by Serum for trades.  The invariant is referral_fee <= deposit_fee

Would it be deposit_fee = referral_fee + manager_fee or total_fee = deposit_fee + referral_fee.  Meaning, do you calculate them separately and add them up? Or do you take the referral fee as a proportion of the total deposit fee?  People always got confused about this.  It may be best to just express it as a u8 percentage of the total fee to keep things as simple as possible

Ok, that's fair, we'll make it a u8 then.

Hey @joncinque for the DepositSol instruction, do we want a deposit authority?
For our project, we probably don't need it. Since deposits of SOL will not carry any slashing risk.
Still, it could be good to have the feature around.
In that case I propose: the deposit authority for DepositStake doubles as that for DepositSol, and we add an additional bool, require_deposit_sol_authority.
This can be toggled via solana-stake-pool require-deposit-sol-authority [true/false]
What do you think?

@jon-chuang how about having a separate liquid_deposit_authority or sol_deposit_authority as an Option<Pubkey> ?

Closing since the work was done in #2107


Merge routes

Even SinmpleTracker is not protected from crashing. If that happens the used will start new record, but after that there is no way to merge the two routes.
Adding merge down option could be the most simple solution. In route list

Long workaround:
Since I don't have an Export functionality #8...

Upload route 1 to Strava
Upload route 2 to Strava
Export the routes on PC
Merge manually routes using some text editor
Delete route 1 & 2 from Strava
Upload the new merged route


Fix Bars to Represent Progress

Currently loading bars do not represent progress as they are calculated as BUFFER_SIZE / (NUM_EPISODES * STEPS_PER_EPISODE)
To solve, the interaction between buffer size and number of total steps will need to be better understood. From there, we can adjust how the loading bars are calculated.

This seems like it might be an issue with Stable Baselines 3. See here. Looks like this might be a more complicated fix, so I am moving this back to the next milestone.


Handle Task/GenServer exits correctly in Google formatter

We were running into a situation where errors caused by GenServers terminating were not being formatted because they were a slightly different shape to what was expected in the formatter. This updates the formatter to handle them.
I'm very open to implementing and/or testing this in a different way - any/all feedback appreciated!

coverage: 100.0%. remained the same
when pulling 25d719c3d0c836e755c6ba28f14846979c70f196 on mechanical-orchard:log-exits
into 5ad0deed1be98e04a00ae1357f1314ca990ffebf on Nebo15:master.

Thank you ❤. I will make sure it's ported to other formaters too

@AndrewDryga do you know if this has been ported to the datadog formatter yet?
I think  (but am not sure) this might be happening there too.


vulnerabilities in libraries

Everytime when I update ghost to the most current version, there is always some libs with vulnerabilities, with 3.15.0 for example:
found 3 vulnerabilities (1 moderate, 2 high)
  run `npm audit fix` to fix them, or `npm audit` for details

when I run npm audit fix I will get
fixed 0 of 3 vulnerabilities in 12150 scanned packages
  2 vulnerabilities required manual review and could not be updated
  1 package update for 1 vulnerability involved breaking changes

is this the case for every ghost installation out there? that the releases are shipped with known library vulnerabilities?

They are warnings, they do not mean that the vulnerabilities in those packages are relevant or exploitable with how those packages are used in Ghost. We are alerted for all package vulnerabilities and they are all triaged and given the appropriate level of prioritisation regarding update schedule.
If any vulnerabilities are exploitable in Ghost then we issue patch releases with the appropriate upgrades or remediations.
For future reference, always follow the guidelines set out by projects regarding security issues. In Ghost's case they are very clearly called out when opening an issue, they are available in our SECURITY.md file, and easily found on our website. Never publicly open security-related issues without going through the proper channels.

For future reference

sorry, but that isn't really a disclosed vulnerability finding, everyone who updates ghost via cmd get these errors...


Symfony Caching

Symfony caches the pages for too long. Instead of disabling the feature, research the autoreload configuration.

The autoreload configuration is suppose to check if source files were changed. If so, it would render the page anew; otherwise, it would serve the cached page. For some reason, changes made to template files seem to be excluded.


Feature request

Hi,
WONDERFUL integration!!! I love it!!! There are some other integration I also use because not all of them have all the information.
I have a list of (possible) features that maybe can be added in this integration. I think you have to ask the devs to add your integration as default then!!!
I use a Asus GT-AX11000
(grab from AsusWRT integration)

CPU Temperature
Load avg 1min
Load avg 5min
Load avg 15min

(grab from UPnP integration)

Packets received total
Packers send total
Packets received packets/sec
Packets send packets/sec
WAN status: connected/disconnected
External IP
Bits received total
Bits send total
KiB received KiB/sec
KiB Sebd KiB/sec

Would be so nice to have those settings also into your integration. Then I can remove the AsusWRT and UPnP one.
//KEEP UP THE GOOD WORK!

Hey @poudenes ,
First of all, thanks for your feedback! 👍🏻
There are more sensors planned for the integration soon (including external IP and WAN status binary sensor).
Out of your list:

bytes received/sent from UPnP is already in the integration as {if}_download / {if}_upload for any user selected interface {if} (e.g. WAN, LAN or others). The value of the sensors themself is in GB, but any of them has attribute bytes and can be accessed from e.g. templates using {{ (state_attr('sensor.{device}_{if}_download', 'bytes')) }}
the same for speeds received/sent. Sensors {if}_download_speed / {if}_upload_speed are in Mbits/s but have the raw attribute bits/s, from which you can calculate any of its derivatives, including KiB/s ({KiB/s} = {b/s} / 1024 / 8).

So I am not sure about adding more of the sensors without any new information. Adding these attributes was done exactly in order to provide any user with the possibility to calculate the needed value correctly.
Regarding the packet values usefulness, I am not convinced, sorry. But I am not in the field, so could be missing something. Could you please explain, how exactly this is useful information for monitoring?
In any case, this integration is still in development, so new features will be coming with time

True, and agree. It's not urgent. It was just a list of options.. :)
Hope you will add the rest haha!

Im using the following shell script to get the temp.
cat /proc/dmu/temperature = command to get cpu temp
wl -i eth1 phy_tempsense = radio 1 (2.4GHz) temp (divide by 2, then add 20)
wl -i eth2 phy_tempsense =  radio 2 (5.0GHz) temp (divide by 2, then add 20)
Would be great if this can be integrated into the next upcoming release

Currently using the shell script + SNMP method to capture the temp
CPU & RAM using this plug-in

Hello,
I'm not sure whether it's valid, is CPU monitoring still in development, but sensors for RAM / CPU usage are unavaliable for my router RT-AX56U (with Merlin firmware)

Hello, @fookyuanloh,
Thanks for your info :+1:
This is similar to what the aioasuswrt library is doing (the one behind the core asuswrt integration). Unfortunately, there is no possibility to run shell scripts when connecting to the device via API. I am checking if this data can be obtained any other way

@poudenes,
Version 0.3.0 implements wan_ip sensor and wan binary sensor for status

@poudenes,
Version 0.3.0 implements wan_ip sensor and wan binary sensor for status

You informed me and 10 min later I got a notification on my watch that there is a HACS update :)

Coming soon to AsusRouter (but highly depends on the device and firmware):

RT-AC66U (Merlin, v380.70)

RT-AX88U (stock, v386_48631)

Hey, @poudenes,
Do you use stock AsusWRT firmware or Merlin on your device?

I use the stock on my gt-ax11000

I use the stock on my gt-ax11000
Off topic is merlin better?

Just curious.
Merlin adds some new features. Not all of them are useful for everyone, so depends on your use cases. Also, as far as I know, AiMesh support is not as good as on stock.
With the next integration update, Merlin will get full support and some sensors, which are not yet available for the stock firmware.

Also, mostly it has more temperature sensors (which I mentioned a couple of comments back). E.g. my RT-AX88U in stock has only CPU temperature, but Merlin gives also the temp of the WiFi modules. Not the most useful info, of course.

Hi, @poudenes, @fookyuanloh,
With the freshly released 0.4.0, support for the temperature sensors is added. Maybe you can check it out?
Also, those with Merlin firmware will get access to the load_average sensors. Unfortunately, I haven't found a way to implement them on the stock firmware yet,

I will update and let's see :)
The load average is also in AsusWRT integration and worked for the stock. Maybe you can check that integration how they did it.

Temperature is working!

I will update and let's see :)
The load average is also in AsusWRT integration and worked for the stock. Maybe you can check that integration how they did it.

AsusWRT uses SSH or Telnet connection and can directly run any shell scripts. That could be a pro or a con, depending on the device. E.g. for some devices, it doesn't provide adequate traffic data. Or some sensors might be blank. The same is for the Merlin support and so on.
On the other hand, this integration is limited to what is provided by the HTTP API. This gives compatibility with almost any Asus device (because anything device-specific is already handled by the firmware). Also, quite all the bugs in the tracker were because of my mistakes in the code or no possibility to test some features, not because of the devices 🙂

To keep the integration most compatible then stay at the api. It's not a big thing to have the load Average :) when there is no network then maybe the router is down haha :)

Hey,
Since quite all of the requested features are already implemented (with some only for Merlin features and not being possible for the stock firmware), I would close this issue. It would be easier for me to monitor issues and feature requests, where I can implement something.
But in any case, all of the FW-specific features of the integration will be considered for future development even without issues in the tracker.
If you find any new useful feature to implement or bug in the integration, feel free to open a new feature request or issue

Good idea! Thanks for the great Addon!!! I consider to try merlin. But scare I screw up my perfect running network haha ;)

Good idea! Thanks for the great Addon!!! I consider to try merlin. But scare I screw up my perfect running network haha ;)

I would say, make a config backup and you should be safe enough. Lately, I am flashing my devices back and forth at least twice per week when testing the new release. WIthout any reset or readjustments

This morning moved to Merlin. Everything in the house is working. Even old ESP devices... :)
Now I have Load AVG also :)


Promises with AsyncWorker do not resolve properly

This is a followup of #539 since the discussion there went far away. I tried to isolate the problem where a promise resolver would not work correctly sometimes, and @julien-f reported in this issue the promise is not working properly when a timeout is set.
I created a minimal example with tests in this gist. Clone it, install it then test it and you'll see when promises are implemented with Nan the timeout expires.
From what I could understand from #539 it happens because setTimeout holds the tick until the timeout expires so the promise resolve or reject function only runs after the timeout expires and the next tick is kicked. From that gist, how should one proceed to fix this issue?

I don't know if it's V8 acting up or if it conformant to the specs, if it is Node + libuv acting up, or something else, but the exposed promise API is marked as experimental, so I would guess something is fishy in V8. It might be fixed in later versions for all I know. The only workaround I know of for now is to kick the event loop into the next tick somehow. One way is to somehow call node::MakeCallback after resolving the Promise, which will kick off the next tick.

I have wandered deep into the Lands of Tick Kicking and discovered there's a way to run pending tasks in the current context without forcing a global tick kicking. In fact, I just grabbed a line from inside the Environment::KickNextTick function and run it after resolving/rejecting the promise:
         promise->Resolve(Nan::GetCurrentContext(), Nan::New(value));
+        v8::Isolate::GetCurrent()->RunMicrotasks();

         promise->Reject(Nan::GetCurrentContext(), Nan::New(ErrorMessage()).ToLocalChecked());
+        v8::Isolate::GetCurrent()->RunMicrotasks();

Not sure if I'm lucky or this is correct, but it passes the test as you can check cloning the gist on the OP.

Ah, that seems like a very good option indeed. Much cleaner.
On March 3, 2016 5:50:26 AM GMT+02:00, Ranieri Althoff<EMAIL_ADDRESS>wrote:

I have wandered deep into the Lands of Tick Kicking and discovered
there's a way to run pending tasks in the current context without
forcing a global tick kicking. In fact, I just grabbed a line from
inside the Environment::KickNextTick function and run it after
resolving/rejecting the promise:
        promise->Resolve(Nan::GetCurrentContext(), Nan::New(value));
+        v8::Isolate::GetCurrent()->RunMicrotasks();

promise->Reject(Nan::GetCurrentContext(),
Nan::New(ErrorMessage()).ToLocalChecked());
+        v8::Isolate::GetCurrent()->RunMicrotasks();

Not sure if I'm lucky or this is correct, but it passes the test as you
can check cloning the gist on the OP.

Reply to this email directly or view it on GitHub:
https://github.com/nodejs/nan/issues/541#issuecomment-191567765

Ah, this does not work with ES7 async/await transpiled by babel somehow.

https://github.com/nodejs/node/issues/5691

Anyone got a fix to this issue? its still happening to me. However I believe this is v8's responsibility to solve this not NAN,

You have to trigger microtasks manually. I guess Nan could implement a helper for that

while this is still a problem for me too, it does not appear to be a problem within the context of the Atom editor.. I was prototyping some parts on the command line and was encountering this exact issue. When I finally moved my changes over into my Atom package I was working on, I did not need the hack to manually run the micro-tasks. I wonder is Atom is doing different.. Or if they are already working around the issue... because it does indeed seem and sound like a V8 issue..

Anyone got a fix to this issue?

If possible, handle Promises on pure JS. That's what I did, but I still hope for a better solution on the metal.

@enobufs AFAIK nothing has advanced in that matter. I am using Promises on JS and passing the callbacks as arguments into C++ code instead, though I'd prefer a thinner JS layer.

@ranisalt That's a bummer...  The native promise seems to be working fine, so I guess something is missing here. Yeah, promisification at JS land seems to be the way to go at least for now.

I've tried to fix deprecation warnings on Nan::MakeCallback replacing with proper AsyncResource calling:
diff --git a/src/argon2.cpp b/src/argon2.cpp
index b950e01..615cd3f 100644
--- a/src/argon2.cpp
+++ b/src/argon2.cpp
@@ -61,7 +61,7 @@ argon2_context make_context(char* buf, const std::string& plain,
 class HashWorker final: public Nan::AsyncWorker {
 public:
     HashWorker(std::string plain, Options options) :
-        Nan::AsyncWorker{nullptr},
+        Nan::AsyncWorker{nullptr, "argon2:HashWorker"},
         plain{std::move(plain)},
         options{std::move(options)}
     {}
@@ -96,11 +96,15 @@ public:
     {
         Nan::HandleScope scope;

-        v8::Local<v8::Value> argv[] = {
+        auto argv = new v8::Local<v8::Value>[1] {
             Nan::CopyBuffer(output.data(), output.size()).ToLocalChecked()
         };
-        Nan::MakeCallback(GetFromPersistent(CONTEXT).As<v8::Object>(),
-            GetFromPersistent(RESOLVE).As<v8::Function>(), 1, argv);
+        Nan::Callback(GetFromPersistent(RESOLVE).As<v8::Function>()).Call(
+                /*target =*/ GetFromPersistent(CONTEXT).As<v8::Object>(),
+                /*argc =*/ 1, /*argv =*/ argv,
+                /*async_resource =*/ async_resource);
     }

     void HandleErrorCallback() override
@@ -108,9 +112,15 @@ public:
         Nan::HandleScope scope;

-        v8::Local<v8::Value> argv[] = {Nan::New(ErrorMessage()).ToLocalChecked()};
-        Nan::MakeCallback(GetFromPersistent(CONTEXT).As<v8::Object>(),
-                GetFromPersistent(REJECT).As<v8::Function>(), 1, argv);
+        auto argv = new v8::Local<v8::Value>[1] {
+            v8::Exception::Error(Nan::New(ErrorMessage()).ToLocalChecked())
+        };
+        Nan::Callback(GetFromPersistent(REJECT).As<v8::Function>()).Call(
+                /*target =*/ GetFromPersistent(CONTEXT).As<v8::Object>(),
+                /*argc =*/ 1, /*argv =*/ argv,
+                /*async_resource =*/ async_resource);
     }

--

It works as expected, but it's around 20% slower. Am I doing it right?

Why do you allocate argv on the heap? It is slow. It will also leak, unless you handle that somewhere else.

Why do you allocate argv on the heap? It is slow. It will also leak, unless you handle that somewhere else.

Because allocating on the stack causes destruction to happen before the callback is fired. IOW, I get segfaults. What do you suggest?

This little detail about RunMicrotasks() should be better documented. This is something anyone passing callbacks from native code into Node.js will encounter eventually.
When Googling, people find that they should use uv_async_send() to have their code run on the main thread, only to later find that it messes up Promises.

Node.js calls RunMicrotasks() automatically, there should be no need to call it manually.
More specifically: any time JS land is entered or exited, pending microtasks (promises) and process.nextTick() callbacks run.
The one exception is when you use v8::Function::Call() but don't do that, it's a bad idea for reasons beyond promises.
@kkoopa Anything left to do or can this be closed out?

@bnoordhuis So what is the right way to call a JS function from C++? Because pretty much everywhere I see only v8::Function::Call() being suggested.

@LubosD Use Nan::MakeCallback().

@kkoopa Anything left to do or can this be closed out?

Nothing I can think of. Note that v8::Function::Call should never be used directly, it should be either Nan::Callor Nan::MakeCallback depending on context.

I think that last conversation is not on the same scope as the issue. I asked specifically about promise resolving/rejecting, which seems not to work as a function internally but rather a Resolver object with some methods.
Maybe there could be a wrapper around a promise resolver that flushes microtask queue or whatever? The gist code still does not work.

Maybe there could be a wrapper around a promise resolver that flushes microtask queue or whatever?

Not until nan drops support for Node.js < v4.x.

Will it happen someday? Those versions have already EOLd long ago, and nan is one of the libraries that can help pushing forward.


mba: Add a separate table for measured boot policies.

In the next PR, similar to named runtime policies, this table will be used to provide support for named measured boot policies and thier management.

@THS-on @aplanas ,  can I request you to please take a look into this PR  and provide any comment? Thanks!

Besides the small comments, looks fine.
How is deletion of the entry implemented once the agent is removed. If the table was added implicitly, it should also be removed automatically.

Th entry is being deleted through the function cloud_verifier_tornado.py:verifier_db_delete_agent() which is called when the agent is deleted.

Sorry for taking so long to review. LGTM!
Please, consider also contributing a end-to-end test to the https://github.com/RedHat-SP-Security/keylime-tests

Thank you!


Add a note about installing git before using create-ol-app

The create-ol-app program depends on git.  This branch adds a link from our docs to the Git installation docs.
See #12860.

use default terminal instead zsh is ok (if you have git on ur computer)


no server side?

can this be used on fabric servers? if yes please notify
if not please mind implementing the feature, as it would actually be better and make the mod more good that before ig

(sorry for the very late reply, i didn't get any notification)
I don't know, I haven't tested it yet.
If it doesn't already work, I would definitely implement it if I knew how to. But I'll see then.

This mod can now be run in multiplayer as of This Commit.
Update 1.2.0 will feature this.


Can this be done when the sub id's are in different AAD tenants?

I am trying to copy a VM from subscription A that resides in tenant A to a subscription B in tenant B. everything works like a dream till the last az disk create command. it brings back this error below (Note have added **** for data protection)
The client has permission to perform action 'Microsoft.Compute/disks/beginGetAccess/action' on scope '/subscriptions/1dafcb4b-/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/OsDisk_1', however the current tenant '72f988bf-*' is not authorized to access linked subscription '2a586eca-3dad-**************************'.
What do I need to make this go away? is it an AAD setting somewhere

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

ID: 8da377c0-04b6-c986-1476-3f878567ab34
Version Independent ID: e6d9767d-4910-564a-7125-58716fb1851c
Content: Azure CLI Script Sample - Copy (move) managed disks to same or different subscription
Content Source: articles/virtual-machines/scripts/virtual-machines-linux-cli-sample-copy-managed-disks-to-same-or-different-subscription.md
Service: virtual-machines-linux
GitHub Login: @ramankumarlive
Microsoft Alias: ramankum

Thanks for the feedback! We are investigating and will update you shortly.

Closing as discussed offline. Will continue offline :)

What was the solution? I just ran into this as well trying to do a similar thing: Copy a VM from subscription 1 in tenant 1 to subscription 2 in tenant 2. We were attempting to create an image in Subscription 2/Tenant 2 from snapshots created in Subscription 1/Tenant 1. I have sufficient access to required resources in both tenants but got the same error.

I sent the solution to Micah and she was going to upload the scripts to Github as a solution
From: andsmit9<EMAIL_ADDRESS>Sent: 06 November 2018 17:44
To: MicrosoftDocs/azure-docs<EMAIL_ADDRESS>Cc: Andy Wylie<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [MicrosoftDocs/azure-docs] Can this be done when the sub id's are in different AAD tenants? (#14662)
What was the solution? I just ran into this as well trying to do a similar thing: Copy a VM from subscription 1 in tenant 1 to subscription 2 in tenant 2. We were attempting to create an image in Subscription 2/Tenant 2 from snapshots created in Subscription 1/Tenant 1. I have sufficient access to required resources in both tenants but got the same error.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fissues%2F14662%23issuecomment-436322129&data=02|01|anwylie%40microsoft.com|8757ffbf81c947b172a708d64407103c|72f988bf86f141af91ab2d7cd011db47|1|0|636771194465178350&sdata=X3cMO6nEtdjDNruXdnEI%2FFUakkdiLRJVZts1Bt3Nt4o%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAkVwtVuNN7khxMOfohEVPSWHjB-Ck5NJks5usbxUgaJpZM4WfIiM&data=02|01|anwylie%40microsoft.com|8757ffbf81c947b172a708d64407103c|72f988bf86f141af91ab2d7cd011db47|1|0|636771194465178350&sdata=04X%2Faubl2JnBxcTzH35q8CbdFF7sJHKZ%2BUqwY9mdUyc%3D&reserved=0.

Thanks for your quick response! Hopefully Micah can give an update when she sees this.
In the meantime, if it isn't too much to ask, could you attach the redacted solution here as well?

The error is due to the fact that the person transferring using the provided script needs to be the AAD Tenant Admin for BOTH subscriptions. Otherwise it will fail.
 So moving stuff from you personal subscription to the MSFT subscription will fail.
A work around was essentially this: https://cloudpuzzles.net/2017/05/moving-azure-managed-disks-around/
Some simplified scripts thank to @CoyoteCloud46 :)
#The below script enables you to copy a Managed Disk associated with an Azure VM to a storage account in the same Resource Group and convert
#it to a .vhd which can subsequently be coped to another storage account and converted back to a managed disk and re-attached.##
###Note ALL the below scripts should be run in the SOURCE Tenant and SUBSCRIPTION##

#connect to the Azure subscription where the VM is deployed and choose the Resource  Group#
Login-AzureRmAccount
Get-AzureRmSubscription -TenantId “your tenant ID here” | Select-AzureRmSubscription
$rgName = "Your resource Group Name"
$location = "Your location"
$storageAccountName ="Your storage account"

#If you don't already have a storage account set up use this command
New-AzureRmStorageAccount -Name $storageAccountName -Location $location -SkuName Premium_LRS -ResourceGroupName $rgName

#To get the Keys from the storage account run this. Easier than copy a massive URL from the portal!
$saKey = Get-AzureRmStorageAccountKey -ResourceGroupName $rgName -Name $storageAccountName

#You'll need the storage contect wrapper for the credentials obtain in previous step
$storageContext = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $saKey[0].Value

#if you dont have a container to copy the managed disk to create one
New-AzureStorageContainer -Context $storageContext -Name "container name here"

#Next creaste a SAS URL for the managed disk. Again this is much faster than the protal.
$diskName = "Your OS Diskname"
$sas = Grant-AzureRmDiskAccess -ResourceGroupName $rgName -DiskName $diskName -DurationInSecond 3600 -Access Read

#Now you have 1 hour (3600 seconds) to copy the Disk to storage before the unique URL expires!
Start-AzureStorageBlobCopy -AbsoluteUri $sas.AccessSAS -DestContainer "your container name" -DestContext $storageContext -DestBlob $diskName

#The above command will say its finished but it wont be, run this and see the progress.
Get-AzureStorageBlobCopyState -Context $storageContext -Blob $diskName -Container "your container name"

#This is a script to allow you to convert an additional data disk back to a managed disk and attach to an existing VM.
###Note ALL the below scripts should be run in the DESTINATION Tenant and SUBSCRIPTION##

Login-AzureRmAccount
Get-AzureRmSubscription -TenantId “your tenant ID here” | Select-AzureRmSubscription

$subId = "your Sub ID here"
$rgName = "your Resource Group"
$diskName = "Your Disk name"
$storageType = "PremiumLRS" #can be "StandardLRS" plus others
$location = "your location"
$sourceUri = "https://<your storageaccount>.blob.core.windows.net/<your container>/<your vhd disk name>"
$StorageAccountId = "/subscriptions/<your sub id>/resourceGroups/<your resource group>/providers/Microsoft.Storage/storageAccounts/<your storage account>"

Select-AzureRmSubscription -SubscriptionId $SubId
$diskConfig = New-AzureRmDiskConfig -AccountType $storageType -Location $location -CreateOption Import -StorageAccountId $storageAccountId -SourceUri $sourceUri

New-AzureRmDisk -Disk $diskConfig -ResourceGroupName $rgName -DiskName $diskName

#this attaches the managed disk created above to the existing VM
$rgName = "your Resource Group"
$diskName = "Your Disk name"
$vmName = "Existing VM name"
$location = "your location"

$disk = Get-AzureRmDisk -ResourceGroupName $rgName -DiskName $diskName

$vm = Get-AzureRmVM -Name $vmName -ResourceGroupName $rgName

$vm = Add-AzureRmVMDataDisk -CreateOption Attach -Lun 0 -VM $vm -ManagedDiskId $disk.Id

Update-AzureRmVM -VM $vm -ResourceGroupName $rgName

###Note ALL the below scripts should be run in the DESTINATION Tenant and SUBSCRIPTION##

# Step 0 - login
Add-AzureRmAccount
Login-AzureRmAccount
Get-AzureRmSubscription -TenantId “your tenant ID here” | Select-AzureRmSubscription

# Step 1 - Create a resource group (if needed)
$locName ="Your location"
$rgName ="Your resource Group Name"
New-AzureRmResourceGroup -Name $rgName -Location $locName

#Step 2 - Create a storage account (if needed)
$storName ="Your storage account"
#If you don't already have a storage account set up use this command
New-AzureRmStorageAccount -Name $storname -Location $locname -SkuName Premium_LRS -ResourceGroupName $rgName

#As the copied OS Disk is in VHD format you need to convert back to managed disk create new OS disk from VHD in storage acct
$sourceUri = 'https://<your storageaccount>.blob.core.windows.net/<your container>/<your vhd disk name>'
$osDiskName = 'your OS Disk name'
$osDisk = New-AzureRmDisk -DiskName $osDiskName -Disk (New-AzureRmDiskConfig -AccountType StandardLRS -Location $locName -CreateOption Import -SourceUri $sourceUri) -ResourceGroupName $rgname

# Step 3 - Configure Networking, This is how to build the new VM and subsequently attach the copied Managed disk to the VM config
$subnetName = "your-Subnet"
$ipName = "your-pip"
$vnetName = "your-vnet"
$nicName = "your-Nic"

$singleSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix <IP_ADDRESS>/24
$pip = New-AzureRmPublicIpAddress -Name $ipName -ResourceGroupName $rgName -Location $locName -AllocationMethod Dynamic
$vnet = New-AzureRmVirtualNetwork -Name $vnetName -ResourceGroupName $rgName -Location $locName -AddressPrefix <IP_ADDRESS>/16 -Subnet $singleSubnet
$nic = New-AzureRmNetworkInterface -Name $nicName -ResourceGroupName $rgName -Location $locName -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $pip.Id

#Step 3.5 create NSG firewall rules
$nsgName = "Your-Nsg"

$rdpRule = New-AzureRmNetworkSecurityRuleConfig -Name "yourRdpRule" -Description "Allow RDP" -Access Allow -Protocol Tcp -Direction Inbound -Priority 110 -SourceAddressPrefix Internet -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389
$nsg = New-AzureRmNetworkSecurityGroup -ResourceGroupName $rgName -Location $locName -Name $nsgName -SecurityRules $rdpRule

#Step 4 - Configure the new VM itself
$vmName ="Your VM name"
$vmConfig = New-AzureRmVMConfig -VMName $vmName -VMSize "Standard_DS2_v2" #Note any size can be used
$vm = Add-AzureRmVMNetworkInterface -VM $vmConfig -Id $nic.Id
$vm = Set-AzureRmVMOSDisk -VM $vm -ManagedDiskId $osDisk.Id -StorageAccountType PremiumLRS -DiskSizeInGB 128 -CreateOption Attach -Windows

# Deploy the new VM (this may take a while so wait for success message to be returned.
New-AzureRmVM -ResourceGroupName $rgName -Location $locName -VM $vm

#Check VM is there and ok
$vmList = Get-AzureRmVM -ResourceGroupName $rgName
$vmList.Name

I will work to add information to the doc to make this clear.

Thanks Micah for the update.
Just as an off-the-cuff thought from one of my colleagues: Would a multi-tenant service principal bypass that AAD tenant admin requirement? - https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant

@andsmit9 I don't believe this will bypass the tenant admin requirement. You could attempt to be added as a second global admin of the tenant. That MIGHT work :) Hard for me to test as I won't ever be giving tenant admin privileges for my internal subscription. But testing this out on free trial subscriptions seems to work...

Thanks.

@ramankumarlive @cynthn @zr-msft any thoughts on how we should move forward with this one?
For one, this specific doc should state that this only works across tenants IF the user performing the action is the Global AAD Tenant Admin of both subscription.
Second, thanks to @CoyoteCloud46 we do have some scripts we tested that work for people who do not meet those requirements and need to move cross tenant. Maybe we can add it to this doc since it's already pretty short? Else, maybe a new one? Thoughts?

@MicahMcKittrick-MSFT I can add something about being a Global AAD Tenant Admin to the doc today. I don't think we should add the scripts to the existing doc, but we might want to add them to the scripts repo and link to them from the scripts section in the TOC. We can talk about more details offline :)

@cynthn sounds good :)

Just an update for all, We will work to add the information that you have to be the Global AAD tenant to run this script.
As per the work around docs, we are discussing offline how to handle this situation. I am closing this issue for now but we will continue to work on the doc and update it as needed :)

Any update on this? I'm running into the same issue.


Question from CodeChef

Greetings, your code is perfect. But try to make a complete program using your class. As I'm merging this and waiting for implementation of this class with class and it's objects.
Waiting for your PR!!!


Index Fedora create/modify headers

When a Fedora Object is indexed on creation or update, it is checked for headers with created and modified dates. If those headers exist, the values are added to the corresponding Elasticsearch document. See the updated README for the proposed header and field names.
TODO:

Agree on header and field names
Update Elasticsearch mapping in pass-data-model
Update fcrepo servlet filters to add headers
Get ITs working against an updated fcrepo

This looks great!
I took a quick look at the servlet filter code the other day, and I think it'll just take a handful of lines of code to implement that on this end.   I half-implemented it, but haven't running it against a real Fedora yet

The migration of PASS repositories to eclipse-pass is complete. This PR is no longer relevant and is being closed as part of archiving https://github.com/eclipse-pass/main/issues/585.


Addresses:#745- Added Edge Detection Example

Addresses #745
Changes:
Added Edge Detection Example from the Processing Foundation example section
Screenshots of the change:

Tagging @montoyamoraga for review
Thanks!

@all-contributors please add @rt1301 for docs


Windows: Fix journald compile error

Signed-off-by: John Howard<EMAIL_ADDRESS>I'm going through trying to get unit tests running on Windows (make test-unit). There are several packages with compile errors on non-Linux. This fixes daemon\logger\journald so that go test or even just a regular compile on Windows doesn't throw an error

LGTM


Clean up chat input components

Converted a bunch of recompose stuff and a HOC to two wrapper components.
Now we have:
Input, with props InputProps, which wraps
MentionInput, with props MentionInputProps, which wraps
PlatformInput, with props PlatformInputProps.
The logic was way confusing before, and everything was untyped, so now
it should be easier to modify.
This is in preparation for using an unconnected TextInput component, as well
as de-platforming the MentionInput component.

This is ready. r? @keybase/react-hackers

code looks fine but i need someone to actually run it and test the various flows. things to check

[ ] editing works
[ ] up arrow editing works
[ ] typing and not sending and switching to a different convo and switching back retains the text
[ ] at mentions work
[ ] channel mentions work

Couple more items that needs verification:
[ ] Quoting a message works
[ ] 'Reply Privately' works

Tests:

Editing works, :sheep: on mobile the yellow marker isn't full height:
Up arrow editing is fine (tested on mac & ubuntu)
Pending text is retained when switching around conversations
@-mentions work, but 'channel' shows up in the list when in ad-hoc conversations (just checked and that's how it already works)
#-mentions are good, but the list pops up in small teams (just checked and that's how it already works)
Quoting doesn't always work on mobile

I had it work once, but most times (maybe every time after the first) it doesn't show in the input
When I back out of the conversation and back in, the quoted text appears correctly

Reply privately works. The quote shows up most times on mobile, but there's a lag before it's filled in

Thanks for testing! Some notes for the results:

Looks like the yellow box on mobile not being full height was already there, so I'll punt, but added a TODO.
Can't repro this yet :/
Yeah, I noticed the lag. I traced through and nothing is obviously broken, but may be because of it being controlled -- seems to show up faster on  https://github.com/keybase/client/pull/11622

Also found a bug where after quoting on mobile and editing the quote, going to another channel and back restores the full quote. That bug was already on master, so will fix separately, and added a TODO.

Repro'd #2, but it's also on master so I'll punt. Interpreting @chrisnojima's approval on https://github.com/keybase/client/pull/11622 to include this one, and merging.


[1.1.x]  Fix XSS in some dashboards queries (#2785)

Backport
This will backport the following commits from master to 1.1.x:

 Fix XSS in some dashboards queries (#2785)

Questions ?
Please refer to the Backport tool documentation

Codecov Report
Base: 76.05% // Head: 76.07% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (a6f3c27) compared to base (9585590).
Patch coverage: 83.33% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##            1.1.x    #2801      +/-   ##
==========================================
+ Coverage   76.05%   76.07%   +0.01%
==========================================
  Files          88       88
  Lines        9644     9681      +37
  Branches     2061     2067       +6
==========================================
+ Hits         7335     7365      +30
- Misses       2049     2056       +7
  Partials      260      260

Impacted Files
Coverage Δ

webapp/graphite/util.py
80.00% <60.00%> (-0.82%)
:arrow_down:

webapp/graphite/errors.py
93.58% <78.57%> (-3.52%)
:arrow_down:

webapp/graphite/dashboard/views.py
99.30% <100.00%> (+0.04%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


refactor readme

i think the readme needs some refactoring now. It doesn't make sense anymore to instruct users to edit the variables in the script itself, especially considering how deeply buried those default values have gotten with the recent changes.
i'm thinking we merge the configuration and options sections, and the run section can be simplified, or maybe even mixed somewhere in with the rest, too.
overall, it should be more like a man page now that the script is more like a full-fledged command-line utility.
i hopefully will be able to tackle this in the next couple of days, but you, of course, are welcome to take a shot, too, @matro (or anyone else who happens to be lurking here).

I did a quick shuffle of the existing content on my "readme-refactor" branch. Not sure how I feel about it yet.


Make chunk size configurable

Add an option in Spark configuration to change the chunk size (which is by default 4 Mb).
This would allow to bypass the issue mentionned in SPARK-24917 when fetching large partitions (a bit less than 2 Gb)
P.S. The two commits should be merged in one

Please squash your commits and make a reference to SPARK-24917 so we can track it.


doesn't work

Description
What steps will reproduce the problem?

trying to create a new notebook

What is the expected output? What do you see instead?
Please provide any additional information below
File "/home/ammma/anaconda3/lib/python3.6/site-packages/spyder_notebook/notebookplugin.py", line 314, in create_new_client
server_info = nbopen(filename)
File "/home/ammma/anaconda3/lib/python3.6/site-packages/spyder_notebook/utils/nbopen.py", line 75, in nbopen
proc = subprocess.Popen(command, creationflags=creation_flag)
File "/home/ammma/anaconda3/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/home/ammma/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'jupyter': 'jupyter'
Version and main components

Spyder Version: 3.2.4
Python Version: 3.6.3
Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
numpy >=1.7      :  1.13.3 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
rope >=0.9.4     :  0.10.5 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
psutil >=0.3     :  5.4.0 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.26.1 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.1.0 (OK)
pylint >=0.25    :  1.7.4 (OK)

Sorry, the development of spyder-notebook is stalled now because we don't have funding to support it.


strace: 4.22 -> 4.23

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: strace
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


Installation error: node-sass

How can this bug be reproduced?

Step one -> git clone https://github.com/olefredrik/FoundationPress.git
Step two -> Run 'sudo npm install'
Step three -> Retried step 2 deleting 'node_modules' before running (no success at all)

What did you expect to happen?
Installation complete successfully.
What happened instead?
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g

<EMAIL_ADDRESS>install /vagrant/wp/wp-content/themes/FoundationPress/node_modules/node-sass
node scripts/install.js

/vagrant/wp/wp-content/themes/FoundationPress/node_modules/tough-cookie/lib/pubsuffix.js:96
{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.a
SyntaxError: Invalid or unexpected token
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/vagrant/wp/wp-content/themes/FoundationPress/node_modules/tough-cookie/lib/cookie.js:34:17)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 3.2.0-23-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /vagrant/wp/wp-content/themes/FoundationPress/npm-debug.log
Please List the Following:

OS & version: Ubuntu 16.04.2 LTS
Node version (node -v) [Node v4+ is required] : 6.0
Installed Ruby, gem, Sass, GCC before trying.

Installed another Vagrant Box and the issue is gone.
About Vagrant Boxes:
VVV and PV: don't even get installed.
Chassis: installs, but get the error above.
Scotch Box: the only one that successfully installs FoundationPress


Can you please create option for PVC too?

I just reused your code to reset my PVCs.
Can you maybe integrate that option to your tool? I would create merge request but not good in go.
thank you.

Hello @maratsal
It is a good idea, I would be glad to accept your PR.

here is the pull request with similar code - https://github.com/jianz/k8s-reset-terminating-pv/pull/3/files
I don't think you can access to EKS control plane and its ETCD.


API_ERROR : "syntax error at or near ")"","code":"42601

When I create any new wallet. I will not be able to access to this URL
https://bombay-fcd.terra.dev/v1/txs?account=terra1cv9n8e5ut4l8ts3wa29wgs2edrcycwn29ytn3a
it shows me this error
{"type":"API_ERROR","message":"syntax error at or near \")\"","code":"42601"}

But if I transfer money to this wallet , then it going to works fine

It does not happen in my end.

This error is indeed happening. But it only happens if the queried account has 0 txs in it.
Check it out, here's an example https://fcd.terra.dev/v1/txs?account=terra1ynhsjzegav33y5a3094yw0yj68s7ym64s0r2nv&limit=100


[DRAFT] fix: mul_with_endomorphism bug

Benchmark results
Metrics with a significant change:

note_trial_decrypting_time_in_ms (32): 105 (+139%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Values are compared against data from master at commit e78b86f9 and shown if the difference exceeds 1%.
L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
8 txs
32 txs
128 txs

l1_rollup_calldata_size_in_bytes
45,700
180,580
720,100

l1_rollup_calldata_gas
222,856
871,024
3,466,156

l1_rollup_execution_gas
316,047
989,472
3,686,534

l2_block_processing_time_in_ms
1,150 (-2%)
4,375
17,626 (+1%)

note_successful_decrypting_time_in_ms
313 (-4%)
977 (-5%)
3,842 (-1%)

note_trial_decrypting_time_in_ms
24.8 (-25%)
:warning: 105 (+139%)
152 (-3%)

l2_block_building_time_in_ms
17,787
70,160 (-1%)
281,694 (-1%)

l2_block_rollup_simulation_time_in_ms
13,097
51,633 (-1%)
207,856

l2_block_public_tx_process_time_in_ms
4,664 (-1%)
18,452 (-1%)
73,584 (-1%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric
5 blocks
10 blocks

node_history_sync_time_in_ms
13,767
26,369 (-1%)

note_history_successful_decrypting_time_in_ms
2,554 (+8%)
4,801 (+3%)

note_history_trial_decrypting_time_in_ms
88.7 (-15%)
227 (-2%)

node_database_size_in_bytes
17,317,968
33,071,184

pxe_database_size_in_bytes
29,923
59,478

Circuits stats
Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit
circuit_simulation_time_in_ms
circuit_input_size_in_bytes
circuit_output_size_in_bytes

private-kernel-init
306
44,528
25,825

private-kernel-ordering
194
44,145
16,225

base-rollup
1,406
128,654
933

root-rollup
82.2 (-2%)
4,192
729

private-kernel-inner
436
71,331
25,825

public-kernel-private-input
240
32,287
25,825

public-kernel-non-first-iteration
236
32,329
25,825

merge-rollup
7.93 (-1%)
2,712
933

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
1 leaves
2 leaves
8 leaves
16 leaves
32 leaves
128 leaves
64 leaves
512 leaves
1024 leaves
2048 leaves
8192 leaves

batch_insert_into_append_only_tree_16_depth_ms
10.3
11.6 (+6%)
12.7 (-2%)
16.8 (-4%)
22.9 (-1%)
64.5
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_count
16.9
17.5
23.0
31.6
47.0
143
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_ms
0.596
0.647 (+7%)
0.540 (-1%)
0.520 (-4%)
0.480 (-1%)
0.443
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_32_depth_ms
N/A
N/A
N/A
N/A
N/A
74.7 (-5%)
47.5
238 (-1%)
462
896 (-1%)
3,570

batch_insert_into_append_only_tree_32_depth_hash_count
N/A
N/A
N/A
N/A
N/A
159
96.0
543
1,055
2,079
8,223

batch_insert_into_append_only_tree_32_depth_hash_ms
N/A
N/A
N/A
N/A
N/A
0.462 (-5%)
0.488
0.436 (-1%)
0.432
0.427 (-1%)
0.428

batch_insert_into_indexed_tree_20_depth_ms
N/A
N/A
N/A
N/A
N/A
105
56.7
349 (-3%)
688
1,365
5,545 (+1%)

batch_insert_into_indexed_tree_20_depth_hash_count
N/A
N/A
N/A
N/A
N/A
197
104
691
1,363
2,707
10,771

batch_insert_into_indexed_tree_20_depth_hash_ms
N/A
N/A
N/A
N/A
N/A
0.499
0.497
0.474 (-2%)
0.474
0.474
0.482 (+2%)

batch_insert_into_indexed_tree_40_depth_ms
N/A
N/A
N/A
56.9
N/A
N/A
N/A
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_count
N/A
N/A
N/A
94.1
N/A
N/A
N/A
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_ms
N/A
N/A
N/A
0.581
N/A
N/A
N/A
N/A
N/A
N/A
N/A

Miscellaneous
Transaction sizes based on how many contracts are deployed in the tx.

Metric
0 deployed contracts
1 deployed contracts

tx_size_in_bytes
16,859
40,167

Transaction processing duration by data writes.

Metric
0 new commitments
1 new commitments

tx_pxe_processing_time_ms
550 (-1%)
1,301

Metric
0 public data writes
1 public data writes

tx_sequencer_processing_time_ms
0.482 (-11%)
574


homebridge-lib missing keyword

Hi,
I'm using RaspBee with pre-installed SD form Phoscon/deCONZ. I updated homebridge-lib using config-ui-x, after this all of my devices stopped responding in Home app. I tried to install homebridge-lib as you suggested in deconz-rest-plugin issue, i also tried resetting Homebridge in Phoscon App and rewriting config.json (both did not help). I'm just a beginner, is there still a problem with homebridge-lib? deamon.log code snippet with potential problem:

Sep  1 00:27:26 phoscon deCONZ-homebridge.sh[22807]: starting homebridge
Sep  1 00:27:28 phoscon deCONZ-homebridge.sh[22807]: [9/1/2019, 12:27:28 AM] Loaded config.json with 2 accessories and 1 platforms.
Sep  1 00:27:28 phoscon deCONZ-homebridge.sh[22807]: [9/1/2019, 12:27:28 AM] ---
Sep  1 00:27:28 phoscon deCONZ-homebridge.sh[22807]: [9/1/2019, 12:27:28 AM] Plugin /usr/lib/node_modules/homebridge-lib package.json does not contain the keyword 'homebridge-plugin'.
Sep  1 00:27:28 phoscon deCONZ-homebridge.sh[22807]: [9/1/2019, 12:27:28 AM] Plugin /usr/lib/node_modules/homebridge-hue requires Node version of ^10.16.3 which does not satisfy the current Node version of v10.16.0. You may need to upgrade your installation of Node.
Sep  1 00:27:30 phoscon deCONZ-homebridge.sh[22807]: [9/1/2019, 12:27:30 AM] Loaded plugin: homebridge-hue
Sep  1 00:27:30 phoscon deCONZ-homebridge.sh[22807]: [9/1/2019, 12:27:30 AM] Registering platform 'homebridge-hue.Hue'

Homebridge-lib is no longer a peer dependency, as that was causing too many issues.  It is once again included in homebridge-hue, and does not need to be installed separately, nor mentioned in config.json.  I suggest you try the following:
= Uninstall homebridge-lib;

Re-install homebridge-hue;
Edit config.json and remove any reference to homebridge-lib or the Lib platform;
Restart homebridge.

Did everything you said, reinstalled plugins, also updated node to 0.16.13. Log file doesn't have any errors anymore. I tried re-adding bridge in Home app but after deleting i can't discover it in Home app. config-ui-x says it listens on port 8081 but Homebridge service isn't working. I also have Pi-hole running on this machine, maybe it somehow causes the problem? ipconfig says broadcast and multicast is enabled:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>

If you deleted homebridge from HomeKit while homebridge wasn’t running, you might need to delete the persist directory in ~/.homebridge.  This is like a factory reset of homebridge, deleting any pairing info.
Homebridge listens on the port specified in config.json, typically 51826, HomeKit needs to find it through Bonjour, which uses multicast.  You might want to disable pihole temporary, to see if that is causing an issue.

Thanks a lot. At the and i deleted pihole and it helped. Homebridge is up and running. Now only find out why pihole was blocking homebridge.


Development experience

Improve the development experience for new contributors and maintainers.
We can discuss overall ideas and track related task issues on this issue.

[ ] #106

Should this issue be closed? @kairoaraujo


Feature/ci toolkit

🧰 Ticket
Part of ticket #7
🚀 Overview:
Adds a number of code checks to the project using the following applications:

Code Climate Quality
Currently applies linting rules, will eventually also run code coverage tests
Travis
Runs the build and will eventually also run the unit and e2e tests
Snyk
Checks the project for known vulnerabilities

🤔 Reason:
PR's will be our primary code quality guard when everything is set up and GitHub's status checks are the perfect measure of that quality.
🔨Work carried out:

[x] Added codeclimate configs
[x] Added stylelint configs
[x] Fixed 'low hanging fruit' for nonconfirmant styles
[x] Added Travis config (first pass)

📝 Developer Notes:

I'm pushing this PR to trigger the first builds of the project and check everything is working as expected.
Until we are able to modify the codebase to ensure that all status checks can turn green, it will still be possible to merge a 'failing' PR.

Forcing a merge as this code needs to be in develop in order to continue.