Regression in 2.4.0: spurious ERRORs logged saying "Function argument not defined in specification"

Description
Connexion produces spurious ERRORs that function arguments are not defined in schema, even though they are. These errors appear in connexion version 2.4.0 and do not in 2.3.0. The errors appear for every request.
I find the error appears in cases when a formData argument coexists with query arguments that have a default value.
For example:
2019-12-05 10:47:00,123 connexion.operations.swagger2 ERROR    Function argument 'queryArg1' not defined in specification
2019-12-05 10:47:00,123 connexion.operations.swagger2 ERROR    Function argument 'queryArg2' not defined in specification
2019-12-05 10:47:00,123 connexion.operations.swagger2 ERROR    Function argument 'queryArg3' not defined in specification

Seems like it might be related to an old bug #522.
Expected behaviour
No errors should be produced when arguments are defined in spec.
Actual behaviour
Errors are produced.
Steps to reproduce
  ...
  /orgs/{org_id}/resource:

    post:
      operationId: "controllers.create_resource"
      consumes:
      - "multipart/form-data"
      produces:
      - "application/json"
      parameters:
      - name: "org_id"
        in: "path"
        description: ""
        required: true
        type: "integer"
        format: "int64"
      - name: "queryArg1"
        in: "query"
        description: ""
        enum: [all, one, two, three]
        default: "all"  # NOTE has default value
        type: "string"
      - name: "queryArg2"
        in: "query"
        description: ""
        default: false  # NOTE has default value
        type: "boolean"
      - in: "query"
        name: "queryArg3"
        type: "boolean"
        default: false  # NOTE has default value
        description: ""
      - in: "formData"  # NOTE in formData
        name: "upload_file"
        required: true
        type: "file"
        description: "The file to upload."
      responses:
        200:
          description: "successful operation"
        404:
          description: "Not found"

In python, we have something like this:
def create_resource(org_id, queryArg1='all', queryArg2=False, queryArg3=False):
    return {"ok": True}

Additional info:
Output of the commands:

python --version

Python 3.7.5

pip show connexion | grep "^Version\:"

Version: 2.4.0

connexion.operations.swagger2 hasn't changed in a long while.
My guess is that it's related to this PR #791 but I haven't had a chance to track it down fully.
somewhat unrelated: using a POST request with query params is not a very common thing to do AFAIK. Why not include these fields in the formdata?

I'm also getting these errors with 2.4.0. In my case, all the parameters are in formData:
      parameters:
        - $ref: '#/parameters/project_id'
        - name: text
          in: formData
          description: input text
          required: true
          type: string
        - name: limit
          in: formData
          description: maximum number of results to return
          required: false
          type: integer
          default: 10
        - name: threshold
          in: formData
          description: 'minimum score threshold, below which results will not be returned'
          required: false
          type: number
          default: 0

Here is the corresponding function signature:
def suggest(project_id, text, limit, threshold):

I get the error messages for the limit and threshold parameters, which have default values set in the spec. If I remove the default values from the spec, the errors go away.


Bug: IPv6 Only Cluster fails to resolve svc.cluster.local addresses

Describe the bug
When deployed on an IPv6 only cluster, the app pod cannot resolve svc.cluster.local addresses as it expects an A, not a AAAA.
Error: getaddrinfo ENOTFOUND platform-oneuptime-redis-master.oneuptime.svc.cluster.local
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'platform-oneuptime-redis-master.oneuptime.svc.cluster.local'
}
To Reproduce
Steps to reproduce the behavior:

Deploy iPv6 only cluster
Configure redis to bind on * and -::*
Restart -app pod.
See error

Expected behavior
When deployed, service should be able to to resolve AAAA addresses.
Addresses obfuscated below.
➜  kubectl -n oneuptime exec -i -t dnsutils -- nslookup platform-oneuptime-redis-master.oneuptime.svc.cluster.local
Server:		<obfuscated>
Address:	<obfuscated>#53

*** Can't find platform-oneuptime-redis-master.oneuptime.svc.cluster.local: No answer

➜  kubectl -n oneuptime exec -i -t dnsutils -- nslookup -q=AAAA platform-oneuptime-redis-master.oneuptime.svc.cluster.local
Server:		<obfuscated>
Address:	<obfuscated>#53

platform-oneuptime-redis-master.oneuptime.svc.cluster.local	has AAAA address <obfuscated>

Screenshots
Deployment Type
self-hosted - EKS (kubernetes)

Looks like this might be related, https://github.com/mastodon/mastodon/issues/27043

Not sure if this will help but you can actually change this by setting:
global:
  clusterDomain:

Not sure if this will help but you can actually change this by setting:
global:
  clusterDomain:

I am not sure that will fix it either as the domain resolves (AAAA only since there is no IPv4 address to resolve)

@xorl Do you know if this issue is still occurring? I'm considering deploying into an IPv6 only cluster, and I'd rather not be blocked by this issue.

Hello and thanks you for this ammazing application.
At this day it's still an issue and a deal breaker for me.
Did you plan to fix this issue on the near future ?


fix(types): guard the is judgement

Ensure the candidate is defined before accessing its property.
And unify the statement using namespace Is.

Any update on this PR ?

@AkatQuas the build failed which is very strange. Can you push something again to retrigger it. I can't merge without a green build.

It turns to a green build after rebase+force-update push. Thanks for approval.


preventDuplicates doesn't allow to show same message after timeout

Sometimes, It's necessary to show same message after timeout if there is no other messages in the list and preventDuplicates is true

Why did you close it? I am merging a patch which will allow you to do what you want.

I've already did. See workaround:
function shouldExit() {
if (options.preventDuplicates) {
if (map.message === previousToastMessage) {
return toasts.length>0;
} else {
previousToastMessage = map.message;
}
return false;
}
}

I merged #89 which has a good option for that, check it out. I will release 1.4.0 in a few minutes.

Thank you!


Angular 13

Hey! could you update the package to support angular 13, please?

@Meistercoach83 - Working on it now...

Done.


A couple issues with this plugin

I have few issues with this plugin that prevent me from opening files.

Pre-build DLL cannot be loaded under windows. Most likely missing some dlls. Have to compile in Windows to make it works.
Unable to load files path that is not ascii encoded.
Since Lua internally use UTF-8 for string storage, while windows does not. Meaning we have to convert to UTF-16LE/active codepages first before opening the files. fopen will return NULL.
I would suggest convert file path to UTF-16LE first and then call _wfopen, also local active code page does not contain all Unicode characters, and Windows allow almost all unicode character as file path.
https://github.com/jgmdev/lite-xl-encoding/blob/b1ddf226277ea12a03ed9db2ddda458988020e91/src/encoding.c#L303
When uchardet detect encoding incorrectly, and uchardet never gets right the first time, the encoding plugin just refuse to load the files. I think we could decode it with best effort if the detect result is incorrect or prompt the user for correct encoding.

Thanks for investigating the issues, I haven't tested this plugin on windows.

Pre-build DLL cannot be loaded under windows. Most likely missing some dlls. Have to compile in Windows to make it works.

Maybe needs some iconv dll, I wonder how the best way will be to handle this with the new lite xl package manager...

Unable to load files path that is not ascii encoded.

Could you work on adding the proper windows support and PR?

I think we could decode it with best effort if the detect result is incorrect or prompt the user for correct encoding.

Mmm, so maybe a commandview listing all valid encodings and let the user choose one?

I tried to add missing dll by checking import table, also add the dll that iconv used, and so on. Somehow still unable to load encoding.dll; that's why I tried to compile it myself. However, I found that the dll I compiled is static linked everything, so you might want to do the same for a standalone release.
I am not sure how the predefined macros works with meson, so change if you see fit.
#ifndef _WIN32
#else
#include <windows.h>
#endif

