Redeclaration of vars possible / Weird side effects

Operating system or device - Godot version:
Windows 10 x64 - Godot 2.1 stable
Issue description (what happened, and what was expected):
Hence the following code:
func _process(delta):
    # Snap-move the grid to place it centered under the camera.
    var grid_pos = _grid.get_translation()
    print(grid_pos.y)
    var camera_pos = _camera.get_translation()
    var offset = grid_size * max_grid_steps / 2
    var grid_pos = Vector3(camera_pos.x - offset, grid_pos.y, camera_pos.z - offset)
    print(grid_pos.y)
    _grid.set_translation(grid_pos)

Note how grid_pos is declared in the first line of the function, then simply redeclared 4 lines later. This compiles without an error. The old value is lost then.
But wait, there's more! With some basic testing:
    var a = Vector3(0, 0, 0)
    var b = Vector3(2, 2, 2)
    var a = Vector3(b.x, a.y, b.z)
    print(a.y)

This will bug out at runtime, complaining a is Nil when wanting to combine b and a together.
    var a = _grid.get_translation()
    var b = Vector3(2, 2, 2)
    var a = Vector3(b.x, a.y, b.z)
    print(a.y)

This does not cause an error at runtime. a "correctly" becomes 2, 0, 2 (when the grid was at Y=0).
In the context of my above code, it gets even worse: The new value of grid_pos.y somehow becomes the Y value of camera_pos!
func _process(delta):
    # Snap-move the grid to place it centered under the camera.
    var grid_pos = _grid.get_translation() # Grid is at 0,0,0
    print(grid_pos.y) # Prints "0"
    var camera_pos = _camera.get_translation() # Camera is at 0,3,6
    var offset = grid_size * max_grid_steps / 2
    var grid_pos = Vector3(camera_pos.x - offset, grid_pos.y, camera_pos.z - offset)
    print(grid_pos.y) # This funnily prints 3 now, though grid_pos.y was 0 all along!
        # It seems to have taken camera_pos.y's value instead.
    _grid.set_translation(grid_pos)

To cut a long story short: Redeclaration should be an error, right? The other things might just be follow-up errors.
I fell over this several times already, getting values I totally do not expect.
Sorry if it has been discussed before and for some reason is allowed now. But the behavior with the Y value doesn't make any sense at all.
This also happens with local variables shadowing more global ones, though that would still be okay (even if it should raise a warning or something).

Redeclaration should be an error, right?

Yes, it should not be allowed. It is a similar problem to #6221.

This also happens with local variables shadowing more global ones

I'm not sure about a warning there. It will be annoying if the programmer is aware of the scope rules.

If a programmer is aware of the scope rules, he is probably also aware of naming variables the same is not a good idea =3c Maybe make warnings optional, if in doubt.

First of all thank you for your report and sorry for the delay.
We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.
We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about it here?
For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.
Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.
Thanks in advance.
Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

Re-declaration in the same function triggers an error now. Shadowing class members was forbidden for a while, but since many things changed into members, people started complaining about it and it's now allowed.
I want to eventually add a warning system (#18271) which could catch things like shadowing class or global members.

Closing as fixed as per the above.


Scalyr agent sidecar for log shipping

When the scalyr_api_key key is defined in the configmap, this adds a sidecar container named scalyr-agent to PostgreSQL pods that ships all logs to Scalyr.
The sidecar image is configurable with the scalyr_image configmap key and defaults to the currently newest CDP build from the currently-private Spilo Scalyr sidecar repository in the private image registry.
That image is very simple: it just installs the Scalyr agent and creates a configuration file that consumes the environment variables set by the Operator.  It should be easy to make that repository public if we build the image on top of the official Scalyr agent image on Docker Hub.  This was not done for the private image as I understand compliance requires approved base images for anything deployed internally.
We could also use the public Scalyr agent image as the default directly, although the agent config file would have to be generated e.g. with an init container, which would add inconvenient complexity to the Operator code.

Coverage decreased (-0.1%) to 11.104% when pulling 2d8472e32409eb3ea39bedb27fd13182fae1a8e7 on scalyr-agent-sidecar into 6c57334666da3d55602e53c9c1559fd132dcb910 on master.

Coverage decreased (-0.1%) to 11.104% when pulling 175fecc1a6fb52263b0b79bd09c562b85a1d6c6d on scalyr-agent-sidecar into 6c57334666da3d55602e53c9c1559fd132dcb910 on master.

Coverage decreased (-0.1%) to 11.095% when pulling 4ebc0718d41e2458cd3ed2764a3844b0c7e18fb4 on scalyr-agent-sidecar into 6c57334666da3d55602e53c9c1559fd132dcb910 on master.

Coverage decreased (-0.1%) to 11.095% when pulling 9b35a2c5ed61a8724df9764da7d9b489e9504f2e on scalyr-agent-sidecar into 6c57334666da3d55602e53c9c1559fd132dcb910 on master.

Tested on playground. :+1:

:+1:

👍


Python3

Any chance of getting this ported to python3?

Actually I have been thinking about making it both 2 and 3 compatible, I can work on that next.

I pushed a commit for python3 compatibility; its working for me on both python 2.7.12 and 3.6.0

Any idea what a RobotError -32600 error is?
I’m trying to get my password.  Here is the code I’m running.
(hass) hass@hass:~/code/pyirobot$ cat GetPassword.py
from pyirobot import Robot
import json
print(Robot.GetPassword("<IP_ADDRESS>"))
(hass) hass@hass:~/code/pyirobot$
I noticed out on your github page, you seem to be interested in home automation.  What systems are you running?
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Tuesday, January 17, 2017 at 10:19 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
I pushed a commit for python3 compatibility; its working for me on both python 2.7.12 and 3.6.0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I just duplicated your error with my robot here; its working in python2.7 but fails like this with python 3.6.  I think I remember getting this error when the order of the keys in the JSON sent to the robot was incorrect, it's very sensitive about the payload you send.  I'll look into this more.
I have quite a few Insteon smart switches and plug in modules in my house, along with the Insteon hub as well as the ISY 994i.  I also have Kevo locks on my doors, and several Echo Dot scattered around the house to control everything via voice.  I'm considering a Logitech Harmony Hub to integrate IR beaming into my automation.  I've also got a number of custom built devices that I've put together with microcontrollers or raspberry pi, like a controller to turn on the electric blanket or sense when the dryer is done.
I'm very intrigued by SmartThings, they seem to have a pretty good ecosystem and a lot of community support, but I've held off because it is so cloud driven, and much of it stops working if your internet is flakey or down.

Thanks,
The cloud based issue is something that bothers me too.  I have probably about a dozen GE smart switches and outlets at this point along with a couple of those in-wall switch modules that let you keep your existing switches.  I use Wink for my primary hub to tie items together.  I’ve got several of the Dots too.  My kids are all older, so I setup one for each of them in their rooms.  That way they can control their skills, alarms, etc individually, but still have access to the devices throughout the Wink Alexa skill.  SmartThings does have a good community.  I settled on Home Assistant though.  The group over there is very helpful too, and with the AppDaemon addon, I can use Python to put in more advanced automations than the base application lets me do.  It can also act as a hub which would remove me from the web even more.
I just got through paying for Christmas and Spring tuition for two of my boys so I’m holding off on buying the next round of items for a few months.  Giving the checkbook a chance to recover.  J
Thanks again
Chip
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Wednesday, January 18, 2017 at 7:26 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
I just duplicated your error with my robot here; its working in python2.7 but fails like this with python 3.6. I think I remember getting this error when the order of the keys in the JSON sent to the robot was incorrect, it's very sensitive about the payload you send. I'll look into this more.
I have quite a few Insteon smart switches and plug in modules in my house, along with the Insteon hub as well as the ISY 994i. I also have Kevo locks on my doors, and several Echo Dot scattered around the house to control everything via voice. I'm considering a Logitech Harmony Hub to integrate IR beaming into my automation. I've also got a number of custom built devices that I've put together with microcontrollers or raspberry pi, like a controller to turn on the electric blanket or sense when the dryer is done.
I'm very intrigued by SmartThings, they seem to have a pretty good ecosystem and a lot of community support, but I've held off because it is so cloud driven, and much of it stops working if your internet is flakey or down.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I think I have this fixed now, there was a small difference in how different python versions were serializing dictionaries to JSON.  I enforced the ordering now so that the robot always gets the request that it expects.  I think this will work now with any 2.7 or 3.x python.
That sounds like a nice setup, I need to look at Home Assistant some more myself.  I have a raspberry pi that would be perfect for that.

Can you send me a copy of a program running GetPassword that works?  When I run mine I’m getting a bunch of no route to host type messages, but I know the IP address is right.  The gateway and network mask are what you would think <IP_ADDRESS>. and <IP_ADDRESS>.
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Wednesday, January 18, 2017 at 10:34 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
I think I have this fixed now, there was a small difference in how different python versions were serializing dictionaries to JSON. I enforced the ordering now so that the robot always gets the request that it expects. I think this will work now with any 2.7 or 3.x python.
That sounds like a nice setup, I need to look at Home Assistant some more myself. I have a raspberry pi that would be perfect for that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Maybe your robot got a new DHCP address?
(pyirobot3) carl@carl-macbook ~/Dropbox/projects/pyirobot :) python asdf.py
Querying robot password...
xxxxxxxxxxxxxxxxxxx

Querying robot status...
Bin is full!

