Update the incorrect JWE response decryption command mentioned in docs

This PR updates the incorrect JWE response decryption command mentioned in testing documentation

Hey @Narayanbhat166 @Chethan-rao ... can you pls review and merge this PR?
Recently my teammates faced the similar issue while trying Vault APIs referring docs


Overlay vs Routed Network Type in 1.3.0

Used the following networking values in kismatic-cluster.yaml:
  networking:
    type: routed
    pod_cidr_block: <IP_ADDRESS>/16
    service_cidr_block: <IP_ADDRESS>/16
    policy_enabled: false
    update_hosts_files: true

It does not appear that the networking type of 'routed' was used as the nodes created end up configured with IP-in-IP tunnels:
[kismaticuser@k8smaster0 ~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         <IP_ADDRESS>      <IP_ADDRESS>         UG    100    0        0 eth0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS>     U     100    0        0 eth0
<IP_ADDRESS>     k8singress0.nov <IP_ADDRESS> UG    0      0        0 tunl0
<IP_ADDRESS>  <IP_ADDRESS>         <IP_ADDRESS> U     0      0        0 *
<IP_ADDRESS>    k8sworker2.nova <IP_ADDRESS> UG    0      0        0 tunl0
<IP_ADDRESS>    k8sworker1.nova <IP_ADDRESS> UG    0      0        0 tunl0
<IP_ADDRESS>   k8sworker0.nova <IP_ADDRESS> UG    0      0        0 tunl0
<IP_ADDRESS> <IP_ADDRESS>      <IP_ADDRESS> UGH   100    0        0 eth0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS>     U     0      0        0 docker0
[kismaticuser@k8smaster0 ~]$

Did not encounter this issue previously when using v1.2.0
The environment used is RHEL 7.2 on OpenStack VMs.

Thanks @paalth
To clarify, you have been using kismatic with routed networking instead of overlay in the past?

Hey @paalth, would it be possible for you to test the change that is in #529?

The change that is in #529 has missing quotes around the values (the values are strings).
After adding quotes I ran another manual test and routed mode seems to be correctly configured:
[kismaticuser@k8smaster0 ~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         <IP_ADDRESS>      <IP_ADDRESS>         UG    100    0        0 eth0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS>     U     100    0        0 eth0
<IP_ADDRESS>    k8sworker2.nova <IP_ADDRESS> UG    0      0        0 eth0
<IP_ADDRESS>   k8sworker0.nova <IP_ADDRESS> UG    0      0        0 eth0
<IP_ADDRESS> <IP_ADDRESS>      <IP_ADDRESS> UGH   100    0        0 eth0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS>     U     0      0        0 docker0
[kismaticuser@k8smaster0 ~]$

The installation doesn't complete successfully yet (the DNS pods keep crashing due to some network config problem), but I believe the issue with the installer not using the configured network type could be consider fixed if the quotes are added in #529 as mentioned above.


Add support for Content Alignment inside AutoSuggestBox

Description
This PR adds binding of VerticalContentAlignment and HorizontalContentAlignment to AutoSuggestBox.
Motivation and Context

This PR fixes #3284
Before, it was impossible to set the content alignment inside AutoSuggestBox using the appropriate arguments in the constructor. This PR makes it possible to set content alignment to the desired values via:
<AutoSuggestBox VerticalContentAlignment="Bottom" HorizontalContentAlignment="Left"/>
If the user doesn't provide the content alignment values, the content will be in the left top corner of the box.
How Has This Been Tested?

Manually tested the changes (see the attached screenshot).
Screenshots (if appropriate):

Content position without providing any content alignment properties:

Content position with VerticalContentAlignment = "Bottom" and HorizontalContentAlignment = "Center":

@chingucoding @Felix-Dev added it to the default text box:)

@beervoley You will need to update the visual verification files in order to resolve these test failures, reach out to me if you need help resolving that.

/azp run

@beervoley can you merge master into this branch? that will pick up the fix for the visual verifications files that went in today then we can rerun the pipeline to get the verification files you need, and rerun with those to get a clear test pass :)

/azp run

/azp run

/azp run

/azp run


issue in free()

Hi nlohmann,
Don't know if anyone has encountered this issue before, and I am not sure if it is and issue with the library.
I just create a json object, and dump it, publish the result to redis, whenever I receive a message from a TCP socket.  However, after running for 15-30 mins, I have a memory error.
The code is very simple:
json jud=json::object();
string timenow = currentTimeStr();
jud["Msg_seq"]=epochTimeStr();
jud["Time"]=timenow;
jud["TimeArrive"]=timenow;
jud["Exchange"]="IB";
jud["Symbol"]="USD_JPY";
string judstr = jud.dump();
redis_cli_.publish("UPDATEx|USD_JPY.IB", judstr, [](cpp_redis::reply &reply) {
//std::cout << "publish UPDATE: " << reply << std::endl;
});
The error:
free(): invalid next size (fast)
Thread 1 "TWS_Client" received signal SIGABRT, Aborted.
0x00007ffff72abae0 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install libgcc-7.3.1-6.amzn2.0.4.x86_64 libstdc++-7.3.1-6.amzn2.0.4.x86_64
(gdb)
(gdb) bt
#0  0x00007ffff72abae0 in raise () from /lib64/libc.so.6
#1  0x00007ffff72acf88 in abort () from /lib64/libc.so.6
#2  0x00007ffff72ebb94 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff72f180a in malloc_printerr () from /lib64/libc.so.6
#4  0x00007ffff72f330b in _int_free () from /lib64/libc.so.6
#5  0x0000555555587e60 in void __gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::destroy<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) ()
#6  0x00005555555847ea in void std::allocator_traits<std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >::destroy<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >(std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) ()
#7  0x000055555558032a in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::json_value::destroy(nlohmann::detail::value_t) ()
#8  0x000055555557c96b in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::~basic_json() ()
#9  0x000055555558024f in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::json_value::destroy(nlohmann::detail::value_t) ()
#10 0x000055555557c96b in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::~basic_json() ()
#11 0x0000555555572d3c in TestCppClient::updateMktDepth(long, int, int, int, double, int) ()
#12 0x00005555555c3bb1 in EDecoder::processMarketDepthMsg(char const*, char const*) ()
#13 0x00005555555cb881 in EDecoder::parseAndProcessMsg(char const*&, char const*) ()
#14 0x00005555555e213c in EReader::processMsgs() ()
#15 0x00005555555657b7 in TestCppClient::processMessages() ()
#16 0x000055555559fb1e in main ()
Describe which system (OS, compiler) you are using.
Virtualbox, Ubuntu 18.04, x86_64 , gc 7.4.0

Describe which version of the library you are using (release version, develop branch).
master branch, version 3.7.3

This is odd as the library does not leak any memory or has any known memory issues. If I had to guess, it is unrelated to the library and it is more likely that some thread is messing with the memory.
Can you reproduce the issue? If so, could you try to run it with Valgrind or ASAN?

Thanks for the reply. It might not be the issue with the library. I will observe a few more days and update the status. I will close this issue if it is not relevant.

Unfortunately I do re-create the error, after running like 30 mins. It is not exactly the same but very similar, and if I don't create a json object, the program doesn't create similar memory error.
I am using single include json.hpp in master branch. Which branch is more stable, master or dev ?
The error:
free(): invalid pointer
Thread 1 "TWS_Client" received signal SIGABRT, Aborted.
0x00007ffff6ef893f in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install libgcc-8.2.1-3.5.el8.x86_64 libstdc++-8.2.1-3.5.el8.x86_64
(gdb) bt
#0  0x00007ffff6ef893f in raise () from /lib64/libc.so.6
#1  0x00007ffff6ee2c95 in abort () from /lib64/libc.so.6
#2  0x00007ffff6f3bd57 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff6f4268c in malloc_printerr () from /lib64/libc.so.6
#4  0x00007ffff6f43e84 in _int_free () from /lib64/libc.so.6
#5  0x00007ffff7b6c6e0 in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) ()
from /lib64/libstdc++.so.6
#6  0x00007ffff7b6dddb in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const*, unsigned long) () from /lib64/libstdc++.so.6
#7  0x0000000000442ec7 in nlohmann::detail::output_string_adapter<char, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::write_characters(char const*, unsigned long) ()
#8  0x0000000000430eb9 in nlohmann::detail::serializer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> >::dump(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, bool, bool, unsigned int, unsigned int) ()
#9  0x000000000042e45e in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::dump(int, char, bool, nlohmann::detail::error_handler_t) const ()
#10 0x0000000000424cc3 in TestCppClient::updateMktDepth(long, int, int, int, double, int) ()
#11 0x000000000047077b in EDecoder::processMarketDepthMsg(char const*, char const*) ()
#12 0x00000000004778fe in EDecoder::parseAndProcessMsg(char const*&, char const*) ()
#13 0x000000000048d319 in EReader::processMsgs() ()
#14 0x0000000000418674 in TestCppClient::processMessages() ()
#15 0x000000000044f3b8 in main ()
(gdb) quit

Quite strange, the problem appears to happen in dump().  I print out the values in the json object "jud", and there is no problem:
cout<< jud["Msg_seq"] << " " << jud["Time"]<< " " << jud["TimeArrive"] << " "<<jud["Exchange"] << " " << jud["Symbol"] <<endl;
"1578478352227862" "2020-01-08 10:12:32" "2020-01-08 10:12:32" "IB" "USD_JPY"
I use jud.dump(-1, ' ', false, json::error_handler_t::ignore), and the error becomes:
munmap_chunk(): invalid pointer
Thread 1 "TWS_Client" received signal SIGABRT, Aborted.
0x00007ffff6ef893f in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install libgcc-8.2.1-3.5.el8.x86_64 libstdc++-8.2.1-3.5.el8.x86_64
(gdb) bt
#0  0x00007ffff6ef893f in raise () from /lib64/libc.so.6
#1  0x00007ffff6ee2c95 in abort () from /lib64/libc.so.6
#2  0x00007ffff6f3bd57 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff6f4268c in malloc_printerr () from /lib64/libc.so.6
#4  0x00007ffff6f42be4 in munmap_chunk () from /lib64/libc.so.6
#5  0x00007ffff7b6c6e0 in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) ()
from /lib64/libstdc++.so.6
#6  0x00007ffff7b6dddb in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const*, unsigned long) () from /lib64/libstdc++.so.6
#7  0x0000000000442c97 in nlohmann::detail::output_string_adapter<char, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::write_characters(char const*, unsigned long) ()
#8  0x0000000000433cc4 in nlohmann::detail::serializer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> >::dump_escaped(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool) ()
#9  0x0000000000430bb2 in nlohmann::detail::serializer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> >::dump(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, bool, bool, unsigned int, unsigned int) ()
#10 0x00000000004304db in nlohmann::detail::serializer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> >::dump(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, bool, bool, unsigned int, unsigned int) ()
#11 0x000000000042de10 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::dump(int, char, bool, nlohmann::detail::error_handler_t) const ()
#12 0x0000000000424bf7 in TestCppClient::updateMktDepth(long, int, int, int, double, int) ()
#13 0x0000000000470605 in EDecoder::processMarketDepthMsg(char const*, char const*) ()
#14 0x0000000000477788 in EDecoder::parseAndProcessMsg(char const*&, char const*) ()
#15 0x000000000048d1a3 in EReader::processMsgs() ()
#16 0x0000000000418724 in TestCppClient::processMessages() ()
#17 0x000000000044f242 in main ()


