TypingError while using StructRef in typed list

What is wrong in this code? Shouldn't StructRef be recognized as a numba type?

import numba as nb
from numba import njit, types, typed, float64, int64
from numba.core import types
from numba.experimental import structref

@structref.register
class VectorStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple((name, types.unliteral(typ)) for name, typ in fields)

class VectorStruct(structref.StructRefProxy):
    def __new__(cls, x, y, z):
        return structref.StructRefProxy.__new__(cls, x, y, z)

    @property
    def x(self):
        return VectorStruct_get_x(self)

    @property
    def y(self):
        return VectorStruct_get_y(self)

    @property
    def z(self):
        return VectorStruct_get_z(self)

@njit
def VectorStruct_get_x(self):
    return self.x

@njit
def VectorStruct_get_y(self):
    return self.y

@njit
def VectorStruct_get_z(self):
    return self.z

structref.define_proxy(VectorStruct, VectorStructType, ["x", "y", "z"])

lst = typed.List.empty_list(VectorStructType)

I tried also:
lst = typed.List.empty_list(VectorStruct._numba_type_)

same error..

I'm not too familliar with the StructRef or Typed List APIs, but I think you need to pass an instance of a type to the Typed List constructor, like:
vector_struct_type = VectorStructType(fields=(('x', float64), ('y', float64),
                                              ('z', float64)))

lst = typed.List.empty_list(vector_struct_type)

Does this allow you to proceed? Or do you hit another problem further down the line?

I was following the example given here https://github.com/numba/numba/blob/master/numba/tests/doc_examples/test_structref_usage.py
If you try
lst = typed.List()
lst.appned(VectorStruct(0,0,0))

appears to be working..
@gmarkall thanks, I will take a look at what you shared to see if it's working

@gmarkall vector_struct_type  works to initialize the list. Can I use it to as a constructor call, e.g vector_struct_type(0.0, 0.0, 0.0) or do I have to rely on the proxy class VectorStruct(0,0, 0.0, 0.0) to instantiate?

You will have to use the VectorStruct class to instantiate.

@gmarkall your suggestion to initialize the list works, but unfortunately I am facing a different issue now. I want to be able to initialize structures with optional types. How can I do that? In the example bellow I have the overloaded method flip which is suppose to take either None or list of polygons..
import numba as nb
from numba import njit, types, typed, float64, int64
from numba.core import types
from numba.experimental import structref
from numba.core.extending import overload_method

@structref.register
class VectorStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple((name, types.unliteral(typ)) for name, typ in fields)

class VectorStruct(structref.StructRefProxy):
    def __new__(cls, x, y, z):
        return structref.StructRefProxy.__new__(cls, x, y, z)

    @property
    def x(self):
        return VectorStruct_get_x(self)

    @property
    def y(self):
        return VectorStruct_get_y(self)

    @property
    def z(self):
        return VectorStruct_get_z(self)

@njit
def VectorStruct_get_x(self):
    return self.x

@njit
def VectorStruct_get_y(self):
    return self.y

@njit
def VectorStruct_get_z(self):
    return self.z

structref.define_proxy(VectorStruct, VectorStructType, ["x", "y", "z"])

vector_struct_type = VectorStructType(fields=(('x', float64), ('y', float64),
                                              ('z', float64)))

@structref.register
class PolygonStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple((name, types.unliteral(typ)) for name, typ in fields)

class PolygonStruct(structref.StructRefProxy):
    def __new__(cls, vertices):
        return structref.StructRefProxy.__new__(cls, vertices)

    @property
    def vertices(self):
        return PolygonStruct_get_vertices(self)

@njit
def PolygonStruct_get_vertices(self):
    return self.vertices

structref.define_proxy(PolygonStruct, PolygonStructType, ["vertices"])

@overload_method(PolygonStructType, "flip")
def PolygonStruct_flip(self):
    def impl(self):
        if self.vertices is not None:
            self.vertices[0].x = -self.vertices[0].x
    return impl

@njit
def test():
    lst = typed.List.empty_list(vector_struct_type)
    lst.append(VectorStruct(1.0, 2.0, 3.0))
    lst[0].x = 5.0

    # p = PolygonStruct(lst)
    p = PolygonStruct(None) # I want to be able to pass optional parameter here: None or list of vertices
    p.flip()
    return p

p = test()

Expect the branch pruning pass needs updating to understand structref, one workaround is:
import numba as nb
from numba import njit, types, typed, float64, int64
from numba.core import types
from numba.experimental import structref
from numba.core.extending import overload_method

@structref.register
class VectorStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple((name, types.unliteral(typ)) for name, typ in fields)

class VectorStruct(structref.StructRefProxy):
    def __new__(cls, x, y, z):
        return structref.StructRefProxy.__new__(cls, x, y, z)

    @property
    def x(self):
        return VectorStruct_get_x(self)

    @property
    def y(self):
        return VectorStruct_get_y(self)

    @property
    def z(self):
        return VectorStruct_get_z(self)

@njit
def VectorStruct_get_x(self):
    return self.x

@njit
def VectorStruct_get_y(self):
    return self.y

@njit
def VectorStruct_get_z(self):
    return self.z

structref.define_proxy(VectorStruct, VectorStructType, ["x", "y", "z"])

vector_struct_type = VectorStructType(fields=(('x', float64), ('y', float64),
                                              ('z', float64)))

@structref.register
class PolygonStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple((name, types.unliteral(typ)) for name, typ in fields)

class PolygonStruct(structref.StructRefProxy):
    def __new__(cls, vertices):
        return structref.StructRefProxy.__new__(cls, vertices)

    @property
    def vertices(self):
        return PolygonStruct_get_vertices(self)

@njit
def PolygonStruct_get_vertices(self):
    return self.vertices

structref.define_proxy(PolygonStruct, PolygonStructType, ["vertices"])

@overload_method(PolygonStructType, "flip")
def PolygonStruct_flip(self):
    # create predicate at type inference time and close over it
    is_none = isinstance(self.field_dict['vertices'], types.NoneType)
    def impl(self):
        if not is_none:
            self.vertices[0].x = -self.vertices[0].x
    return impl

@njit
def test():
    lst = typed.List.empty_list(vector_struct_type)
    lst.append(VectorStruct(1.0, 2.0, 3.0))
    lst[0].x = 5.0

    o = PolygonStruct(lst)
    o.flip()
    p = PolygonStruct(None)
    p.flip()
    return o, p

x, y = test()

print(x.vertices[0].x)
print(y.vertices)

@stuartarchibald  thanks. the example you gave works, but when I am trying to 'lazily initialze' the structure it's not working anymore
    p = PolygonStruct(None)
    p.flip()
    p.vertices = lst # lazy init
    p.flip()

I get a cannot cast error..

Oh you probably want a types.Optional, try this:
import numba as nb
from numba import njit, types, typed, float64, int64
from numba.core import types
from numba.experimental import structref
from numba.core.extending import overload_method

@structref.register
class VectorStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple((name, types.unliteral(typ)) for name, typ in fields)

class VectorStruct(structref.StructRefProxy):
    def __new__(cls, x, y, z):
        return structref.StructRefProxy.__new__(cls, x, y, z)

    @property
    def x(self):
        return VectorStruct_get_x(self)

    @property
    def y(self):
        return VectorStruct_get_y(self)

    @property
    def z(self):
        return VectorStruct_get_z(self)

@njit
def VectorStruct_get_x(self):
    return self.x

@njit
def VectorStruct_get_y(self):
    return self.y

@njit
def VectorStruct_get_z(self):
    return self.z

structref.define_proxy(VectorStruct, VectorStructType, ["x", "y", "z"])

vector_struct_type = VectorStructType(fields=(('x', float64), ('y', float64),
                                              ('z', float64)))

@structref.register
class PolygonStructType(types.StructRef):
    def preprocess_fields(self, fields):
        return tuple([('vertices', types.Optional(types.ListType(vector_struct_type))),])

class PolygonStruct(structref.StructRefProxy):
    def __new__(cls, vertices):
        return structref.StructRefProxy.__new__(cls, vertices)

    @property
    def vertices(self):
        return PolygonStruct_get_vertices(self)

@njit
def PolygonStruct_get_vertices(self):
    return self.vertices

structref.define_proxy(PolygonStruct, PolygonStructType, ["vertices"])

@overload_method(PolygonStructType, "flip")
def PolygonStruct_flip(self):
    def impl(self):
        if self.vertices is not None:
            ref = self.vertices[0]
            ref.x = -ref.x
    return impl

@njit
def test():
    lst = typed.List.empty_list(vector_struct_type)
    lst.append(VectorStruct(1.0, 2.0, 3.0))
    lst[0].x = 5.0

    p = PolygonStruct(None)
    p.flip()
    p.vertices = lst
    p.flip()
    return p

y = test()
print(y.vertices[0].x)

@stuartarchibald  It would be cool if you could use numba.optional types to instantiate directly to either None or value

@stuartarchibald It would be cool if you could use numba.optional types to instantiate directly to either None or value

I'm not sure what this means?

@stuartarchibald
something like this..
opt_type = numba.optional(types.ListType(VectorStrucType))
opt_lst = opt_type.instantiate_from_optional(None) #initialize with none or object instance
p = PolygonStruct(opt_lst)
p.flip()
p.vertices = lazy init list..
p.flip()

@stuartarchibald I didn't saw your last answer about the optional. I will try that. thanks

@stuartarchibald my proposal above will also defer type inference for the struct until the last moment, when it's being instantiated. You don't have to 'force' the optional type from preprocess_fields anymore. Of course, this is just an idea. Don't know if it's even possible..

@rpopovici, it is possible to write an intrinsic to emulate what you suggested.

@sklam thanks for the suggestion but I am total noob with numba. I am not sure if I can do it.. not yet at least

@rpopovici how would you like to proceed with this issue? We could: close it or leave it open or move it to discourse, or anything else that might be appropriate.

@esc you can move it to discourse if you wish

Closing as this is stale and further discussion has been recommended to move to discourse.


New Turtlebot 4 won't connect to wifi network and remains in AP mode

Please provide the following information:

OS: (e.g. Ubuntu 20.04) Ubuntu 20.04
ROS Distro: (e.g. Galactic) Galactic
Built from source or installed: installed
Package version: (if from repository, give version from sudo dpkg -s ros-$ROS_VERSION-turtlebot4-PACKAGE_WITH_ISSUE, if from source, give commit hash)

Expected behaviour
I followed the User Manual Basic setup https://turtlebot.github.io/turtlebot4-user-manual/setup/basic.html
Logged into the RPi with '"ssh<EMAIL_ADDRESS>Ran command "sudo wifi.sh -s 'Buffalo_D125' -p 'd125_router' -r US && sudo reboot"
Expect the RPi to connect to Buffalo_D125 router network
Actual behaviour
The RPi rebooted but remained in AP mode, the robot IP address display temporarily showed "UNKNOWN", then back to "<IP_ADDRESS>"
To Reproduce
Provide the steps to reproduce:

run something
launch something else
see the error

Other notes
I also used the printed instructions at https://turtlebot.github.io/turtlebot4-user-manual/overview/quick_start.html which no longer exists on the web but the robot still remained in AP mode. These instructions had worked for two previous Turtlebot 4s.

Hi @languyen14507,
The latest turtlebots may be shipping out with Humble. You should be able to check this by ssh'ing into the robot and running printenv ROS_DISTRO. If this is the case then please install the latest raspberry pi image for your desired ROS distro and then follow the appropriate wifi set up instructions for your ros distro.

@hilary-luo
I ssh'ed into the new turtlebot from my current PC (PC-1) and was able to verify that the new turtlebot runs ROS Humble. I decided to use another PC (PC-2), installed Ubuntu 22.04 and ROS Humble on it. When I tried to connect to Turtlebot4 wifi, it would not take the password turtlebot4. When PC-2 was running Ubuntu 20.04 and ROS Galactic, it did connect to Turtlebot4 wifi with password turtlebot4. What would be the quickest way for me to get  the new turtlebot running? I prefer to stay with ROS Humble since it's the future. Thanks.

Please install the latest humble raspberry pi image to start from scratch and follow the approriate wifi set up instructions for humble. Running the galactic instructions may have messed up the configuration and the easiest way to get started will be to restart. After you reset you should be able to connect and use the turtlebot4-setup tool to configure the wifi settings.

@hilary-luo
My PC finally connected to Turtlebot4 wifi network. I proceeded with the turtlebot4-setup tool. Entered the required SSID and password, save, apply settings, yes. However, I got an error message as shown below

@languyen14507 Did you re-image the raspberry pi just before running the turtlebot4-setup tool as requested?

@languyen14507 Have you waited to let it boot up completely and play the melody? It may take slightly longer to boot up then you are used to. Once it is completely booted up, what is the IP address that it shows on the screen?
One option is that you can just wire into the pi and run the turtlebot4_setup tool from there.

Also make sure that you unzip the image before running the script. If you didn't try it again after unzipping.

Yes, I did unzip the image, I did hear the melody but no IP address nor the Turtlebot4 wifi signal ever showed up. So I proceeded with the Recovering the Raspberry Pi process as shown in the picture below  . It shows the connection is there but ssh'ing into the RPi did not work. This happened to both the original microSD card that came with the robot and the microSD card that I used to flash the downloaded image. Note that I have used the ethernet connection to successfully recovered another Turtlebot4 before.

When you called the sd_flash.sh command did you provide it with the full path to the image including the .img extension on the name? It doesn't seem like the flash worked properly.

Yes, the image file name was turtlebot4_standard_humble_1.0.0.img, I was very careful with the details after all that happened.

The attached photos show:

The result of the bash sd_flash.sh command which shows the flash was complete without errors
Turtlebot4 with original SD card: RPi displays shows UNKNOWN IP address after powered on
Turtlebot4 with newly flashed SD card: RPi display is completely dark after powered on
I don't know what the properly powered on RPi should look like.

@languyen14507 Please only reach out with your issues through one method, in other words if you are interfacing with official Clearpath Support about an issue then please don't create a github issue for it and vice versa unless so directed. It wastes our time to be trying to support through two different routes for the same issue.
I am posting this here, even though you should be hearing from the support team, in case anyone else comes across this issue or references it in the future: You need to flash the full sd card mmcblk0, not a partition. Although the partition was flashed successfully, that is not compatible with how the turtlebot4 operates.
I am closing this ticket, if you continue to have issues getting your robot running, feel free to continue to pursue it with the support team and your open support ticket there.

@languyen14507 Thank you for the clarification. You can reopen this ticket if the issue is still persistent after re-imaging. That being said, if both robots are experiencing similar issues then it is beneficial for everyone if you pursue them both through the same venue.

@hilary.luo,Sorry for the misunderstanding. I contacted ClearPath Support for a different Turtlebot4 than the one I initiated the issue on github with. We bought a total of 3 Turtlebot 4s and only one is working. The one I contacted Support is a Galactic model and the one I initiated an issue on github is a Humble model.
                On Tuesday, August 29, 2023 at 12:40:05 PM CDT, Hilary Luo<EMAIL_ADDRESS>wrote:

@languyen14507 Please only reach out with your issues through one method, in other words if you are interfacing with official Clearpath Support about an issue then please don't create a github issue for it and vice versa unless so directed. It wastes our time to be trying to support through two different routes for the same issue.
I am posting this here, even though you should be hearing from the support team, in case anyone else comes across this issue or references it in the future: You need to flash the full sd card mmcblk0, not a partition. Although the partition was flashed successfully, that is not compatible with how the turtlebot4 operates.
I am closing this ticket, if you continue to have issues getting your robot running, feel free to continue to pursue it with the support team and your open support ticket there.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>


Unexpected behaviour with Singletons when using Configure

Hey all,
I'm facing an unexpected issue:
My main.go looks like:
package main

import(
        "foo"
	bugsnag "github.com/bugsnag/bugsnag-go"
)

func init(){
    instance := foo.Get()
    bugsnag.Configure(bugsnag.Configuration{
		APIKey:              "bar",
    })
}

func main(){
    //Code that is not executed twice
}

With foo.go:
package foo

import (
	"fmt"
	"sync"
)

type Context struct{}

var once sync.Once
var instance *Context

func Get() *Context {
	fmt.Printf("\nonce: %s\n", once)
	once.Do(func() {
		instance = &Context{}
		fmt.Printf("\ninstance: %s\n\n", instance)
	})

	return instance
}

When running this code, I get the following Code:

once: {{%!s(int32=0) %!s(uint32=0)} %!s(uint32=0)}
instance: &{}

once: {{%!s(int32=0) %!s(uint32=0)} %!s(uint32=0)}
instance: &{}

So it appears that foo.Get() is called twice. However, when I do not call Configure but instead do
bugsnag.Config.APIKey = "foo"

The instance appears only to be created once.
Regards,
Julius

Hi @juliusbachnick, I apologize for the delayed response. This behavior is a side effect of initializing Bugsnag after other parts of the application, since monitoring unhandled panics requires wrapping the process and reporting the contents of stderr. I updated the documentation to make this clearer, and explain why Bugsnag should be initialized before the rest of the application:

Initial configuration
Reporting unhandled exceptions

Hopefully this helps, feel free to reopen if you have any questions.


How to use it?

I've created a repo for my tfs-project:
git-tfs init http://tfs:8080 $/MyProject
Then on any command I'm getting errors:

git-tfs fetch
Fetching from TFS remote default
git command: Starting process: git log --no-color --pretty=medium refs/remotes/tfs/default
git stderr: fatal: ambiguous argument 'refs/remotes/tfs/default': unknown revision or path not in the working tree.
git stderr: Use '--' to separate paths from revisions
git command time: [00:00:00.0220012] log --no-color --pretty=medium refs/remotes/tfs/default
An error occurred while loading head refs/remotes/tfs/default (maybe it doesn't exist?): Sep.Git.Tfs.Core.GitCommandException: Command exited with error code.

git-tfs verify
git command: Starting process: git rev-parse --show-prefix
git command time: [00:00:00.0510029] rev-parse --show-prefix
git command: Starting process: git log --no-color --pretty=medium HEAD
git stderr: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
git stderr: Use '--' to separate paths from revisions
git command time: [00:00:00.0230013] log --no-color --pretty=medium HEAD
An error occurred while loading head HEAD (maybe it doesn't exist?): Sep.Git.Tfs.Core.GitCommandException: Command exited with error code.

git-tfs shelve test
git command: Starting process: git rev-parse --show-prefix
git command time: [00:00:00.0520030] rev-parse --show-prefix
git command: Starting process: git log --no-color --pretty=medium HEAD
git stderr: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
git stderr: Use '--' to separate paths from revisions
git command time: [00:00:00.0230013] log --no-color --pretty=medium HEAD
An error occurred while loading head HEAD (maybe it doesn't exist?): Sep.Git.Tfs.Core.GitCommandException: Command exited with error code.

and so on.
How to use tfs-git correctly? Could you provide some short tutorial.

You're using it correctly. Here is log from my machine:
idanilov@IDANILOV /d/work/1
$ git tfs init http://ws2008r2:8080/tfs $/TfsTeamProjectTest
Initialized empty Git repository in d:/work/1/.git/

idanilov@IDANILOV /d/work/1 (master)
$ git tfs fetch
C2 = 88b690e7f68bc270ea91c9a2107c32b8024cd695
C3 = 55173f0d7d0bc205a6ecf057a7e0f005ccb42b67
C4 = 722ffa323dd8e41feef253b1a6596637ad09ae8c
C5 = 41485dd543aed65eb6dd08b40a589cf01bd0819d
C6 = 2b4fe643e6cb81cbd96f627378072ba9d23b62a4

idanilov@IDANILOV /d/work/1 (master)
$ git log -1
fatal: bad default revision 'HEAD'

## it seems for some reason HEAD is not set correctly, so we need to reset it.
## Maybe it is a bug, I'll check

idanilov@IDANILOV /d/work/1 (master)
$ git reset --hard tfs/default
HEAD is now at 2b4fe64 some change yet

idanilov@IDANILOV /d/work/1 (master)
$ git log -1
commit 2b4fe643e6cb81cbd96f627378072ba9d23b62a4
Author: Administrator <WS2008R2\Administrator>
Date:   Thu Oct 13 23:08:38 2011 +0000

    some change yet

    git-tfs-id: [http://ws2008r2:8080/tfs]$/TfsTeamProjectTest;C6

## Now everything is ok

You could verify correctness of git tfs init and git tfs fetch by passing -d option, which means to show debug info.
And note please, that exception on first git tfs fetch call (about refs/remotes/tfs/default doesn't exist) is normal. It is not pretty, but it is how the things work right now. So here's what I had on first git tfs fetch -d:
idanilov@IDANILOV /d/work/1 (master)
$ git tfs fetch -d
git command: Starting process: git config --list
git command time: [00:00:11.5575000] config --list
Fetching from TFS remote default
git command: Starting process: git log --no-color --pretty=medium refs/remotes/tfs/default
git stderr: fatal: ambiguous argument 'refs/remotes/tfs/default': unknown revision or path not in the working tree.
git command time: [00:00:00.0365000] log --no-color --pretty=medium refs/remotes/tfs/default
git stderr: Use '--' to separate paths from revisions
An error occurred while loading head refs/remotes/tfs/default (maybe it doesn't exist?): Sep.Git.Tfs.Core.GitCommandException: Com
mand exited with error code.
   at Sep.Git.Tfs.Core.GitHelpers.Close(Process process) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 197
   at Sep.Git.Tfs.Core.GitHelpers.<>c__DisplayClass8.<CommandOutputPipe>b__7() in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 5
9
   at Sep.Git.Tfs.Core.GitHelpers.Time(String[] command, Action action) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 183
   at Sep.Git.Tfs.Core.GitHelpers.CommandOutputPipe(Action`1 handleOutput, String[] command) in D:\work\git-tfs\GitTfs\Core\GitHel
pers.cs:line 54
   at Sep.Git.Tfs.Core.GitRepository.GetParentTfsCommits(String head, Boolean includeStubRemotes) in D:\work\git-tfs\GitTfs\Core\G
itRepository.cs:line 244
git command: Starting process: git log --no-color --pretty=medium refs/remotes/tfs/default..HEAD
git stderr: fatal: ambiguous argument 'refs/remotes/tfs/default..HEAD': unknown revision or path not in the working tree.
git stderr: Use '--' to separate paths from revisions
git command time: [00:00:00.0350000] log --no-color --pretty=medium refs/remotes/tfs/default..HEAD
An error occurred while loading head refs/remotes/tfs/default..HEAD (maybe it doesn't exist?):
It turns out that I have another error "remote TFS repository path was not found". The reason is the fact that my tfs-project contains non-english characters.

It could be... there were a bunch of such issues recently and most of them fixed in one or another way. I'll try to see if I can reproduce this problem and write here afterwards.

Thanks!
The problem is in GitTfs\Core\GitRepository.cs#151:
while ((line = stdout.ReadLine()) != null)
{
TryParseRemoteConfigLine(line, remotes);
}
here line equals "tfs-remote.default.repository=$/╩Ёюъ.R-and-D.ReportRenderers"
stdout.Encoding is cp866 (Cyrilic)

I pushed 3aa2904. Please read comment there. In short you should have system default codepage set correctly. For now it is the limitation. If you want to implement it more robustly - there's some suggestion how to do that.
I just noticed that you mentioned 866 codepage. It is codepage using in DOS, isn't it? That's strange (I assume you have 1251 codepage as default). Could you please check what is the encoding of thing string in the .git\config file after it is written?

P.S. I checked things yet one time. I have 866 as the console default encoding as well.
So, it should work for you too. Could you check it please?

Encoding.Default is UTF8. So the code expects input stream from console as utf8. It doesn't change or encode actual data. By default encoding in all console window in Ru culture is 866. So to get it working we have to change console window's encoding. I did this:
chcp 65001
git-tfs clone http://msts:8080 $/Крок.R-and-D.ReportRenderers
The bat-file itself is in utf8.
But it doesn't work for some reason :(
I checked stdout.BaseStream.Encoding is UTF8 in GitRepository.ParseRemoteConfig. But data arrives as:
"tfs-remote.default.repository=$/����.R-and-D.ReportRenderers"
p.s. without "chcp 65001" it doesn't work either indeen

.git/config is in 1251!

chcp won't help because it seems that it has no influence on git config.
I have Encoding.Default=1251 and .git/config as 1251 as well, so it works for me (msysgit 1.7.4). What git implementation do you use?

You're right. My fault (I didn't update sources correctly actually).
I'm using GitExtensions.
So now with issuing "chcp 1215" before running git-tfs it works.
Thank you very much.

Could you check if it works without "chcp 1251" please?

No, it doesn't.
Actually it shouldn't I guess. Because changing StandardOutputEncoding doesn't change console's codepage (see http://stackoverflow.com/questions/7520706/force-standardoutputencoding-to-utf8).

Well, I guess that non-ascii characters in the name of repository is not very likely case and we have a workaround to it with chcp, so I'm happy with it. I close this issue. If you still have any problems - feel free to reopen this or create new one.
And thanks for the feedback, it is much appreciated!


Fix #68: correctly handle whitespace in multiline strings.

Previously, the library would trim all whitespace in multiline strings, even when the string was a multiline literal string. This resolves that issue, leaving all whitespace in multiline literal strings.

This patch looks good however, I am hesitant to accept it since it does break the toml test suite's multiline string test.
Could you submit a fix to that test to @BurntSushi upstream? After that, I will accept the PR.

@uiri Why does it matter if it breaks the test suite if the test suite is incorrect? I've (and you've) mentioned @BurntSushi in both posts, and there are issues opened (https://github.com/BurntSushi/toml-test/issues/18) about the problem. Further, the test suite is outdated: TOML is a v0.4 while the suite tests for v0.2. If you think the changes are correct, then why does it matter if an incorrect test suite fails?
In any case, pytoml does the right thing here, and I'm fairly certain (though I haven't tried) that these changes will pass a fork of @BurntSushi's test suite: https://github.com/avakar/toml-test/

@uiri Why does it matter if it breaks the test suite if the test suite is incorrect?

If the test suite is incorrect then it should be fixed. I rely on the test suite when I make bug fixes and add in features related to new versions of the spec. The test suite in question is also language agnostic - improving the test suite will also improve other TOML implementations. This promotes interoperability when multiple different implementations (in different languages) use the same TOML files.

Further, the test suite is outdated: TOML is a v0.4 while the suite tests for v0.2.

I do not think that the test suite is outdated. The version which it claims to support is not necessarily the latest version which it actually supports.

If you think the changes are correct, then why does it matter if an incorrect test suite fails?

For a number of different reasons all stemming from the fact that maintenance work on this library is sporadic and my memory is, to put it mildly, less than perfect. I'm sure I've accidentally reintroduced bugs due to missing tests for them in the test suite before. I want to prevent that from happening again.

In any case, pytoml does the right thing here, and I'm fairly certain (though I haven't tried) that these changes will pass a fork of @BurntSushi's test suite: https://github.com/avakar/toml-test/

The forks of the test suite maintained by @Avakar and @BurntSushi respectively have now diverged to the point that ideally I would have both of them passing until @BurntSushi merges @Avakar's tests in.

From the spec:

For writing long strings without introducing extraneous whitespace, use a "line ending backslash". When the last non-whitespace character on a line is a \, it will be trimmed along with all whitespace (including newlines) up to the next non-whitespace character or closing delimiter.

Closing as WONTFIX due to compliance with the spec.

As I mentioned in #71, that line of the spec is entirely related to the issue at hand, and as a result, to this PR.

That line of the spec is relevant to the test which this PR breaks. Looking at the test suite, it conforms to the spec.
I am happy to accept this PR if it does not break the test suite.

Oh wow, I'm really sorry about accidentally closing this.
A button in the GitHub Web UI merged the upstream master into your downstream master... which is something no one would ever want and I'm really not sure why the button to do that exists. In trying to fix it, I accidentally pushed the latest master to your repo's master instead of your previous commit to that master. That commit still exists in this repo in the pr69 branch.


Regularize diffs

I manually looked at these and they all seemed to have the same contents before and after, just reordered. I decided to include the cli/zsh-5.9/minimal.diff in the change as well, just to show an example of what it looks like if the patches are already sorted — only the timestamps have changed.

I wrote a script to run an action on each directory in the repository in order to do this, but unfortunately it got eaten by a git clean right before I submitted this. Don't have the heart to rewrite it at the moment. 😔

In other news this could almost be fully automated except that libevent unpacks to a directory that is different from the name of its upper-level directory.

I like the word regularize. Thank you for the PR!


librespot cannot play user playlists (including daily mixes)

Describe the bug
Librespot (as called via snapcast) is unable to play any user playlists. It appears that anything that would require permissions to access the private user is failing, as any publicly accessible playlists are still working correctly. Playing a track directly from an artist/album page also works with no issues. This affects my curated playlists, daily mixes, and ' Mix' playlists that spotify generates.
I have already found some workaround to this, but I feel like this is a hack which just sidesteps the actual bug. I have followed the discussion here and used the same resolution of manually remapping the domain to point to a different endpoint, which restores the functionality.
My hack/fix
Manually forcing librespot to use a different spotify endpoint resolves the issue. As per the method in the link above, my response from apresolve.spotify.com is:
{"ap_list":["ap-gae2.spotify.com:4070","ap-gae2.spotify.com:443","ap-gae2.spotify.com:80","ap-gue1.spotify.com:4070","ap-gew4.spotify.com:443","ap-guc3.spotify.com:80"]}

My librespot seems to be defaulting to use the ap-gae2.spotify.com endpoint, and according to the logs the alternative endpoint ap-gew4.spotify.com is blacklisted. However I can restore correct functionality by creating a local DNS record remapping ap-gae2 to <IP_ADDRESS>, which is the current IP address that ap-gew4.spotify.com points to.
Not sure why this endpoint blacklisted, or what blacklisting means, but redirecting my traffic to that means that my setup is working again. The non-blacklisted endpoint has been failing consistently - I can reproduce this issue every single attempt.
The other endpoints listed by apresolve don't seem to actually be available. If I remap to point to those, I get an error about connection issues and all playback fails.
To reproduce failure

Launch librespot as part of the snapclient service.
In the spotify desktop or mobile app, start playing music from a spotify created playlist, ie created by user 'Spotify', or by playing an artist/album directly.
Choose 'Connect to Device' -> device.
Spotify connects to the librespot device correctly. Playback works as expected (everything working until this point)
In the desktop/mobile app, change playback to a user playlist. The librespot device will be immediately disconnected and playback will stop.
Restart the snapcast/librespot service.
In the spotify desktop or mobile app, start playing music from a user playlist, or a daily mix, etc.
Choose 'Connect to Device' -> device. Spotify will attempt to connect but will fail.
The spotify desktop/mobile app with now show the current playing track as "Playing from playlist " but with a blank playlist name. Before trying to connect to the librespot device it would have said "Daily Mix 4" for example.

Host
I'm running librespot as part of my snapcast service in a docker container. Dockerfile is pretty basic:
FROM alpine:latest

RUN apk add --no-cache snapcast-server
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing librespot
RUN apk add --no-cache mpv

CMD ["snapserver"]

Log
Note that this is a truncated log; I'm not going to share the full details as it exposes a lot of my home network information. This is the log from the docker container (snapcast-server process), without the hack DNS fix, limited to just the librespot output. The process crashes after the last line in this log.
2022-09-13 08-30-40.358 [Info] (librespot) librespot 0.4.2 1c364e3eec (Built on 2022-07-30, Build ID:<PHONE_NUMBER>, Profile: release)
2022-09-13 08-30-42.195 [Warn] (librespot_core::apresolve) Ignoring blacklisted access point ap-gew4.spotify.com:80
2022-09-13 08-30-42.195 [Info] (librespot_core::session) Connecting to AP "ap-gae2.spotify.com:4070"
2022-09-13 08-30-42.882 [Info] (librespot_core::session) Authenticated as "uquhcy53zuk19hf72mm4sl4d6" !
2022-09-13 08-30-42.882 [Info] (librespot_playback::mixer::softmixer) Mixing with softvol and volume control: Log(60.0)
2022-09-13 08-30-42.883 [Info] (librespot_playback::convert) Converting with ditherer: tpdf
2022-09-13 08-30-42.883 [Info] (librespot_playback::audio_backend::pipe) Using StdoutSink (pipe) with format: S16
2022-09-13 08-30-42.884 [Info] (librespot_core::session) Country: "AU"

Thanks for the report. This is really strange, never heard of it before. Would you please recompile from the current dev and post the verbose logs. I don't mind at all if you anonymise it but we really need the extra log lines to understand what's happening here.
Coincidentally dev no longer blacklists that access point, so your issues may just fade away.
Still if you could be of service to also run vanilla librespot v0.4.2 with verbose logs then we could actually have a throw at analysing and fixing the issue instead of just working around it. I don't mind if you anonymise the logs at all but I really need the extra log lines or I just can't debug.

Have flushed my DNS cache and gone back to using the original endpoint - and the issue doesn't seem to be present when librespot is called as a standalone process, instead of when using snapcast's stream = ///librespot:/<etc> manner. I'm reproducing the same issue I had before using the snapcast container, but everything appears to be working fine with the following setup:
Dockerfile
Note that this is the identical version/package that I'm using in the failing setup.
FROM alpine:latest
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing librespot
RUN mkfifo /tmp/emptysink
CMD ["/usr/bin/librespot", "--verbose", "--backend", "pipe", "--device", "/tmp/emptysink"]

docker-compose.yml
version: "3"

services:
  librespot:
    container_name: librespot
    build:
      context: .
      dockerfile: Dockerfile
    network_mode: host

Logs
librespot  | [2022-09-14T05:23:31Z INFO  librespot] librespot 0.4.2 1c364e3eec (Built on 2022-07-30, Build ID:<PHONE_NUMBER>, Profile: release)
librespot  | [2022-09-14T05:23:31Z TRACE librespot] Command line argument(s):
librespot  | [2022-09-14T05:23:31Z TRACE librespot] 		verbose
librespot  | [2022-09-14T05:23:31Z TRACE librespot] 		backend "pipe"
librespot  | [2022-09-14T05:23:31Z TRACE librespot] 		device "/tmp/emptysink"
librespot  | [2022-09-14T05:23:31Z DEBUG librespot_discovery::server] Zeroconf server listening on <IP_ADDRESS>:43895
librespot  | [2022-09-14T05:23:36Z DEBUG librespot_discovery::server] POST "/" {}
librespot  | [2022-09-14T05:23:36Z WARN  librespot_core::apresolve] Ignoring blacklisted access point ap-gue1.spotify.com:4070
librespot  | [2022-09-14T05:23:36Z INFO  librespot_core::session] Connecting to AP "ap-gae2.spotify.com:4070"
librespot  | [2022-09-14T05:23:37Z INFO  librespot_core::session] Authenticated as "uquhcy53zuk19hf72mm4sl4d6" !
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_core::session] new Session[0]
librespot  | [2022-09-14T05:23:37Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_connect::spirc] new Spirc[0]
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_connect::spirc] canonical_username: uquhcy53zuk19hf72mm4sl4d6
librespot  | [2022-09-14T05:23:37Z DEBUG librespot::component] new MercuryManager
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_playback::player] new Player[0]
librespot  | [2022-09-14T05:23:37Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
librespot  | [2022-09-14T05:23:37Z INFO  librespot_playback::audio_backend::pipe] Using StdoutSink (pipe) with format: S16
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_playback::mixer::mappings] Input volume 58958 mapped to: 49.99%
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_playback::player] command=AddEventSender
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_playback::player] command=VolumeSet(58958)
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_core::session] Session[0] strong=3 weak=2
librespot  | [2022-09-14T05:23:37Z INFO  librespot_core::session] Country: "AU"
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_core::mercury] subscribed uri=hm://remote/user/uquhcy53zuk19hf72mm4sl4d6/ count=0
librespot  | [2022-09-14T05:23:37Z DEBUG librespot_connect::spirc] kMessageTypeNotify "vulcan" 314f28608ee3d8ef85db71a241a511bc5e8e713c 980674917<PHONE_NUMBER>695 kPlayStatusPlay
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_connect::spirc] kMessageTypeLoad "vulcan" 314f28608ee3d8ef85db71a241a511bc5e8e713c 980675156<PHONE_NUMBER>695 kPlayStatusPlay
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_connect::spirc] State: context_uri: "spotify:playlist:37i9dQZF1E39dznvv93rL1" index: 4 position_ms: 266559 status: kPlayStatusPlay position_measured_at:<PHONE_NUMBER>990 context_description: "" shuffle: false repeat: false playing_from_fallback: true row: 0 playing_track_index: 4 track {gid: "\371-\013\327\240xKn\270]s+\273S{\225"} track {gid: "\301\245\235\215\226\005C\'\276\342\313\\\361\266\210C"} track {gid: "\306\200#\026\r\366F\363\224lJ\230\371@L\311"} track {gid: "\310\00315J\213Oo\2631\263r\\\024\202\232"} track {gid: "\327\210x\363\237\362H\255\225\246\254\207(\225\212\202"} track {gid: "\035%{\252\371\022@\236\2307(\376\266\372\250\356"} track {gid: "|\366\326\252\343\027B\250\275\025g_fMnI"} track {gid: "\r{\252u\206{F\305\220\0003 \232\252\236\304"} track {gid: "\360\034\327[\333\304H\013\245\305\362\357J\333\365\014"} track {gid: "\274\325\266|zpB\302\224\344\177\026V6p\352"} track {gid: "\362\244\036\205\335\024B\221\273\372\373\027BH\251\014"} track {gid: "g\335\004\372\035\264N\240\243q?\227\310\352\271\334"} track {gid: "\037\317\256\346\243\226L\007\231SgQ\272\302X\306"} track {gid: "\006oo\270\347k@.\251J\033m\321:\300E"} track {gid: "\365\2614\213\251\237L;\274\tMnH\347\202\026"} track {gid: "\270\322M~\\\300A\313\271@\215\372y<\313\'"} track {gid: "\014\313\334\336\205\215K\t\225\217\323I\010l!s"} track {gid: "\332\021\236\027U\300M!\237v+(\373MGF"} track {gid: "6\316\363\000\013\274I\324\277\004\030}\264}\347\014"} track {gid: "\275}\306#\214;I\001\230\272b\305\233\243`\377"} track {gid: "\025W!\014\240\223Ac\235K\357\332\337\036\215F"} track {gid: "T6\321\010\351\264L\320\2009v\374q&\030\033"} track {gid: "\362\340S \'\366J\274\273\353\206bVW\030 "} track {gid: "\361]\345\335*\302Hg\274\371\352\364\2741\263\330"} track {gid: "\256p\225\350\322~@\361\247\323\200\336Q+\204P"} track {gid: "+\313\262\034I\177B\265\250\270\216d\026\220\260\223"} track {gid: "\005b\320\210C)Ff\251\312`\201\367 \007\327"} track {gid: "Z\000\314\266\332\377B\025\216\312\344}\247\027\244\253"} track {gid: "hIT\224^\255A\006\266A\322\024Tz\037\211"} track {gid: "\274\017\361\347\352\340L\351\2169\205\351\322kK\006"} track {gid: "\321\265\302\013k\020F\301\236d\311\036\273/\334>"} track {gid: "\265ci\376\271HM\240\275o\250\0003j\025\262"} track {gid: "\001\000\013\020\037\320O9\275Sp\322Nf\227\010"} track {gid: "6\3138\236\242mHC\2453\217\226\3218\232\001"} track {gid: "1\302\251P\352\227Ip\261\270j\357\350\026\366\035"} track {gid: "\204]\004\013x\323KX\256\366\313J8.\221H"} track {gid: "\351_PzLEG\351\212\320#\363k\027\221\330"} track {gid: "\244\260i$\274LD~\273\343\376\243GZ\323\263"} track {gid: "^\371]Y;\276LI\244d\303\277\177{\021\372"} track {gid: "\206iqd\226\016K\365\267)\302~\345\257\016\033"} track {gid: "`aQ.\353mK\205\223n\353\243U\202$]"} track {gid: "\n\202+ HfBJ\200\\\222\331\253\016 L"} track {gid: "bm\376\241\250sM\222\2147\215\227\177?\027\305"} track {gid: "\253\202^\006\036\026L\210\245L#*\2321M\274"} track {gid: "\025\231K\232\3610H\037\273c\245\034\370\245q\350"} track {gid: "[\035\010\206\343\237Ie\216\234c\331\274\377\375p"} track {gid: "\307^h\014;c@\010\217\247\000\237\305\321\025p"} track {gid: "<q\242\033Q-D,\222\026\307c>\371\256\272"} track {gid: "p\225\231\206\002XNR\232{)D\004!|\250"} track {gid: "\014P\204\014\330IL$\250\337\240d\241k\243\303"}
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_connect::spirc] Frame has 50 tracks
librespot  | [2022-09-14T05:23:38Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay]
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_playback::player] command=SetAutoNormaliseAsAlbum(false)
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_playback::player] command=Load(SpotifyId { id:<PHONE_NUMBER>57614598220881167970395851394, audio_type: Track }, true, 266559)
librespot  | [2022-09-14T05:23:38Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay]
librespot  | [2022-09-14T05:23:38Z INFO  librespot_playback::player] Loading <I Don't Do Drugs, I Just Sweat a Lot> with Spotify URI <spotify:track:6yHIxvq0z3KIQevkjaTf10>
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_audio::fetch] Downloading file 9b4cc8b5cbae8d60429d3d43db99a8670af561dc
librespot  | [2022-09-14T05:23:38Z DEBUG librespot::component] new ChannelManager
librespot  | [2022-09-14T05:23:38Z DEBUG librespot::component] new AudioKeyManager
librespot  | [2022-09-14T05:23:38Z DEBUG librespot_connect::spirc] kMessageTypeNotify "vulcan" 314f28608ee3d8ef85db71a241a511bc5e8e713c 980675675<PHONE_NUMBER>453 kPlayStatusStop
librespot  | [2022-09-14T05:23:40Z INFO  librespot_playback::player] <I Don't Do Drugs, I Just Sweat a Lot> (371280 ms) loaded
librespot  | [2022-09-14T05:23:40Z TRACE librespot_playback::player] == Starting sink ==

I've tried and it doesn't look like I can pass through the --verbose flag to librespot when called by snapcast easily. Looks like from now on I'll be running librespot in a separate container and piping the audio into snapcast that way. For any future readers: my hack fix ended up not being a good solution, the alternate endpoint worked for some playlists/tracks but failed again on others.
If you don't mind, could you explain the meaning/reason behind blacklisting an access point? I'm curious why ap-gae2 would have been blacklisted in the first place.

Gew4 was blacklisted as per the first log. Gew2 shouldn't have been. It's because it was found to be broken for some users. See https://github.com/librespot-org/librespot/pull/1026

And Gae1 is also blacklisted as per https://github.com/librespot-org/librespot/commit/87ea69b4573f1ec9205dbab29d997916e7218fc0, I missed that one. Gae2 is not blacklisted, assuming that's just your typo in the above comment.

Yep that was a typo, I meant ap-gew4. Thanks for the commit link.
I'll close this then, seems its not actually an issue with librespot but something do with snapcast + librespot.

I think more likely something related to the container rather than using with snapcast, snapcast just runs the binary with a few options that should have not effect on this. Containers are always the problem!


create APP

URL
https://dotnet.microsoft.com/zh-cn/learn/dotnet/hello-world-tutorial/create
Operating system
windows
More information about your system
X64
Description
During step 6 of creating the application, there was a problem naming the item MyConsoleApp in the command panel
dotnet --info

It seems that the .NET SDK installation was unsuccessful on the previous step.
How are you trying to install the .NET SDK? Have you tried changing the timeout value?


BitDropDown pop-up hegiht

The consumer must be able to set heigh for BitDropDown pop-up and it must be scrollable

The consumer can easily customize the style of the drop-down callout and change the value of the height, overflow, or any other CSS properties of it.
@msynk what do you think?


Dropdown menus disappear immediately when combined with text fields

On Android,  when you have a DropdownButton on the same page as a TextFormField, and tap the dropdown when the text field has focus, then tapping the dropdown button will cause the dropdown to appear, a metrics change to occur (because the keyboard went away when the text field lost focus), and the dropdown disappears immediately, since the dropdown is coded to disappear with a metrics change, making it impossible to make a selection.  Popup menus don't have this issue.
In order to combine properly with text fields, we need to figure out how to prevent them from losing the keyboard when they lose focus, so that the keyboard doesn't bounce up and down, which will fix this problem.  And perhaps dropdowns shouldn't go away with a metrics change, but there may be other reasons for that.
Example code that shows this:
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String value = 'foo';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Material(
        child: Padding(
          padding: EdgeInsets.symmetric(vertical: 100.0, horizontal: 10.0),
            child: Column(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                TextFormField(
                  decoration: InputDecoration(border: OutlineInputBorder()),
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  mainAxisSize: MainAxisSize.min,
                  children: <Widget>[
                    DropdownButton(
                      value: value,
                      items: [
                        DropdownMenuItem(
                          value: 'foo',
                          child: Text('Foo'),
                        ),
                        DropdownMenuItem(
                          value: 'bar',
                          child: Text('Bar'),
                        ),
                        DropdownMenuItem(
                          value: 'baz',
                          child: Text('Baz'),
                        ),
                      ],
                      onChanged: (String value) {
                        setState(() {
                          this.value = value;
                        });
                      },
                    ),
                  ],
                ),
              ],
            ),
        ),
      ),
    );
  }
}