int f_detect(lua_State *L) {
  const char* file_name = luaL_checkstring(L, 1);

#ifndef _WIN32
  FILE* file = fopen(file_name, "rb");
#else
  wchar_t utf16[1024];
  memset(utf16, 0, sizeof(utf16));
  MultiByteToWideChar(CP_UTF8, 0, file_name, strlen(file_name), utf16, 1024);
  // utf8_to_utf16le(file_name, utf16, 1024, NULL);
  FILE* file = _wfopen(utf16, L"rb");
#endif

  if (!file) {
    lua_pushnil(L);
        lua_pushfstring(L, "unable to open file '%s', code=%d", file_name, errno);
        return 2;
  }

//rest of the function

I think not include any windows header would also work, but require to write a decoder for decoding the filename from UTF-8 to Unicode Point and then a encoder for UTF16-LE. Just keep in mind that Windows file path should support codepoint higher than 0xFFFF, which use UTF-16 surrogate pair and two uint16_t, such as rocket emoji 🚀 U+1F680.
Or just use detect_string instead of detect.
For auto decoding, the fact is uchardet hardly get the encoding right for most asian languages. And some encoding is kinda of a subset of another encoding. For example, most of the bytes of shift-jis/CP932 can be decoded as GBK/CP936.
For me, if detect as UTF-8, UTF-16 LE, UTF-16 BE, then just decode with the result. For the rest, use the result to sort the list and then let user choose from it.

Ok, so I added your change https://github.com/jgmdev/lite-xl-encoding/commit/de1c9be297e034e8466dd7ee0d714b0481684379 hope that I copy pasted properly :)

I tried to compile it myself. However, I found that the dll I compiled is static linked everything

Can you share how did you build the plugin to accomplish this?

For auto decoding, the fact is uchardet hardly get the encoding right for most asian languages.

Does doc:reload-width-encoding tackles that?

For me, if detect as UTF-8, UTF-16 LE, UTF-16 BE, then just decode with the result. For the rest, use the result to sort the list and then let user choose from it.

So currently encoding_detect checks if one of the registered boms in bom_list is found on the given string, if that is the case then it converts from that bom charset into utf8 and if success returns the found bom charset.
If the bom detection and conversion fails then it checks if the string is valid utf8 and just return that charset. Otherwise it fallbacks to uchardet and if uchardet fails it just errors.
What you want is on error to allow manually specifying the charset or change the order of the steps above?

Doing a local test using ntldd to check linked libraries and building under msys2 mingw64 this is what I got:
ADVAPI32.dll => C:\Windows\SYSTEM32\ADVAPI32.dll (0x000001feed4e0000)
GDI32.dll => C:\Windows\SYSTEM32\GDI32.dll (0x000001feee610000)
libiconv-2.dll => C:\msys64\mingw64\bin\libiconv-2.dll (0x000001feed990000)
IMM32.dll => C:\Windows\SYSTEM32\IMM32.dll (0x000001feed4e0000)
KERNEL32.dll => C:\Windows\SYSTEM32\KERNEL32.dll (0x000001feed990000)
msvcrt.dll => C:\Windows\SYSTEM32\msvcrt.dll (0x000001feed990000)
ole32.dll => C:\Windows\SYSTEM32\ole32.dll (0x000001feed990000)
OLEAUT32.dll => C:\Windows\SYSTEM32\OLEAUT32.dll (0x000001feee220000)
SETUPAPI.dll => C:\Windows\SYSTEM32\SETUPAPI.dll (0x000001feeedb0000)
SHELL32.dll => C:\Windows\SYSTEM32\SHELL32.dll (0x000001feedd60000)
libstdc++-6.dll => C:\msys64\mingw64\bin\libstdc++-6.dll (0x000001feedd60000)
USER32.dll => C:\Windows\SYSTEM32\USER32.dll (0x000001feee450000)
VERSION.dll => C:\Windows\SYSTEM32\VERSION.dll (0x000001feed560000)
WINMM.dll => C:\Windows\SYSTEM32\WINMM.dll (0x000001feed4e0000)

From this the revelant dlls would be:
libstdc++-6.dll => C:\msys64\mingw64\bin\libstdc++-6.dll (0x000001feedd60000)
libiconv-2.dll => C:\msys64\mingw64\bin\libiconv-2.dll (0x000001feed990000)

I have no idea what is going on, but I think my compile environment is different than yours. I just cloned the repo and then

meson setup build
meson compile -C build

meson is installed with ninja by meson-1.0.0-64.msi, and I am not using MSYS2, and gcc/g++ is installed by scoop.

meson setup build output
The Meson build system
Version: 1.0.0
Source dir: C:\src\lite-xl-encoding
Build dir: C:\src\lite-xl-encoding\build
Build type: native build
Project name: encoding
Project version: 1.0
C compiler for the host machine: gcc (gcc 11.2.0 "gcc (GCC) 11.2.0")
C linker for the host machine: gcc ld.bfd 2.37
C++ compiler for the host machine: g++ (gcc 11.2.0 "g++ (GCC) 11.2.0")
C++ linker for the host machine: g++ ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Found CMake: C:\Program Files\CMake\bin\cmake.EXE (3.25.0)
Run-time dependency uchardet found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency uchardet

Executing subproject uchardet

uchardet| Project name: uchardet
uchardet| Project version: 0.0.7
uchardet| C compiler for the host machine: gcc (gcc 11.2.0 "gcc (GCC) 11.2.0")
uchardet| C linker for the host machine: gcc ld.bfd 2.37
uchardet| C++ compiler for the host machine: g++ (gcc 11.2.0 "g++ (GCC) 11.2.0")
uchardet| C++ linker for the host machine: g++ ld.bfd 2.37
uchardet| Compiler for C++ supports arguments -msse2: YES
uchardet| Compiler for C++ supports arguments -mfpmath=sse: YES
uchardet| Build targets in project: 3
uchardet| Subproject uchardet finished.

Dependency uchardet from subproject subprojects/uchardet-0.0.7 found: YES 0.0.7
sdl2-config found: NO
Run-time dependency sdl2 found: NO (tried pkgconfig and config-tool)
Looking for a fallback subproject for the dependency sdl2

Executing subproject sdl2

sdl2| Project name: sdl2
sdl2| Project version: 2.26.0
sdl2| C compiler for the host machine: gcc (gcc 11.2.0 "gcc (GCC) 11.2.0")
sdl2| C linker for the host machine: gcc ld.bfd 2.37
sdl2| Compiler for C supports arguments -Wdeclaration-after-statement: YES
sdl2| Compiler for C supports arguments -Wshadow: YES
sdl2| Compiler for C supports arguments -fno-strict-aliasing: YES
sdl2| Compiler for C supports arguments -mpreferred-stack-boundary=2: NO
sdl2| Dependency gl skipped: feature use_video_opengl disabled
sdl2| Dependency opengl skipped: feature use_video_opengl disabled
sdl2| Dependency glesv2 skipped: feature use_video_openglesv2 disabled
sdl2| Dependency egl skipped: feature use_video_openglesv2 disabled
sdl2| Dependency egl skipped: feature use_video_wayland disabled
sdl2| Dependency alsa skipped: feature use_audio disabled
sdl2| Dependency libpulse-simple skipped: feature use_audio disabled
sdl2| Dependency jack skipped: feature use_audio disabled
sdl2| Dependency libpipewire-0.3 skipped: feature use_audio disabled
sdl2| Dependency vulkan skipped: feature use_video_vulkan disabled
sdl2| Run-time dependency threads found: YES
sdl2| Run-time dependency libusb-1.0 found: NO (tried pkgconfig and cmake)
sdl2| Dependency wayland-client skipped: feature use_video_wayland disabled
sdl2| Dependency wayland-cursor skipped: feature use_video_wayland disabled
sdl2| Dependency wayland-egl skipped: feature use_video_wayland disabled
sdl2| Dependency wayland-protocols skipped: feature use_video_wayland disabled
sdl2| Dependency wayland-scanner skipped: feature use_video_wayland disabled
sdl2| Dependency libdecor-0 skipped: feature use_video_wayland disabled
sdl2| Program wayland-scanner skipped: feature use_video_wayland disabled
sdl2| Program ./find-dylib-name.py found: YES (C:\Program Files\Meson\meson.exe runpython C:\src\lite-xl-encoding\subprojects\SDL2-2.26.0\./find-dylib-name.py)
sdl2| Library m found: YES
sdl2| Library dl found: NO
sdl2| Library iconv found: NO
sdl2| Message: Subsystem "atomic" is ENABLED
sdl2| Message: Subsystem "audio" is DISABLED
sdl2| Message: Subsystem "cpuinfo" is DISABLED
sdl2| Message: Subsystem "events" is ENABLED
sdl2| Message: Subsystem "file" is ENABLED
sdl2| Message: Subsystem "filesystem" is ENABLED
sdl2| Message: Subsystem "haptic" is DISABLED
sdl2| Message: Subsystem "hidapi" is ENABLED
sdl2| Message: Subsystem "joystick" is DISABLED
sdl2| Message: Subsystem "loadso" is ENABLED
sdl2| Message: Subsystem "locale" is ENABLED
sdl2| Message: Subsystem "power" is DISABLED
sdl2| Message: Subsystem "render" is ENABLED
sdl2| Message: Subsystem "sensor" is DISABLED
sdl2| Message: Subsystem "threads" is ENABLED
sdl2| Message: Subsystem "timers" is ENABLED
sdl2| Message: Subsystem "video" is ENABLED
sdl2| Checking for size of "void*" : 8
sdl2| Check usable header "alloca.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "altivec.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "audioclient.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "ctype.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "ddraw.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "dinput.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "dsound.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "dxgi.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "endpointvolume.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "fcitx/frontend.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "float.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "iconv.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "immintrin.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "inttypes.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "libsamplerate.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "libudev.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "libunwind.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "limits.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "malloc.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "math.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "memory.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "mmdeviceapi.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "pthread.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "pthread_np.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "semaphore.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "sensorsapi.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "signal.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "stdarg.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "stdint.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "stddef.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "stdio.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "stdlib.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "string.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "strings.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "sys/inotify.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "sys/types.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "wchar.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "linux/input.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "usbhid.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "libusbhid.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "usb.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "libusb.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "d3d.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "d3d11.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "d3d12.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Check usable header "windows.gaming.input.h" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Check usable header "xinput.h" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Header "fcntl.h" has symbol "O_CLOEXEC" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Header "math.h" has symbol "M_PI" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Header "pthread.h" has symbol "PTHREAD_MUTEX_RECURSIVE" : YES
sdl2| Header "pthread.h" has symbol "PTHREAD_MUTEX_RECURSIVE_NP" : YES
sdl2| Checking for function "_Exit" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_i64toa" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_ltoa" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "_stricmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_strlwr" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_strnicmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_strrev" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_strupr" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_uit64toa" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "_uitoa" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "_ultoa" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_wcsdup" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_wcsicmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "_wcsnicmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "abs" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "bsearch" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "acos" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "acosf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "alloca" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "asin" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "asinf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "atan" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "atan2" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "atan2f" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "atanf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "atof" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "atoi" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "bcopy" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "calloc" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "ceil" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "ceilf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "clock_gettime" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "copysign" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "copysignf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "cos" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "cosf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "dlopen" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "elf_aux_info" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "exp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "expf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fabs" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fabsf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "floor" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "floorf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fmod" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fmodf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fopen64" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "free" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fseeko" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "fseeko64" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "getauxval" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "getenv" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "getpagesize" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "iconv" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "index" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "inotify_init" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "inotify_init1" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "itoa" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "log" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "log10" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "log10f" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "logf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "lround" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "lroundf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "malloc" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "memcmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "memcpy" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "memmove" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "memset" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "mprotect" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "nanosleep" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "poll" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "pow" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "powf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "pthread_set_name_np" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "pthread_setname_np" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "putenv" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "qsort" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "realloc" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "rindex" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "round" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "roundf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "scalbn" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "scalbnf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sem_timedwait" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "setenv" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "setjmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sigaction" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "sin" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sinf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "snprintf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sqrt" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sqrtf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sscanf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strcasecmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strchr" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strcmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strdup" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strlcat" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "strlcpy" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "strlen" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strncasecmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strncmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strrchr" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strstr" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strtod" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strtok_r" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strtol" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strtoll" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strtoul" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "strtoull" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "sysconf" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "sysctlbyname" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "tan" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "tanf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "trunc" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "truncf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "unsetenv" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for function "vsnprintf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "vsscanf" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "wcscmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "wcsdup" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "wcslen" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "wcsncmp" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for function "wcsstr" with dependencies -lm, -ldl, -liconv, , , threads: YES
sdl2| Checking for type "XINPUT_GAMEPAD_EX" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking for type "XINPUT_STATE_EX" with dependencies -lm, -ldl, -liconv, , , threads: NO
sdl2| Checking whether type "struct sigaction" has member "sa_sigaction" : NO
sdl2| Checking if "__atomic_load_n test" : links: YES
sdl2| Checking if "__sync_lock_test_and_set test" : links: YES
sdl2| Checking if "input events test" compiles: NO
sdl2| Library user32 found: YES
sdl2| Library gdi32 found: YES
sdl2| Library winmm found: YES
sdl2| Library imm32 found: YES
sdl2| Library ole32 found: YES
sdl2| Library oleaut32 found: YES
sdl2| Library version found: YES
sdl2| Library uuid found: YES
sdl2| Library advapi32 found: YES
sdl2| Library setupapi found: YES
sdl2| Library shell32 found: YES
sdl2| Library dinput8 found: YES
sdl2| Message: filesystem:  windows
sdl2| Message: haptic:  dummy
sdl2| Message: joystick:  dummy
sdl2| Message: loadso:  windows
sdl2| Message: power:
sdl2| Message: sensor:  dummy
sdl2| Message: video:
sdl2| Message: input:
sdl2| Message: audio_driver:  dummy
sdl2| Message: video_driver:  windows, dummy
sdl2| Message: video_render:  d3d, d3d11, d3d12
sdl2| Message: thread:  windows
sdl2| Message: timer:  windows
sdl2| Configuring SDL_config.h using configuration
sdl2| Build targets in project: 5
sdl2| NOTICE: Future-deprecated features used:
sdl2| * 0.58.0: {'meson.get_cross_property'}
sdl2| * 0.64.0: {'copy arg in configure_file'}
sdl2| Subproject sdl2 finished.

Dependency sdl2 found: YES 2.26.0 (overridden)
Build targets in project: 6

encoding 1.0

  Subprojects
    sdl2    : YES 1 warnings
    uchardet: YES

Found ninja-1.11.1 at "C:\Program Files\Meson\ninja.EXE"

Since Lite-xl just refuse to open the file, so I cannot execute the doc:reload-with-encoding.
on error to allow manually specifying the charset is what i want. Changing the order would not work since nobody in the chain has the correct encoding.
I just found that for GBK the plugin will try to decode it as KOI8-R, which will fail; and correctly detect shift-jis but still fail to open it. You can try make some test files by this python snippet.

with open("gbk.txt", "w", encoding="gbk") as f:
    f.write("中文测试")

with open("shiftjis.txt", "w", encoding="cp932") as f:
    f.write("あいうえお日本語")

ok, so fixed the dynamically linked libraries with this https://github.com/jgmdev/lite-xl-encoding/commit/e2cd00ba2304e8a0625ed6851b49cd96f76b39cd now what is missing is asking the user for charset if not detected :)


Flickering during plot downsizing

We have a plot created via DefaultPlotComponentProviderBatik.
You can see on the recorder video that upscale works relatively normal and the previous image are displayed until the new one come from render.
But on the downscale we have a different thing with flickering via empty panel, which looks not so good.
Please, make sizing a little bit smoother. For example, we can show the original image fill the component rect in both cases, in upsizing and downsizing.

In PlotPanel replaced GridBagLayout with BorderLayout, which doesn't seem to get invalidated on downsizing.
However, you can try a different layout manager by overriding 'layout' in a subclass of PlotPanel. Like in  MyPlotPanelBatik demo for example.


Requests that return HttpDuplex (eg docker exec start) hang when using named pipe on windows.

Found an interesting situation that i was able to track down a bit. I am unsure if this is a bug with docker-modem or potentially how Docker for Windows sets up the named pipe to begin with.
Here is a file to reproduce (uses latest node-docker-api but upgraded to docker-modem 1.0.0), the same thing happens if you use analogous code for dockerode
'use strict'
const Docker = require('node-docker-api').Docker

const promisifyStream = (stream) => new Promise((resolve, reject) => {
  stream.on('data', (d) => console.log(d.toString()))
  stream.on('end', () => {
      if (process.stdin.setRawMode) {
        process.stdin.setRawMode(false);
      }
      process.stdin.pause();
      resolve()
  })
  stream.on('error', reject)
})

var thing
const docker = new Docker({ socketPath: '//./pipe/docker_engine' })
//const docker = new Docker({host: '<IP_ADDRESS>', port: 2375})
let _container

  docker.container.create({
    Image: 'debian:jessie',
    Cmd: [ '/bin/bash', '-c', 'tail -f /var/log/dmesg' ]
  })
  .then((container) => container.start())
  .then((container) => {
    _container = container
    return container.exec.create({
	    AttachStdin: true,
	    AttachStdout: true,
	    AttachStderr: true,
	    Cmd: ['echo', 'thing'],
	    Tty: true
    })
  })
  .then((exec) => {
    return exec.start({
      hijack: false,
      Detach: false,
      Tty: true,
      stdin: true,
    })
  })
  .then((stream) => {
  	thing = stream
  })
  .then(() => {
  	thing.pipe(process.stdout);

  	// Restart stdin with correct encoding
  	process.stdin.resume();
  	process.stdin.setEncoding('utf8');

  	// Make sure rawMode matches up
  	if (process.stdin.setRawMode) {
  	  process.stdin.setRawMode(true);
  	}

  	// Send our processes stdin into the container
  	process.stdin.pipe(thing);

  })
  .then(() => promisifyStream(thing))
  .then(() => _container.delete({force: true}))
  .catch((error) => console.log(error))

If you connect over tcp (need to allow insecure connections in the docker for windows app first), it works as expected but if you switch over to the named pipe it will hang after "thing" is written to stdout. What is extremely interesting is after this happens you can get the stream to close and the process to resume by pressing any key three times.
Another interesting data point here is it looks like docker-compose itself avoids using the API for this on Windows, deciding to just delegate directly to a shell call to docker exec.
see: https://github.com/docker/compose/blob/master/compose/cli/main.py#L411
My best guesses at this point are:

there is is some additional buffer with named pipes that is not being correctly flushed and its causing things to hang up
writes are not happening or getting lost duringish reads

Any thoughts about why this could be happening?

Hi, I'm most likely running in to the same problem with Dockerode 2.5.4 which relies on Docker-modem 1.0.4 . Anything with exec.start gets stuck and won't terminate properly.

docker desktop 4.12 has a compatibility shim that should fix this.
https://docs.docker.com/desktop/release-notes/#bug-fixes-and-minor-changes
see my comments about it here: https://github.com/apocas/dockerode/issues/534


Sleuth Integration Performance degradation

If we add spring cloud sleuth starter to the 2.0.x stream performance degrades to such an extent that it is almost unusable. Request Processing times is about 6 times slower.  This issue has already been identified and at least partially addressed in Spring Cloud 2.1.x SNAPSHOT.  The fixes are here:
https://github.com/spring-cloud/spring-cloud-sleuth/pull/1111
https://github.com/spring-cloud/spring-cloud-sleuth/pull/1122
Will we need to wait for a 2.1.x release to get these fixes or will they be ported into the 2.0.3?

AFAIR there were some big changes there so we encourage to upgrade to the latest Boot and Greenwich.

Can you confirm that with the latest versions the performance is not degraded?

Running with Finchley and adding sleuth request processing is about 6 times slower.  Using Greenwich SNAPSHOT is a lot better...only 2 times slower with sleuth.
@spencergibb This would imply no sleuth in practice for Spring Cloud Gateway 2.0.x

So it's not about Spring Cloud Stream but Gateway, correct?
OTOH you're the first person to complain about it so I'm surprised the performance is so bad for you. I'm not surprised that it's deteriorated though. Anyways, I'm closing the issue.

Oh and cc @smaldini

The issue raised here is: will the fixes be merged into Finchley....I didn't see that raised as an issue anywhere else? I think you are saying the answer is "no". What is the duplicate of?

The title is Sleuth Integration Performance degradation. So it's a duplicate.
BTW in the title you have Integration. Then you write about Stream. Then it turns out that it's not Stream but Gateway. Actually it's really about Reactor.
Currently I'm saying no to merging it to Finchley.


feat: peers discovery lookups

Motivation
Implements lookups in the discovery server.
Description
In the discovery protocol, for every x unit of time (currently hardcoded to 10 min) we need to run lookups to find new peers and fill our buckets. In theory, we should preferably run lookups on the least filled buckets, that is: when sending find_nodes, we should set a public key (target field) such that its distance from the peer to be queried returns the corresponding bucket number. This step is not trivial at all unless we do some brute generation. Instead, we are just sending lookups to three randomly generated pub keys. See more here.
Changes in detail:

Fix find_node request target field.
New validation when inserting a node that checks if it is already inserted.
discovery peer now spawns a new task for the lookups.
peers_lookup function that handles the random lookups.

And here is the lookup flow in detail:

Every 30min we spawn three concurrent lookups: one closest to our pubkey and three others closest to a random generated pubkeys.
Every lookup starts with the closest nodes from our table. Each lookup keeps track of:

Peers that have already been asked for nodes
Peers that have been already seen
Potential peers to query for nodes: a vector of up to 16 entries holding the closest peers to the pubkey. This vector is initially filled with nodes from our table.

We send a find_node to the closest 3 nodes (that we have not yet asked) from the pubkey.
We wait for the neighbors' response and push or replace those who are closer to the potential peers.
We select three other nodes from the potential peers vector and do the same until one lookup has no node to ask.

Finally, this implementation is supported by some custom unit and e2e tests.
Closes #154

I've added recursive lookups, @ElFantasma would you mind doing a review, thanks.


setClientRole () not valid.

This method is not valid. There is no callback after setting, and it is used in live mode!

setClientRole is a function with our video/audio sdk. you are opening an issue in RTM, which is our real time messaging SDK. maybe there's some misunderstanding here?


Add Readme

I's important add a readme with how to install, use, and collaborate.

I'll handle this

Pull request available for evaluation

closed by https://github.com/EvoluxBR/react-smart-tabs/pull/18


feat: changed requestsThreshold default value to 1

@rollsappletree as discussed I was thinking about going with a default of "1" for the requestsThreshold so that, if no options are passed, the candidate will cache the function when firstly encountered.

@rollsappletree as this could be considered a breaking change, what about bringing some stuff together and prepare a v2.0 release with many features?


Role definition construct looks different from the past

The role definition of Storage Blob Data Reader is different from the one here https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles
In this article, the property name to declare role definition is roleName while the past one uses Name.  Moreover, roleType looks similar to IsCustom (false) if I understand correctly. Whether we construct a custom or use built-in, the jSON structure should be the same.

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

ID: e0091902-7cb0-8dc3-2a7a-dc644f39a961
Version Independent ID: d2757c88-1bad-8d27-b548-9e04a8ec7fe1
Content: Understand role definitions in Azure RBAC
Content Source: articles/role-based-access-control/role-definitions.md
Service: role-based-access-control
GitHub Login: @rolyon
Microsoft Alias: rolyon

@thuansoldier Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

Hi @thuansoldier
PowerShell and CLI outputs role definitions in different formats. The information is the same, but the property names are different. I can see how this might be unclear in the docs. I'll work to make more consistent.
thanks
#in-progress

Hi @thuansoldier
I've updated the article to use the PowerShell format of the role definitions.
https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions
Hopefully this clearer. Let us know if you have additional feedback.

#please-close

We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


Question: the location of certificate validation

Hi everyone, I want to know the location of certification validation in the code, could anyone point it out for me? Thanks~

I do not quite understand your question. If you mean TLS cert validation, I believe go std lib does the work. If you want to know more about that, you probably can read go std lib code.


[BUG] Cant handle multiple requests with streaming output

Describe the bug
Promptflow server cant handle multiple requests with streaming output.
How To Reproduce the bug

Run promptflow server with stream chat output
Open 2 terminals
Run in 1 terminal script for send request and get response to promptflow server
In same time run in 2 terminal script for send request and get response to promptflow server
And now 1 terminal crashed with error ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read)