Inconsistency between cb and promise with @google-cloud/datastore nodejs

Environment details

OS: linux
Node.js version: 7.7.3
npm version: 4.4.4
google-cloud-node version: @google-cloud/datastore: 0.7.1

Steps to reproduce

require @google-cloud/datastore
get(keyObj)

Using a callback approach with 1 key
get(key, (err, entity) => {} will output an object
whereas using a promise approach with 1 key
get(key).then(entity => {}) will output a 1 sized array containing the object

@stephenplusplus Hi there! A bit of feedback: this is confusing and hard to find an answer for. You should improve docs there.
Moreover, I don't think your answer addresses the question at all. Why doesn't the callback API return an array too then? That would consistent (although weird).

We have two ways of using every method, and I think if we dual-documented every method, we'd end up confusing everybody. In our documentation, each method has an examples section. If it can be run as a promise, it will show the response arguments to the then handler. That's where we show that an array is returned.

Why doesn't the callback API return an array too then?

We're trying to be consistent for each user. A promise user should expect us to be consistent with how we return responses in promise mode, and a callback user should expect us to be consistent with how we return responses in callback mode. We can't be consistent between callback and promise because of the promise spec, which refuses multiple arguments to a promise's resolution. In other words, we can't do this:
method().then(function(items, apiResponse) {})

We have to do put them into a single structure of either an array or object
method().then(function(resp) { resp[0] === items && resp[1] === apiResponse })

You should improve docs there.

I want this, too. How?

An introductory paragraph explaining the thing you just explained :) most libraries I've used in node return array for multiple results and objects for single results.
So I jumped to this conclusion and was confused

@stephenplusplus this brings up a good point - if we're deprecating the meta packages, perhaps we'll need to include instructions for things that would have typically belonged inside of the meta package overview everywhere else (e.g. interceptors, promises, config object, etc.)

Good thinking, maybe it should be part of the Overview template.

I see progress and I see no need for further commenting on my part.
Thank you very much and congrats on thorough feedback process.

(Coming from #1768).  I have developed a few apps on App Engine for two years but not on Node. In my current project, I am using the Node datastore library for the first time as I am integrating it with Cloud Functions beta.
As a new user to the library, I have to check the docs and tutorials on how to use different methods. I didn't realize that there was consistency for "promise users" and "callback users", and I didn't realize that promise result arguments were designed to be consistent across various APIs until I read this thread.
To put it in another way, as a new user, the point on consistency for promise arguments across different APIs was not that important for me. I spent some time debugging why my batch get only had one element when I iterated over the outer array. Looking back, the docs did show an example that showed the need to access the first element of the array first.
That being said, experienced users may find the consistency to be highly beneficial. Establishing consistency is valuable to library developers as well. Just my two cents. Thanks!

I encountered this too and was confused until I read through this issue. Second the idea of adding some clarity in the documentation.
With regards @stephenplusplus comment about 'single structure of either an array or an object', why not an object rather than array?
Instead of:
file.getMetadata().then(function(data) {
  var metadata = data[0];
  var apiResponse = data[1];
});

I could then:
file.getMetadata().then(function(data) {
  var metadata = data.metadata;
  var apiResponse = data.apiResponse;
});

@DazWilkin Ultimately we decided to go with arrays over objects to benefit users who use promise libraries that have a spread method.

@callmehiphop, is there anything actionable on this issue?


Replace sources selection with new selection List/Dictionary & FOSS model support

NOTE: This is a breaking change, and we're early enough into the project to make these breaking.
Solving this issue will help to solve #21 and we should throw in making the URL for the APIs configurable as to support FOSS OpenAI compatible APIs.
We currently configure sources like so in Vim:
let g:neural = {
\   'source': {
\       'openai': {
\           'api_key': $OPENAI_API_KEY,
\       },
\   },
\}

And also in Lua:
require('neural').setup({
  ui = {
    animated_sign_enabled = false,
  },
  source = {
    openai = {
      api_key = vim.env.OPENAI_API_KEY,
    },
  },
})

We then select a source like so:
g:neural.selected                                           *g:neural.selected*
                                                        *vim.g.neural.selected*
Type: |String|
Default: `'openai'`

Selects a source for Neural to use. Possible values are:

1. `'openai'` - OpenAI
2. `'chatgpt'` - ChatGPT

Expressed in Lua syntax alone, we should instead make our sources configurable this way:
require('neural').setup({
  ui = {
    animated_sign_enabled = false,
  },
  source = {
    type = 'openai',
    api_key = vim.env.OPENAI_API_KEY,
    url = 'https://custom-url.com',
  },
})

Setting the source itself should set the selection. We need to add a url setting to the existing sources to make it possible to select FOSS models. We should additionally support this in future, but not now (separate issue).
All possible fields should always support defaults at all times, and the type should determine the default values we select. The values should be printed back to the user so you can see exactly what is selected, including when you :echo g:neural.
require('neural').setup({
  ui = {
    animated_sign_enabled = false,
  },
  source = {
    {
      type = 'openai',
      url = 'https://custom-url-1.com',
    },
    {
      type = 'openai',
      url = 'https://custom-url-2.com',
    },
  },
})

The plugin could explain back to the user automatically when no source is selected that they need to set one, and point them to the documentation on how to do so.

It would be also helpful when using enterprise instances


isort extension not working on remote container

Type: Bug

Behaviour
isort was working fine prior to being broken out into the new extension.  now it doesn't work at all (no sorting).
Expected vs. Actual
I expect it to work, and it does nothing.
Steps to reproduce:

Open a remote container (a docker container running on a remote server).
Project has [tool:isort] config in setup.cfg

Diagnostic data

Python version (& distribution if applicable, e.g. Anaconda): 3.10.7
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
Value of the python.languageServer setting: Pylance

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

Experiment 'pythonaacf' is active
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
Python interpreter path: /usr/local/bin/python
Starting Pylance language server.
> conda info --json
Extension search path: /home/gidev/.vscode-server/extensions
> /usr/local/bin/python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/interpreterInfo.py
Extension search path: /home/gidev/.vscode-server/extensions
> /usr/local/bin/python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/linter.py -m mypy --follow-imports=silent --ignore-missing-imports --show-column-numbers --no-pretty /cargo/api/public/graphql/resolve/query/post.py
cwd: /cargo/api
> /usr/local/bin/python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/linter.py -m flake8 /cargo/api/public/graphql/resolve/query/post.py
cwd: /cargo/api
> /usr/local/bin/python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/linter.py -m mypy --follow-imports=silent --ignore-missing-imports --show-column-numbers --no-pretty /cargo/api/public/graphql/resolve/query/post.py
cwd: /cargo/api
> /usr/local/bin/python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/linter.py -m flake8 /cargo/api/public/graphql/resolve/query/post.py
cwd: /cargo/api
##########Linting Output - mypy##########

##########Linting Output - flake8##########

User Settings

languageServer: "Pylance"

linting
• flake8Enabled: true
• mypyEnabled: true

testing
• pytestEnabled: true

Extension version: 2022.8.0
VS Code version: Code 1.73.1<PHONE_NUMBER>f055b99068d3688932416f2346dd3b, 2022-11-09T02:22:48.959Z)
OS version: Darwin arm64 22.1.0
Modes:
Sandboxed: No
Remote OS version: Linux x64 4.14.262-200.489.amzn2.x86_64
Remote OS version: Linux x64 4.14.262-200.489.amzn2.x86_64
Connection to 'attached-container+7b22636f6e7461696e65724e616d65223a222f636172676f5f6f66666963655f31222c2273657474696e6773223a7b22636f6e74657874223a226d655f646576227d7d' could not be established

System Info

Item
Value