{
    "cleaningPreferences": {
        "lang": 0,
        "timezone": "US/Pacific",
        "name": "Roomba",
        "carpetBoost": "Auto",
        "cleaningPasses": "Auto",
        "finishWhenBinFull": "Off",
        "edgeClean": "On"
    },
    "mission": {
        "batteryPercentage": 100,
        "missionElapsedMinutes": 87,
        "readyStatus": "BinFull",
        "robotPosition": {
            "theta": 46,
            "point": {
                "x": 816,
                "y": -667
            }
        },
        "missionCoveredSquareFootage": 580,
        "binStatus": "Full",
        "robotStatus": "Charging"
    }
}
(pyirobot3) carl@carl-macbook ~/Dropbox/Carl/projects/pyirobot :) python --version
Python 3.6.0
(pyirobot3) carl@carl-macbook ~/Dropbox/Carl/projects/pyirobot :) cat asdf.py
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json

robot_ip = "<IP_ADDRESS>"

print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()

print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
    print("Bin is full!")
    print()

print(json.dumps(status, indent=4))

I thought about the DHCP address, but It’s a reserved address in DHCP, and the iPhone app agrees on the IP address, and the Iphone is able to talk to it fine.
I’ll give the code you sent me a try tonight when I get home from work.  There are a couple differences in what I was importing that might make a difference.
Thanks again for the help.
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
Maybe your robot got a new DHCP address?
(pyirobot3) carl@carl-macbook ~/Dropbox/projects/pyirobot :) python asdf.py
Querying robot password...
xxxxxxxxxxxxxxxxxxx
Querying robot status...
Bin is full!
{
    "cleaningPreferences": {
        "lang": 0,
        "timezone": "US/Pacific",
        "name": "Roomba",
        "carpetBoost": "Auto",
        "cleaningPasses": "Auto",
        "finishWhenBinFull": "Off",
        "edgeClean": "On"
    },
    "mission": {
        "batteryPercentage": 100,
        "missionElapsedMinutes": 87,
        "readyStatus": "BinFull",
        "robotPosition": {
            "theta": 46,
            "point": {
                "x": 816,
                "y": -667
            }
        },
        "missionCoveredSquareFootage": 580,
        "binStatus": "Full",
        "robotStatus": "Charging"
    }
}
(pyirobot3) carl@carl-macbook ~/Dropbox/Carl/projects/pyirobot :) python --version
Python 3.6.0
(pyirobot3) carl@carl-macbook ~/Dropbox/Carl/projects/pyirobot :) cat asdf.py
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
    print("Bin is full!")
    print()
print(json.dumps(status, indent=4))
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Ok, I’m making progress.
I got the password.  I had to beef up the headings.  I looked at https://github.com/koalazak/dorita980/blob/master/bin/getpassword.js to see what he did.
So the next thing I did was remove the getpassword part of the program and just try to get the robot status.  I’m having problems there.  Is there anything I need to do to the password other than just cut and paste it in where the password was being pulled in from GetPassword?  What I have is below.
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = "thisismypassword"
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")

print()

print(json.dumps(status, indent=4))
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
    print("Bin is full!")
    print()
print(json.dumps(status, indent=4))

That should work fine. Maybe you need to add those additional headers to _PostToRobot as well. What headers did you have add?

On Jan 20, 2017, at 8:35 PM, turboc1208<EMAIL_ADDRESS>wrote:
Ok, I’m making progress.
I got the password.  I had to beef up the headings.  I looked at https://github.com/koalazak/dorita980/blob/master/bin/getpassword.js to see what he did.
So the next thing I did was remove the getpassword part of the program and just try to get the robot status.  I’m having problems there.  Is there anything I need to do to the password other than just cut and paste it in where the password was being pulled in from GetPassword?  What I have is below.
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = "thisismypassword"
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

I also had to specify port 443.  I probably could/should have done that just passing it in as part of the robotIP, but this works for now to get the password.
def GetPassword(robotIP):

    """

    Get the password for this robot

    Before calling this method, place the robot on its dock and then hold down the home button for 3-4 seconds,

    until the LEDs illuminate and the robot emits a series of tones.  Then quickly call this method

    Returns:

        The robot password (str)

    """

    result = requests.post("https://{}:443/umi".format(robotIP),

                            data=json.dumps({"do" : "get",

                                             "args" : ["passwd"],

                                             "id" : 0}),

                            headers={"Content-Type" : "application/json",

                                     "connection":"close",

                                     "user-agent":"aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0",

                                     "Content-Encoding":"identity",

                                     "Accept":"*/*",

                                     "Accept-Language":"en-us",

                                     "Host":robotIP},

                            verify=False)

    res = result.json()

    if "err" in res:

        raise RobotError(res["err"])

    return res["ok"]["passwd"]

From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Friday, January 20, 2017 at 10:47 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
That should work fine. Maybe you need to add those additional headers to _PostToRobot as well. What headers did you have add?

On Jan 20, 2017, at 8:35 PM, turboc1208<EMAIL_ADDRESS>wrote:
Ok, I’m making progress.
I got the password. I had to beef up the headings. I looked at https://github.com/koalazak/dorita980/blob/master/bin/getpassword.js to see what he did.
So the next thing I did was remove the getpassword part of the program and just try to get the robot status. I’m having problems there. Is there anything I need to do to the password other than just cut and paste it in where the password was being pulled in from GetPassword? What I have is below.
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = "thisismypassword"
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Wondering something else.
To get the password, I had to hit the home button till the music played.  That in effect wakes up the unit.  Do I have to do something else with the unit on the docking station to wake it up to get the code to run using the password?
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Friday, January 20, 2017 at 10:47 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
That should work fine. Maybe you need to add those additional headers to _PostToRobot as well. What headers did you have add?

On Jan 20, 2017, at 8:35 PM, turboc1208<EMAIL_ADDRESS>wrote:
Ok, I’m making progress.
I got the password. I had to beef up the headings. I looked at https://github.com/koalazak/dorita980/blob/master/bin/getpassword.js to see what he did.
So the next thing I did was remove the getpassword part of the program and just try to get the robot status. I’m having problems there. Is there anything I need to do to the password other than just cut and paste it in where the password was being pulled in from GetPassword? What I have is below.
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = "thisismypassword"
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I haven't had to do that but it's worth a shot to see what happens for you.
What firmware version is your robot running? Mine is on 1.6.6, I've heard there is an update rolling out that my robot hasn't picked up yet. In the app it's under Settings -> About Roomba
Carl
Cheers,
Carl

On Jan 21, 2017, at 5:38 AM, turboc1208<EMAIL_ADDRESS>wrote:
Wondering something else.
To get the password, I had to hit the home button till the music played.  That in effect wakes up the unit.  Do I have to do something else with the unit on the docking station to wake it up to get the code to run using the password?
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Friday, January 20, 2017 at 10:47 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
That should work fine. Maybe you need to add those additional headers to _PostToRobot as well. What headers did you have add?

On Jan 20, 2017, at 8:35 PM, turboc1208<EMAIL_ADDRESS>wrote:
Ok, I’m making progress.
I got the password. I had to beef up the headings. I looked at https://github.com/koalazak/dorita980/blob/master/bin/getpassword.js to see what he did.
So the next thing I did was remove the getpassword part of the program and just try to get the robot status. I’m having problems there. Is there anything I need to do to the password other than just cut and paste it in where the password was being pulled in from GetPassword? What I have is below.
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = "thisismypassword"
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

1.6.6 dated Nov 23, 2016
I may have my versions wrong, but this is not the top of the line 900 series (980 I think), it’s the second one down ( the 960) I think.  But everything seems to talk about these as being a 900 series, so like you said in your documentation, it “should” work.
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Saturday, January 21, 2017 at 1:14 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
I haven't had to do that but it's worth a shot to see what happens for you.
What firmware version is your robot running? Mine is on 1.6.6, I've heard there is an update rolling out that my robot hasn't picked up yet. In the app it's under Settings -> About Roomba
Carl
Cheers,
Carl

On Jan 21, 2017, at 5:38 AM, turboc1208<EMAIL_ADDRESS>wrote:
Wondering something else.
To get the password, I had to hit the home button till the music played. That in effect wakes up the unit. Do I have to do something else with the unit on the docking station to wake it up to get the code to run using the password?
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Friday, January 20, 2017 at 10:47 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
That should work fine. Maybe you need to add those additional headers to _PostToRobot as well. What headers did you have add?