Focus the text field and try and select something from the dropdown.

cc @HansMuller, who has worked on DropdownButton recently.

Linking #41574 to this as well for reference

@gspencergoog , Dropdown is coded to disappear on orientation change actually and there's no better way to detect orientation change in Flutter currently other than listening to metrics change.

What about using MediaQuery?

@ThinkDigitalSoftware orientation provided by MediaQuery is also based on onMetricsChanged. It won't detect native orientation of device.

I think the right fix is to do what native Android does: don't drop the keyboard when a text field loses focus to another control.
Much easier said than done, of course. This basically means adding another kind of "focus", since Android allows you to keep typing on the keyboard. As soon as you do, it closes the popup menu and adds the text to the field, so the text field never really lost focus as far as the user (or the field highlight) is concerned. In order for keyboard focus traversal to work, though, the popup items need to be able to take the focus so that hitting tab moves the focus, and enter commits the value for the popup, all without changing the text field, so it's...complicated.
Hans and I will discuss this today and come up with some kind of plan.

Appreciate it!

So I had to downgrade to the stable channel for a different reason and I replaced the material/dropdown.dart from stable with the one @sarbagyastha edited and the dropdown works perfectly (for me at least) I'm happy with its functionality. Even though it may up functioning differently when you guys are done. Tapping a DropdownButton dismisses the keyboard AND brings up the dropdown menu in a single tap. When the dropdown is dismissed, nothing else happens. The previous TextEditingField is not refocused and the keyboard does not come up.