CPUs
Apple M1 Pro (8 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
3, 2, 2

Memory (System)
16.00GB (0.05GB free)

Process Argv
--crash-reporter-id 1ed310f7-1cef-41d4-acaa-253391dfe6c7

Screen Reader
no

VM
0%

Item
Value

Remote
Container cargo-www (cargo_www_1) @ me_dev

OS
Linux x64 4.14.262-200.489.amzn2.x86_64

CPUs
AMD EPYC 7571 (4 x 2199)

Memory (System)
15.52GB (6.95GB free)

VM
0%

Item
Value

Remote
Container cargo-api (cargo_backend_1) @ me_dev

OS
Linux x64 4.14.262-200.489.amzn2.x86_64

CPUs
AMD EPYC 7571 (4 x 2199)

Memory (System)
15.52GB (6.95GB free)

VM
0%

Connection to 'attached-container+7b22636f6e7461696e65724e616d65223a222f636172676f5f6f66666963655f31222c2273657474696e6773223a7b22636f6e74657874223a226d655f646576227d7d' could not be established

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
pyindex848cf:30577861
nodejswelcome1cf:30587006
fc301958:30595537
2e4cg342:30602488
gswce1:30612156
3d0df643:30608728
dbltrim-noruby:30604474
89544117:30607850

Seeing the same intermittent issues after upgrading to the latest version. Sometimes it will work (takes 10+ seconds though), other times it spins for a bit and then pops up No organize import action available
In Extensions > isort > Runtime Status I'm seeing write after end errors too.
I my case, I have skip_gitignore turned on in .isort.cfg. I have noticed this to make isort run considerably slower. If I disable it in my .isort.cfg and then restart the extension server the isort extension seems to work reliably.
Seems like this is a combo where skip_gitignore makes isort take a bit, and something in the latest extension version no longer likes to wait around for it, thus the write after end error.

Can you share the contents of Output > isort?
@ashbreeze  If you see issue due to specific settings in .isort.cfg please file it on isort (https://github.com/PyCQA/isort/issues).

Contents of Output > isort:
Name: isort
Module: isort
Python extension loading
Waiting for interpreter from python extension.
Python extension loaded

That's it, no additional lines ever, even after saving files or running Python Refactor: Sort Imports

Can you share extension host log from the output tab?

Also, console logs from Help > toggle developer tools.

There's nothing related to isort in Log (Extension Host), but I do see this in Log (Remote Extension Host):
2022-11-17 09:11:44.088 [error] Error: Header must provide a Content-Length property.
	at g.onData (/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/dist/extension.js:1:113959)
	at Socket.<anonymous> (/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/dist/extension.js:1:113680)
	at Socket.emit (node:events:526:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

@karthiknadig I don't think this is a bug on the isort side, more of a performance issue on their end that isn't handled well by the extension.
I filed a performance enhancement PR with them - https://github.com/PyCQA/isort/pull/2002

Isn't this a communication bug between VSCode and its server?

Why is this marked as "info-needed"?  What info is needed?

Is there any hope of an update here?  vscode-isort is totally broken for my due to this.

This seems like an issue with VS Code LSP client handling the messages. Transferring this over to the right repo.

@markedwards Before I send send it over, can you set isort.logLevel to debug and then try and reload and see if there is any additional information. Also, can you run pip list from the environment that you are using on remote?

I am having the same issue. isort seems to be stuck. I will try pasting debug info tomorrow

No additional info that I can see after setting isort.logLevel to debug in both my User settings and in the Remote settings.  Still just see this in Remote Extension Host output:
2023-01-20 10:47:22.363 [error] Error: Header must provide a Content-Length property.
	at g.onData (/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/dist/extension.js:1:113959)
	at Socket.<anonymous> (/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/dist/extension.js:1:113680)
	at Socket.emit (node:events:526:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

pip list output:
$ pip list
Package                  Version
------------------------ --------------
aiodataloader            0.3.0
aiohttp                  3.8.3
aiosignal                1.3.1
algoliasearch            2.6.2
anyio                    3.6.2
ariadne                  0.16.1
ariadne-django           0.3.0
ariadne-relay            0.1.0a8
asgiref                  3.5.2
astroid                  2.12.12
asttokens                2.1.0
async-timeout            4.0.2
attrs                    22.1.0
autopep8                 2.0.0
backcall                 0.2.0
backoff                  2.2.1
boto3                    1.26.11
botocore                 1.29.11
certifi                  2022.9.24
cffi                     1.15.1
charset-normalizer       2.1.1
coverage                 6.5.0
croniter                 1.3.8
cryptography             38.0.3
decorator                5.1.1
Django                   4.1.3
django-cors-headers      3.13.0
django-phonenumber-field 7.0.0
django-request-logging   0.7.5
django-storages          1.13.1
django-stubs             1.12.0
django-stubs-ext         0.7.0
easypost                 6.0.1
exceptiongroup           1.0.4
execnet                  1.9.0
executing                1.2.0
flake8                   5.0.4
flake8-import-order      0.18.1
frozenlist               1.3.3
google-i18n-address      2.5.2
gql                      3.4.0
graphql-core             3.2.3
graphql-relay            3.2.0
growthbook               0.3.1
gtin                     1.3.1649173518
gunicorn                 20.1.0
idna                     3.4
iniconfig                1.1.1
ipython                  8.6.0
jedi                     0.18.1
jmespath                 1.0.1
lazy-object-proxy        1.8.0
matplotlib-inline        0.1.6
mccabe                   0.7.0
multidict                6.0.2
mypy                     0.991
mypy-boto3-dynamodb      1.26.0.post1
mypy-extensions          0.4.3
packaging                21.3
parameterized            0.8.1
parso                    0.8.3
pexpect                  4.8.0
phonenumbers             8.13.0
pickleshare              0.7.5
pip                      22.3.1
pluggy                   1.0.0
prompt-toolkit           3.0.32
psutil                   5.9.4
psycopg2-binary          2.9.5
ptyprocess               0.7.0
pure-eval                0.2.2
pycodestyle              2.9.1
pycountry                22.3.5
pycparser                2.21
pydantic                 1.10.2
pyflakes                 2.5.0
Pygments                 2.13.0
PyJWT                    2.6.0
pyparsing                3.0.9
pytest                   7.2.0
pytest-cov               4.0.0
pytest-django            4.5.2
pytest-xdist             3.0.2
python-dateutil          2.8.2
pytoolconfig             1.2.2
PyYAML                   6.0
requests                 2.28.1
requests-toolbelt        0.10.1
rope                     1.4.0
s3transfer               0.6.0
setuptools               63.2.0
six                      1.16.0
sniffio                  1.3.0
sqlparse                 0.4.3
stack-data               0.6.1
starlette                0.20.4
stripe                   5.0.0
supervisor               4.2.4
tenacity                 8.1.0
tomli                    2.0.1
traitlets                5.5.0
types-croniter           1.3.2
types-pkg-resources      0.1.3
types-python-dateutil    <IP_ADDRESS>
types-pytz               2<IP_ADDRESS>
types-PyYAML             <IP_ADDRESS>
types-requests           <IP_ADDRESS>
types-urllib3            <IP_ADDRESS>
typing_extensions        4.4.0
Unidecode                1.3.6
urllib3                  1.26.12
wcwidth                  0.2.5
websockets               10.4
wheel                    0.38.4
wrapt                    1.14.1
yarl                     1.8.1

Also, I updated the original description with Output -> Python.  Nothing mentioning isort there.
Oddly, I can't make any other isort extensions from the Marketplace work either.  Running isort from the command line works fine, but nothing happens on saving a file in VSCode.  Linting (flake8/mypy) works fine, just no isort.

@markedwards What version of isort do you have installed in the container? I am currently using 5.11.4 with the same issues

I've tested with no isort installed in the container, and with 5.11.4 installed.  I don't think isort is being called at all, so its irrelevant what version is installed.

@markedwards The error that you are seeing "Header must provide a Content-Length property." if something is writing to the stdout. This happen when some library registers pth files with print in them. This can also occur when a library is shadowed and that unexpected library load prints something to the output. Given that you mentioned other tools are working fine, I am suspecting some library shadowing might be occurring.
In your project do you have any python files with following names:

@karthiknadig, I do have a file called utils.py, but there's no print in it.  None of the other filenames exist.

@markedwards do you have importStrategy setting set to fromEnvironment by chance?

@karthiknadig, I do not.  All of my isort extension settings are default.

What happens when you run this from a terminal from your project folder
python /home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/bundled/tool/server.py

Expectation is no error is printed, and it should just wait. Keyboard interrupt (like ctrl+c) should shutdown the server.

No error, server waits.  However, ctrl+c does not succeed in shutting down the server.  Second ctrl+c results in a crash:
$ python /home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/bundled/tool/server.py
 [2023-01-20 18:37:39,913] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature exit
 [2023-01-20 18:37:39,914] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature initialize
 [2023-01-20 18:37:39,915] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature initialized
 [2023-01-20 18:37:39,916] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature $/setTrace
 [2023-01-20 18:37:39,916] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature shutdown
 [2023-01-20 18:37:39,917] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature textDocument/didChange
 [2023-01-20 18:37:39,918] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature textDocument/didClose
 [2023-01-20 18:37:39,919] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature textDocument/didOpen
 [2023-01-20 18:37:39,920] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature workspace/didChangeWorkspaceFolders
 [2023-01-20 18:37:39,920] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature workspace/executeCommand
 [2023-01-20 18:37:39,921] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/didOpen" with options "None"
 [2023-01-20 18:37:39,922] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/didSave" with options "None"
 [2023-01-20 18:37:39,929] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/didClose" with options "None"
 [2023-01-20 18:37:39,935] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/codeAction" with options "work_done_progress=None code_action_kinds=[<CodeActionKind.SourceOrganizeImports: 'source.organizeImports'>, <CodeActionKind.QuickFix: 'quickfix'>] resolve_provider=True"
 [2023-01-20 18:37:39,935] [12381] [level=INFO] [pygls.feature_manager] Registered "codeAction/resolve" with options "None"
 [2023-01-20 18:37:39,935] [12381] [level=INFO] [pygls.feature_manager] Registered "initialize" with options "None"
 [2023-01-20 18:37:39,936] [12381] [level=INFO] [pygls.feature_manager] Registered "exit" with options "None"
 [2023-01-20 18:37:39,937] [12381] [level=INFO] [pygls.server] Starting IO server
^C [2023-01-20 18:37:58,632] [12381] [level=INFO] [pygls.server] Shutting down the server
^CTraceback (most recent call last):
  File "/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/bundled/tool/server.py", line 744, in <module>
    LSP_SERVER.start_io()
  File "/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/bundled/libs/pygls/server.py", line 237, in start_io
    self.shutdown()
  File "/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/bundled/libs/pygls/server.py", line 207, in shutdown
    self._thread_pool_executor.shutdown()
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 235, in shutdown
    t.join()
  File "/usr/local/lib/python3.10/threading.py", line 1096, in join
    self._wait_for_tstate_lock()
  File "/usr/local/lib/python3.10/threading.py", line 1116, in _wait_for_tstate_lock
    if lock.acquire(block, timeout):
KeyboardInterrupt
Exception ignored in atexit callback: <function ProcessManager.stop_all_processes at 0x7f867dff05e0>
TypeError: ProcessManager.stop_all_processes() missing 1 required positional argument: 'self'
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedReader name='<stdin>'> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x000055d7e3ef47c0)

Current thread 0x00007f867ea7c740 (most recent call first):
  <no Python frame>
Aborted (core dumped)

TypeError: ProcessManager.stop_all_processes() missing 1 required positional argument: 'self'

That is a known error. That should be fixed in the next release.
I am not sure how to dig into the header error further. @dbaeumer is there a way to log the broken message that was received by the LSP client, if yes do you know where we can find this? Particularly want to see which message got to this point:
2023-01-20 10:47:22.363 [error] Error: Header must provide a Content-Length property.
	at g.onData (/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/dist/extension.js:1:113959)
	at Socket.<anonymous> (/home/gidev/.vscode-server/extensions/ms-python.isort-2022.8.0/dist/extension.js:1:113680)
	at Socket.emit (node:events:526:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

This should be easily reproducible by installing the isort extension on a remote docker container.  @karthiknadig are you not able to repro?

@markedwards Unfortunately, I have not been able to repro this. The next step for figure this out is to get the faulty message that the language server client is receiving. That should allow us to narrow down where this is occurring.
Is it possible for you to share the container that you are using?
PS:
If you are willing to test a new build out, we have a server less mode: https://github.com/microsoft/vscode-isort/suites/10501841931/artifacts/521118312 . Download and extract the zip file, there should be a vsix. You can use Install from vsix command in VS Code to install this.
With that build, you should be able to set "isort.serverEnabled": false in your user/remote machine settings. That mode runs isort directly each time, instead of server like mode. It is less performant, but it should work better in this case.

I've traced this down to customizations that my container is making to Python logging formatting.  These changes are not recent, and I'm not clear on why this would interfere with VSCode.

Specifically, the customization in question is a logging.Filter that adds custom context to logging records.  Its this recommended Python pattern:
https://docs.python.org/3/howto/logging-cookbook.html#using-filters-to-impart-contextual-information
This is breaking something in VSCode, but I can't tell what or why.

More specifically, what's happening is the custom logging filter is being added to a handler in the root logger, in a sitecustomize module.  I worked out a minimal repro.
/isortdemo/Dockerfile:
FROM python:3.10-slim-bullseye

WORKDIR /isortdemo/
COPY --chown=$USERNAME isortdemo/ /isortdemo
USER root
RUN ln -s /isortdemo/sitecustomize.py $(python -c 'import site; print(site.getsitepackages()[0])')

/isortdemo/sitecustomize.py:
import logging
import logging.config

class ContextFilter(logging.Filter):

    def filter(self, record):
        record.foo = ""
        return True

logging.config.dictConfig({
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'root_filter': {
            '()': ContextFilter,
        },
    },
    'handlers': {
        'root': {
            'class': 'logging.StreamHandler',
            'stream': 'ext://sys.stdout',
            'filters': ['root_filter'],
        },
    },
    'root': {
        'handlers': ['root'],
        'level': 'INFO',
        'propagate': False,
    },
})

Connect to the resulting container using VSCode, install the Python extension, and observe the issue.

@markedwards VSCode and the isort server communicate over stdout. So, if something is being written to stdout. They communicate using JSON RPC. If something gets written to stdout as a part of logging customization, it will interfere.
'root': {
            'class': 'logging.StreamHandler',
            'stream': 'ext://sys.stdout',
            'filters': ['root_filter'],
        },

What happens if you configure it to write to stderr?
Additionally, were you able to try "isort.serverEnabled": false with the custom https://github.com/microsoft/vscode-isort/suites/10501841931/artifacts/521118312

I haven't tried the "isort.serverEnabled": false yet, my guess is it will work.  But this issue goes beyond just getting isort working.  Won't this issue interfere with any VSCode communication using JSON RPC?
It shouldn't be written to stderr, this config is for logging that should go to stdout.  This is a normal python configuration on top of a standard docker container.
I think this indicates a bug of some sort on the VSCode side.  The entire customization I'm doing is in the above message, and you can easily repro.  This shouldn't break VSCode.

@markedwards The issue is that when we run the isort server. the logging that is used the server which was previously not written to stdout gets written to stdout. This is what happens when I run the server with the above mentioned python config.
This breaks the communication that between VS Code and the isort server.
In the container:

The expected output here upon running server.py is that it should be empty. Nothing should get written until VSCode sends a request to the server. And the response must be a JSON RPC message.
@brettcannon Any suggestions on what we can do to avoid this?

Thanks for digging in to this @karthiknadig.  I don’t understand why simply adding a member to records in the filter would trigger unexpected output.  Without the this line there’s no issue:
    record.foo = “”

Regarding https://github.com/microsoft/vscode-isort/issues/163#issuecomment-1398802848
The problem here is that the client receives something that doesn't contain a Content-Length property hence it doesn't know how long the actual message is. So the message can not be read from the stream.
This usually happens if some other part of the server for some reason writes to the stream as well and doesn't send a valid RPC message. How do you talk between client and server. If you use stdin/stdout then very likely some part of the code prints to stdout as well.

Actually there is one other possibility: which version of the client / server are you using? Checking for the content-length was not case insensitive before and I fixed this for the latest 8.1.0-next release. Could this be a problem for you?

@dbaeumer The issue was that the configuration for logging in python for some other package was impacting the server running in python. This was causing internal logging to leak into stdout. This was an issue on the server side.

@markedwards do you have a copy or setup of Python in your container that does not have your custom logging configured? You can use isort.interpreter to specify the command to use to run the language server for isort.
Unfortunately your global change of what Python prints out to stdout by default breaks assumptions we have about how Python will operate when we use it to run tooling. So the only way I can think of to support your container setup with this extension is for you to provide a way to have Python itself function w/o flipping on all logging for all packages.
If that doesn't work then you could set up a task in VS Code that calls isort directly and rely on it directly editing your files.
But otherwise I don't see how we can support the Python you have as-is with this extension.

@brettcannon what exactly about my logging config breaks things?  The trigger in my repro above seems to be simply adding an attribute to logging record objects.  That doesn’t change anything about what’s printed to stdout.
It would be helpful to know exactly what assumptions are being made here, so I can work around the issue.

All of the following output is breaking stuff for us:
 [2023-01-20 18:37:39,913] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature exit
 [2023-01-20 18:37:39,914] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature initialize
 [2023-01-20 18:37:39,915] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature initialized
 [2023-01-20 18:37:39,916] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature $/setTrace
 [2023-01-20 18:37:39,916] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature shutdown
 [2023-01-20 18:37:39,917] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature textDocument/didChange
 [2023-01-20 18:37:39,918] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature textDocument/didClose
 [2023-01-20 18:37:39,919] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature textDocument/didOpen
 [2023-01-20 18:37:39,920] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature workspace/didChangeWorkspaceFolders
 [2023-01-20 18:37:39,920] [12381] [level=INFO] [pygls.feature_manager] Registered builtin feature workspace/executeCommand
 [2023-01-20 18:37:39,921] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/didOpen" with options "None"
 [2023-01-20 18:37:39,922] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/didSave" with options "None"
 [2023-01-20 18:37:39,929] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/didClose" with options "None"
 [2023-01-20 18:37:39,935] [12381] [level=INFO] [pygls.feature_manager] Registered "textDocument/codeAction" with options "work_done_progress=None code_action_kinds=[<CodeActionKind.SourceOrganizeImports: 'source.organizeImports'>, <CodeActionKind.QuickFix: 'quickfix'>] resolve_provider=True"
 [2023-01-20 18:37:39,935] [12381] [level=INFO] [pygls.feature_manager] Registered "codeAction/resolve" with options "None"
 [2023-01-20 18:37:39,935] [12381] [level=INFO] [pygls.feature_manager] Registered "initialize" with options "None"
 [2023-01-20 18:37:39,936] [12381] [level=INFO] [pygls.feature_manager] Registered "exit" with options "None"
 [2023-01-20 18:37:39,937] [12381] [level=INFO] [pygls.server] Starting IO server

That logging from pygls is not triggered by us. My guess is the following part of your config is what's turning logging on for all code being run by your Python interpreter and not just your own code as well as sending all logging to stdout which breaks our communication channel to VS Code which is done via stdout:
 'handlers': {
        'root': {
            'class': 'logging.StreamHandler',
            'stream': 'ext://sys.stdout',
            'filters': ['root_filter'],
        },
    },
    'root': {
        'handlers': ['root'],
        'level': 'INFO',
        'propagate': False,
    },

Otherwise I'm not familiar enough with the logging package to provide more help.

Thanks @brettcannon, this makes sense now.  Unfortunately, there are very good reasons for using this logging config, and bending it to satisfy a dev tool is kind of upside down (and might not be possible anyway).
I'll use the isort.serverEnabled option for now, I can confirm the custom build provided above works.
Food for thought -- maybe relying on stdout in this way is not the ideal pattern for VSCode?  I realise that is probably not something that will change, but its not uncommon for projects to have to customize stdout in order to route logs, and the project arguably shouldn't have to constrain its requirements to fit the IDE.

maybe relying on stdout in this way is not the ideal pattern for VSCode?

It's actually a security concern for language servers, so you're right this won't be something we change. By launching language servers as subprocesses and communicating over stdin/stdout we are able to avoid security risks where we have to communicate over a local socket that runs the risk of a malicious process trying to attach (and us messing up that the right process connected).

its not uncommon for projects to have to customize stdout in order to route logs, and the project arguably shouldn't have to constrain its requirements to fit the IDE.

This is why we let people specify a different Python install. We are unfortunately in an odd spot of not having an easy way to ship Python itself with the extension, so we have to rely on users to supply the interpreter. Hopefully some day we can maybe use WebAssembly builds of Python to run the tools, but that's a more of a long-term dream than short-term solution.

👍

We are unfortunately in an odd spot of not having an easy way to ship Python itself with the extension, so we have to rely on users to supply the interpreter.

Wouldn't running your thing in a venv solve this?
Using the venv module, your server script could have a bootstrap bit, that if it detects it's not running in your own venv would create it (if not existing) and use it. Looking at the activate script, shouldn't be that hard (to activate the env for your script), looks like it's just a matter of setting some env variables and switching to the interpreter in .venv (or whatever path). Will take a closer look when I get back from holiday.


How do I pair devices with a specified mac address? (AEGHB-860)

Checklist

[X] Checked the issue tracker for similar issues to ensure this is not a duplicate.
[X] Provided a clear description of your suggestion.
[X] Included any relevant context or examples.

Issue or Suggestion Description
When studying the example of this component, I only found the pairing via broadcast in the example control etc., but what I want to do is a master device to search for the surrounding devices, display the information of the surrounding devices, and then be able to select a device as the pairing device function, if so, the pairing function needs a parameter of the other mac address. What should I do, please?

@WzxKB

You can call espnow_send as unicast if you know the device's mac addr.

You can reference control example which only send data to the bind device if you don't know the device's mac addr.

I'm going to piggyback on this because my question is an extension of the OP.
@WzxKB If you look at the control example, you'll see the "initiator" has "binding" code.  If you double click the BOOT button, it will temporarily "pair" with the "responder".  If the unit is power cycled, it will need to "bind" again.
Looking at the method, "static void app_espnow_event_handler(void *handler_args, esp_event_base_t base, int32_t id, void *event_data)", there is:
espnow_ctrl_bind_info_t *info = (espnow_ctrl_bind_info_t *)event_data;

That struct contains the "initiators' MAC Address.  If you save that to NVS, and at boot, load it and add it as a peer with "esp_now_add_peer"

None of the binding information is on the ESP-NOW programming guide, so I'll just have to read the source to figure it out.

Having said that, the method for sending is:
static void app_initiator_send_press_cb(void *arg, void *usr_data)
{
    static bool status = 0;

    ESP_ERROR_CHECK(!(BUTTON_SINGLE_CLICK == iot_button_get_event(arg)));

    if (s_espnow_ctrl_status == APP_ESPNOW_CTRL_BOUND) {
        ESP_LOGI(TAG, "initiator send press");
        espnow_ctrl_initiator_send(ESPNOW_ATTRIBUTE_KEY_1, ESPNOW_ATTRIBUTE_POWER, status);
        status = !status;
    } else {
        ESP_LOGI(TAG, "please double click to bind the devices firstly");
    }
}

Adding the initiator to the responder's peer list means that it isn't bound.  When I tap the BOOT button to "send press", the terminal says, "app_main: please double click to bind the devices firstly"
BUT!  If I comment out the conditional, leaving:
static void app_initiator_send_press_cb(void *arg, void *usr_data)
{
    static bool status = 0;

    ESP_ERROR_CHECK(!(BUTTON_SINGLE_CLICK == iot_button_get_event(arg)));

    if (s_espnow_ctrl_status == APP_ESPNOW_CTRL_BOUND) {
        ESP_LOGI(TAG, "initiator send press");
        espnow_ctrl_initiator_send(ESPNOW_ATTRIBUTE_KEY_1, ESPNOW_ATTRIBUTE_POWER, status);
        status = !status;
    } else {
        ESP_LOGI(TAG, "please double click to bind the devices firstly");
    }
}

It will send.
My question: How do peers and bounded devices work together?  If I add a peer, why is it not automatically bound?

@dpnebert

espnow_ctrl_initiator_send send ESPNOW_ADDR_BROADCAST messgae, so it'll also send if you comment out the conditional.
The responder will not handle the data if don't receive ESPNOW_DATA_TYPE_CONTROL_BIND message because of the initiator's MAC address can't be find in its list.


Line Four

Description based on Connect Four:
Connect Four (also known as Connect 4, Four Up, Plot Four, Find Four, Captain's Mistress, Four in a Row, Drop Four, and Gravitrips in the Soviet Union) is a game in which the players choose a color and then take turns dropping colored tokens into a six-row, seven-column vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own tokens.

Completed functionality


SMS Autofill

Hi,
I want to implement the feature where user receive OTP via text and it Autofills the textfields.
Right now what's happening is I get the OTP via text and it shows up on the NumberPad but when I clicked on it then only first number is filed in textfield.
Could you please suggest something how to achieve autofill the fields just by clicking on received OTP pin ?

@Psingh148 first of all apologies I hadn't spotted the ticket.
I would assume what's happening is the autofill is firing a different set of events than the keyboard input. Are you able to share any code that I am able to look at (unless of course it's commercial software).
I should turn my attention to this library and complete some of the pending features.


yolov3 output is zero

I have gone through issues but I couldn't find the reason please let me know what can be the issue.
Thanks,
Daniel

Your issue description is too unspecific, so I cannot help much.
Are you running the code with the downloaded (pretrained with COCO) yolov3 model?
Otherwise, check out:

https://github.com/jkjung-avt/tensorrt_demos/issues/275
https://github.com/jkjung-avt/tensorrt_demos/issues/261

I have downloaded the weights from.sh file after that I have converted to onnx model and trt while I am doing inference the model is not detecting anything.

I am trying it on p2.8xlarge with cuda 10.0 and trt <IP_ADDRESS>

Try updating the CUDA driver.

I will update and I will check it

Configuration on Jetson AGX
CUDA-10.2
TensorRT - <IP_ADDRESS>
I have tried it on Jetson AGX it worked with coco weights... Now when I am trying with my own custom yolov3 model.. I am getting  an error
Weights are outside of the fp16 range. A possible fix is to retrain the model with regularization to bring the magnitude of the weights down.)
ERROR: Failed to build the TensorRT engine!
Can you please tell me How to train the yolov3 model with FP16? I am unable to train I tried multiple methods.
Thanks,
Daniel

https://github.com/jkjung-avt/tensorrt_demos/issues/161#issuecomment-662473343

Ok thanks I have one more question regarding int8 conversion I am getting out of memory error.

Please refer to the FPS numbers I posted in the README (for Jetson Nano).  You would be able to achieve higher FPS if you code with C++ (or use DeepStream SDK).
Reference: https://github.com/AlexeyAB/darknet/pull/5453#issuecomment-663593512

One more question I trained my custom model by changing the weight decay still there is the same problem weights are out of fp16 range... can you suggest weight decay value or how to train the model so that weights will be in fp16

You could refer to my yolov4_crowdhuman examples.  In addition to that, I have also trained other custom models in a very similar way.  I always used decay=0.0005 as set in the original yolov4-custom.cfg and yolov4-tiny-custom.cfg.  And the resulting model could be optimized as TensorRT FP16 engines without any problem.
I think 0.05 is too large.

yeah I will go through them if I have any doubt I will let you know. Thanks for your immediate replies :-)

I will attach my weight files and cfg can you try converting them into TRT

Please work on that by yourself.

sure


ReLinker fails to find dependencies recursively on Android-16

Hello team, thanks for the project!
Trying to use it but can't seem to get it working on older Android devices.
I've put together a trivial test case to illustrate my issue.
It's an Android JNI project with min SDK set to 16 and Android STL set to "c++_shared".
Shared STL implies that my native library depends on libc++_shared.so.
I load my native library using:
ReLinker.recursively().log(logcatLogger).loadLibrary(getApplicationContext(), "native-lib");

Here's the output from logcat:
12-24 00:00:43.912 14207-14207/? D/---ReLinker: Beginning load of native-lib...
12-24 00:00:43.912 14207-14207/? D/---ReLinker: Loading the library normally failed: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]:  1124 could not load needed library 'libc++_shared.so' for 'libnative-lib.so' (load_library[1093]: Library 'libc++_shared.so' not found)
        at java.lang.Runtime.loadLibrary(Runtime.java:370)
        at java.lang.System.loadLibrary(System.java:535)
        at com.getkeepsafe.relinker.SystemLibraryLoader.loadLibrary(SystemLibraryLoader.java:24)
        at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:163)
        at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
        at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:92)
        at com.viliussutkus89.relinkersharedstl.MainActivity.onCreate(MainActivity.java:34)
        at android.app.Activity.performCreate(Activity.java:5008)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
        at android.app.ActivityThread.access$600(ActivityThread.java:130)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:4745)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        at dalvik.system.NativeStart.main(Native Method)