Expected behavior
On 5 step first and second terminals worked in streaming format and get results from promptflow server
Logs 1 terminal
СTraceback (most recent call last):
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 761, in _update_chunk_length
    self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 444, in _error_catcher
    yield
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 828, in read_chunked
    self._update_chunk_length()
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 765, in _update_chunk_length
    raise InvalidChunkLength(self, line)
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 624, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 857, in read_chunked
    self._original_response.close()
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/urllib3/response.py", line 461, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kuruhuru/dev/llm/pf/hr_chat_bot/examples/streaming_api.py", line 166, in <module>
    for line in get_stream(question, chat_history, project, url):
  File "/home/kuruhuru/dev/llm/pf/hr_chat_bot/examples/streaming_api.py", line 151, in get_stream
    for event in event_stream:
  File "/home/kuruhuru/dev/llm/pf/hr_chat_bot/examples/streaming_api.py", line 32, in __next__
    return Event.parse_from_lines(self.decoded_lines)
  File "/home/kuruhuru/dev/llm/pf/hr_chat_bot/examples/streaming_api.py", line 90, in parse_from_lines
    for line in lines_stream:
  File "/home/kuruhuru/dev/llm/pf/hr_chat_bot/examples/streaming_api.py", line 25, in decoded_lines
    for line in self._lines:
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/requests/models.py", line 865, in iter_lines
    for chunk in self.iter_content(
  File "/home/kuruhuru/micromamba/envs/promptflow/lib/python3.9/site-packages/requests/models.py", line 818, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

Logs promptflow server
<IP_ADDRESS> - - [08/Nov/2023 11:07:04] "POST /score HTTP/1.1" 200 -
Error on request:
Traceback (most recent call last):
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 710, in _error_catcher
    yield
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 1073, in read_chunked
    self._update_chunk_length()
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 1008, in _update_chunk_length
    raise InvalidChunkLength(self, line) from None
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 933, in stream
    yield from self.read_chunked(amt, decode_content=decode_content)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 1102, in read_chunked
    self._original_response.close()
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 727, in _error_catcher
    raise ProtocolError(f"Connection broken: {e!r}", e) from e
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/werkzeug/serving.py", line 362, in run_wsgi
    execute(self.server.app)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/werkzeug/serving.py", line 325, in execute
    for data in application_iter:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/werkzeug/wsgi.py", line 256, in __next__
    return self._next()
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/werkzeug/wrappers/response.py", line 32, in _iter_encoded
    for item in iterable:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_sdk/_serving/response_creator.py", line 73, in generate
    for chunk in self.stream_iterator:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 27, in generate_from_proxy
    yield from proxy
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 17, in __next__
    item = next(self._generator)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 27, in generate_from_proxy
    yield from proxy
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 17, in __next__
    item = next(self._generator)
  File "/os-llm-tool/os_llm_tool/tools/os_llm.py", line 99, in generator
    for chunk in response:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 27, in generate_from_proxy
    yield from proxy
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 17, in __next__
    item = next(self._generator)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 166, in <genexpr>
    return (
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/openai/api_requestor.py", line 692, in <genexpr>
    return (
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/openai/api_requestor.py", line 115, in parse_stream
    for line in rbody:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/requests/models.py", line 865, in iter_lines
    for chunk in self.iter_content(
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/requests/models.py", line 818, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

Code for clients:
import json
from time import time
import requests

class EventStream:
    """Accepts lines of text and decodes it into a stream of SSE events.

    Refer to the following page for details:
    https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

    This class is supposed to be iterated with a for loop like:

    >>> for event in EventStream(lines):
    ...     do_something_with(event)

    """

    def __init__(self, lines, encoding="utf-8"):
        self._lines = lines
        self._encoding = encoding

    @property
    def decoded_lines(self):
        for line in self._lines:
            yield line.decode(self._encoding)

    def __iter__(self):
        return self

    def __next__(self):
        return Event.parse_from_lines(self.decoded_lines)

class Event:
    """A single event in the event stream."""

    def __init__(self):
        self.id = None
        self.event = None
        self.data = ""

    def append_line(self, line):
        if not line:
            raise ValueError(
                "Not supposed to accept empty lines. Please handle this outside of the Event class."
            )

        if ":" not in line:
            raise ValueError("Bad format: Each line must contain `:`.")

        parts = line.split(":", maxsplit=1)
        if len(parts) < 2:
            raise ValueError(
                "Bad format: Each line must could be splitted into two parts by ':'."
            )

        prefix = parts[0]
        data = parts[1].strip()

        if prefix == "id":
            if self.id is not None:
                raise ValueError(
                    "Bad event: event id cannot be specified multiple times."
                )
            self.event = data

        if prefix == "event":
            if self.event is not None:
                raise ValueError(
                    "Bad event: event type cannot be specified multiple times."
                )
            self.event = data

        if prefix == "data":
            if not self.data:
                self.data = data
            else:
                self.data = "\n".join((self.data, data))

        # TODO: Handle other prefixes here

    @staticmethod
    def parse_from_lines(lines_stream):
        """Given a lines stream, parse an event from it.

        It only parse the first event. The remainder are not touched.
        """
        result = Event()
        for line in lines_stream:
            if not line:
                return result
            else:
                result.append_line(line)

        # If we reached the end of the input lines stream,
        # raise StopIteration to indicate that no more events will happen
        raise StopIteration()

    def __str__(self):
        # Defaults to "message" when event name is not defined.
        event_name = self.event or "message"
        return f"Event ({event_name}): {self.data}"

def get_stream(question, chat_history, project, url):
    headers = {"Content-Type": "text/event-stream", "Accept": "text/event-stream"}

    request_data = {"question": question, "chat_history": chat_history, "project": project}

    response = requests.post(url, json=request_data, headers=headers, stream=True)
    response.raise_for_status()

    content_type = response.headers.get("Content-Type")
    if "text/event-stream" in content_type:
        event_stream = EventStream(response.iter_lines())
        for event in event_stream:
            data = event.data
            data = json.loads(data)
            yield data["answer"]
    else:
        raise TypeError(f"{content_type=} is not text/event-stream")

if __name__ == "__main__":
    question = "tell about"
    chat_history = []
    url = "http://localhost:8080/score"
    project = "hr"

    st = time()
    for line in get_stream(question, chat_history, project, url):
        print(line, end="")
    print()
    print(time() - st)

@ArtyomZemlyak Could you share how you start the promptflow server?

@wangchao1230
Using Docker server:
CMD ["bash", "./start.sh"]
# Startup script for the flow container

CONDA_ENV_PATH="$(conda info --base)/envs/promptflow-serve"
export PATH="$CONDA_ENV_PATH/bin:$PATH"

cd ./kb-search-tool
pip install -e .
cd ..

cd ./os-llm-tool
pip install -e .
cd ..

ls
ls connections
pf connection create --file /connections/kb_search_gpu2.yaml
pf connection create --file /connections/gguf_openai.yaml
pf flow serve --source flow --host <IP_ADDRESS>

Hi @ArtyomZemlyak
Thank you for reporting this issue to us. We appreciate your feedback and we are sorry for any inconvenience this may have caused you.
From your description, I understand that you are using a docker container to host the promptflow server and send requests to it. The server returns a streaming output to the client. However, when you send multiple requests at the same time, one of the terminals crashes with an error message.
You have identified two conditions that trigger this bug:

The flow output is streaming
Multiple requests are made to the container simultaneously

To investigate your case, I attempted to reproduce the bug on my end using the following setup:

A flow with one node that echoes the user’s input in streaming mode
A docker image that contains the flow
A script that sends HTTP requests to the server using the same method as you did

However, I did not encounter any errors when multiple requests were made to the container simultaneously. This was the case even when a lengthy passage was input for the flow to echo, which would extend the duration of the streaming process.
In our Docker setup, we use the following settings for the Flask app, which ensures that multiple requests are processed by different workers in case of a race condition:
gunicorn -w 8 --threads 1 -b "<IP_ADDRESS>:8080" --timeout 300 "promptflow._sdk._serving.app:create_app()"
From my perspective, it seems that each request is isolated and processed in a different process. I do not see any difference with a single request processing.
This leads me to believe that there might be some discrepancies in our understanding of the problem at hand. It would be greatly beneficial if you could provide us with your flow or docker file. This will allow us to fully grasp the nature of the problem you are encountering.

@liucheng-ms
Thanks for your reply! I tried gunicorn -w 8 --threads 1 -b "<IP_ADDRESS>:8080" --timeout 300 "promptflow._sdk._serving.app:create_app()" and also hase exactly same issue :(
docker-compose.yml
version: '3'

services:

  hr_chat_bot:
    build:
      context: .
      dockerfile: Dockerfile
    env_file:
      - .env
    ports:
      - 8080:8080
    volumes:
      - ./:/flow
      - ./connections:/connections
      - ../kb-search-tool:/kb-search-tool
      - ../os-llm-tool:/os-llm-tool
      - ./start.sh:/start.sh
    command: ["bash", "./start.sh"]
    image: hr_chat_bot
    restart: unless-stopped
    networks:
      - llm-test_default

networks:
  llm-test_default:
    # driver: bridge
    external: true
  # knowledge-base-search_kbs:
  #   external: true

Docker
# syntax=docker/dockerfile:1
FROM docker.io/continuumio/miniconda3:latest

WORKDIR /

COPY ./requirements.txt /flow/requirements.txt

# create conda environment
RUN conda create -n promptflow-serve python=3.9.16 pip=23.0.1 -q -y && \
    conda run -n promptflow-serve \
    pip install -r /flow/requirements.txt && \
    conda run -n promptflow-serve pip install keyrings.alt && \
    conda run -n promptflow-serve pip cache purge && \
    conda clean -a -y

# COPY ./connections/* /connections/
# COPY ./start.sh /
CMD ["bash", "./start.sh"]

Also tried 10 threads.
New traceback from server:
[2023-11-09 11:59:10 +0000] [86] [ERROR] Socket error processing request.
Traceback (most recent call last):
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 710, in _error_catcher
    yield
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 1073, in read_chunked
    self._update_chunk_length()
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 1008, in _update_chunk_length
    raise InvalidChunkLength(self, line) from None
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 933, in stream
    yield from self.read_chunked(amt, decode_content=decode_content)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 1102, in read_chunked
    self._original_response.close()
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/urllib3/response.py", line 727, in _error_catcher
    raise ProtocolError(f"Connection broken: {e!r}", e) from e
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 282, in handle
    keepalive = self.handle_request(req, conn)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 354, in handle_request
    util.reraise(*sys.exc_info())
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/gunicorn/util.py", line 641, in reraise
    raise value
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 339, in handle_request
    for item in respiter:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/werkzeug/wsgi.py", line 256, in __next__
    return self._next()
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/werkzeug/wrappers/response.py", line 32, in _iter_encoded
    for item in iterable:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_sdk/_serving/response_creator.py", line 79, in generate
    for chunk in self.stream_iterator:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 27, in generate_from_proxy
    yield from proxy
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 17, in __next__
    item = next(self._generator)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 27, in generate_from_proxy
    yield from proxy
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 17, in __next__
    item = next(self._generator)
  File "/os-llm-tool/os_llm_tool/tools/os_llm.py", line 99, in generator
    for chunk in response:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 27, in generate_from_proxy
    yield from proxy
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/promptflow/_core/generator_proxy.py", line 17, in __next__
    item = next(self._generator)
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 166, in <genexpr>
    return (
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/openai/api_requestor.py", line 692, in <genexpr>
    return (
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/openai/api_requestor.py", line 115, in parse_stream
    for line in rbody:
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/requests/models.py", line 865, in iter_lines
    for chunk in self.iter_content(
  File "/opt/conda/envs/promptflow-serve/lib/python3.9/site-packages/requests/models.py", line 818, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

@liucheng-ms I think, issue can be with llama-cpp-python server. Because I tried same (2 terminals) with stream responses directly to llama-cpp-python server (OpenAI API compatible). And same issue occured!
I think we can close this issue, because its not from promptflow

https://github.com/abetlen/llama-cpp-python/issues/897

@ArtyomZemlyak Thank you for your investigation and feedback. I appreciate your effort and collaboration. I agree that the issue seems to be related to the llama-cpp-python server, and not promptflow. I will close this issue Thank you for your cooperation and understanding. 😊


Adding context to getMenus() for locale support

@harumijang you also need to add locales in nextc onfig. Reference - https://nextjs.org/docs/advanced-features/i18n-routing#getting-started

rebased and fixed the eslint issue

@joshirohit100 Would you mind outlining the steps to

Setup multilingual drupal site
Update / add menu in drupal for different languages

on ACMS?
Because I

added Spanish as another language on /admin/config/regional/language
added Spanish translations to each of the main menu items on  /admin/structure/menu/manage/main
set the language for Custom menu links to Spanish on /admin/config/regional/content-language

but it's still not translating on my nextjs site so I'm wondering if I'm missing something else on the ACMS side.
I did get context to set the locales correctly after adding them to the nextconfig.

Steps -

Setup the headless ACMS starter kit using the command ./vendor/bin/acms acms:install with the demo content
Visit /admin/config/regional/language to add a new language say Snanish (langcode=es)
Configure the locales in nextjs as per https://nextjs.org/docs/advanced-features/i18n-routing#getting-started
Go to /admin/content and edit any existing article (or add new article) and add content for both EN and ES
Visit the site NextJS site /es/articles and notice it will show you the spanish version of articles if available
For menu => Visit main menu /admin/structure/menu/manage/main
Edit the Articles main menu link and add the spanish translation for the link
Now verify on the nextjs site by visiting /es locale on site

@joshirohit100 Thank you! Got it to work. I didn't add any translation to an article before which I guess is what I was missing.

Works as expected 👍
Head:

This PR:

Tested with next.config.js
module.exports = {
  images: {
    domains: [process.env.NEXT_IMAGE_DOMAIN ?? ''],
  },
  i18n: {
    locales: ['es', 'en'],
    defaultLocale: 'en',
  },
};

Tested in dev mode because there is a build error complaining about /es/ pages that don't exist because I only added translations for one article.

Yes! build error is there (for me as well) and seems its because of https://www.drupal.org/project/decoupled_router/issues/3111456


[BUG] Deleting Liquid files breaks development

Describe the bug
While packer start or packer watch is running, deleting a liquid file in the src folder causes development to break. The file in the src folder is deleted, but that same file in the dist folder still remains.
To Reproduce
Steps to reproduce the behavior:

packer start
create a liquid file in the src folder (e.g. src/snippets/product-card.liquid)
Delete the newly created file
See error

Expected behavior
Deleting a liquid file under any subdirectory in the src folder should also delete the file in the dist folder and upload the change to Shopify.
Screenshots

System (please complete the following information):

OS: Mac OSX 11.3
Node Version v12.22.1
NPM Version 6.14.12
Browser chrome 90.0.4430.93

Packer (please complete the following information):

Version v2.1.5

Theme (please complete the following information):

Shopify Packer theme True
Version 1.0.13

@jzelaya-manduka This has been fixed in v2.1.9

@hayes0724 I've upgraded to v2.2.0 and I no longer see the error in the console and deleted files in the dist folder are now removed as intended. However after running packer start and then adding and deleting the file, the deleted file in the dist folder doesn't trigger an update to remove it from Shopify. Is this the expected behavior?


WIP: New integration: hourly price of electricity in Spain

I've been using a custom_component sensor for the hourly price of electricity for almost 2 years, but after seeing it as a feature request in the forum, I decided to clean and update it up to current standards to propose it as new integration: pvpc_hourly_pricing
Description

Cloud polling sensor that downloads an XML file provided by the official API of the electric network operator in Spain (REE) to extract the 'PVPC' prices for each hour of the day, in €/kWh.
The configuration is done by selecting one of the 3 reference tariffs in Spain, with
1, 2, or 3 billing periods for each one.
Features config flow, entity registry,  RestoreEntity, and options flow to change tariff
Manual yaml config can be done as sensor platform entity or by component. (if some of these are deprecated there is no problem to remove those, I just wanted to cover all cases first)
Minimal polling, with 3 API calls/hour at random times with smart retry; fully async
Only 1 state change / hour (only when the price changes)
In evening, downloads published prices for next day, to always store prices info for a window of [3, 27] hours in the future.
Include useful state attributes to program automations to be run at best electric prices.
Add spanish and english translations.
Requires xmltodict to parse official xml file with hourly prices for each day.

Breaking change

Proposed change

Type of change

[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[x] New integration (thank you!)
[ ] New feature (which adds functionality to an existing integration)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

The simplest way of using it is to add it from "Integrations" (can be used multiple times to set sensors with different tariffs), but there is also the possibility of manual yaml setup, both as sensor platform entities or by component entities.
# Example configuration.yaml as component
pvpc_hourly_pricing:
  - name: PVPC manual ve
    tariff: coche_electrico
  - name: PVPC manual nocturna
    tariff: discriminacion

# Example configuration.yaml as sensor platform
sensor:
  - platform: pvpc_hourly_pricing
    name: pvpc_manual_sensor
    tariff: normal

  - platform: pvpc_hourly_pricing
    name: pvpc_manual_sensor_2
    tariff: discriminacion
    timeout: 8

Additional information

This PR fixes or closes issue: fixes #
This PR is related to issue:
Link to documentation pull request: TODO docs

Checklist

[x] The code change is tested and works locally.
[x] Local tests pass. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist
[x] The code has been formatted using Black (black --fast homeassistant tests)
[x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated for www.home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[x] The manifest file has all fields filled out correctly.
Updated and included derived files by running: python3 -m script.hassfest.
[x] New or updated dependencies have been added to requirements_all.txt.
Updated by running python3 -m script.gen_requirements_all.
[ ] Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

[ ] No score or internal
[ ] 🥈 Silver
[ ] 🥇 Gold
[x] 🏆 Platinum

I hope!
If not, there is no problem to change it until it reaches platinum score :)

bad branch, my bad, I will open it again


Remove sudo: required from travis.yml

It seems that xmonad is getting the same issue with building X11 that required us to add sudo back to travis.yml (see xmonad/xmonad#88), we should follow along with the discussion there to see if they are able to fix it

Sort of fixed by #225


Substitute not working

4.2 Substitute						*:substitute*
							*:s* *:su*
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
			For each line in [range] replace a match of {pattern}
			with {string}.
			For the {pattern} see |pattern|.
			{string} can be a literal string, or something
			special; see |sub-replace-special|.
			When [range] and [count] are omitted, replace in the
			current line only.
			When [count] is given, replace in [count] lines,
			starting with the last line in [range].  When [range]
			is omitted start in the current line.
			Also see |cmdline-ranges|.
			See |:s_flags| for [flags].

This is functionality for search and replace %s/search/replace/g
							*:s_flags*
The flags that you can use for the substitute commands:

[&]	Must be the first one: Keep the flags from the previous substitute
	command.  Examples: >
		:&&
		:s/this/that/&
<	Note that `:s` and `:&` don't keep the flags.
	{not in Vi}

[c]	Confirm each substitution.  Vim highlights the matching string (with
	|hl-IncSearch|).  You can type:				*:s_c*
	    'y'	    to substitute this match
	    'l'	    to substitute this match and then quit ("last")
	    'n'	    to skip this match
	    <Esc>   to quit substituting
	    'a'	    to substitute this and all remaining matches {not in Vi}
	    'q'	    to quit substituting {not in Vi}
	    CTRL-E  to scroll the screen up {not in Vi, not available when
			compiled without the |+insert_expand| feature}
	    CTRL-Y  to scroll the screen down {not in Vi, not available when
			compiled without the |+insert_expand| feature}
	If the 'edcompatible' option is on, Vim remembers the [c] flag and
	toggles it each time you use it, but resets it when you give a new
	search pattern.
	{not in Vi: highlighting of the match, other responses than 'y' or 'n'}

[e]     When the search pattern fails, do not issue an error message and, in
	particular, continue in maps as if no error occurred.  This is most
	useful to prevent the "No match" error from breaking a mapping.  Vim
	does not suppress the following error messages, however:
		Regular expressions can't be delimited by letters
		\ should be followed by /, ? or &
		No previous substitute regular expression
		Trailing characters
		Interrupted
	{not in Vi}

[g]	Replace all occurrences in the line.  Without this argument,
	replacement occurs only for the first occurrence in each line.  If
	the 'edcompatible' option is on, Vim remembers this flag and toggles
	it each time you use it, but resets it when you give a new search
	pattern.  If the 'gdefault' option is on, this flag is on by default
	and the [g] argument switches it off.

[i]	Ignore case for the pattern.  The 'ignorecase' and 'smartcase' options
	are not used.
	{not in Vi}

[I]	Don't ignore case for the pattern.  The 'ignorecase' and 'smartcase'
	options are not used.
	{not in Vi}

[n]	Report the number of matches, do not actually substitute.  The [c]
	flag is ignored.  The matches are reported as if 'report' is zero.
	Useful to |count-items|.
	If \= |sub-replace-expression| is used, the expression will be
	evaluated in the |sandbox| at every match.

[p]	Print the line containing the last substitute.

[#]	Like [p] and prepend the line number.

[l]	Like [p] but print the text like |:list|.

[r]	Only useful in combination with `:&` or `:s` without arguments.  `:&r`
	works the same way as `:~`:  When the search pattern is empty, use the
	previously used search pattern instead of the search pattern from the
	last substitute or `:global`.  If the last command that did a search
	was a substitute or `:global`, there is no effect.  If the last
	command was a search command such as "/", use the pattern from that
	command.
	For `:s` with an argument this already happens: >
		:s/blue/red/
		/green
		:s//red/   or  :~   or  :&r
<	The last commands will replace "green" with "red". >
		:s/blue/red/
		/green
		:&
<	The last command will replace "blue" with "red".
	{not in Vi}

Note that there is no flag to change the "magicness" of the pattern.  A
different command is used instead, or you can use |/\v| and friends.  The
reason is that the flags can only be found by skipping the pattern, and in
order to skip the pattern the "magicness" must be known.  Catch 22!

If the {pattern} for the substitute command is empty, the command uses the
pattern from the last substitute or `:global` command.  If there is none, but
there is a previous search pattern, that one is used.  With the [r] flag, the
command uses the pattern from the last substitute, `:global`, or search
command.

If the {string} is omitted the substitute is done as if it's empty.  Thus the
matched pattern is deleted.  The separator after {pattern} can also be left
out then.  Example: >
	:%s/TESTING
This deletes "TESTING" from all lines, but only one per line.

For compatibility with Vi these two exceptions are allowed:
"\/{string}/" and "\?{string}?" do the same as "//{string}/r".
"\&{string}&" does the same as "//{string}/".
							*E146*
Instead of the '/' which surrounds the pattern and replacement string, you
can use any other single-byte character, but not an alphanumeric character,
'\', '"' or '|'.  This is useful if you want to include a '/' in the search
pattern or replacement string.  Example: >
	:s+/+//+

For the definition of a pattern, see |pattern|.  In Visual block mode, use
|/\%V| in the pattern to have the substitute work in the block only.
Otherwise it works on whole lines anyway.

					*sub-replace-special* *:s\=*
When the {string} starts with "\=" it is evaluated as an expression, see
|sub-replace-expression|.  You can use that for complex replacement or special
characters.

Otherwise these characters in {string} have a special meaning:
								*:s%*
When {string} is equal to "%" and '/' is included with the 'cpoptions' option,
then the {string} of the previous substitute command is used, see |cpo-/|

magic	nomagic	  action    ~
  &	  \&	  replaced with the whole matched pattern	     *s/\&*
 \&	   &	  replaced with &
      \0	  replaced with the whole matched pattern	   *\0* *s/\0*
      \1	  replaced with the matched pattern in the first
		  pair of ()					     *s/\1*
      \2	  replaced with the matched pattern in the second
		  pair of ()					     *s/\2*
      ..	  ..						     *s/\3*
      \9	  replaced with the matched pattern in the ninth
		  pair of ()					     *s/\9*
  ~	  \~	  replaced with the {string} of the previous
		  substitute					     *s~*
 \~	   ~	  replaced with ~				     *s/\~*
      \u	  next character made uppercase			     *s/\u*
      \U	  following characters made uppercase, until \E      *s/\U*
      \l	  next character made lowercase			     *s/\l*
      \L	  following characters made lowercase, until \E      *s/\L*
      \e	  end of \u, \U, \l and \L (NOTE: not <Esc>!)	     *s/\e*
      \E	  end of \u, \U, \l and \L			     *s/\E*
      <CR>	  split line in two at this point
		  (Type the <CR> as CTRL-V <Enter>)		     *s<CR>*
      \r	  idem						     *s/\r*
      \<CR>	  insert a carriage-return (CTRL-M)
		  (Type the <CR> as CTRL-V <Enter>)		     *s/\<CR>*
      \n	  insert a <NL> (<NUL> in the file)
		  (does NOT break the line)			     *s/\n*
      \b	  insert a <BS>					     *s/\b*
      \t	  insert a <Tab>				     *s/\t*
      \\	  insert a single backslash			     *s/\\*
      \x	  where x is any character not mentioned above:
		  Reserved for future expansion

The special meaning is also used inside the third argument {sub} of
the |substitute()| function with the following exceptions:
  - A % inserts a percent literally without regard to 'cpoptions'.
  - magic is always set without regard to 'magic'.
  - A ~ inserts a tilde literally.
  - <CR> and \r inserts a carriage-return (CTRL-M).
  - \<CR> does not have a special meaning. it's just one of \x.

Examples: >
  :s/a\|b/xxx\0xxx/g		 modifies "a b"	     to "xxxaxxx xxxbxxx"
  :s/\([abc]\)\([efg]\)/\2\1/g	 modifies "af fa bg" to "fa fa gb"
  :s/abcde/abc^Mde/		 modifies "abcde"    to "abc", "de" (two lines)
  :s/$/\^M/			 modifies "abcde"    to "abcde^M"
  :s/\w\+/\u\0/g		 modifies "bla bla"  to "Bla Bla"
  :s/\w\+/\L\u/g		 modifies "BLA bla"  to "Bla Bla"

Note: "\L\u" can be used to capitalize the first letter of a word.  This is
not compatible with Vi and older versions of Vim, where the "\u" would cancel
out the "\L". Same for "\U\l".

Note: In previous versions CTRL-V was handled in a special way.  Since this is
not Vi compatible, this was removed.  Use a backslash instead.

command		text	result ~
:s/aa/a^Ma/	aa	a<line-break>a
:s/aa/a\^Ma/	aa	a^Ma
:s/aa/a\\^Ma/	aa	a\<line-break>a

(you need to type CTRL-V <CR> to get a ^M here)

The numbering of "\1", "\2" etc. is done based on which "\(" comes first in
the pattern (going left to right).  When a parentheses group matches several
times, the last one will be used for "\1", "\2", etc.  Example: >
  :s/\(\(a[a-d] \)*\)/\2/      modifies "aa ab x" to "ab x"

When using parentheses in combination with '|', like in \([ab]\)\|\([cd]\),
either the first or second pattern in parentheses did not match, so either
\1 or \2 is empty.  Example: >
  :s/\([ab]\)\|\([cd]\)/\1x/g   modifies "a b c d"  to "ax bx x x"
<

Substitute with an expression			*sub-replace-expression*
						*sub-replace-\=* *s/\=*
When the substitute string starts with "\=" the remainder is interpreted as an
expression.  This does not work recursively: a |substitute()| function inside
the expression cannot use "\=" for the substitute string.

The special meaning for characters as mentioned at |sub-replace-special| does
not apply except for "<CR>".  A <NL> character is used as a line break, you
can get one with a double-quote string: "\n".  Prepend a backslash to get a
real <NL> character (which will be a NUL in the file).

The "\=" notation can also be used inside the third argument {sub} of
|substitute()| function.  In this case, the special meaning for characters as
mentioned at |sub-replace-special| does not apply at all. Especially, <CR> and
<NL> are interpreted not as a line break but as a carriage-return and a
new-line respectively.

When the result is a |List| then the items are joined with separating line
breaks.  Thus each item becomes a line, except that they can contain line
breaks themselves.

The whole matched text can be accessed with "submatch(0)".  The text matched
with the first pair of () with "submatch(1)".  Likewise for further
sub-matches in ().

Be careful: The separation character must not appear in the expression!
Consider using a character like "@" or ":".  There is no problem if the result
of the expression contains the separation character.

Examples: >
	:s@\n@\="\r" . expand("$HOME") . "\r"@
This replaces an end-of-line with a new line containing the value of $HOME. >

	s/E/\="\<Char-0x20ac>"/g
This replaces each 'E' character with a euro sign.  Read more in |<Char->|.

Ok, this is not exactly search and replace, this behaves differently:
4.3 Search and replace					*search-replace*

							*:pro* *:promptfind*
:promptf[ind] [string]
			Put up a Search dialog.  When [string] is given, it is
			used as the initial search string.
			{only for Win32, Motif and GTK GUI}

						*:promptr* *:promptrepl*
:promptr[epl] [string]
			Put up a Search/Replace dialog.  When [string] is
			given, it is used as the initial search string.
			{only for Win32, Motif and GTK GUI}

But everyone uses substitute :)


Bad margins in debug call stack

The call stack line numbers overlap with the scrollbar. Make sure we get enough right margin/padding in there.

Nice catch
Added 0.15 em to the right margin, since we already had a left margin. I like it now

You're as fast as :zap: Gordon.

Instead of this fix, I suggest you remove that and increase the right-margin of the div.stack-frame to 1.2em.
Marking this as verified though.

When making the viewlet horizontally small file name: line number get hidden if there is not enough space so I went with 0.8em since 1.2em felt like too much


[SPARK-25513][SQL] Read zipped CSV and JSON

What changes were proposed in this pull request?
In the PR, I propose to support reading of zip archives containing one CSV or JSON file in the multi-line mode.
How was this patch tested?
Added tests for CSV and JSON where zip archives are created by Java library.

Test build #96477 has started for PR 22528 at commit ec8ba0d.

Test build #96477 has finished for PR 22528 at commit ec8ba0d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

@HyukjinKwon One of main use cases which the PR addresses is reading zipped CSV files. Currently it is possible to read such files by Spark but the approach looks over-complicated, for example: https://docs.azuredatabricks.net/spark/latest/data-sources/zip-files.html#zip-files

@gatorsmile Please, take a look at the PR.

Generally, this is useful for reading the zip archives containing a single CSV. The extra support JSON file is not very useful.
The major limitation is we have to read the zipped CSV files using the multi line mode. I am not sure whether we can automatically switch to multi line mode. If so, is the result expected? Is the results different if we read it using the regular mode? If different, can we issue an exception with a better error message and let the users manually enable the multi line mode?

The limitation is quite clear - multi line mode only and single file. We don't have to rush about this - looks @MaxGekk has a clear idea on this. Another concern here is, we have another place to control the compression codec (where we usually delegate to HDFS libraries).
I don't think we can extend the current way to implement https://github.com/apache/spark/pull/22528#discussion_r219691537 idea. It just sounds like a bandaid fix to allow one zipped file case in multi line mode.

Another concern here is, we have another place to control the compression codec (where we usually delegate to HDFS libraries).

I was considering using Compressor API but its streaming nature controverses to structure of zip archive where meta-info is located at the end of files, and you cannot read/uncompress it sequentially block-by-block.

It just sounds like a bandaid fix to allow one zipped file case in multi line mode.

I believe it is better to return correct result in a case when wrong result is returned for now (try to read zipped CSV), or to force users to use this workaround only to read zip archives via RDD API: https://docs.databricks.com/spark/latest/data-sources/zip-files.html#zip-files . Especially in the case of compressed not splittable CSV, there is not big difference how to read it in multiLine enabled or disabled.

Since there is no consensus, I am going to close the PR.

@MaxGekk, please feel free to proceed based upon your idea. From a cursory look, the idea makes sense to me.

We should stop returning a wrong result. Please fix it. Thanks!


V2 project pay button

What does this PR do and why?

Creates a V2PayButton and passes it into PayButtonGroup.
Also adds a new V2ConfirmPayOwner modal in the button component which has a 'custom beneficiary' field to (can gift tokens to someone else)

Screenshots or screen recordings
[If applicable, provide screenshots or screen recordings to demonstrate the
changes.]
https://user-images.githubusercontent.com/96150256/156907102-ccb586e7-f25c-436d-8f64-8bc5fdc5189d.mp4
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] I have tested this PR in all supported browsers.

@aeolianeth addressed everything besides getting the reserved rate from the decoder (can't get working).

This is a great improvement @aeolianeth.
Few thoughts:

Should we have tooltips for any case where a card is disabled? e.g. redeem button has no tooltip when user has no tokens in the project.
Might be out of the scope of this PR, but while we're on this modal, I've noticed there's no limit on the 'Redeem tokens for ETH' input. This should be capped to the total token supply.


Include default configuration from mbed_cloud_client_user_config.h

Has been reported by @andrewc-arm
The configuration file mbed_cloud_client_user_config.h is not available in simple-mbed-cloud-client, and hence requires extra step to copy from somewhere else.
We should include a default configuration and have the ability to override from mbed_app.json

@screamerbg, @MarceloSalazar Because this is very application specific I added it to -example, not to simple-mbed-cloud-client. If you want to override it, fine, but I think it should not live in this repo.

This is now addressed.


Update schema violations so that it can contain a list of errors

A schema violation bad row is emitted by the enrich job when at least one of the input custom contexts of an event is invalid.
At the moment such a bad row can contain the information about only one invalid context, whereas there can be several at the same time.
FailureDetails.SchemaViolation should evolve so that it can contain a List[NotIglu] or a List[IgluError].

It's already the case, I got confused.


[Bug]: SfRadialGauge crash when open in new windows

Contact Details
<EMAIL_ADDRESS>What happened?
When you on Galley -> Syncfusion -> SfRadialGauge, SfBadgeView -> More detail to open the new page-> It can't do it and got out of the program.
Version
7.0
What platforms are you seeing the problem on?
Windows
Relevant log output
System.Runtime.InteropServices.COMException: 'The application called an interface that was marshalled for a different thread. (0x8001010E (RPC_E_WRONG_THREAD))'

Code of Conduct

[X] I agree to respect and follow this project's rules

git fetch origin
git checkout 124-bug-sfradialgauge-crash-when-open-in-new-windows

x:Binding of Labal Property inside gauge:RadialRange make the bug remove it resolve the problem

Wait which platform got affected? @nhatminh1401 @E-vaTRON
On windows it work


feat: add renovate regex-manager for bootstrap templates

With adding jinja to pretty much all the Flux HelmReleases Renovate will not parse those files using the builtin managers. After the templates get rendered the old style renovate comment is gone.
See here https://github.com/renovatebot/renovate/discussions/18470

Closing in favor of https://github.com/onedr0p/flux-cluster-template/pull/1163


'Stop on coverage achieved' TestSvm option

Added new option for TestSvm attribute: if it is set to true, execution stops when exprectedCoverage is achieved
Implementation details:

Statistics calculates approximate coverage as covering steps / total instructions count
Approximate coverage is checked on each .vst test generated. If it is desired, dotCover runs on generated tests. If dotCover shows desired coverage as well, test execution is stopped
 TestResultsChecker was updated to run incrementally: it it has already been run on some tests, and there are some new tests added, dotCover will be run only for them, and then results will be merged with previous

It is better to implement this feature with coverage by tests statistics