So, after discussing this with @HansMuller, we decided that the following is what needs to happen:
There are two cases: one where a hardware keyboard is present, and one where it isn't.
Hardware Keyboard Present
When a hardware keyboard is present, the _DropdownRoute needs to take the focus when pushed, so that keyboard navigation works (which can only happen from a hardware keyboard anyhow). This is basically what the code does now.
Hardware Keyboard Not Present (Software Keyboard)
When a hardware keyboard isn't present, then the _DropdownRoute doesn't take the focus when it is pushed, the text field keeps the focus, and the keyboard stays up, so as not to cause a metrics change.  In addition, if a key is pressed on the software keyboard (a.k.a. an editing event occurs), then the dropdown will dismiss itself, and the text field will handle the event as normal. Also, the text field will need to decide to not blink its cursor if there it is not on the top route, so that it stops blinking when the dropdown is visible, but it doesn't lose its focus highlight.
To determine if the _DropdownRoute should take the focus, we'll use the existence of non-zero MediaQueryData.viewInsets as a proxy for whether the keyboard is visible or not, which we use in other places.
This should allow things to work for both the hardware keyboard/desktop case, and for the Android/iOS keyboard case.
Work Needed
The work needed to get this fixed is to:

[ ] Wire up a notification for text  connection editing events to the dropdown menu so it can dismiss itself if the keyboard is showing and one happens.
[ ]  Modify the text field to not blink the cursor if another route is on top of it.
[ ]  Modify the _DropdownRoute to predicate requesting focus for its FocusScope on whether or not viewInsets is non-zero.

Exactly my pain


Support multiple versions for the tool

To enable faster release time, we want to support task versions.  The versions will correspond to the major number of the tag used to build that version.  For example, terraformCli@0 will correspond to the latest tag that starts with 0.  The version which is higher than the highest tag major number will be where the latest, unstable version install goes (e.g. terraformCli@2 will be the latest PR if the highest tag is 1.*)

Added in #392


Wrong const declaration

You can't declare const like this
const string[] scopeRequiredByApi = new string[] { "access_as_user" };
It gives error code:

Severity
Code
Description

Error
CS0133
The expression being assigned to 'ProjectsController.scopeRequiredByApi ' must be constant

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

ID: 14524e2e-a5c6-ef53-0643-879b63b6a9f4
Version Independent ID: 5b3eb1d5-300e-6e03-9e3d-9abd530b7239
Content: Verify scopes and app roles protected web API - Microsoft identity platform
Content Source: articles/active-directory/develop/scenario-protected-web-api-verification-scope-app-roles.md
Service: active-directory
Sub-service: develop
GitHub Login: @jmprieur
Microsoft Alias: jmprieur

@Gadziu1 Thanks for the feedback. We will engage the content development team for further investigation, they will verify and perform necessary changes in the document as needed.


Debugging cpp program throws exception on combase.dll

Issue Type: Bug
I have a project which I'm using CMake and Visual Studio 2017 to build successfully from vscode (Visual Studio 15 2017 Win64 host=x64). However, I'm unable to debug it from vscode due to an Access violation in a combase.dll.
I am able to debug the same executable generated from the build with VS 2017 by calling devenv path/program.exe from a terminal.
Here is the debug console output:
Loaded 'D:\Work\3.PD\2.program\1.cpp\bin\Debug\main.exe'. Symbols loaded. Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\msvcp140.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\vcruntime140.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\tmumh\20019\AddOn\<IP_ADDRESS>9\TmUmEvt64.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\psapi.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\gdi32full.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\msvcp_win.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file. Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file. Exception thrown at 0x00007FFDF596448E (combase.dll) in MdaMeX.exe: 0xC0000005: Access violation reading location 0x0000000000000008.
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:45:59.656Z)
OS version: Windows_NT x64 10.0.17763

System Info

Item
Value

CPUs
Intel(R) Xeon(R) Gold 6244 CPU @ 3.60GHz (32 x 3592)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_offsurface_control: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
255.70GB (244.76GB free)

Process Argv
D:\Work\3.PD\2.program\1.cpp

Screen Reader
no

VM
0%

Extensions (8)

Extension
Author (truncated)
Version

Bookmarks
ale
11.0.0

extended-cursormove
Bil
0.0.2

latex-workshop
Jam
8.7.2

linter-gfortran
krv
2.1.1

python
ms-
2020.2.63990

cpptools
ms-
0.26.3

cmake
twx
0.0.17

vscodeintellicode
Vis
1.2.5

Please file against the C++ extension. Thank you
https://github.com/microsoft/vscode-cpptools


[FLINK-36399][table] Fix incorrect cast behavior.

What is the purpose of the change
Fix incorrect cast behavior.
Verifying this change
This change is already covered by existing tests
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

hi @davidradl will you look it again?


Arya23499/release 0.14 main

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 4 committers have signed the CLA.:white_check_mark: arya-harness:x: akhilcheruvalat:x: bot2-harness:x: bot-harnessYou have signed the CLA already but the status is still pending? Let us recheck it.


Fixed Broken Demo Directory

I updated the demo directory to mirror the latest updates to the source code by @yhnavein with PR #28
It works out of the box:

cd into demo/
start server (server in Terminal)
localhost:8000 will display angular-tour demo out of the box

CC: @booleanbetrayal @DaftMonk

Thanks @nicolairobles !


writeAVToFile doesn't work

I call writeAVToFile, but it always print false. I wonder know why. Thanks
let uploadVideoName = "video-test.mov"
let documents = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as! String
let writePath = documents.stringByAppendingString("/video-test.mov")
asset.writeAVToFile(writePath, presetName: "uploadVideoName", completeBlock: { (success) in                          print(success)
})

presetName should be [AVAssetExportPresetLowQuality,AVAssetExportPresetMediumQuality,
AVAssetExportPresetHighestQuality,AVAssetExportPreset640x480,AVAssetExportPreset960x540,AVAssetExportPreset1280x720,AVAssetExportPreset1920x1080]

🍺


[ci]Fix precheck getting commit id in the fallback

Summary of the Pull Request
CI is currently failing the precheck on main:

This is because on push, there's no system.pullRequest.
Use Build.SourceVersion from https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services , since there's no PR.