12-24 00:00:43.912 14207-14207/? D/---ReLinker: native-lib (null) was not loaded normally, re-linking...
12-24 00:00:43.912 14207-14207/? D/---ReLinker: Beginning load of log...
12-24 00:00:43.912 14207-14207/? D/---ReLinker: log (null) was loaded normally!
12-24 00:00:43.912 14207-14207/? D/---ReLinker: Beginning load of m...
12-24 00:00:43.912 14207-14207/? D/---ReLinker: m (null) was loaded normally!
12-24 00:00:43.912 14207-14207/?

It works nicely if I load libc++_shared.so beforehand either manually by System.loadLibrary or using ReLinker, but that kind of defeats the purpose.
Failure happens on "system-images;android-16;default;x86" emulator image.
Works nicely on real (non-emulator) Android-25 device.
Let me know if I'm missing something obvious.
Thanks,
Vilius

Hi, any update on this issue? Related: https://github.com/gradle/gradle/issues/23023


Can we hide this share screen popup

Hello,
Its a good solution for screen capture with audio.
I am using getDisplayMedia to capture screen, It will always show share screen popup window.
Also, i have used canvas recording, but for my application their are iframes and some other things and that doesn't suit me.
Now Concerns is :-
Can we hide this share screen popup?
or is their any other way where this popup window will not show.