On Jan 20, 2017, at 8:35 PM, turboc1208<EMAIL_ADDRESS>wrote:
Ok, I’m making progress.
I got the password. I had to beef up the headings. I looked at https://github.com/koalazak/dorita980/blob/master/bin/getpassword.js to see what he did.
So the next thing I did was remove the getpassword part of the program and just try to get the robot status. I’m having problems there. Is there anything I need to do to the password other than just cut and paste it in where the password was being pulled in from GetPassword? What I have is below.
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = "thisismypassword"
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
From: Carl Seelye<EMAIL_ADDRESS>Reply-To: cseelye/pyirobot<EMAIL_ADDRESS>Date: Thursday, January 19, 2017 at 11:40 PM
To: cseelye/pyirobot<EMAIL_ADDRESS>Cc: Chip Cox<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [cseelye/pyirobot] Python3 (#1)
#!/usr/bin/env python3
from pyirobot import Robot, RobotError, BinStatus
import json
robot_ip = "<IP_ADDRESS>"
print("Querying robot password...")
robot_password = Robot.GetPassword(robot_ip)
print(robot_password)
print()
print("Querying robot status...")
r = Robot(robot_ip, robot_password)
status = r.GetStatus()
if status["mission"]["binStatus"] == BinStatus.Full:
print("Bin is full!")
print()
print(json.dumps(status, indent=4))
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


[Misc] feat: add eetq quantization

EETQ is int8 per-channel weight only quantization owned by Netease Fuxi AI Lab. The high performance gemm kernels are derived from FasterTransformer and TensorRT-LLM. We fit it into vllm and realize Llama and Baichuan model including their tensor parallel. We will implement the other models in the future.

The speed is over gptq-int8 when input length is small and below is our testing result when input-len = 512 and output-len = 64 on 4090.
It does not need any calibration.
The accuracy degradation is negligible.
You can quantize your model easily via

from eetq import AutoEETQForCausalLM
from transformers import AutoTokenizer
model_name = "/path/to/your/model"
quant_path = "/path/to/quantized/model"
tp = 1
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoEETQForCausalLM.from_pretrained(model_name)
model.quantize(quant_path, tp)
tokenizer.save_pretrained(quant_path)

We find it is hard to implement an online quantization since the model weights are saved in the parallellinear classes. (I have tried to modify the code, but I am not able to do it in an elegent way. It would be great if you can help us solve the problem.)
Since the compiling time of cutlass kernel is long(about 15 minutes). We recommend install eetq via the source https://github.com/NetEase-FuXi/EETQ. (If eetq is not installed, it will not affect the usage of other function).
#3261
#2455

Thank you for bringing this up! I think this is great addition to quantization methods.
Personally tested with Qwen and result looked promising when fixing the bias part.


ui: dark mode color inverting

On hard reload:

#53 Revert: as it creates flickering in light mode (related to #34)


Add SourceArn to Lambda perms

Adds SourceArn attribute to the AWS::Lambda::Permission resource. Amazon adds this field to the permission when subscribing Lambda to SNS through the web interface. Adding it here gets the web panel working as expected.
Fixes #5

Coverage remained the same at 22.222% when pulling 55ff8dff4d74d3801fee7d3a2e0c937342a4cf4c on davekonopka:lambda-perm-source into ecdd1752ab1217cfc8ced3861b44e6190a953014 on silvermine:master.

Coverage increased (+6.7%) to 28.889% when pulling 84753e6459a9f76f6ee2e1d30a90605816fa5540 on davekonopka:lambda-perm-source into ecdd1752ab1217cfc8ced3861b44e6190a953014 on silvermine:master.

@jthomerson Is it likely that you will consider this PR? Wondering if I should start using my own fork.

@davekonopka FYI I also wanted your change and have it on my internal branch as well.
Part of my pull request as well:  https://github.com/silvermine/serverless-plugin-external-sns-events/pull/8

Closed with #11


Misleading Error for non-unique relation names

Bug description
If you have two relations, that use the same name @relation("a"), running prisma format returns an unspecific error message.
Prisma schema loaded from prisma/schema.prisma
thread '<unnamed>' panicked at 'Did not find a relation for model User and field comments', query-engine/prisma-models/src/builders/internal_dm_builder.rs:122:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Unexpected token D in JSON at position 0
error Command failed with exit code 1.

Running the command with DEBUG="*" give me the following error
  prisma:engines binaries to download libquery-engine, migration-engine, introspection-engine, prisma-fmt +0ms
Prisma schema loaded from prisma/schema.prisma
  prisma:getDMMF Using CLI Query Engine (Node-API) at<EMAIL_ADDRESS>+0ms
thread '<unnamed>' panicked at 'Did not find a relation for model User and field comments', query-engine/prisma-models/src/builders/internal_dm_builder.rs:122:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: SyntaxError: Unexpected token D in JSON at position 0
    at JSON.parse (<anonymous>)
    at getDmmfNodeAPI (/Users/***/projects/test/prisma-test/node_modules/prisma/build/index.js:42643:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getDMMF (/Users/***/projects/test/prisma-test/node_modules/prisma/build/index.js:42622:17)
    at async Object.parse (/Users/***/projects/test/prisma-test/node_modules/prisma/build/index.js:113414:5)
    at async main (/Users/***/projects/test/prisma-test/node_modules/prisma/build/index.js:115059:18)
error Command failed with exit code 1.

As a note, the VS Code prisma extension, does not throw an Error for this. (Which is somewhat okay for me)
How to reproduce
Example repository
https://github.com/Haschikeks/prisma-relation-name-bug
If you change the relation to be equal, for example both to a and then run prisma format the above mentioned error appears.
Expected behavior
It would be nice, if there was an error message that indicates, that there is a problem with the relation names. This would already help in tracking down the problem.
Prisma information
Prisma schema:
model Post {
  id     String @unique
  userId String
  user   User   @relation("a", fields: [userId], references: [id])
}

model User {
  id       String    @unique
  posts    Post[]    @relation("a")
  comments Comment[] @relation("a")
}

model Comment {
  id     String @unique
  userId String
  user   User   @relation("a", fields: [userId], references: [id])
}

Environment & setup

OS: Mac OS
Node.js version: v17.9.0

Prisma Version
prisma                  : 3.12.0
@prisma/client          : Not found
Current platform        : darwin
Query Engine (Node-API) : libquery-engine 22b822189f46ef0dc5c5b503368d1bee01213980 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 22b822189f46ef0dc5c5b503368d1bee01213980 (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine    : introspection-core 22b822189f46ef0dc5c5b503368d1bee01213980 (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary           : prisma-fmt 22b822189f46ef0dc5c5b503368d1bee01213980 (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash    : 22b822189f46ef0dc5c5b503368d1bee01213980
Studio                  : 0.459.0

@Weakky thank you for attending to this problem. Just a quick follow up question.
With Version 4 we would then be able to have multiple relations that have the same name in the prisma schema?


Add note about how to specify event in github action

Why:
Hi, I'm new to GitHub action and I would like to push the built docker image to the docker hub when I commit. I pasted the demo yml to try it but I was blocked and spent a lot of time solving it, because our doc doesn't note that we need to specify the event that triggers the docker action.
So I add a note in our docs and hope it could help the other newer.

What's being changed:
Add a note for the newer to let them know there is an event that can be set to control when the event is triggered.

Check off the following:

[X] I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
[X] For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

[ ] This pull request impacts the contribution experience

[ ] I have added the 'writer impact' label
[ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

🤔  We do actually mention it in the top of the section and link to the "Events that trigger workflows" page, which I think makes sense.
I don't think that it hurts to restate that, though. My suggestion would be to bring the trigger to the top of the paragraph instead of the bottom, and not as a "note".  For example:

The above workflow runs when you create a release in your repository. The workflow checks out the GitHub repository, uses the login-action to log in to the registry, and then uses the build-push-action action to: build a Docker image based on your repository's Dockerfile; push the image to Docker Hub, and apply a tag to the image.

I would also apply this consistently to the three workflows.


Update Get-CsOnlineVoiceRoutingPolicy.md

Docs Build status updates of commit 2108c5e:
:clock10: Full build: the average full build time is 12 min(s) 15 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit 2108c5e:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Get-CsOnlineVoiceRoutingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 300c0ea:
:clock10: Full build: the average full build time is 12 min(s) 16 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit 300c0ea:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Get-CsOnlineVoiceRoutingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


new feature: when a precompressed file (.gz) exists alongside the original, then gzipped file will be served instead

new feature: when a precompressed file (.gz) exists alongside the original, then gzipped file will be served instead

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Hi @juliuse, thanks for your PR. :smile:
I'm not sure why this should go in file server and not the gzip middleware?

Hi Matt,
The scenario for using this feature would be to precompress certain files
(eg. html/css/js...) at build time, to save server resources at runtime.
Usually, precompressed files sit alongside original ones and just have .gz
extension added.
In such cases the fileserver midleware would serve the precompressed files
ones instead, then flag it to skip compressing in the gzip middleware
(presets Accept-Encoding to gzip).
Gzip middleware role would remain to compress responses on the fly for the
rest of matching cases.
I think is a good separation of concerns between the two, but I am quite
new to Caddy, so please free to change as it might fit.
Julius
On Fri, May 20, 2016 at 7:35 AM, Matt Holt<EMAIL_ADDRESS>wrote:

Hi @juliuse https://github.com/juliuse, thanks for your PR. 😄
I'm not sure why this should go in file server and not the gzip middleware?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-220622843

The way this is now, you have the file server concerned with gzip, which I don't believe it should be. gzip directive could do the part that checks for existing .gz file and rewrite the request internally. It's like a 2-line change.

All right

Also, let's talk about how to update pull requests instead of making 5 of them. :smile: Simply push your changes to your branch and the PR will update. You can run tests locally with go test, etc.

All right, I wasn't sure if the build is hooked or scheduled
On Fri, May 20, 2016 at 2:39 PM, Matt Holt<EMAIL_ADDRESS>wrote:

Also, let's talk about how to update pull requests instead of making 5 of
them. 😄 Simply push your changes to your branch and the PR will update.
You can run tests locally with go test, etc.
—
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-220724831

I'd love to see this feature in Caddy. It is straight forward and can save lots of CPU cycles and improve the (slightly overrated but still) TTFB. Maybe refuse to send the static compressed file if its mtime is older than then plain file? (I.e. do a fall back, not generate an error.) That would make two round trips to the platter via os.Stat instead of one, but I'd assume the performance hit is negligible.
Another advantage, if you put this feature into gzip middleware, you can toggle this mtime check and this feature altogether. That config thing would be a candidate for a follow-up PR.
You do not need to trigger or wait for the build server. You can do all the builds, tests and checks locally. Have a look at https://github.com/alecthomas/gometalinter for a suite that runs (and installs) all kinds of checks for you.

@juliuse are you still working on this ?

There is a blog post at CF on why TTFB is overrated. Note that the assumptions of that argument are not valid when the files are statically compressed.

What I would suggest instead is to make this optional by adding an additional config to gzip.
gzip {
    ...
    use_compressed
}

We sure can do with a better name 😉 .

I think having gzip module being concerned only to compressing the byte
stream (and not changing the file handler), and letting the fileserver
module to deal with anything related to the file system, will maintain a
better separations of concerns between the two, and more flexible approach
to add future algorithms (eg.Brotly).
From my point of view, the performance aspect should be always treated from
an extreme perspective (every memory byte and cpu cycle counts,
particularly at high loads, but not only).
Even negligible hits should be avoided, like + string concatenation. I
would also prefer not to check if the plain and compressed files are in
sync (should be an external responsibility to maintain it, usually done
automatically at build time, and the timestamp might not be reliable). I
would rather check against "ext" and "not" matches before checking if
compressed file exists (but I didn't get the time to benchmark).
Having some configuration settings related to this feature could be useful,
especially when extending to multiple compressing algorithms.
On the other hand I am for completely open and collaborative approach, so
everyone please feel free to change/extend the implementation or come up
with alternative. There will be always room or improvement.
On Sun, May 22, 2016 at 3:44 AM, Abiola Ibrahim<EMAIL_ADDRESS>wrote:

What I would suggest instead is to make this optional by adding an
additional config to gzip.
gzip {
...
use_compressed
}
We sure can do with a better name 😉 .
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-220825772

@juliuse I appreciate your feedback!

and letting the fileserver module to deal with anything related to the file system

The fileserver's role isn't to "deal with anything related to the file system." Its job is to serve static files from disk based on the request path. Plenty of other middleware also access the file system for a variety of specific purposes, not always to load and serve files. It would not be fitting for the file system to bend over and start accommodating the needs of all the other middleware.

Even negligible hits should be avoided, like + string concatenation.

What if string concatenation is necessary, though? How do you get around it? Pre-process, maybe. But the bigger question is, "Is it really hurting performance?" We must not make such optimizations without proper, thorough profiling in a variety of scenarios. We have to be able to prove such an optimization is needed and that a certain change fixes it.
Let's bring it back to this PR and gzip. If the gzip middleware sees a file at the same location as the request path + ".gz", then perhaps the gzip middleware should simply rewrite the request and add a ".gz" to it, then the file server will serve up the .gz file. It takes just a few lines of code and keeps it clean.

It's Matt's gig. Other than premature optimization I second the motion that FileServer is the place to look for static content in alternate encodings, such as but not limited to gzip (bz, xz…):
In an ideal FileServer content negotiation would happen. Encodings is a specialization of that.
The progression I see for this is: add encodings, add image type detection, generalize into content negotiation.

Hi Matt,
Sorry for imprecision, when I said anything in the context of fileserver I
meant related to serving files from the file system.
When I said + string concatenation I referred to adding ".gz" to the
filename before checking for existence, not to static files concatenation
which of course should be of build concern.
My concern with gzip checking if a precompressed version exists is that
fileserver has already opened a handler for the plain file.
I agree with Mark that extending to alternative algorithms would require a
more comprehensive solution, which probably would require a design doc
first, including config settings as per Abiola's suggestion.
On Sun, May 22, 2016 at 3:17 PM, W. Mark Kubacki<EMAIL_ADDRESS>wrote:

It's Matt's gig. Other than premature optimization I second the motion
that FileServer is the place to look for static content in alternate
encodings, such as but not limited to gzip (bz, xz…):
In an ideal FileServer content negotiation would happen. Encodings is a
specialization of that.
The progression I see for this is: add encodings, add image type
detection, generalize into content negotiation.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-220859954

My concern with gzip checking if a precompressed version exists is that
fileserver has already opened a handler for the plain file.

The good news is that it hasn't, so no need to worry about that. gzip runs before the static file server does.

to be more specific serveFile method on fileserver  precedes Write method
on gzip, but even if other method on gzip could check if compressed file
exists  before the serveFile, wouldn't be more expensive to rewrite the
request than to change the filename before opening the file handler?
On Sun, May 22, 2016 at 9:55 PM, Matt Holt<EMAIL_ADDRESS>wrote:

My concern with gzip checking if a precompressed version exists is that
fileserver has already opened a handler for the plain file.
The good news is that it hasn't, so no need to worry about that. gzip runs
before the static file server does.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-220887331

@juliuse, the gzip Write method will never get called with what I am proposing. It just rewrites the URL and sets a header:
if fileExistsWithGzExtension(req) {
    req.URL.Path += ".gz"
    w.Header.Set("Content-Encoding", "gzip")
    return h.Next.ServeHTTP(w, r)
}

Something like that.

Matt, thank you and everyone for taking the time to review and provide
feedback on this new feature.
Unfortunately, due to time constraints I am not available to refactor as
suggested soon, so I would appreciate if anyone else could pick up the task.
On Mon, May 23, 2016 at 8:12 AM, Matt Holt<EMAIL_ADDRESS>wrote:

@juliuse https://github.com/juliuse, the gzip Write method will never
get called with what I am proposing. It just rewrites the URL and sets a
header:
if fileExistsWithGzExtension(req) {
req.URL.Path += ".gz"
w.Header.Set("Content-Encoding", "gzip")
return h.Next.ServeHTTP(w, r)
}
Something like that.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-221006785

Thank you for working on it!

On Mon, May 23, 2016 at 1:02 PM, Matt Holt<EMAIL_ADDRESS>wrote:

Thank you for working on it!
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/mholt/caddy/pull/838#issuecomment-221079459


Life of a Distributed Transaction: add Parallel Commits info

Addresses #4723.
Summary of changes:

Update places that mention the transaction commit protocol with
references to the STAGING state and a link to the more in-depth
Parallel Commits docs.

Fix a couple of small typos

This change is

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/8aba9c2546f141f5cf930b3d3c0ecd2fafbcbf67/
Edited pages:

v19.2/architecture/life-of-a-distributed-transaction.md

Note: build failures are because this PR depends on content added in #5394


Unpack Project Dependencies

Concerning: #69

For sure it will break incremental build as we will need to build, pack and unpack modules every time.


Image renders as a placeholder until user clicks on it

Hi, I'm using the inline image functionality which was recently merged into the master branch. However, when I specify an image in markdown, I get a grey "question mark" in a box, which I see the code draws as a placeholder image. But the real image never appears until I click on that question mark, and then it instantly shows up.
Any advice? I am not fluent in NSAttributedStrings or NSTextAttachemts unfortunately.

I should have mentioned: MacOS 10.14

I found a workaround... we were using an NSTextField, which causes the above issue. Switching it to an NSTextView makes it render correctly, as in the example app. Not sure why this would matter but I'm past my problem now at least.

Actually NSTextField should not be used for markdown-related attributed string display because a text field  is a NSControl intended for text entry, so it has a number of limitations compared to NSTextView.
According to Apple Developer Documentation:

The Field Editor
The field editor is a single NSTextView object that is shared among all the controls, including text fields, in a window. This text view object inserts itself into the view hierarchy to provide text entry and editing services for the currently active text field. When the user shifts focus to a text field, the field editor begins handling keystroke events and display for that field. Figure 4-3 illustrates the field editor in relation to the text field it is editing.
Figure 4-3  The field editor

@tsfischer Can you therefore close this issue?


feat(settings): support settings on mobile device

Now there is no setting entry on mobile devices, this PR replaces ThemeSwicher with a setting entry so that all settings, including theme, can be changed on small screens.

The SettingsDialog is not friendly for mobile device user and going to refactor

Hi, we're actually working on a settings page that would remove the current settings dialog so that would be a replacement for settings menu on computer and a new feature on mobile devices. Thanks!


Dynamic background color for splits

In the current implementation to define the background color for the split cells it is necessary to define astyle for it’s class on the CSS.
I’ve found that this is not practical when the color is fetched from the back-end or need to change dynamically so I had to made this small change to be able to accomplish that.
Old behavior for setting the background color of a split:
In data..
splits: [
  { label: 'Whatever', class: 'split1' }
]
In CSS
.vuecal__body .split1 {background-color: rgba(226, 242, 253, 0.7);}

This PR:
splits: [
  { label: 'Whatever', color: 'rgba(226, 242, 253, 0.7)' }
]

Hi @crisclacerda,
Thanks for your contribution!
This version of Vue Cal is the last for v4, but this will be included in the coming v5, good idea!
To be very flexible (we may want a specific border or text color or whatever later), if there is a style in the schedule definition, it will be used.
{ label: 'Dr 1', class: 'dr-1', style: 'background-color: red' }


Fix/tighten AWS Batch test_reregister_task_definition unit test

This PR strengthens the tests/test_batch/test_batch.py unit test.
Expected behavior:
When you register a job definition using the name of a pre-existing job, the revision number should increment.  E.g., using the AWS CLI:
williamharvey@fnord $ aws batch register-job-definition --job-definition-name='wjh-bippy-2019-09-10' --type='container' --container-properties='{"image": "busybox", "vcpus": 1, "memory": 128, "command": ["sleep", "10"]}'
arn:aws:batch:us-east-1:scrubbed:job-definition/wjh-bippy-2019-09-10:1    wjh-bippy-2019-09-10    1

williamharvey@fnord $ aws batch register-job-definition --job-definition-name='wjh-bippy-2019-09-10' --type='container' --container-properties='{"image": "busybox", "vcpus": 1, "memory": 127, "command": ["sleep", "10"]}'
arn:aws:batch:us-east-1:scrubbed:job-definition/wjh-bippy-2019-09-10:2    wjh-bippy-2019-09-10    2

williamharvey@fnord $ aws batch register-job-definition --job-definition-name='wjh-bippy-2019-09-10' --type='container' --container-properties='{"image": "busybox", "vcpus": 1, "memory": 126, "command": ["sleep", "10"]}'
arn:aws:batch:us-east-1:scrubbed:job-definition/wjh-bippy-2019-09-10:3    wjh-bippy-2019-09-10    3

The comment in the unit test, "Reregistering task with the same name bumps the revision number," reflects this desired behavior.  However, the unit test only checks to make sure that the first redefinition increases the revision number to 2.
Erroneous Behavior
It turns out that moto 1.3.13, and possibly earlier versions, have a bug related to this behavior: The revision number does not seem to increase beyond 2 regardless of how many times a job is redefined.
This bug seems to have disappeared in version 1.3.14.dev.
Resolution
This PR strengthens the unit test in question so that it (1) exposes the bug if run against moto 1.3.13, and (2) confirms that the bug is no longer present in moto 1.3.14.dev.

Coverage remained the same at 93.251% when pulling 0d4d2b70415c4c2ab03ef6a35bfc8946db6f8ff2 on harveywi:wjh-fix-reregister-taskdefinition-unit-test into 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 on spulec:master.

Thanks!


addFont is not working as expected

Hi,
I try to use my pre-defined font-face within in my pdf.
The font-face is defined as the following :
@font-face {
    font-family: 'DharmaGothicE-Regular';
    src: url('../DharmaGothicE_Regular.eot')  format('eot');
    src: url('../DharmaGothicE_Regular.eot?#iefix') format('embedded-opentype'), url('../DharmaGothicE-Regular.otf')  format('truetype');
}

And I try to add with the following :
doc.addFont('DharmaGothicE-Regular', 'DharmaGothicE-Regular', 'normal');
But its not working. I would expect, that the font is getting loaded.
Do you have any hints ?

Duplicate of 115

https://github.com/MrRio/jsPDF/issues/115


cmd/cue: mod init should support versioned paths and have tests

cue mod init was added in https://cue-review.googlesource.com/c/cue/+/3866 and hasn't really been modified since.
Right now it supports the same kind of module paths we've always used, like cue mod init foo.com/bar, but it doesn't support the versioned module paths that we use with CUE_EXPERIMENT=modules, like cue mod init foo.com/bar@v0. We should fix that.
Note that the CL above said "Tests done in follow-up CL", but that never happened; we should add tests too.
While here, I also noticed that cue mod init without a module path argument succeeds, leaving cue.mod/module.cue as module: "". I can't tell if that was done on purpose, but it feels odd. What's even odder is that commands like cue eval . don't seem to mind that the current module path is empty.
cc @rogpeppe @myitcv

@myitcv mentions that cue mod init works as a default for the sake of quickly creating a local-only CUE module, being able to import dependencies. Having to do something like cue mod init test to end up with module: "test", mimicking the reserved module path prefixes like Go does, would be slightly more effort on the user's side for no huge benefit. The only real limitation of an empty module path is that packages within the module can't import each other, since they don't have fully qualified package paths.
We could also make cue mod init require a major version, like cue mod init foo.com/bar@v0, only when CUE_EXPERIMENT=modules is set, so that existing calls like cue mod init foo.com/bar do not break.
Another aspect is that if we require major versions with the modules experiment enabled, we should be careful to not require a major version for local-only modules, which right now is done via cue mod init per my first paragraph above.

@rogpeppe did this in https://review.gerrithub.io/c/cue-lang/cue/+/1176076 in January; we didn't link the commit or CL back to this issue.


Add UI snapshot testing

Once the UI is relatively stable, this makes sense.

Documentation Storybook (under 'Snapshot testing')

With https://github.com/JabRef/JabRefOnline/pull/362 we now use chromatic for visual snapshot testing


Closing the widget, then opening a new one leads to issues with annotation

When closing a classifier widget, opening a new image and then loading the first classifier for that second image, the annotation is not working as expected. It seems to overwrite some annotations with something else (e.g. set all annotations to class 1, even if another class was selected).
I wonder whether there's an issue with the first widget still being active in the background and we'd have to deal with closing it better.
In the meantime, the workaround is to close napari whenever the widget is closed. If the second image is opened in a fresh napari session, everything works as expected.

Closed by #46


Black box and no content

I'm following the README for adding a PDFTable to a document and am getting a black box at the bottom of the rendered PDF. I am rendering via a UIWebView

Started working


Don't try to run library example

It is possible to have an example, which is a library and not a binary. trying to  cargo run this example tries to execute rlib, which does not make sense at all. Instead, this should error cleanly.
Here's a reproducible example
~/tmp/hello master*
λ ls -T
drwxr-xr-x   - matklad  3 May 20:08 .
.rw-r--r--  46 matklad  3 May 20:07 ├── Cargo.lock
.rw-r--r-- 146 matklad  3 May 20:07 ├── Cargo.toml
drwxr-xr-x   - matklad  3 May 20:06 ├── examples
.rw-r--r--  33 matklad  3 May 20:06 │  └── foo.rs
drwxr-xr-x   - matklad  3 May 20:06 └── src
.rw-r--r--  95 matklad  3 May 20:06    └── lib.rs

~/tmp/hello master*
λ cat Cargo.toml
[package]
name = "hello"
version = "0.1.0"
authors = ["Aleksey Kladov<EMAIL_ADDRESS>
[[example]]
name = "foo"
crate_type = ["lib"]

~/tmp/hello master*
λ cargo run --example foo
   Compiling hello v0.1.0 (file:///home/matklad/tmp/hello)
warning: function is never used: `foo`
 --> examples/foo.rs:3:1
  |
3 | fn foo() {}
  | ^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.19 secs
     Running `target/debug/examples/libfoo.rlib`
error: could not execute process `target/debug/examples/libfoo.rlib` (never executed)

Caused by:
  Permission denied (os error 13)

I think that is_example check in the code, linked above, should be replaced with is_bin_example, and perhaps CompileFilter::target_run should be adjusted as well.
The tests for this should go to tests/testsuite/run.rs

@matklad I can take this one before I do #5426.

@matklad What should the expected behavior be when trying to execute an example library? I let TargetKind::ExampleLib(..) return false from CompileFilter::target_run but this only prevents the target from being run. Should we show a better error message here such as example target 'foo' is a library and cannot be executed.? I could (if I understand correctly) bail inside the Compile::target_run filter if trying to run an example library target, but that feels somehow wrong.
A lot of questions, but just want to get the expectations right for this one. First time I've read through the Cargo code so it's probably a lot I'm misunderstanding here. Please feel free to correct me in that case. Any input is appreciated.


Feature Request - Read Only User

It would be great to allow read only access to special users, for example, our devs could see container status/images etc., but only admins could create, start containers etc.

This will be implemented as a part of #235
You'll be able to define specific permissions for teams/users and we'll also add a "guest" account with read-only permissions.


kdsingleapplication: 1.0.0 -> 1.1.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/KDAB/KDSingleApplication/releases.
meta.description for kdsingleapplication is: KDAB's helper class for single-instance policy applications
meta.homepage for kdsingleapplication is: https://www.kdab.com/
meta.changelog for kdsingleapplication is: https://github.com/KDAB/KDSingleApplication/releases/tag/v1.1.0
Updates performed

Version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.1.0 with grep in /nix/store/nx131afymcc48x44wvq4ibs0q1sg2l74-KDSingleApplication-1.1.0
found 1.1.0 in filename of file in /nix/store/nx131afymcc48x44wvq4ibs0q1sg2l74-KDSingleApplication-1.1.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
kdsingleapplication
owncloud-client

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/nx131afymcc48x44wvq4ibs0q1sg2l74-KDSingleApplication-1.1.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A kdsingleapplication https://github.com/r-ryantm/nixpkgs/archive/7c86ba50c9bba39cd39adc5aacf9fac8b64f04bc.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/7c86ba50c9bba39cd39adc5aacf9fac8b64f04bc#kdsingleapplication

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/nx131afymcc48x44wvq4ibs0q1sg2l74-KDSingleApplication-1.1.0
ls -la /nix/store/nx131afymcc48x44wvq4ibs0q1sg2l74-KDSingleApplication-1.1.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

kdsingleapplication
owncloud-client

Maintainer pings
cc @hellwolf for testing.

The sole dependent of this package: https://github.com/owncloud/client/blob/b343f55bb05d04920b3f471a6b71bd549f725779/src/gui/CMakeLists.txt#L3 is still using 1.0.0
Will continue to watch.


ADR: NanoTDF Attribute Storage Optimization in 255-bytes

ADR: NanoTDF Attribute Storage Optimization in 255-bytes
Context and Problem Statement
We need to store attributes in the nanotdf policy header, but it has a maximum length of 255 bytes. The current attribute value in ztdf is in the form of a Fully Qualified Name (FQN) as JSON. Even removing the JSON overhead, the FQN is still too verbose to store multiple attributes within the 255-byte limit.
Example:
https://namespace.com/attr/classification/val/topsecret

The goal is to define a syntax that will compress the data to allow for efficient storage of multiple attributes within the 255-byte limit.
Considered Options

Schema-Based Syntax with Full URLs
Index-Based Syntax
Protobuf Compression

Decision Outcome
We have decided to use the Schema-Based Syntax with Full URLs. This decision was made based on the need for a federatable and customer-friendly approach that retains full attribute names and avoids using indexes.
We also considered Protobuf Compression for further optimization, however this makes ease of debugging more difficult
since the data cannot be easily read without a protobuf decoder.
Options
Option 1: Schema-Based Syntax with Full URLs
Format:
{schema}|{base_url}|{attribute}:{value,{...value}}\n{attribute}:{value,{...value}};...

Components:

Schema (schema): A digit representing the URL schema (0 for HTTP, 1 for HTTPS).
Base URL (base_url): The full namespace URL without the schema.
Attributes: {attribute}:{value} pairs separated by semicolons (;). Multiple values within an attribute are separated by commas (,).

Example:
1|namespace.com|classification:topsecret;relto:usa,gba,cda
1|ns.namespace.com|group:a

Advantages:

Retains full attribute names and base URLs, making it customer-friendly and federatable.
Clear and easy to parse structure.

Disadvantages:

Attributes starting with numbers (0 or 1) need careful handling to avoid confusion with schema indicators.
Slightly more verbose due to retaining full URLs.

Approximate Range of Attributes
Given the 255-byte limit, the number of attributes that can be stored depends on the length of the base URLs and attribute names. For estimation:

Assume average domain name (.com) length: 13 bytes
Average attribute name length: 5-15 bytes
Average value length: 1-10 bytes
Delimiters and schema indicators: 3-10 bytes

Example calculation for a single attribute set:
1|namespace.com|classification:topsecret

This example is about 40 bytes.
For multiple attributes:
1|namespace.com|classification:topsecret;relto:usa,gba,cda

This example is about 60 bytes.
For multiple attributes across multiple namespaces:
1|namespace.com|classification:topsecret;relto:usa,gba,cda
1|namespace2.com|classification:topsecret;relto:usa,gba,cda
1|namespace3.com|classification:topsecret;relto:usa,gba,cda
1|namespace4.com|classification:topsecret;relto:usa,gba,cda

This example is about 240 bytes.
Therefore, approximately 15-20 attributes of similar length can be stored within the 255-byte limit.
Example
See playground https://go.dev/play/p/M9s8QOtTn4Y
Option 2: Index-Based Syntax
Format:
{schema}|{index}|{attribute_index}:{value_index};{attribute_index}:{value_index};...

Components:

Schema (schema): A digit representing the URL schema (0 for HTTP, 1 for HTTPS).
Index (index): A numeric index representing the base URL.
Attributes: {attribute_index}:{value_index} pairs separated by semicolons (;). Multiple values within an attribute are separated by commas (,).

Example:
1|1|1:1;2:2,3,4

Advantages:

Extremely compact representation.
Potentially allows storing a higher number of attributes within the 255-byte limit.

Disadvantages:

Requires a predefined mapping of indexes to base URLs and attributes, which is not federatable.
Harder to manage and less transparent to customers.

Option 3: Protobuf Compression
Protobuf can serialize the data into a compact binary format, potentially reducing the size further than ASCII or other text-based formats.
Advantages:

Compact binary format that is efficient for storage and transmission.
Strongly typed data ensures consistency and integrity.
Supports multiple programming languages and versioning.

Disadvantages:

Requires additional tooling and setup to define and compile Protobuf schemas.
Requires additional tooling to decode and read the binary data.
May not provide significant savings over the schema-based approach for small datasets.

Protobuf Example
syntax = "proto3";

enum Schema {
  HTTP = 0;
  HTTPS = 1;
}

message Attribute {
  string name = 1;
  repeated string values = 2;
}

message AttributeSet {
  Schema schema = 1;
  string base_url = 2;
  repeated Attribute attributes = 3;
}

No concerns from my POV

Attributes are stored in Policy the max size is 2^16 -1 in NanoTDF. https://github.com/virtru/nanotdf/blob/master/spec/index.md

@sujankota according to https://github.com/virtru/nanotdf/blob/master/spec/index.md#342-policy the policy has a Maximum Length (B) of 255. Am I misreading this?

We use Embedded Policy for nanoTDF.

Encrypted policy could be upto 64kb

This work is not needed (see comments above).


Update Foscam stream for newer models

Description:
Turns out some newer models actually return rtspPort in their "port_info". This PR uses it if it's available on the newer models and falls back to mediaPort for older models. I renamed self._media_port to self._rtsp_port since it's now more accurate that way.
I managed to get a hold of a newer camera and update it to more recent firmware (though I broke the web interface in the process) so I was able to test the newer-style and older-style both existing in configuration.yaml.
Related issue (if applicable): fixes #22739
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.

I probably should have made a new branch so all those old commits would get squashed. Sorry about that.

Looks like this broke my stream in 0.91.1, it worked on 0.91.
It appears it is trying to connect on port 554?

@omriasta you can either roll back to 0.91.0 (which only uses port 88) or wait for 0.91.2. I added an rtsp_port option to the Foscam config to allow you to override the auto-discovered port. The R2 and R2C publish their rtsp port as port 554 through the API even though they use port 88 so you'll need to add that rtsp_port option and probably set it to port 88.  Here's the pull request that adds that option for more info: #22786

Thanks @cwhits I'll wait for the next update, appreciate the response!


enable on Linux all relevant functional tests marked Mac/Windows-only

Some functional tests currently marked with either MacOnly or WindowsOnly categories will also be relevant on Linux, e.g., GitCommandsTests.UpdateFileModeOnly().
We need to audit all of the MacOnly and WindowsOnly tests, as well as the MacTODO tests, and ensure we enable all of those which are relevant for the Linux platform and implementation.

I think I've worked through all of these, with the exception of those marked with comments about "partial folders".

The partial folders tests have now also been analyzed, so I think this work is done.


Fix the order of the map

Resolve #125
I wrote a custom sort implementation this scenario. I know that by the documentation it shouldn't have letters in that key, but I wanted to handle that case as well, where the map's key is a letter or non-numeric.
Benchmarks:
// Previous solution with sort.Strings(...)
//         BenchmarkOrderedMap_MarshalJSON-8         250574          4697 ns/op        1329 B/op          46 allocs/op
// New solution with custom sort algorithm
//         BenchmarkOrderedMap_MarshalJSON-8         211605          5277 ns/op        1707 B/op          53 allocs/op

I think there can be a few performance improvements especially for the strconv.ParseUint.

@PumpkinSeed, thanks for the PR! Great improvement!
There's a similar implementation in the Describe method here: https://github.com/moov-io/iso8583/blob/master/describe.go#L161
It would be great if we could use just one implementation. Should we make the type exportable?
I also appreciate the benchmark tests you've created!

What do you think of put it into the utils package?
Also I prefer the strconv.ParseUint over the strconv.Atoi, because the Atoi calls the ParseInt, and ParseInt calls the ParseUint. So there is a very small performance upgrade.
Please let me know your thoughts on it.

I'm a bit late with response. We already have sortpackage which is public.
What if we:

use alphaNumericSlice name instead of Numeric as it sorts both and it follows similar convention as IntSlice, StringSlice; keep is private but inside sort package
create sort.AlphaNumeric that will use alphaNumericSlice

@PumpkinSeed @adamdecaf thoughts?

I'll also think about how to solve the usage of panic so linter is happy.

I'm a bit late with response. We already have sortpackage which is public.
What if we:

use alphaNumericSlice name instead of Numeric as it sorts both and it follows similar convention as IntSlice, StringSlice; keep is private but inside sort package
create sort.AlphaNumeric that will use alphaNumericSlice

@PumpkinSeed @adamdecaf thoughts?

I tested it and the StringsByInt doing exactly the same what we need. So I have two proposal. In both case I can remove the Numeric struct implementation.

If we can assume that the keys never will be alphabetic rather only numeric we can use it. Based on the spec of iso8583 I can safely say that it won't be alphabetic, but please correct me if I'm wrong.

Same as above, but I can add return x[i] < x[j] instead of the panic. In this case we will have the same functionality IN THEORY. All of the tests passes. Also that will resolve the panic issue for the function.

I'm leaning towards 2nd option and not using panic at all. It looks like a breaking change, but I think it should have no impact on real integrations.

I'm leaning towards 2nd option and not using panic at all. It looks like a breaking change, but I think it should have no impact on real integrations.

I checked it and mostly it's used by tests. I will check the others and see what can happen in case of this change.

Or have something like this:
func StringsByInt(x []string) {
	sort.Slice(x, stringsByInt(x, func(i, j int) bool {
		panic("failed to sort strings by int: failed to convert string to int")
	}))
}

func StringsByIntOrString(x []string) {
	sort.Slice(x, stringsByInt(x, func(i, j int) bool {
		return x[i] < x[j]
	}))
}

func stringsByInt(x []string, fn func(i, j int) bool) func(i, j int) bool {
	return func(i, j int) bool {
		valI, err := strconv.Atoi(x[i])
		if err != nil {
			return fn(i, j)
		}
		valJ, err := strconv.Atoi(x[j])
		if err != nil {
			return fn(i, j)
		}
		return valI < valJ
	}
}

but it feels like overengineering the problem.

It is used in these places:

examples/VSDCChipData/main.go
specs/builder.go

In the specs the tagDummy struct has a sort field which used for sorting purposes. Let's say I implement the 2. option for now and we will see.

Also, there are 5 panics left in the code. What can I do with them to satisfy the linter? I would recommend the new slog package, but the users of the library wouldn't be happy if they just randomly getting logs after a package update instead of panics what they are prepared for.

You can ignore linter for now. I'll create a separate PR. I'll either ignore linter alerts for panic or rework some func/method signatures.

@PumpkinSeed here it is: https://github.com/moov-io/iso8583/issues/269. Thank your for your help!
btw, are you in Moov's Slack channel about #iso8583? If no, join https://moov-io.slack.com/archives/C014UT7C3ST
I would want to know more about how and for what you are using iso8583 :)

Thanks for the PR! The linter is from a separate improvement we're making across all of our repositories.


fix: build executables with correct release

PR summary
This PR modifies the build so that we can build the executables AFTER semrel updates the package.json file so that they will contain the correct (new) release #.
Signed-off-by: Phil Adams<EMAIL_ADDRESS>PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:

[ ] The commit message follows the Angular Commit Message Guidelines.
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
[ ] Dependencies have been updated as needed
[ ] .secrets.baseline updated as needed?

Checklist for adding a new validation rule:

[ ] Added new validation rule definition (packages/ruleset/src/rules/*.js, index.js)
[ ] If necessary, added new validation rule implementation (packages/ruleset/src/functions/*.js, updated index.js)
[ ] Added new rule to default configuration (packages/ruleset/src/ibm-oas.js)
[ ] Added tests for new rule (packages/ruleset/test/*.test.js)
[ ] Added docs for new rule (docs/ibm-cloud-rules.md)

:tada: This PR is included in version 0.44.4 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 0.96.5 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:


Update the CDC monolingual profiles to version 1.0.5

This closes #126 and cessda/cessda.cdc.versions#546.

Not easy to see what has changed since v1.0.4 of the profile.
The file header says "Change summary from v1.0.4: See https://github.com/cessda/cessda.metadata.profiles/blob/v1.0.4/CHANGELOG.md" but there is no relevant information there.

Yes, that should be a link to https://github.com/cessda/cessda.metadata.profiles/blob/v1.0.5/CHANGELOG.md instead


[2.0] Sortable middleware stack

Q
A

Branch?
2.0

Bug fix?
no

New feature?
yes

BC breaks?
no

Deprecations?
no

Tests pass?
yes

License
MIT

I realized that the middleware implementation that was merged with #487 has some problems, in particular:

the middlewares cannot be added through the client builder
the middlewares cannot be removed (not even the default ones)
the middlewares are not sortable, so newly added middlewares will always go to the end of the chain

To solve the last one this PR implements something similar to the priority feature of the processors so that any middleware can be pushed in a specific position, be it the end of the chain, the start or the middle. Also, all the other points have been addressed

I think there's a bit of duplication between the stack and the part of the client builder..

Unfortunately the same problem exists for the processors and I don't know how to solve it without extracting the registry/stack from the Client class and inject it via constructor (which would be a long way better as they can be easily mocked/replaced with a different implementation). The only downside of doing this is that the constructor would start to have many arguments, but honestly this is DI so I don't know how else it could be

The only other way around having a bloated constructor would be grouping dependencies with an intermediate dependency. But I'm not sure if we can do it with some sense...


Use a production WSGI server

In the logs for v1.0.0 of ODH I've noticed that jsp's flask app is claiming to use the built-in WSGI server, which is not meant for production use. Can we swap this out for something like gunicorn or gevent?
Happy to work on a PR for this.

This would be great, since we have no work which fixes this currently.


Add support for custom static headers

Remove properties files for version detection (rely on metadata in MANIFEST.MF instead) - greatly simplifies everything, makes things more consistent and reliable.
Split custom and library-defined static headers configuration - prevents accidental overriding of intenal gapic headers by custom headers.
Support prepending User-Agent header with custom value (the only way User-Agent can be modified).
Redesign ApiClientHeaderProvider

Codecov Report

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

@@             Coverage Diff              @@
##             master     #432      +/-   ##
============================================
+ Coverage     70.53%   70.68%   +0.14%
- Complexity      634      636       +2
============================================
  Files           136      136
  Lines          2912     2937      +25
  Branches        220      221       +1
============================================
+ Hits           2054     2076      +22
- Misses          776      780       +4
+ Partials         82       81       -1

Impacted Files
Coverage Δ
Complexity Δ

...api/gax/grpc/InstantiatingGrpcChannelProvider.java
34.78% <0%> (-0.78%)
8 <0> (ø)

...in/java/com/google/api/gax/rpc/ClientSettings.java
94.44% <100%> (+0.77%)
9 <1> (+1)
:arrow_up:

...ain/java/com/google/api/gax/rpc/ClientContext.java
93.47% <100%> (+8.47%)
8 <0> (+2)
:arrow_up:

...com/google/api/gax/grpc/GrpcHeaderInterceptor.java
76.92% <62.5%> (-8.08%)
3 <0> (ø)

.../java/com/google/api/gax/rpc/NoHeaderProvider.java
50% <0%> (-50%)
1% <0%> (-1%)

Continue to review full report at Codecov.

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

PTAL

Ping. Update on status here?

@rdayal there the second part of this change (much bigger than expected originally): https://github.com/GoogleCloudPlatform/google-cloud-java/pull/2690

@garrettjonesgoogle PTAL

@garrettjonesgoogle PTAL

PTAL


Make VertexUtils<T> public

VertexUtils<T> is already documented but to reiterate, it is a helper class that keeps track of how many vertex attributes are enabled and enables and/or disables them as needed.
It will be needed for our project vignette-project/vignette-live2d which allows the framework to render Live2D models as the framework's current way, specifically making use of VertexBatch<T> is not suitable for our needs as we directly provide vertex and indices data to OpenGL.

One can argue that we can directly use GL.EnableVertexAttribArray directly but doing so will cause the class, or specifically VertexUtils<T>.amountEnabledAttributes to be in an invalid state.
Example code of how we use the class is this:
public void Draw()
{
    if (vaoID == -1 && iboID == -1)
        Initialise();

    if (GLWrapper.BindBuffer(BufferTarget.ArrayBuffer, vaoID))
        VertexUtils<MeshVertex>.Bind();

    var vertices = new MeshVertex[Positions.Length];
    for (int i = 0; i < Positions.Length; i++)
    {
        vertices[i] = new MeshVertex
        {
            Position = Positions[i],
            TexturePosition = TexturePositions[i],
        };
    }

    GL.BufferData(BufferTarget.ArrayBuffer, (IntPtr)(Positions.Length * VertexUtils<MeshVertex>.STRIDE), vertices, BufferUsageHint.DynamicDraw);

    GLWrapper.BindBuffer(BufferTarget.ElementArrayBuffer, iboID);
    GL.DrawElements(PrimitiveType.Triangles, Indices.Length, DrawElementsType.UnsignedShort, IntPtr.Zero);
}

My only worry with this is VertexUtils is going to change as soon as VAOs are added/as soon as we adopt the opengl core profile (https://github.com/smoogipoo/osu-framework/tree/opengl-core-profile). But I suppose we can keep this around and obsolete it at that time...


apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX

Summary

apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX

Applications should not depend on any properties of nshlib
Signed-off-by: chao an<EMAIL_ADDRESS>
nshlib/nshline: move all temp line buffer to heap

Signed-off-by: chao an<EMAIL_ADDRESS>
nshlib/traceline: move traceline buffer from stack to heap

Signed-off-by: chao an<EMAIL_ADDRESS>Impact
N/A
Testing
sim/nsh ostest

[Experimental Bot, please feedback here]
No, this PR does not fully meet the NuttX requirements.  While it provides a summary of changes, it lacks crucial details.
Here's a breakdown of what's missing:

Insufficient Summary:  The summary lists what was changed but not why.  It needs to explain the rationale behind replacing CONFIG_NSH_LINELEN and moving buffers to the heap. What problem does this solve?  What are the benefits?  There's no mention of a related NuttX issue.
Missing Impact Assessment:  Simply stating "N/A" for impact is insufficient.  Even seemingly small changes can have unforeseen consequences.  The PR needs to explicitly address each impact area (user, build, hardware, documentation, security, compatibility).  For example, moving buffers to the heap could impact memory usage. This needs to be acknowledged and discussed.
Inadequate Testing Information: "sim/nsh ostest" is not enough.  The PR needs to specify the host operating system, CPU architecture, and compiler used for testing.  It also needs to specify the target architecture and board configuration used with the simulator.  Most importantly, it's missing the actual testing logs before and after the change, which are crucial for demonstrating that the changes work as intended and don't introduce regressions.

Example of how to improve the PR:
Summary:
This PR addresses potential buffer overflows and improves portability in nshlib and related applications.  Applications were depending on the internal CONFIG_NSH_LINELEN setting from nshlib, which is not ideal for modularity.  This PR replaces the use of CONFIG_NSH_LINELEN with the standard LINE_MAX define in applications. Additionally, temporary line buffers in nshlib/nshline and nshlib/traceline are moved from the stack to the heap.  This prevents potential stack overflows when processing very long lines and improves the robustness of nshlib.
Related NuttX Issue:  (If one exists, link it here)
Impact:

Impact on user: YES. Applications using CONFIG_NSH_LINELEN will need to be recompiled. This should be a straightforward change, as LINE_MAX is a standard define.
Impact on build: NO.
Impact on hardware: NO.
Impact on documentation: YES.  Documentation should be updated to reflect the removal of the CONFIG_NSH_LINELEN dependency and the change to heap-allocated buffers.  (Indicate if documentation changes are included in the PR).
Impact on security: YES. This change mitigates potential stack overflow vulnerabilities when processing long lines.
Impact on compatibility:  Potentially backwards compatible with applications that don't use extremely long lines.  However, applications directly relying on CONFIG_NSH_LINELEN will need modification.
Anything else to consider: The change to heap-allocated buffers might slightly increase heap memory usage.

Testing:

Build Host: Linux (Ubuntu 20.04), x86_64, GCC 9.4.0
Target: sim:qemu-x86_64:nsh

Testing logs before change:
(Paste actual logs here showing the problem being addressed)

Testing logs after change:
(Paste actual logs here demonstrating the correct behavior after the change)


Install without docker

Hi- I'm interested in trying this but what I plan to try it on does not allow docker. I want to use QEMU so how would I be able to get this running if this is even possible?

Docker is only part of the build process, and you do not need to build ToaruOS from source to run it. Prebuilt CD images are attached to tagged releases and also uploaded as build artifacts by CI with every push, though I do not recommend using the latest master builds. Instructions for running the CD image in various virtual machines are provided in the README.

Hi- so if I made some changes and wanted to build what do I do?

What changes do you want to make?
The build requires a cross compiler toolchain (GCC and Binutils targeted to the OS) and a number of utilities. The Docker image is a shortcut to obtaining those, and is used by the CI builders. You can attempt to install the required packages following the same steps used to build the Docker images, but it can take multiple hours to build the required tools. I no longer provide instructions for this, as the necessary packages are prone to name changes in distribution repositories so my instructions are regularly outdated even for Ubuntu, and the gcc/binutils builds are not special beyond the patches for the OS target so they're far more dependent on the host environment.
You can also fork the repository and push your changes to your own copy and Github will run the CI tasks for you.

I'll give forking a try, thanks!


ButtonBarView was transparent

I use a ViewController as MyViewController: ButtonBarPagerTabStripViewController.
When i navigate to MyViewController via self.navigationController.pushNavigation, the ButtonBarView appear but it becomes Transparent (so i can not see every tab i add to child ViewController).
Who can help me pls?

I'm facing the same issue.  @tannt275  Did you able to figure out the fix ?

Hi @tannt275
Could you provide as a picture and some code to be able to further see into the problem? I can't think of something that could lead into this problem.
Cheers,


Lint all packages

Description
Now that prettier is setup, every file can be parsed to fix all code style errors.
Proposed Changes

Linted every relevant files of all packages

Potential Breaking Changes
None
Acceptance Criteria

[x] The proposed changes are covered by unit tests
[x] The potential breaking changes are clearly identified
[x] README.md is adjusted to reflect the proposed changes (if relevant)

Codecov Report

:exclamation: No coverage uploaded for pull request base (packages-shared-prettier-config@cc1f374). Click here to learn what that means.
The diff coverage is 98.87%.

@@                        Coverage Diff                         @@
##             packages-shared-prettier-config    #1173   +/-   ##
==================================================================
  Coverage                                   ?   99.67%
==================================================================
  Files                                      ?      350
  Lines                                      ?     8852
  Branches                                   ?     2095
==================================================================
  Hits                                       ?     8823
  Misses                                     ?       29
  Partials                                   ?        0

Impacted Files
Coverage Δ

...downSearch/DropdownSearchInfiniteScrollOptions.tsx
100% <ø> (ø)

...ges/react-vapor/src/components/content/Content.tsx
100% <ø> (ø)

...por/src/components/filterBox/FilterBoxSelectors.ts
100% <ø> (ø)

...vapor/src/components/drop/hoc/DropWithDropdown.tsx
100% <ø> (ø)

...ct-vapor/src/components/banner/BannerContainer.tsx
100% <ø> (ø)

...apor/src/components/filterBox/FilterBoxReducers.ts
100% <ø> (ø)

...react-vapor/src/components/chart/ScatterSeries.tsx
100% <ø> (ø)

...por/src/components/flatSelect/FlatSelectOption.tsx
100% <ø> (ø)

...react-vapor/src/components/filterBox/FilterBox.tsx
100% <ø> (ø)

...act-vapor/src/components/flatSelect/FlatSelect.tsx
100% <ø> (ø)

... and 106 more

Continue to review full report at Codecov.

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


Aligning Nvidia DIGITS and OpenCV DNN together

I have successfully trained a model with Digits using GoogleNet. I have tried to classify some new images using the Digits GUI and it seems to work fair enough.
However, when testing the model with OpenCV DNN module [1], I get mediocre results. Therefore, I would like to have access to the script/program initiating the forward pass on digits when hitting the _classify one _button.
I am thinking that this issue could be a great opportunity to build a new functionality for people who want to train their networks on digits and run them afterwards on OpenCV.
[1] My program is based upon the following opencv sample. It support GoogleNet.

Dead link? Are you working with caffe or torch?

Link updated. The framework I use is caffe.

Caffe inference in DIGITS is done from this method. If you are willing to replicate your DIGITS results from another program that is the function you need to port. Does that answer the question?

Yes, thank you.


845 error 404 'angular' is not in the npm registry.

npm install seems to have issues on my system (linux mint 17.3)
among them:
845 error 404 'angular' is not in the npm registry.
full npm-debug.log: https://paste.ubuntu.com/23483699/
I admit I have almost no experience with nodejs but am hoping to change that soon.

I'm not exactly sure what's going on here. The @angular packages in the current version are correct. Feel free to reopen if this is happening to other people


loss of 64bit test infrastucture

@neelgala
in this commit https://github.com/riscv/riscv-compliance/commit/a0246089194b9a98dbbd61994346d0415390d0fb
youmoved the 64bit tests into wip
what did you do with the target device code? can you please also move that back to wherever it should be
for example you have removed riscv-target/riscvOVPsim/device/rv64i and rv64im directories, they should not have been deleted, but also should be be moved to wip sub dirs
pls reinstate things
so that when people want to run the 64bit tests - they just need to cp -r .. the dirs and they can use the tests.
thanks
Simon

Well @eroom1966 had approved the pull request (twice infact with the quote "I am happy for these changes" ) .. anyways... I'll do a PR for this.

@simon5656 @eroom1966 I have created a branch: revert_rv64_ovpsim on the repo.
Pulled in your old target file and updated the include files GCC_OPTS as well.
You can choose to re-order them in the fashion you prefer and make a PR once you are
done.

IS anyone looking into this? It should either get implemented or closed.

the branch already exists on repo. Simon or Lee should be able to edit it according to their needs and merge it.

Can this be closed now?

I'm going to close this unless someone tells me that this isn't working in the next week.

we should probably also get rid of the branch : revert_rv64_ovpsim if this is closed.

I actually don't remember why that branch was there; I thought had to do
more with target files.
On Tue, Apr 27, 2021 at 9:03 PM Neel Gala @.***> wrote:

we should probably also get rid of the branch : revert_rv64_ovpsim if this
is closed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/riscv/riscv-arch-test/issues/116#issuecomment-828126236,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHPXVJQNQVDHIIWL5PFXKS3TK6CKVANCNFSM4NTSC4AA
.

Yes please delete branch and close.
Simon

deleted and closed


Uncaught TypeError: source.datafn is not a function

Hi!
Trying to use alasql with react and webpack.
Alasql is installed from npm.
In webpack the alasql folder is in noparse
noParse: [/alasql/]
In the js file where I want to call alasql I use
let alasql = require('alasql');
I then try to do the simplest thing and query an array of objects
let temp = [{name: "Bob", age: 30},{name: "Alice", age: 34}];
let result = alasql("SELECT * FROM ?", [temp]);
But I get a:
Uncaught TypeError: source.datafn is not a function
Any idea why I get this?

Can you do a alasql.version ?

I can, it says 0.3.9.
Everything works now though. Since it didn't work the first time I had a brake point set to the alasql code, in chrome. When I tried different alasql queries in the chrome console I got the error above. But when I run the code normaly everything works fine. Any Idea how to get it work in the console? I do a lot of testing with the alasql calls and to run all the code over and over again just to test different queries is time consuming.

My guess is that the object is some how wrapped into a container thats not avaiable at your breakpoint?
Pleae reopen this issue if you can provide some example code for others to be able to replicate your problem.


show_lastlogin: Don't read if no database

At first login on the system, show_lastlogin logged an unwanted error message. As no login has been proceed before, no database has been yet created, and ll2_read_entry() will try to open a non-existing file. Check before reading if the database has been creating.
Add new lib function ll2_check_database().
Add tests.

Sorry, I thought I merged that already after your last changes...