Tested this change by pushing the same commit to another branch, so CI ran as part of a push instead of PR: https://github.com/microsoft/PowerToys/runs/18675756050
The pre-check passes.

Triggered CI manually against a bogus commit on top of this change and it passes Precheck: https://github.com/microsoft/PowerToys/runs/18675925034


SUP-1043 Change default provider settings to match new pipeline

When creating a new pipeline in the UI, these settings default to on. We should have the terraform provider do the same thing.
The specific settings are:

And that maps to the build_pull_requests, skip_pull_request_builds_for_existing_commits, build_branches, publish_commit_status.
PR checklist:

[x] docs/ updated
[x] tests added
[x] an example added to examples/ (useful to demo new field/resource)

I don't think we need to call it out in the docs. But mention it in the changelog when this is released at least


Syncing latest changes from upstream master for rook

PR containing the latest commits from upstream master branch

Let's hold this until https://github.com/rook/rook/issues/14208 fixed


PCP: Improve the API about region information

PCP issue

difficult: Easy
score: 50
min score required: 0
recommended skills: GO

Description
Now, TiDB uses some PD API to discover the status of the cluster, Such as the write/read information of the table. we can do some improvements on the API. and a region result as follows now:
{
  "id": 2,
  "start_key": "7480000000000000FFAF5F728000000039FFC4D7830000000000FA",
  "end_key": "",
  "epoch": {
    "conf_ver": 4571,
    "version": 8348
  },
  "peers": [
    {
      "id": 668213,
      "store_id": 7
    },
    {
      "id": 668234,
      "store_id": 11
    },
    {
      "id": 668909,
      "store_id": 1
    }
  ],
  "leader": {
    "id": 668213,
    "store_id": 7
  },
  "written_bytes": 918769,
  "approximate_size": 197,
  "approximate_keys": 714305
}

There are some points :

aprroximate_size: should specify the unit: MB
written_bytes/read_bytes: use a weighted moving average method to smooth history changed.

@nolouch
About point 2:

written_bytes/read_bytes: use a weighted moving average method to smooth history changed.
means ?

add a field "written_bytes/read_bytes" at region info;
store some history value of  "written_bytes/read_bytes" to smooth history change.
any misunderstanding?

@qinggniq Sorry for the late reply.  I'm going to close this because this API now used to many places, and may affect other components. I have fired a new one to replace this, you can check #1920 #1964


Create a NuGet package for PAPI interfaces

Create a NuGet package for PAPI interfaces. This should be created under a new organization called Platform.Bible. Ultimately, we'll want to be able to sign it using the official organization set up to own Platform.Bible. For now, we can build and upload it it manually and maybe self-sign? The project for this can be part of the paranext-core repo.

Note that I created PR #573 to merge the code additions into main, but it currently doesn't pass/build, so as part of this task, that also needs to be figured out.


React Native Authentication (OIDC) SDK for IS & Samples

Problem description
As of now, Identity Server doesn't have any client-side tools like SDKs or official guides on how to integrate react native application with IS.
Having official SDKs, samples and guides will make the developer experience more convenient. This will help the app developer to avoid spending time on.

Selecting and applying best practices on different authentication protocols
Selecting correct libraries to implement
Make that client-side implementation to integrated with IS

Preferred Solution
Have React Native SDK, sample, and needed guides to integrate the application with Identity Server.
Effort FE::119
Tasks

[ ] React Native Authentication (OIDC) SDK Development

[ ] Developer Documentation for React Native SDK

[ ] Sample App Development & Demonstration

[ ] Testing with using React Native Testing Library

Closing the issue as this repo is no longer maintained.


bug: Firefox Window Zoom Window 80%

Affected Packages

[ ] @yeger/eslint-config
[X] @yeger/vue-masonry-wall
[ ] @yeger/vue2-masonry-wall
[ ] vecti

Description
@yeger/vue-masonry-wall seems not working on a zoomed window 80%
Reproduction
Zoom at 80%
Additional context
No response
Preferences

[ ] I want to be assigned to and work on this issue myself

Please create a minimal reproduction.

Please see https://antfu.me/posts/why-reproductions-are-required#reproducible-projects-or-playgrounds on how to create a minimum reproduction. Based on your code snippet, I assume this issue is not related to the window zoom at all, check https://github.com/DerYeger/yeger/tree/main/packages/vue-masonry-wall#limitations.


When I use more than 1 gpu, what is the number of the iterations?

I use the IterbasedRunner with 2 gpus to train my models. Each gpu constains 2 images. When I run one iter, it means in this iter the model train with 4 images or only 2 images?

4 images


Ajv 6.2.0 not available on cdnjs

CDNJS is returning a 404 on https://cdnjs.cloudflare.com/ajax/libs/ajv/6.2.0/ajv.min.js

There may have been some delay, cdnjs picks up npm updates automatically.


Refactor rbx_binary further

Based on @Kampfkarren's work in #30, trying to further these ideas to refactor the core of rbx_binary.

I think I'd like to break this apart into smaller, more digestable changes.

This has drifted waaay too far behind master in code and in vision I think.


CopyBinaries target does not support web application projects

The CopyBinaries target was introduced in pull request #116 and copies all data from each project's bin/Release/ folder into the bin folder.
A web application project does only have a bin/ folder, whatever configuration (Debug; Release) is used. So as soon as you add a web application project to your solution this task fails because it cannot find the bin/Release folder. It should use the bin/folder instead.
//cc @Vidarls

Is this is just a different convention for the default output path of the project, or is it something more hardwired, IE not possible to change in project->properties->build->output path?
Pre CopyBinaries, each new project had to manually set the output path to [project root]/bin
The goal of copy binaries is to allow easy adding of new projects without having to worry about output path settings.
In order to fix this we have to either:

Remove any inference and require manually setting output path of projects
Somehow infer / read / parse /do-magic to figure out the configured output path of projects and copy from there (I believe Paket does some magic like that during packing of project templates..)

Hi,
you new solution is top. But a WebApplication has this as default and also need this setting; otherwise it's not abel to load its binaries on startup.
Maybe you can check on your loop method if bin/Releaseexists; otherwise try bin/and if both do not exist -> ignore this project.

Well, but using the project's output path from Release configuration would be better ;)

Would be cool to have the output detection in the ProjectFile helper or something?
But: I have expended my Yak shaving quota for some time now, which mean I have no idea when I might get the chance to have a go at this


Azure cluster setup

Implement neonKUBE setup for Azure:

[ ] Provision
[ ] Prepare
[ ] Setup

Let's start by how we'll think about Azure before writing a bit of a specification.  Here are some good links to get started with:
https://docs.microsoft.com/en-us/azure/availability-zones/az-overview
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/scheduled-events
https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview
Availability
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
Azure provides mechanisms for deploying multiple VMs such that the chance that all of them becoming unavailable at the same time will (hopefully) be rare.  VM availability can be impacted by local hardware failures in the physical rack hosting the VM, a failure of an Azure availability zone, a hardware failure of the machine hosting the VM, or a software update required by the hosting machine.
Production neonKUBE clusters will generally deploy 3 Kubernetes manager nodes.  These nodes coordinate to form a highly reliable source of truth for the expected state of of the services and pods running on the cluster.  Managers rely on a RAFT style leader election mechanism combined with mechanisms for reliably replicating state across the managers.  RAFT requires a majority of the managers (2 out of 3 in this case) to be available for the cluster to operate properly.  This means that cluster deployment must take care to ensure that only one manager at a time is at risk of failing or being updated and rebooted.
Most neonKUBE operators will also need this sort of resilience.  For example, they may wish to deploy multiple web servers such that some will always be available in the face of failures or the may also be deploying a multi-node database cluster such that data is replicated to prevent a single source of failure.
Azure has several related concepts:

Region: A collection of datacenters sited close together with dedicated low-latency networking.  Each datacenter is equipped with isolated power, cooling, and networking.

Availablity Zone: A unique set of one or more datacenters in a region where customer resources can be hosted such that they can be isolated from failures of other availability zones in the region.

placement policy

Here's another link discussing the MSFT Partner Program.  We'd need to do this to publish VM images.
https://docs.microsoft.com/en-us/azure/marketplace/marketplace-faq-publisher-guide