No, it is part of the browser.  Why would Google let their browser be used to leak private data without the user's consent?
As I was writing that I realised the irony of it but the answer is still "no" so I suggest you close this issue so as not to waste the time of the project author.

@PeteDevoy and how about changing somehow the elements on this popup window? When we include audio: true as a media constrain on getDisplayMedia(), the popup window appears with a "Share Audio" checkbox which is unchecked by default. Can we change it's state to checked by default when this popup window is opened?


Problem with better biblatex "An error occured while trying to export the selected file"

Report ID on firefox plugin :138926557
Report ID on standalone :<PHONE_NUMBER>
I suddenly cannot export using better bibtex. Things worked just fine this morning. It really looks like better bibtex is not installed anymore
although the add-on pane says it is (in zotero's preferences, the better biblatex tab is still there).
New problems which emerged at the same time :

I used to be able to drag and drop an item from Zotero into Texstudio and get the corresponding \cite{}. This does not work anymore. When I drag and drop, nothing happens.
When I left click on an item with no "extra" entry and ask to "Generate Bibtex key" nothing happens.
Although I checked the "Show citekey instead of 'extra' field in reference list" (and restarted multiple times) the 'extra' field is still there.

Regular bibtex export still works fine too.
Thanks in advance for your help.

Unfortunately I cannot access the debug logs submitted through the internal reporting facilities. It looks like another plugin has auto-updated and introduced a conflict with BBT; it's happened before, but I can usually work around it. What you will have to do is the following:

Go into the Zotero preferences, tab "Advanced", check the box that says "Enable after restart". Click "OK"
Close Firefox (make sure all windows are closed)
Re-start Firefox
Go into the Zotero preferences, tab "Advanced", click "View output"
Click in the resulting window, press control-A (select-all), then control-C (copy)
Open a plain-text editor. On Windows, notepad would do the job. Paste the log just copied into it
Save the resulting text file, and drop it into https://dbinbox.com/allthatisthecase

Can you also get me a list of plugins you installed?

Done, tell me if you did not get it.
As far as other plugins are concerned, I have ZotFile 4.1.1 installed on both the firefox and the standalone version. On the standalone, I also have Zotero Word for Mac Integration 3.5.6.SA.4.0.23, but from what I can tell, it is not installed on the firefox plugin.
Many thanks for your quick reply and for offering a somewhat anonymous solution for log submission (would have been a pain to remove all personal information from this log).

Ok, don't know why but now everything works fine again. Not sure if I the log was generated after or before things where back to normal. If it runs into trouble again, I follow the procedure once more and send you another log.

No problem. Strange, though. It looks like BBT is starting up normally, but BBT not showing any sign of life, it must bomb out fairly early. There are also zero exceptions in the log. I see Zotfile 4.1.1 released a few days ago, but I just installed it, and that in itself is not causing me any problems.
Could you try opening "http://localhost:23119/better-bibtex/collection" in firefox? I expect you'd see "Could not export bibliography: no path".

Ah, sure, no problem. Don't hesitate to file a new issue -- I don't ever want my work to be the cause of disrupted flow.

"Could not export bibliography: no path", as expected.

Unfortunately, the logging slows down Zotero to a noticeable degree, so you don't always want it on, but you need to have it on for me to be able to look at what's happening for things I can't reproduce here. I sure hope it's not a platform thing... although it would finally give me that excuse to get a macbook air...

Are you OK with closing this issue? It is never a problem to open a new one if the problem reappears.

Yeah, sorry, should have done it much earlier. Thanks again for you help.


replace slashes and other special characters in file names

I've got a file named "Call Log Export: 01/13/15 - 04/21/15". rclone syncs it successfully but treats slashes as directory separators and creates a long path with data in the file called '15'. Native windows google drive replaces special characters with underscores and creates a file named "Call Log Export_ 01_13_15 - 04_21_15" instead. Somehow I like this approach better.

You can have any characters at all in a drive file name.
There are quite a few characters you can't have in a windows file name (see ms docs for more info)
Linux/OS X are much more forgiving - it is only / and NUL that you can't have in a file name.
One thing I could do is map the forbidden characters to unicode equivalents, eg I could map / to the unicode division slash which looks pretty similar and is allowed in filesystems.
/ => ∕

Or I could just replace all characters which can't be represented on the current filing system with _ which would give the same result as the google drive sync.
This would mean making each fs declare which characters it couldn't deal with (or possibly whole names as (for example) con is an invalid file name in windows)

If you want to suit everyone, make it configurable. I personally go for a more restrictive MS-style limitations - being able to create a file with a colon is great until you have to copy it to a FAT USB stick.

This was partially fixed in f50f353b5d7e76d8f666ac1383f5c23021b6ea34 the : gets escaped as _ for windows file systems.
The path separators / are still an issue though - this needs to be fixed in the drive code.

There's an issue with the syncing of files named with a colon from Google Drive to Windows.  If the file already exists in Windows, the sync operation will delete it.
rclone -v sync remote:test f:\test

F:>rclone -v sync remote:test test
2017/02/25 12:07:06 rclone: Version "v1.35-40-gb6848a3ß" starting with parameters ["rclone" "-v" "sync" "remote:test" "test"]
2017/02/25 12:07:06 Local file system at \?\F:\test: Modify window is 1ms
2017/02/25 12:07:06 Google drive root 'test': Reading ""
2017/02/25 12:07:07 Google drive root 'test': Finished reading ""
2017/02/25 12:07:07 Local file system at \?\F:\test: Waiting for checks to finish
2017/02/25 12:07:07 Local file system at \?\F:\test: Waiting for transfers to finish
2017/02/25 12:07:07 Local file system at \?\F:\test: Replacing invalid characters in "\test\test: name" to "\\?\F:\test\test_ name"
2017/02/25 12:07:07 test: name: Copied (new)
2017/02/25 12:07:07 Waiting for deletions to finish
2017/02/25 12:07:07 test_ name: Deleted
2017/02/25 12:07:07
Transferred:      0 Bytes (0 Bytes/s)
Errors:                 0
Checks:                 1
Transferred:            1
Elapsed time:        1.3s
2017/02/25 12:07:07 Go routines at exit 7

I'm planning to fix all this properly for 1.37

FYI, an other software replace the "/" by "%2F"

@aldones I have a plan to fix all of this which will probably take some time to implement!
In the mean time I'd replace / with ／ which is Unicode Character 'FULLWIDTH SOLIDUS' (U+FF0F) then I can make these transforms reversible.
Go is really easy to pick up for C programmers - the major thing that takes getting used to is the type declarations are backwards.  The go tour is an excellent place to start for experienced programmers.  I think of Go as being mostly a super C with no memory management, closures and great concurrency.
To change this in drive/drive.go would do  / to   ／ in the ListDir function where it says remote := job.Path + item.Title (just change item.Title) and  ／ to / in the two places where &Object{}s are created.  So adding 3 strings.Replace would do it probably!

I tried adding these 3 strings.Replace. A "lsd" on the drive root will show me the directory name with the / replaced by  U+FF0F. Unfortunately, it won't work past that. Even a "lsd" on the specific directory, either with / or with U+FF0F will return "directory not found."
I will keep tinkering, but I guess I will just have to wait for the official fix.
Thank you for your attention. I will check that Tour, and see that happens.

@aldones can You link You repo where You are trying to fix this?
My attempt is here: https://github.com/lechup/rclone/commit/19191b82f369544f7713a549048bb84977a52109

@lechup I don't have a github repo. But here is the unified diff:
drive.go.diff.txt

@aldones I've updated my repo with Your diff, rclone ls  seems to work but still prints / instead of ／, hm...
https://github.com/lechup/rclone/commit/257a20a0e11b921940e4b18b8be4e44914e8e57f

Looking at this again I think there is only one place that needs patching as all the item.Titles ultimately come from the list() function.  This should fix the can't find the directory problems too.
Untested:
diff --git a/drive/drive.go b/drive/drive.go
index 3a8aa0f1..32f92a7e 100644
--- a/drive/drive.go
+++ b/drive/drive.go
@@ -273,6 +273,7 @@ OUTER:
 			return false, errors.Wrap(err, "couldn't list directory")
 		}
 		for _, item := range files.Items {
+			item.Title = strings.Replace(item.Title, '/', '／', -1)
 			if fn(item) {
 				found = true
 				break OUTER

@ncw Thanks for invastigating it once again, I've applied Your patch, but still can't get it work....
Should all paths (dir and file names) be renamed in all functions so parter/parter.png file should be listed as parter／parter.png while using ls command and test/test directory should be listed as test／test directory while using lsd command?
lechup@lechup-ubuntu:~/gocode/src/rclone$ make clean
go clean ./...
find . -name \*~ | xargs -r rm -f
rm -rf build docs/public
rm -f rclone rclonetest/rclonetest
lechup@lechup-ubuntu:~/gocode/src/rclone$ make
touch fs/version.go
go install -v --ldflags "-s -X github.com/ncw/rclone/fs.Version=v1.36-167-g775f82d4-google_drive_slash_fix2"
cp -av `go env GOPATH`/bin/rclone .
'/home/lechup/gocode/bin/rclone' -> './rclone'
lechup@lechup-ubuntu:~/gocode/src/rclone$ ./rclone lsd Asia2:/Test
          -1 2017-06-20 11:37:29        -1 test/test
lechup@lechup-ubuntu:~/gocode/src/rclone$ ./rclone ls Asia2:/Test
  1238946 parter/parter.png
lechup@lechup-ubuntu:~/gocode/src/rclone$ ./rclone --version
rclone v1.36-167-g775f82d4-google_drive_slash_fix2

Interestingly sync to local works but not as expected:
lechup@lechup-ubuntu:~/gocode/src/rclone$ ./rclone sync -v Asia2:/ ~/test/
lechup@lechup-ubuntu:~$ tree test
test
└── parter
    └── parter.png

expected:
test
└── parter／parter.png

PS: Just thinking, is dircache related stuff revelant here and could cause some glitches? Maybe is there any command to clear it?
PS2: If You want I can send You rclone config so You could test it Yourself without setting up Google Account.

I have done a revised patch which I have actually bothered to test this time!
Please try the binary here
https://pub.rclone.org/v1.36-199-g89d5491a-drive-slashβ/
(or on drive-slash branch)
It seems to work for me!
$ rclone ls drive:slash_test/
       92 z／slash
       92 has／slash/z

$ rclone ls drive:slash_test/has／slash
       92 z

$ rclone sync drive:slash_test /tmp/slash_test

$ tree /tmp/slash_test/
/tmp/slash_test/
├── has／slash
│   └── z
└── z／slash

What do you think?

@ncw thanks! it looks like it is working now, I'll test it on my end on bigger set of files.
Does this branch need some tests to get into master? https://github.com/ncw/rclone/compare/drive-slash

I've merged this to master now - you can find it here
https://beta.rclone.org/v1.36-209-gb44d0ea0/ (uploaded in 15-30 mins)
In an idea world this would have tests, but I only have integration tests for each remote and this doesn't fit into the framework.

Oh, don't worry. I will test the *&@#($ out of it.
Will do my best to break it, and report back as soon as it either break, or I give up and we can claim a win.
Thank you.

So far, no luck breaking it. Working as expected, thank you.
One other thing I noticed regarding the drive code, is for directories ending in one or more spaces. The Google Drive Windows App will replace the ending spaces with "_", because Windows doesn't like directories ending in blank spaces. For Linux, it doesn't matter.
Maybe this is something that might be changed also, in the future? Compared to the "/" bug, now fix, this is very minor, since this other bug needs 2 things to trigger: the directory ending in 1 or more spaces, and rclone running on Windows, but, anyway, might be something to consider.
Anyway, I just moved the fbv44d0ea0 to my production environment, and lets see if it holds or breaks in the next few days.
Once again, thank you.

rclone can't upload with filename contains ầ & ề
ầ & ề
Transferred:      0 Bytes (0 Bytes/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:        1.2s

@nsuper rclone only transfers UTF-8 encoded filenames - check out the section in the docs about filename encoding.

@ncw Thank you for your support. But convmv said already UTF-8: /home/ubuntu/test/ầề
~$ convmv -f UTF-16 -t utf8 -i '/home/ubuntu/test/   ầềm'
Starting a dry run without changes...
Skipping, already UTF-8: /home/ubuntu/test/   ầềm
No changes to your files done. Would have converted 0 files in 0 seconds.
Use --notest to finally rename the files.

How to get rclone full log to ensure rclone can read this file? Verbose mode is not enough.
Linux file command can read this file. Python, NodeJS can, only rclone can't :(

@nsuper thanks for checking the UTF-8 encoding.
I didn't manage to replicate this.
$ cd /tmp/
$ mkdir t2
$ cd t2
$ echo hello > 'ầ & ề'
$ ls
ầ & ề
$ cd ..
$ rclone copy -vv t2 drive:issue-62
2017/07/02 15:53:36 DEBUG : rclone: Version "v1.36-DEV" starting with parameters ["rclone" "copy" "-vv" "t2" "drive:issue-62"]
2017/07/02 15:53:36 DEBUG : drive: Saved new token in config file
2017/07/02 15:53:38 INFO  : Google drive root 'issue-62': Modify window is 1ms
2017/07/02 15:53:38 INFO  : Google drive root 'issue-62': Waiting for checks to finish
2017/07/02 15:53:38 INFO  : Google drive root 'issue-62': Waiting for transfers to finish
2017/07/02 15:53:41 INFO  : ầ & ề: Copied (new)
2017/07/02 15:53:41 INFO  :
Transferred:      6 Bytes (1 Bytes/s)
Errors:                 0
Checks:                 0
Transferred:            1
Elapsed time:        4.2s

2017/07/02 15:53:41 DEBUG : Go routines at exit 8
2017/07/02 15:53:41 DEBUG : rclone: Version "v1.36-DEV" finishing with parameters ["rclone" "copy" "-vv" "t2" "drive:issue-62"]
$ rclone ls drive:issue-62
        6 ầ & ề
$

Can you open a new issue please with a similar test script to the above showing the problem please?

@aldones - thanks for the note about directories ending in spaces on Windows - I didn't know that.  I've added that to #1477 where I'm thinking about such things.

@ncw - I think it's a bug.
Passed if upload a directory.
Failed if upload single file!

Upload a directory test/

rclone copy -c -vv /home/ubuntu/test drive:test2
2017/07/02 11:35:14 DEBUG : rclone: Version "v1.36-DEV" starting with parameters ["/home/ubuntu/bin/rclone" "copy" "-c" "-vv" "/home/ubuntu/test" "drive:test2"]
2017/07/02 11:35:15 INFO  : Google drive root 'test2': Modify window is 1ms
2017/07/02 11:35:15 INFO  : Google drive root 'test2': Waiting for checks to finish
2017/07/02 11:35:15 INFO  : Google drive root 'test2': Waiting for transfers to finish
2017/07/02 11:35:17 INFO  :    ầềm: Copied (new)
Transferred:   4.451 MBytes (1.165 MBytes/s)
Errors:                 0
Checks:                 0
Transferred:            1
Elapsed time:        3.8s

Upload a file: test/    ầềm

rclone copy -c -vv '/home/ubuntu/test/    ầềm' drive:test3
2017/07/02 11:39:59 DEBUG : rclone: Version "v1.36-DEV" starting with parameters ["/home/ubuntu/bin/rclone" "copy" "-c" "-vv" "/home/ubuntu/test/   ầềm" "drive:test3"]
2017/07/02 11:40:00 INFO  : Google drive root 'test3': Modify window is 1ms
2017/07/02 11:40:00 DEBUG :    ầềm: Excluded from sync (and deletion)
2017/07/02 11:40:00 INFO  : Google drive root 'test3': Waiting for checks to finish
2017/07/02 11:40:00 INFO  : Google drive root 'test3': Waiting for transfers to finish
2017/07/02 11:40:00 INFO  :
Transferred:      0 Bytes (0 Bytes/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:        1.1s

@nsuper I can replicate that - can you make a new issue with that info in please!

@ncw FYI #1515


It may be an option to generate the fixture manually each time

thinking about this, it might be an idea to keep the fixture deliberatlely as small as possible,
And keep size to the stress testing fixture, which updates would have their own dedicated branch.

Addressed in 1.2.0.


Add tracking of project specifications repository state to metadata

This should be an option of the build_project method, that in case the project specifications reside in a git repository the current status (commit id if there are no uncommitted changes) should be added to the metadata survey as a hidden field.

For completeness, this should not only encompass the commit id of the repository that contains the project definition, but also the commit id of the DigLabTools repository used to build / upload the project.


⚠ SceneTime has degraded performance

In d07f3e3, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 2460 ms

Resolved: SceneTime performance has improved in 7f435ad after 14 minutes.


Bump version: 0.13.0 → 0.14.0

Codecov Report

Merging #579 (1eceab6) into main (9860356) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #579   +/-   ##
=======================================
  Coverage   97.50%   97.50%
=======================================
  Files           6        6
  Lines         400      400
  Branches       80       80
=======================================
  Hits          390      390
  Misses          8        8
  Partials        2        2

Files
Coverage Δ

columbo/__init__.py
100.00% <100.00%> (ø)


How add proxy?

I can send to telegram only through a proxy. How add proxy?

Okay, I will add this option

I want to offer you
#33

Thank you.


feat: more logs relevant for debugging failures of 2 pixies test

...
Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

[ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
[ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
[ ] Every change is related to the PR description.
[ ] I have linked this pull request to relevant issues (if any exist).

Benchmark results
Metrics with a significant change:

note_history_trial_decrypting_time_in_ms (10): 241 (+54%)
note_trial_decrypting_time_in_ms (8): 4.14 (-78%)
note_trial_decrypting_time_in_ms (32): 19.4 (+43%)

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

Metric
8 txs
32 txs
128 txs

l1_rollup_calldata_size_in_bytes
45,444
179,588
716,132

l1_rollup_calldata_gas
222,924
868,076
3,449,576

l1_rollup_execution_gas
842,011
3,595,184
22,204,945

l2_block_processing_time_in_ms
1,995 (-2%)
7,727 (-1%)
30,009 (-1%)

note_successful_decrypting_time_in_ms
298 (-5%)
909 (+1%)
3,255 (-1%)

note_trial_decrypting_time_in_ms
:warning: 4.14 (-78%)
:warning: 19.4 (+43%)
142 (+1%)

l2_block_building_time_in_ms
20,578 (-3%)
82,639 (-1%)
327,221 (-1%)

l2_block_rollup_simulation_time_in_ms
11,908 (-4%)
47,768 (-1%)
188,920 (-1%)

l2_block_public_tx_process_time_in_ms
8,625 (-2%)
34,723
137,767 (-1%)

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

Metric
5 blocks
10 blocks

node_history_sync_time_in_ms
22,032 (-1%)
42,602 (-2%)

note_history_successful_decrypting_time_in_ms
2,040 (-4%)
3,996 (-4%)

note_history_trial_decrypting_time_in_ms
126 (-1%)
:warning: 241 (+54%)

node_database_size_in_bytes
1,629,830
1,095,232 (-1%)

pxe_database_size_in_bytes
29,748
59,307

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

Circuit
circuit_simulation_time_in_ms
circuit_input_size_in_bytes
circuit_output_size_in_bytes

private-kernel-init
767 (-1%)
61,697
18,905

private-kernel-ordering
127 (-1%)
24,297
8,153

base-rollup
1,759
656,428
873

root-rollup
169 (-1%)
4,072
1,097

private-kernel-inner
792 (-1%)
81,568
18,905

public-kernel-private-input
570 (-1%)
41,519
18,905

public-kernel-non-first-iteration
409
41,561
18,905

merge-rollup
15.4 (-1%)
2,592
873

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

Metric
0 deployed contracts
1 deployed contracts

tx_size_in_bytes
8,787
27,547


JSDoc Reference Twoslash improvements

and converts "Typescript" to "TypeScript" everywhere

The final is from the PR deploy, this is fine


AVRO-1819 and AVRO-1820: Parsing aliases and custom properties of request's field

AVRO-1819: Parsing aliases of request's field
AVRO-1820: Parsing custom properties of request's field
Fixed bug in org.apache.avro.Protocol.parseMessage of loss field's aliases and custom properties.

@DrVirtual, I posted one question but I think this is overall a great addition. Thank you for taking the time to contribute! Once you answer the question (and maybe add the check), I'll commit this.

@rdblue, hi, thank you for your attention. I've made some changes to get rid of my contributuin to ugly copy paste (besides all other copy paste from Schema.parse), hope, you will be satisfied )


Add width and height parameters to ST7789 device

This pull request adds support for more ST7789 based screens with resolutions other than 240x240.
As in #142, passing the width and height to set_window() didn't directly work. This is because the arguments to the RASET and CASET commands are sent as command bytes. They should, however, be sent as data bytes. This also applies to all other commands with arguments, like those called to initialize the screen.
The reason that the screen went blank in #142 was because 320px translates to 0x01 0x3F, where the command 0x01 is mapped to software reset in the LCD driver.
To solve this, I add the command(self, cmd, *args) function in st7789 where it calls super.command(self, cmd) and self.data(args) to send the arguments as data bytes.

Lgtm. If the tests run ok and code coverage is about the same I will merge and make a release.
Thanks for taking the time to investigate and provide a fix.
Could you add yourself to the contributors list too please?


Pod template support with KubernetesContainerFactory

This PR adds support for providing a base Pod template to customize the action Pod created by KubernetesContainerFactory (KCF)
Description
Sometime back we discussed a usecase on DL to configure a private registry for action containers. This PR now enables that usecase via an optional pod-template config
Usage
Provide the base pod template via config like below
Pod template yaml stored at "/pod-template.yaml`
---
apiVersion: "v1"
kind: "Pod"
metadata:
  annotations:
    allow-outbound : "true"

whisk {
  spi {
    ContainerFactoryProvider = "org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider"
  }
  kubernetes {
    pod-template = "file:/pod-template.yaml"
  }
}

When KCF would create an action container POD it would use the above template as base and add the changes required by OpenWhisk on top of that.
There are 3 ways to pass this yaml config
1. Inline
whisk {
  kubernetes {
    pod-template = """---
apiVersion: "v1"
kind: "Pod"
metadata:
  annotations:
    allow-outbound : "true"
    """
  }
}

2. Via File reference
whisk {
  kubernetes {
    pod-template = "file:/pod-template.yaml"
  }
}

Here the file can be mounted from a config map
3. Via ENV
whisk {
  kubernetes {
    pod-template = ${WHISK_POD_TEMPLATE}
  }
}

Here the env WHISK_POD_TEMPLATE is configured via a ConfigMap value
To see the final POD spec this PR also enables support for logging the pod spec in yaml via X-OW-EXTRA-LOGGING header (#3174).
For example assume that setup has a hello action configured (say using #4671).
$ curl -k --dump-header -  -X POST \
      --user "23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP" \
      -H "X-OW-EXTRA-LOGGING: on" \
      "http://localhost:3233/api/v1/namespaces/_/actions/hello?blocking=true&result=true"

Then above command would log the pod spec
[2019-10-15T16:23:12.659Z] [INFO] [#tid_B7WSlmTXLKHTDCH0TYb6mcf6ttpyKNrZ] [KubernetesClient] Pod spec being created
---
apiVersion: "v1"
kind: "Pod"
metadata:
  annotations:
    allow-outbound: "true"
  labels:
    name: "wsk0-1-guest-hello3"
    invoker: "invoker0"
  name: "wsk0-1-guest-hello3"
  namespace: "default"
spec:
  containers:
  - env:
    - name: "__OW_API_HOST"
      value: "http://host.docker.internal:3233"
    image: "openwhisk/action-nodejs-v10:1.14.0-incubating"
    name: "user-action"
    ports:
    - containerPort: 8080
      name: "action"
    resources:
      limits:
        memory: "256Mi"
      requests: {}
    securityContext:
      capabilities:
        drop:
        - "NET_RAW"
        - "NET_ADMIN"
  nodeSelector: {}
  restartPolicy: "Always"

This spec includes the custom annotation configured in base template allow-outbound
Implementation Details
With pod-template one can configure any k8s supported config for the Pod. Each such pod would always have  a  container named user-action. Following aspects though would be controlled by KCF

Container memory limit
Container port
Container env
Container securityContext would always have NET_RAW and NET_ADMIN dropped. One can "add" more capabilities
Pod name

Related issue and scope

[ ] I opened an issue to propose and discuss this change (#????)

My changes affect the following components

[ ] API
[ ] Controller
[ ] Message Bus (e.g., Kafka)
[ ] Loadbalancer
[x] Invoker
[ ] Intrinsic actions (e.g., sequences, conductors)
[ ] Data stores (e.g., CouchDB)
[ ] Tests
[ ] Deployment
[ ] CLI
[ ] General tooling
[ ] Documentation

Types of changes

[ ] Bug fix (generally a non-breaking change which closes an issue).
[ ] Enhancement or new feature (adds new functionality).
[ ] Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

[ ] I signed an Apache CLA.
[ ] I reviewed the style guides and followed the recommendations (Travis CI will check :).
[ ] I added tests to cover my changes.
[ ] My changes require further changes to the documentation.
[ ] I updated the documentation where necessary.

Why not just add the pod template as a config map in the cluster instead on inline-ing the whole thing right into the config?

This is still possible by referring to env variable in config which in turn is backed by config map entry.
What's not possible is to refer to file via config map based mount. So would the env based approach be sufficient or we need the file based one also?

Mounting a confgmap in an env var could work fine.  Maybe work through the helm chart change in kube-deploy and see what it would look like?  The thing I'd like to avoid if possible is having to write an awkward string-escaped version of the pod template to change the default value.

Added support to enable reading template value from file (see updated doc in PR)
whisk {
  kubernetes {
    pod-template = "file:/pod-template.yaml"
  }
}

So if pod-template value is

File reference - String representing a file uri file:/path/to/template.yaml then its content would be read and used as value
Env variable - pod-template = ${WHISK_POD_TEMPLATE} then TypeSafe config would internally read its value and use that
Literal inline yaml - Else its value would be considered as a literal yaml value

@dgrove-oss @mcdan Does above implemented approach looks fine?

Codecov Report

Merging #4690 into master will decrease coverage by 7.1%.
The diff coverage is 91.17%.

@@            Coverage Diff             @@
##           master    #4690      +/-   ##
==========================================
- Coverage   84.25%   77.15%   -7.11%
==========================================
  Files         194      196       +2
  Lines        8728     8753      +25
  Branches      607      594      -13
==========================================
- Hits         7354     6753     -601
- Misses       1374     2000     +626

Impacted Files
Coverage Δ

...ore/containerpool/kubernetes/WhiskPodBuilder.scala
100% <100%> (ø)

...a/org/apache/openwhisk/common/ConfigMapValue.scala
100% <100%> (ø)

...re/containerpool/kubernetes/KubernetesClient.scala
25.56% <25%> (+1.65%)
:arrow_up:

...core/database/cosmosdb/RxObservableImplicits.scala
0% <0%> (-100%)
:arrow_down:

...ore/database/cosmosdb/cache/CacheInvalidator.scala
0% <0%> (-100%)
:arrow_down:

...core/database/cosmosdb/CosmosDBArtifactStore.scala
0% <0%> (-96.56%)
:arrow_down:

...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala
0% <0%> (-94.74%)
:arrow_down:

...sk/core/database/cosmosdb/CosmosDBViewMapper.scala
0% <0%> (-92.6%)
:arrow_down:

...e/database/cosmosdb/cache/ChangeFeedListener.scala
0% <0%> (-86.67%)
:arrow_down:

...e/database/cosmosdb/cache/KafkaEventProducer.scala
0% <0%> (-76.48%)
:arrow_down:

... and 36 more

Continue to review full report at Codecov.

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


[Website] Test drive page has bad usability

http://prismjs.com/test.html
With all the languages, one has to scroll to see the result. Result should be moved to be right below the code area. Should be pretty quick to fix if someone has the time.

@LeaVerou, @Golmote
In the scope of PR https://github.com/PrismJS/prism/pull/584 there are updates to the test page which is adding support of testing the plugins.
In the same PR we can push this one too.

@VitaliyR I chose to fix it separately. You'll probably need to update your PR to allow automatic merge to work.


Add step to update docker image on github synchronize event

The update image step makes sure that our app is upto date when new changes are pushed to the PR.

Changes

A new step for updating the Fly application image has been added to the YAML workflow. This ensures that any changes made in a pull request are applied to the deployed application, improving the deployment process's responsiveness to code changes.

Hi folks , please review this when you are free

Hi folks gentle reminder , please review this when you are free

gentle reminder folks, please review this when you are free


Interaction between accents and superscripts

The Accents example in our repository shows that the last exponent is rendered higher by LaTeX than it is by KaTeX. I'd guess that LaTeX takes the vector arrow into account when it considers the height of the left group. I don't know the rules when it does that and when it does not.

Nice visualization.  TeX source for reference:
\vec{A}\vec{x}\vec x^2\vec{x}_2^2\vec{A}^2\vec{xA}^2


Unit tests are broken

When I run pub run test then I have this output
...
00:03 +211 -4: test/batch_test.dart:

4 tests has failed.
My dartvm version is 1.24.3 (Dart VM version: 1.24.3 (Wed Dec 13 23:26:59 2017) on "macos_x64")

Changes are in 2.0.0


Version 0.9.0

Adding datetime_format, dtf methods
Adding datetime_from_iso, dtiso methods
Adding catch_it and retry_it wrappers
Adding CONTRIBUTING file
Changing Namespace now operates more like "dict" on init, and can accept both iterable and kwargs
Changing major structure of reusables to better group similar functionality
Changing wrapper time_it now uses .time for older versions instead of the .clock
Depreciation Warning: get_logger is changing to setup_logger
Breaking change: log_exception has new and changed kwargs
Breaking change: removing Cookie Management in favor of separate library
Breaking change: removing sort_by
Breaking change: removing namespace.from_dict()
Breaking change: removing DateTime class in favor of singular methods datetime_format and datetime_from_iso

Hello @cdgriffith! Thanks for submitting the PR.

In the file reusables/dt.py, following are the PEP8 issues :

Line 117:1: E305 expected 2 blank lines after class or function definition, found 1

In the file reusables/file_operations/config.py, following are the PEP8 issues :

Line 99:1: W391 blank line at end of file

In the file reusables/file_operations/file_ops.py, following are the PEP8 issues :

Line 192:21: E128 continuation line under-indented for visual indent
Line 227:21: E127 continuation line over-indented for visual indent
Line 518:1: W391 blank line at end of file

In the file reusables/log.py, following are the PEP8 issues :

Line 283:1: W391 blank line at end of file

In the file reusables/namespace.py, following are the PEP8 issues :

Line 302:1: E305 expected 2 blank lines after class or function definition, found 1

In the file reusables/processes/tasker.py, following are the PEP8 issues :

Line 275:40: W292 no newline at end of file

In the file reusables/shared_variables.py, following are the PEP8 issues :

Line 30:17: E128 continuation line under-indented for visual indent
Line 31:17: E128 continuation line under-indented for visual indent
Line 32:17: E128 continuation line under-indented for visual indent

In the file reusables/string_manipulation/strings.py, following are the PEP8 issues :

Line 56:1: W391 blank line at end of file

In the file reusables/web.py, following are the PEP8 issues :

Line 81:58: E127 continuation line over-indented for visual indent

In the file reusables/wrappers.py, following are the PEP8 issues :

Line 317:75: W291 trailing whitespace
Line 351:1: W391 blank line at end of file

In the file test/test_reuse.py, following are the PEP8 issues :

Line 29:5: E303 too many blank lines (2)
Line 48:52: E128 continuation line under-indented for visual indent
Line 121:52: E127 continuation line over-indented for visual indent
Line 193:101: E501 line too long (103 > 100 characters)
Line 231:101: E501 line too long (109 > 100 characters)
Line 248:101: E501 line too long (115 > 100 characters)
Line 329:101: E501 line too long (131 > 100 characters)
Line 330:101: E501 line too long (139 > 100 characters)
Line 331:101: E501 line too long (184 > 100 characters)

In the file test/test_reuse_logging.py, following are the PEP8 issues :

Line 139:1: W391 blank line at end of file

In the file test/test_reuse_namespace.py, following are the PEP8 issues :

Line 73:48: E127 continuation line over-indented for visual indent

In the file test/test_wrappers.py, following are the PEP8 issues :

Line 30:5: E303 too many blank lines (2)
Line 170:9: E303 too many blank lines (2)

Coverage increased (+0.2%) to 97.799% when pulling ffeacd93fc33f8b36c32589eb3044fa9c771c3aa on develop into 36673df5757e3bb57942e71813dcc99921aecf57 on master.

Coverage increased (+0.2%) to 97.799% when pulling ffeacd93fc33f8b36c32589eb3044fa9c771c3aa on develop into 36673df5757e3bb57942e71813dcc99921aecf57 on master.

Coverage increased (+0.2%) to 97.799% when pulling ffeacd93fc33f8b36c32589eb3044fa9c771c3aa on develop into 36673df5757e3bb57942e71813dcc99921aecf57 on master.