For neonHIVE, I created a long list of Azure VM types describing their CPUs, RAM, and NIC/drive capacities (which I'm sure is very out of date by now).  One of the goals for cluster setup is that we want to detect any problems with the cluster configuration early in the setup process; we don't want the customer to go well into cluster setup only to find that a VM type doesn't have enough RAM or something.
One problem with this list of instance types was that it assumed that all instance types are available in all Azure datacenters and this isn't true.  It's very common for MSFT to roll out new instance types to DCs over time and perhaps retire them in the same way.
I took a look at how OpenShift does this on Azure:
https://azure.microsoft.com/en-us/pricing/details/openshift/
This is very interesting.  OpenShift has a list of instance types operators can select from.  This includes just one rather beefy type for manager nodes: D8sv3 8 core 32GiB RAM at $0.44/hr or $316/mo.  OpenShift does not add additional fees for manager nodes (like we're thinking).  The crazy thing is that they claim a worker node this big can still handle only 100 worker nodes in the cluster.  We're going to have to do some capacity testing to understand these limits better.
For worker nodes, OpenShift charges by hour on a sliding scale based on the capability of the instance type:

The costs are pretty outrageous:

So the smallest reasonable cluster will cost $5.4K/mo or $3.8K/mo with reserved instances.

That really leaves a lot of pricing room for neonCLOUD (BTW: I already own neoncloud.io) for just this purpose.

Implemented for v2.2.0


Scale factor defined in fig.yml

The scale command is very useful to define a unique docker entry in the fig.yml and scale the number of containers in execution time, but I can't found any way to increase the default number of containers at initial start. There is any way to define it in the fig.yml?
Something like:
node:
    build: node
    scale: 3

If not exist, I think it could be a nice feature.

See #116, #630


Add flag to skip modal requirements for Image.from_registry

Describe your changes

Provide Linear issue reference (e.g. MOD-1234) if available.

 Backward/forward compatibility checks

Check these boxes or delete any item (or this section) if not relevant for this PR.

[ ] Client+Server: this change is compatible with old servers
[ ] Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.

Changelog

What about add_modal_dependencies? Fits better with add_python and avoids an awkward double-negative.
Should this go in from_dockerfile too?


user.api is not part of the cn-prefix by default, should it be?

Context - https://gigantic.slack.com/archives/C1R9481LZ/p1663682577825429

closing


Add banner for security update

Review HTML:

toolkit: https://nvidia.github.io/cloud-native-docs/review/pr-110/container-toolkit/latest/index.html
gpu-op: https://nvidia.github.io/cloud-native-docs/review/pr-110/gpu-operator/latest/index.html
ocp: https://nvidia.github.io/cloud-native-docs/review/pr-110/openshift/latest/index.html

My only uncertainty is how this banner might interact with a "version selector" warning when someone selects an older version of the docs.
@francisguillier, @cdesiniotis, @elezar, PTAL.

@mikemckiernan can we add the reference to this link in the message? https://nvidia.custhelp.com/app/answers/detail/a_id/5582

Updated.  I used the bulletin heading as the link text.  PLMK any more suggs.  TY!

all good for me.
thanks Mike!


feat(openapi-fetch): add onError handler to middleware

Changes
This PR adds an optional onError handler to the middleware feature. It allows handling errors thrown by fetch in three ways:

return nothing which means that the error will still be thrown, but useful for logging,

  client.use({
    onError({ error }) {
      console.error(error);
      return;
    },
  });

return another instance of Error to be thrown instead,

  client.use({
    onError({ error }) {
      return new Error("Oops", { cause: error });
    },
  });

or return a new instance of Response which means that the fetch call will proceed as successful.

  client.use({
    onError({ error }) {
      return Response.json({ message: 'nothing to see' });
    },
  });

How to Review
See additional tests in packages/openapi-fetch/test/middleware/middleware.test.ts
If multiple middlewares with onError are configured, they are executed in reverse order like onResponse. I'm not sure if that's intuitive or not. 🤔
Checklist

[X] Unit tests updated
[-] docs/ updated (if necessary) 👈 I'll amend the commit with docs if this feature request is accepted
[-] pnpm run update:examples run (only applicable for openapi-typescript)

Before middleware was added to openapi-fetch, I created a wrapper for fetch to log requests, responses and failed requests (e.g. network errors, etc.). When migrating to the middleware approach, I wasn't able to implement logging for failed requests which is why I added that feature in this PR.
I could of course keep my fetch wrapper for handling failed requests, but that would spread the logging logic across two places.

I updated the docs. Feel free to make suggestions if something is missing or could be explained better somehow.
Just to be sure: since this is a new feature, shouldn't it be a minor changeset instead of a patch?

I updated the docs. Feel free to make suggestions if something is missing or could be explained better somehow (or weird phrasing as I'm not a native speaker 😄).
Just to be sure: since this is a new feature, shouldn't it be a minor changeset instead of a patch?

Thanks so much! This all looks great. But yes this should be a patch changeset ONLY because it’s 0.x. You’re correct—1.0.0 and greater, this would be a minor. But before 1.0.0, we reserve minor versions for breaking changes (many other libraries do it as a convention). So patches get bugfixes AND features.
Once this has a patch changeset added, happy to approve and merge 🙂

Is it really necessary to reinvent try...catch? Why return X sometimes behaves like return X but other times like throw X? Is it still JavaScript or a totally different language?

@zsugabubus I’m not sure what you’re asking. If you have a feature request or bug to report, please open an issue using the appropriate template


Rule scope specification

I'm trying to integrate WAF into Kong gateway. I came across Coraza and you custom plugin. Since there any documentation of your plugin, I'm assuming that your Go plugin is reading SecLang rules using K8S api. I'm having the hard time to understand this, since it's a Kong plugin should your plugin reading SecLang rule directly from Kong so that users can config and apply its to there own need ?

I'm trying to integrate WAF into Kong gateway. I came across Coraza and you custom plugin. Since there any documentation of your plugin, I'm assuming that your Go plugin is reading SecLang rules using K8S api. I'm having the hard time to understand this, since it's a Kong plugin should your plugin reading SecLang rule directly from Kong so that users can config and apply its to there own need ?

I have just started it. Yes, you are right. Also, It's possible to use adapters. I have needed the WAF for a multi-tenant environment, This is the reason I've used Kubernetes CRD(s) as the rule storage.

Thanks for the promptly response, I'm definitely going develop a plugin to read SecLang rules using Kong admin apis base on your plugin. Thanks for the idea !

we can develop it as an adapter here.


Update logo in header when a new logo is uploaded

Coverage increased (+1.0%) to 11.532% when pulling f3d9f190e552dc8f885eb4d0be5e68b0cd82d5ec on pierredup:logo into 114e1a899bc195ad362afb807288fb70477aa60a on CSBill:master.

Coverage remained the same at 10.552% when pulling 2d74e3bb9468d902edd0315e935cf3985e39a8f9 on pierredup:logo into 114e1a899bc195ad362afb807288fb70477aa60a on CSBill:master.


haproxy-ingress, metalb: set <IP_ADDRESS> as private ingress

To prepare for ingress that will be exposed publicly, mark <IP_ADDRESS>/27 as a private IP pool and use haproxy-private as the ingress class for ingress through <IP_ADDRESS>.

bors r+


ImageProcessor: Processing gif Files Generates Server Error 500

ImageProcessor appears to work perfectly in our development setup. In our production setup it doesn't render gif images as expected in the back-end or in served pages.
For example, browsing the production server using a url similar to the following...
https:/ /prodserver/media/6600/sample.gif?anchor=center&mode=crop&width=500&height=200
...generates the following ysod.
Server Error in '/' Application.
Property is not supported.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Property is not supported.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Property is not supported.]
   System.Drawing.Image.SetPropertyItem(PropertyItem propitem) +88
   ImageProcessor.ImageFactory.Save(Stream stream) +173
   ImageProcessor.Web.HttpModules.<ProcessImageAsync>d__34.MoveNext() +2430
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
   System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +60
   System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +9699833

This only happens with gif images (Example file attached below)
Issuing the same request in the development environment...
http:/ /devserver/media/6600/sample.gif?anchor=center&mode=crop&width=500&height=200
...returns the image as expected.
Workaround:
Setting 'preserveExifMetaData' to false in processing.config fixes the issue.
Configuration:

Umbraco 7.5.11
ImageProcessor <IP_ADDRESS>
ImageProcessor.Web <IP_ADDRESS>
Windows Server 2008 / IIS 7 / .net 4.5
-- development 64bit (http)
-- production 32bit (https)

Example gif file:

Hi @drangus

ImageProcessor appears to work perfectly in our development setup. In our production setup it doesn't render gif images as expected in the back-end or in served pages.

That sends alarm bells ringing straight away. Are you absolutely 100% sure that you are running the exact same versions in both environments? If it works in development it will work on production. The bit depth will not affect image property items. They're just metadata.
On the note of bit depth? Why only run 32bit mode in your production server. You should be running the same depth, you're massively reducing the amount of non-fragmented memory available to you.
Do you have a public url to an image. I can easily check the version numbers from headers there.
Cheers
James

Hi James,
I've checked the binaries and both the production and development environments are the same:
ImageProcessor.Web	<IP_ADDRESS>
ImageProcessor		<IP_ADDRESS>
Unfortunately, I can't provide a public url as the servers are not accessible externally.
I take on board what you say about our 32bit production environment: the server is legacy and is scheduled to be replaced, which should address the current issue in any case. The fact that this is an older server could itself be the problem as its configuration may be hiding some inappropriate and / or invalid settings - an inherited issue can not be discounted!  As a fix, setting 'preserveExifMetaData' to false in processing.config meets our immediate needs.
I appreciate your taking the time to look into this.
Thanks,
Angus

No problem at all.
Unfortunately it's going to be incredibly difficult for me to debug the issue really what with the image working on my local system.
I know it's a long shot but if you have the opportunity could you create a custom build and wrap a try/catch around that code to determine what the property item id is, we'd probably be able to fix it quite easily.
Cheers
James


Documentation

I think we should add some docs and a small tutorial on how to use it ;)

Don't worry, it will come soon :)

@p365labs: some documentation has been written. What do you think about it?

@p365labs documentation has been fully written. I'm closing this issue.


Add a test that includes expires in a zcap

The test suite here was passing without the term expires being defined in the zcap-context
https://github.com/digitalbazaar/zcap-context/blob/main/CHANGELOG.md#120---2021-04-27
The issue was detected in a downstream test suite.

This will be addressed by #72.


adding abort on error to reset state machine

Errors on I2C bus can leave the I2C state machine in a non-idle state.  Calling the MCUX I2C_MasterTransferAbort function in the FSL library will properly reset this state so that future transactions will work.
Also, commented out some lines in pinux.c for the FRDM-K64F board. These lines were set for Ethernet, but are not used by the K64F board. These lines prevented UART 3 from working correctly (or at all)

@marketideas thanks for the PR. Please note that there are no merge commits allowed in Pull Requests, and that you need to fix your commit message formatting according to:
https://docs.zephyrproject.org/latest/contribute/index.html#contribution-workflow

@marketideas Thank you for the PR. I believe you have included a bit too many unrelated changes and commits in this PR. Please clean it up to only contain the exact changes needed for the bug fix (look at the "Commits" and "Files changed" tabs).

I have created an alternative PR #26761. Please either fix this one or review that one.

Superseeded by #26761. Please open a new issue/PR for the FRDM-K64F UART3 issue as needed.


Ecto 3

Workaround
Ecto queryable was a tuple value based map and now becomes a structure collection. that's why CacheableRepo module is getting the same problem fixed here again.
Features

Fixed schema handling into CacheableRepo
Fully compatible with Ecto new and old versions

Solutions?


DOC clarify how to exit from a plan

Sometimes during execution of a plan by the RunEngine, it is deemed essential that the Bluesky session must be terminated immediately in an orderly manner.  Describe these steps clearly.
Description
Documentation was added to provide a plan that will stop the session both immediately and orderly, under the control of the RunEngine.
Motivation and Context
APS beam lines (tomo, USAXS, depo lab) have requested instructions how to make an emergency stop of the entire session in response to some monitored conditions.  Previously, the clear_checkpoint() plan was added in response.
The documentation of how to finish the task after calling yield from clear_checkpoint() was vague.
How Has This Been Tested?
"""
demo_orderly_exit.py

Demonstrate how to STOP and exit Python from a Bluesky suspender.

1. Set BIT_PV set to 0 before starting this code.
2. Start this code.
3. From a separate EPICS client, change BIT_PV to 1.
   This will activate the suspender.  Subsequently, the Python session will exit
   with an exception trace.
   After the trace, the ``atexit`` handler is called.  That's where to put any
   final instructions.
"""

from bluesky import RunEngine
from bluesky import plan_stubs as bps
from bluesky.suspenders import *
from ophyd import EpicsSignalRO
import atexit

BIT_PV = "gp:gp:bit1"  # Some bo PV
RE = RunEngine()

def pre_response(*args, **kwargs):
    print(f"pre_response(): {args=}  {kwargs=}")
    print("request clear_checkpoint()")
    yield from bps.clear_checkpoint()
    print(f"pre pause(): {RE.state=}")
    yield from bps.pause()
    print(f"post pause(): {RE.state=}")

def exit_notice(*args, **kwargs):
    print("Python session has ended.  Ignore the errors.  EXPLAIN further...")

bit = EpicsSignalRO(BIT_PV, name="bit")
bit.wait_for_connection()
suspender = SuspendBoolHigh(
    bit, pre_plan=pre_response, tripped_message="This suspender will not resume."
)
RE.install_suspender(suspender)
atexit.register(exit_notice)

def loop_forever():
    "a silly plan"
    while True:
        print(f"Hi")
        yield from bps.sleep(1)

# Execute the plan.
RE(loop_forever())

I suggest the documentation provide this example (since the existing docs led me astray, with a call to RE.pause() from the plan).

Thanks so much for providing this example @prjemian, this is EXACTLY the functionality I was searching for and I was just about to bother everyone on slack about it!

I agree you should add a more complete example about integrating these messages with suspenders. I don't think the average reader will be able to figure it out on their own.

I think this suggests we need to add stop and abort messages to the RE such that you can reliably stop any further messages from being processed.
Another alternative would be to add an Exception sub-class like class ExitRunEngine(Exception):... which we could catch in the RE and not re-raise out of the RE but would cause all of the plans to be (semi-gracefully) exited.

This should also be distinguished from returning early which will exit the local plan, but if it is part of a bigger plan the outer plan will continue on.

(sorry for closing, fat fingers on my keyboard)

Yes, but I am not 100% sure that is the best place for this content to go.

@coretl , @callumforrester what are the plan - exiting requirements that we know to be at DLS use cases?


Add Waifusion

Hi! What is your PR about?

[x] Add images for your space

The images file size should not exceed 50KB. Please reduce their weight.

@gokaiorg @0xKiwi
Uploaded new images that are under 50KB :smile:


Containers hang when peers set to self

Ubuntu 15.10 running on Vagrant, with ip set to <IP_ADDRESS>. Weave 1.4.6 with Docker 1.10.3. Launching weave with peers set to <IP_ADDRESS> results in no errors. However, launching any docker containers (either via proxy or with network plugin) will hang.

If you want to run weave on a single host, no peer should be provided, i.e. weave launch should do the job.

dup of #1881


rx.debounce_input() does not work with rx.slider()

Describe the bug
When using a controlled rx.slider(), I want the on_change handler to be de-bounced, to have both:

a responsive UI
protect the backend from spam

I have tried using on_value_commit, but it is pretty flakey. See Radix UI issue: https://github.com/radix-ui/primitives/issues/1760
Instead, I opted to try rx.debounced_input(), but it is not compatible with rx.slider().
I suspect debounce_input() is intended to work with semantic <input> HTML elements, but Radix UI opted for their own funky implementation (a bunch of span/p/divs). 🤷♀
To Reproduce
Steps to reproduce the behavior:
value = State.my_values[name]
min_val = 0
max_val = 100
rx.debounce_input(
    rx.slider(
        value=[value],
        on_change=lambda val: State.update_my_value(name, val, True),
        min=min_val,
        max=max_val,
        step=1,
    ),
    debounce_timeout=2_000,
)

If I specify a value on rx.slider(), I get:
TypeError: Invalid var passed for prop value, expected type <class 'str'>, got value [state__state.my_values[name]] of type <class 'list'>.

If I omit it, I get a react compilation error:
Unhandled Runtime Error
TypeError: (intermediate value).map is not a function
Call Stack
Slider<
<EMAIL_ADDRESS>(14:0)
renderWithHooks
node_modules/react-dom/cjs/react-dom.development.js (16305:0)
updateForwardRef
node_modules/react-dom/cjs/react-dom.development.js (19226:0)
beginWork
node_modules/react-dom/cjs/react-dom.development.js (21636:0)
callCallback
node_modules/react-dom/cjs/react-dom.development.js (4164:0)
invokeGuardedCallbackDev
node_modules/react-dom/cjs/react-dom.development.js (4213:0)
invokeGuardedCallback
node_modules/react-dom/cjs/react-dom.development.js (4277:0)
beginWork$1
node_modules/react-dom/cjs/react-dom.development.js (27451:0)
performUnitOfWork
node_modules/react-dom/cjs/react-dom.development.js (26557:0)
workLoopSync
node_modules/react-dom/cjs/react-dom.development.js (26466:0)
renderRootSync
node_modules/react-dom/cjs/react-dom.development.js (26434:0)
performConcurrentWorkOnRoot
node_modules/react-dom/cjs/react-dom.development.js (25738:0)
workLoop
node_modules/scheduler/cjs/scheduler.development.js (266:0)
flushWork
node_modules/scheduler/cjs/scheduler.development.js (239:0)
performWorkUntilDeadline
node_modules/scheduler/cjs/scheduler.development.js (533:0)

Expected behavior
Either:

on_value_commit is not flakey
debounce_input works with a slider

Specifics (please complete the following information):

Python Version: 3.10
Reflex Version: 0.4.5
OS: MacOS
Browser (Optional): Firefox

There are two problems going on here:

the type of value in DebounceInput is Var[str], and it should be Var[Any] so that any underlying API can be used
The other problem was below that:

Reflex actually renames the prop onChange to onValueChange for the radix Slider element, but the debounce doesn't take this into account, and so it never actually gets the sliders onValueChange event fired and thus never updates. This is actually much harder to fix...
On the plus side, we are considering adding a reflex native "event throttling" mechanism. Similar to debounce, but actually to rate limit the number of events sent to the backend in a given time interval. We don't have a firm date for when such a feature will be available though.
I don't see an easy fix or workaround for this at the moment.

Thanks for the quick answer!
I haven't tried implementing a custom UI component in Reflex yet, but could a valid workaround (assuming the 1st point you mention gets fixed) bet to implement my own <input type="range"> based component, and wrap it in a debounce_input()?

EDIT: although that might also be problematic without using raw rx.html(), as rx.input() seems to assume a textual input (as it adds classes like rt-TextFieldInput etc.).

We also have the el namespace for basic HTML element, so you can maybe extend from rx.el.input instead


Bugfix/imsave is deprecated

imsave is deprecated so I updated to imageio.imwrite.  I also added pycache and shape_predictor to the gitignore

Thank you!


Create resource class

The idea is to create an instance of the Resource object that contains all the data for a resource. If you need to modify it (i.e., add a warning level for the resource, compute some derived value, etc.) you can do so inside of the Resource instance. Any modifications will then be grouped together, rather than spread out over the script.
In your current script you change the value of resources['Usage'] to a color-coded string. Now you've prevent yourself from working with the usage value, if the need ever arises. You've also changed the type of the variable from an integer (or float) to a string. Using the Resource class approach, you instead format the textual output later in the code, using the Resource.usage_level to determine the color tags.
We can discuss the relevance of this in the group meeting if you'd like.
Originally posted by @nhjjreuter in https://github.com/psyinfra/HTCAnalyze/pull/115#discussion_r510022323

I suggest to make a resource class for this.
class Resource(object):
    def __init__(resources: str, usage: int, requested: int, allocated: int):
        # naming in __init__ arguments should be consistent with names in the resources dictionary
        self.name = resources
        self.usage = usage
        self.requested = requested
        self.allocated = allocated
        self.usage_level = None

def refactor_resources(resources: dict) -> List[Resource]:
    """Convert a dict of lists to a list of Resource objects"""
    resources = {k.lower(): v for k, v in resources.items()}
    resources = [dict(zip(resources, v)) for v in zip(*resources.values())]
    resources = [Resource(**resource) for resource in resources]
    return resources

Instead of passing a dictionary object to the class, you pass a list of Resource objects to the class (or, alternatively, you convert the dictionary to a list resource objects inside of this class -- whichever fits better logistically).
Then instead of n_resources = len(resources['Resources']) (and the code directly following this) you can do the following:
for resource in resources:
    if resource.requested != 0:
        deviation = resource.usage / resource.requested  # note: they become floats, no need to pre-assign them

        if 1 - self.bad_usage <= deviation <= 1 + self.bad_usage:
            resource.usage_level = 'error'
        elif 1 - self.tolerated_usage <= deviation <= 1 + self.tolerated_usage:
            resource.usage_level = 'warning'
        elif str(usage) == 'nan':
            resource.usage_level = 'light_warning'  # or some other name to indicate usage of 'yellow2'
        else:
            resource.usage_level = 'normal'

In a later part of the code (the part that is all about providing the text output, separated from this level of logic), you can then have:
def get_color(level: str) -> str:
    """Convert an alert level to an appropriate color"""
    colors = {'error': 'red', 'warning': 'yellow', 'light_warning': 'yellow2', 'normal': 'green'}
    return colors[level]

def print_output(resources: List[Resource]) -> None:
    """This is just a dummy function to explain the printing side of things"""
    for resource in resources:
        color = get_color(resource.usage_level)
        print(f'[{color}]{resource.usage}[/{color}]')

More discussion about this : https://github.com/psyinfra/HTCAnalyze/pull/115#discussion_r509912233

Done


Clean up checkpoint on shard deletion

This is already implemented. The publish position is stored in shards, so we effectively clean up the checkpoint when we delete shards upon indexing completion.


Doesn't this work for SQLServer yet

I can't get this to work, it claims its not written yet.....
I installed it following your instructions, would be great if you could advise, if it is supposed to work.
thanks
Paul

i will check it this week end.

@pbuxtonccuk have a try the new version

Didn't want to re-open this, but it doesn't work.  On startup, the utility outputs an INFO line of what look like the parameters it is using, but they bear no resemblance mine...  almost looks hardcoded.


STORM-1890: looks like too many calls were moved to getStatic. It doe…

…snt break things, but it is sloppy, so reverting some to $.get

+1


"Poienari", "Ceaurești" are listed in the drop-down menu

Description:
When user writes "Poienari" and "Ceaurești" the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Poienari"

Expected results
The location appears in the drop-down menu as "Poienari, Argeș (Poienarii de Argeș)"

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 1
Write in the search bar "Ceaurești"

Expected results
The location appears in the drop-down menu as "Ceaurești, Argeș (Poienarii de Argeș)"


[REQUEST] Add a theme option for hydra, blue, red, green, etc... you could also have custom themes from the community.

Is your feature request related to a problem? Please describe.
Custom themes, themes, etc...
Describe the solution you'd like
add This, thats cool.
Describe alternatives you've considered
No response
Additional context
No response

i make a concept how can it be

BRO, THATS FIRE, Cool visual.

That's a cool idea! I hope any devs see this.


JettyServer attempts to use keystore password as truststore file path

On this line it should pass the truststore file path and not the keystore password:
https://github.com/decebals/pippo/blob/93f71655481f3133310019317d90467485f37e1f/pippo-jetty/src/main/java/ro/pippo/jetty/JettyServer.java#L125-L125

You are right! Thanks for notice. I will create a PR shortly!

It's an issue generated by a copy/paste :smile:

Looks good, thanks @decebals