ansible: can't connect and/or hangs when conecting to remote machines

I'm looking to speedup my too slow ansible scripts so mitogen looks like the ticket. However it doesn't connect to any of my machines. It did once however, I was running against a group and it connected to one machine and was crazy fast.
I'm connecting to Ubuntu 16.04 from OSX but have tried connecting from Ubuntu 16.04 as well.
[pid 77639] 13:35:48.079227 D mitogen.io: iter_read(78) -> "Warning: Permanently added 'www1.west.company.com,<IP_ADDRESS>' (ECDSA) to the list of known hosts.\r\n"
[pid 77639] 13:35:48.079704 D mitogen: mitogen.ssh.Stream('local.77645'): received "Warning: Permanently added 'www1.west.company.com,<IP_ADDRESS>' (ECDSA) to the list of known hosts.\r\n"
[pid 77639] 13:35:48.358282 D mitogen.io: iter_read(78) -> 'EC0\n'
[pid 77639] 13:35:48.358666 D mitogen: mitogen.ssh.Stream('local.77645'): received 'EC0\n'
[pid 77639] 13:35:48.358990 D mitogen: mitogen.ssh.Stream('local.77645')._ec0_received()

[pid 77639] 13:35:58.368800 D mitogen.io: Waker(Broker(0x107c7b350) rfd=40, wfd=42).defer() [fd=42]
[pid 77639] 13:35:58.369247 D mitogen.io: Latch(0x107c7ba90, size=0, t='mitogen.service.Pool.107c7ba10.worker-0').get(timeout=None, block=True)
[pid 77639] 13:35:58.369630 D mitogen.io: Broker(0x107c7b350): POLLIN for <Side of Waker(Broker(0x107c7b350) rfd=40, wfd=42) fd 40>
[pid 77639] 13:35:58.370050 D mitogen.io: Waker(Broker(0x107c7b350) rfd=40, wfd=42).on_receive()
[pid 77639] 13:35:58.370374 D mitogen.io: Router(Broker(0x107c7b350))._async_route(Message(1, 0, 0, 1000, None, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554), None)
[pid 77639] 13:35:58.370683 D mitogen.io: mitogen.core.Stream('unix_client.77640')._send(Message(1, 0, 0, 1000, None, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554))
[pid 77639] 13:35:58.370999 D mitogen.io: Broker(0x107c7b350)._start_transmit(mitogen.core.Stream('unix_client.77640'))
[pid 77639] 13:35:58.371425 D mitogen.io: Latch(0x107c7ba90, size=0, t='mitogen.service.Pool.107c7ba10.worker-0')._get_sleep(timeout=None, block=True)
[pid 77639] 13:35:58.371364 D mitogen.io: Broker(0x107c7b350)._loop_once(None)
[pid 77639] 13:35:58.371983 D mitogen.io: Broker(0x107c7b350): POLLOUT for <Side of mitogen.core.Stream('unix_client.77640') fd 80>
[pid 77639] 13:35:58.372225 D mitogen.io: mitogen.core.Stream('unix_client.77640').on_transmit()
[pid 77639] 13:35:58.372569 D mitogen.io: mitogen.core.Stream('unix_client.77640').on_transmit() -> len 1578
[pid 77640] 13:35:58.372588 D mitogen.io: Broker(0x107c8d090): POLLIN for <Side of mitogen.core.Stream('unix_listener.77639') fd 50>
[pid 77639] 13:35:58.372836 D mitogen.io: Broker(0x107c7b350)._stop_transmit(mitogen.core.Stream('unix_client.77640'))
[pid 77640] 13:35:58.373044 D mitogen.io: mitogen.core.Stream('unix_listener.77639').on_receive()
[pid 77639] 13:35:58.373151 D mitogen.io: Broker(0x107c7b350)._loop_once(None)
[pid 77640] 13:35:58.373541 D mitogen.io: Router(Broker(0x107c8d090))._async_route(Message(1, 0, 0, 1000, 0, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554), mitogen.core.Stream('unix_listener.77639'))
[pid 77640] 13:35:58.373881 D mitogen.io: Receiver(Router(Broker(0x107c8d090)), 1000)._on_receive(Message(1, 0, 0, 1000, 0, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554))
[pid 77640] 13:35:58.374161 D mitogen.io: Latch(0x107c97110, size=0, t='mitogen-broker').put(Message(1, 0, 0, 1000, 0, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554))
[pid 77640] 13:35:58.374419 D mitogen.io: Latch(0x107c97110, size=1, t='mitogen-broker').put() -> waking wfd=52
[pid 77640] 13:35:58.374679 D mitogen.io: Broker(0x107c8d090)._loop_once(None)
[pid 77640] 13:35:58.374966 D mitogen.io: Latch(0x107c97110, size=1, t='MainThread').get() wake -> Message(1, 0, 0, 1000, 0, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554)
[pid 77640] 13:35:58.375334 D mitogen.io: Message(1, 0, 0, 1000, 0, '\x80\x02cmitogen.core\n_unpickle_call_error\nq\x01T\xdf\x05\x00\x00mitoge'..1554).unpickle()
[pid 77640] 13:35:58.375898 D ansible_mitogen.connection: Call exec_command(u'apt install -y python', None) took 11929 ms
[pid 77640] 13:35:58.377597 D mitogen.io: Waker(Broker(0x107c8d090) rfd=47, wfd=48).defer() [fd=48]
[pid 77640] 13:35:58.377977 D mitogen.io: Broker(0x107c8d090): POLLIN for <Side of Waker(Broker(0x107c8d090) rfd=47, wfd=48) fd 47>
[pid 77640] 13:35:58.378240 D mitogen.io: Waker(Broker(0x107c8d090) rfd=47, wfd=48).on_receive()
[pid 77640] 13:35:58.378635 D mitogen.io: Waker(Broker(0x107c8d090) rfd=47, wfd=48).defer() [immediate]
[pid 77640] 13:35:58.378932 D mitogen: mitogen.core.Stream('unix_listener.77639').on_disconnect()
[pid 77640] 13:35:58.379228 D mitogen.io: Broker(0x107c8d090).stop_receive(mitogen.core.Stream('unix_listener.77639'))
[pid 77640] 13:35:58.379493 D mitogen.io: Waker(Broker(0x107c8d090) rfd=47, wfd=48).defer() [immediate]
[pid 77640] 13:35:58.379752 D mitogen.io: Broker(0x107c8d090)._stop_transmit(mitogen.core.Stream('unix_listener.77639'))
[pid 77640] 13:35:58.379996 D mitogen.io: <Side of mitogen.core.Stream('unix_listener.77639') fd 50>.close()
[pid 77640] 13:35:58.380363 D mitogen.io: <Side of mitogen.core.Stream('unix_listener.77639') fd 51>.close()
[pid 77639] 13:35:58.380691 D mitogen.io: Broker(0x107c7b350): POLLIN for <Side of mitogen.core.Stream('unix_client.77640') fd 79>
[pid 77640] 13:35:58.380918 D mitogen: Waker(Broker(0x107c8d090) rfd=47, wfd=48).on_disconnect()
[pid 77639] 13:35:58.381067 D mitogen.io: mitogen.core.Stream('unix_client.77640').on_receive()
[pid 77640] 13:35:58.381210 D mitogen.io: Broker(0x107c8d090).stop_receive(Waker(Broker(0x107c8d090) rfd=47, wfd=48))
[pid 77639] 13:35:58.381399 D mitogen: mitogen.core.Stream('unix_client.77640').on_disconnect()
[pid 77640] 13:35:58.381495 D mitogen.io: Waker(Broker(0x107c8d090) rfd=47, wfd=48).defer() [immediate]
[pid 77639] 13:35:58.381684 D mitogen.io: Broker(0x107c7b350).stop_receive(mitogen.core.Stream('unix_client.77640'))
[pid 77640] 13:35:58.381772 D mitogen.io: Broker(0x107c8d090)._stop_transmit(Waker(Broker(0x107c8d090) rfd=47, wfd=48))
[pid 77639] 13:35:58.381989 D mitogen.io: Waker(Broker(0x107c7b350) rfd=40, wfd=42).defer() [immediate]
[pid 77640] 13:35:58.382066 D mitogen.io: <Side of Waker(Broker(0x107c8d090) rfd=47, wfd=48) fd 47>.close()
[pid 77639] 13:35:58.382290 D mitogen.io: Broker(0x107c7b350)._stop_transmit(mitogen.core.Stream('unix_client.77640'))
[pid 77640] 13:35:58.382356 D mitogen.io: <Side of Waker(Broker(0x107c8d090) rfd=None, wfd=48) fd 48>.close()
[pid 77639] 13:35:58.382565 D mitogen.io: <Side of mitogen.core.Stream('unix_client.77640') fd 79>.close()
[pid 77639] 13:35:58.383398 D mitogen.io: <Side of mitogen.core.Stream('unix_client.77640') fd 80>.close()
[pid 77639] 13:35:58.384040 D mitogen.io: Broker(0x107c7b350)._loop_once(None)
The full traceback is:
Traceback (most recent call last):
  File "/usr/local/Cellar/ansible/<IP_ADDRESS>/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 130, in run
    res = self._execute()
  File "/usr/local/Cellar/ansible/<IP_ADDRESS>/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 528, in _execute
    result = self._handler.run(task_vars=variables)
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/mixins.py", line 128, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
  File "/usr/local/Cellar/ansible/<IP_ADDRESS>/libexec/lib/python2.7/site-packages/ansible/plugins/action/raw.py", line 41, in run
    result.update(self._low_level_execute_command(self._task.args.get('_raw_params'), executable=executable))
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/mixins.py", line 345, in _low_level_execute_command
    chdir=cast(chdir),
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/mixins.py", line 137, in call
    return self._connection.call(func, *args, **kwargs)
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/connection.py", line 283, in call
    return self.call_async(func, *args, **kwargs).get().unpickle()
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/connection.py", line 269, in call_async
    self._connect()
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/connection.py", line 243, in _connect
    self.host = self._connect_ssh()
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/connection.py", line 169, in _connect_ssh
    for term in shlex.split(s or '')
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/service.py", line 280, in call
    return recv.get().unpickle()
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/core.py", line 359, in unpickle
    raise obj
CallError: mitogen.core.TimeoutError: read timed out
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/service.py", line 195, in dispatch
    self._produce_response(key, self.get_response(args))
  File "/Users/kneufeld/company/ansible/mitogen/ansible_mitogen/services.py", line 77, in get_response
    return method(**args)
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 771, in ssh
    return self.connect('ssh', **kwargs)
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 743, in connect
    return self._connect(klass, name=name, **kwargs)
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 729, in _connect
    stream.connect()
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/ssh.py", line 114, in connect
    super(Stream, self).connect()
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 494, in connect
    self._connect_bootstrap()
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/ssh.py", line 133, in _connect_bootstrap
    self._ec0_received()
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 499, in _ec0_received
    discard_until(self.receive_side.fd, 'EC1\n', time.time() + 10.0)
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 255, in discard_until
    for buf in iter_read(fd, deadline):
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 251, in iter_read
    raise mitogen.core.TimeoutError('read timed out')

fatal: [www1.west]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}

Some guy on Reddit reported this stack trace a few weeks ago, but I forgot all about it. Is the machine heavily loaded by any chance? Presumably you've got good networking to the target.
Basically 'ec0_received()' means the bootstrap reported successful start, but 'EC1' never got written, which means Python failed to start up (within the timeout) after we sent core.py.
This is most likely some kind of problem with the target, perhaps involving some modules missing that core.py needs, or a bug in core.py bootstrap that your config is tickling.
(Random guesswork) do you have e.g. a custom bashrc or similar on the target box that might be fiddling with the Python environment in some way?

Is Python 3 on the remote machine? This could also be explained by that ,since the bootstrap is already 3.x compatible but core.py very much is not.

I did think of .bashrc and .profile and moved them out of the way, same issue.
python 3.6 is on the remote machine but running python gives you 2.7.
Ansible without the mitogen strategy and ssh in general work fine.

I tried moving my ~/.ssh/config out of the way and still timing out on EC1.

I flew long haul earlier and I'm wrecked today, will look at improving logging in this case at the very least. One trick is moving python on the box to e.g. python2.7.real, and replacing python2.7 with a shell script that does "exec strace -o /tmp/python-strace -ff /path/to/python.real "$@"" and seeing if there is anything fun in the logs.
Actually if you do that please attach the logs here :)

I shouldn't be working on Saturday either. ;) Go have a nap or something, I'll try the strace thing next week.

Ok, I tried the strace thing remotely but since Ansible/mitogen never logs in the strace-python is never run. Makes sense. If that's not what you meant I also did the same the thing with my local python but it spawned 38 different processes, so a bit of a needle in a haystack.
 I thought for sure mitogen would start failing after the single sign on with freeipa was installed but nope, kept on working for many subsequent test runs.
So I have no idea what's going on but I guess it's not mitogen's fault and there is something freaky deaky about my setup.

If Mitogen breaks where Ansible succeeds, then it's Mitogen's problem :)
Yep, I meant doing the strace thing on the remote box. I'm really dumb -- I said to switch out "python2.7", but actually by default Ansible runs "python". Can you give it another try? So sorry! What I'd expect to be looking for is lines like "write(1, "Traceback (most recent call last)...." in the output, but really no clue if it's an exception or some other problem.
As for the script, the only strace juju that may be useful is increasing the logged string length, like:
#!/bin/bash
exec strace -s 200 -o /tmp/python-strace -ff /path/to/python.real "$@"

I did replace python, not python2.7.
However, since I can't successfully ssh/connect, the remote python is never attempted to run.

Hey Kurt, any luck with this one? :)  Still can't reproduce on this end

Sorry, I've been slammed at work. I'll try some more stracing and see what I can figure out. I keep doing a git pull every few days to see if this problem gets magically fixed but so far no luck. :(

Holy crap... so I moved all my .bash* and .profile* out of /root and mitogen worked! Cool but I had tried that before... So then I moved the files back one at a time to try and find the one that broke things. And... I got all the files placed back and mitogen still works.
So on another machine I tried the same experiment by moving all the same files out of the way and mitogen still didn't work.
The strace trick doesn't/can't work because the the ssh login process doesn't finish and no command on the remote host is run.
So I'm pretty much out of ideas. I'd love to be able to use mitogen as the few times I've seen it run it's crazy fast and way less CPU. But here we are. So unless you've got something brilliant to try next I think I'm done. :(

Hi Kurt!
Thanks for all your efforts :) Regarding 'the login process doesn't finish', that cannot be true, as in the original stack trace:
File "/Users/kneufeld/company/ansible/mitogen/mitogen/ssh.py", line 133, in _connect_bootstrap
    self._ec0_received()
  File "/Users/kneufeld/company/ansible/mitogen/mitogen/parent.py", line 499, in _ec0_received
    discard_until(self.receive_side.fd, 'EC1\n', time.time() + 10.0)

The _ec0_received() function cannot run until the remote prints "EC0", which can only happen if login both succeeded and started the initial "python -c ....." command, which causes EC0 to be printed.
Keeping this bug open in case anyone hits the same issue. Thanks again :)

Hi @sharph, thanks for commenting :) Have you tried simply bumping timeout= under [defaults] in ansible.cfg up to something like 120 or similar? I'd love it if this were simply an issue of too short a timeout :)

Ah whups. The relevant timeout is (erroneously) hard-coded. It is the "+ 10" value in mitogen/parent.py::_ec0_received. If you say, increase that number 10x, does the problem abate?

Okay, now the value is derived from ansible.cfg as it should be.

If I change to 100 seconds in the source code, I get the same result.
I wrote this small script to help me test. It hangs about half the time, succeeds quickly the other half. If I ssh into the target while it is hanging, I can see the mitogen python processes just sitting there. This doesn't seem to be ansible related.

import mitogen.master
import os

broker = mitogen.master.Broker()
router = mitogen.master.Router(broker)

try:
    router.enable_debug()
    host = router.ssh(
        hostname='my.host',
        check_host_keys='ignore'
    )

    host.call(os.system, 'echo hello')
finally:
    broker.shutdown()

It leaves the following log (timeout was still 10s at this point.)
Parent PID: 1
Created by:

  File "test.py", line 12, in <module>
    check_host_keys='ignore'
  File "/fabric/ansible/mitogen-master/mitogen/parent.py", line 1073, in ssh
    return self.connect('ssh', **kwargs)
  File "/fabric/ansible/mitogen-master/mitogen/parent.py", line 1031, in connect
    return self._connect(klass, name=name, **kwargs)
  File "/fabric/ansible/mitogen-master/mitogen/parent.py", line 1013, in _connect
    stream.connect()
  File "/fabric/ansible/mitogen-master/mitogen/ssh.py", line 143, in connect
    super(Stream, self).connect()
  File "/fabric/ansible/mitogen-master/mitogen/parent.py", line 742, in connect
    LOG.debug('%r.connect()', self)
  File "/usr/lib/python2.7/logging/__init__.py", line 1155, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1286, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1296, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1336, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 759, in handle
    self.emit(record)
  File "/fabric/ansible/mitogen-master/mitogen/core.py", line 265, in emit
    self._reopen()
  File "/fabric/ansible/mitogen-master/mitogen/core.py", line 257, in _reopen
    ''.join(traceback.format_stack()),

17:35:24 D mitogen: mitogen.ssh.Stream('default').connect()
17:35:25 D mitogen: hybrid_tty_create_child() pid=319 stdio=7, tty=6, cmd: "ssh" "-o" "Compression yes" "-o" "ServerAliveInterval 15" "-o" "ServerAliveCountMax 3" "-o" "StrictHostKeyChecking no" "-o" "UserKnownHostsFile /dev/null" "-o" "GlobalKnownHostsFile /dev/null" "[REDACTED]" "python2.7" "-c" "'import codecs,os,sys;_=codecs.decode;exec(_(_(\"eNpd0FFLwzAQB/Bn+yl8u4SFkVvFrYWCUsT3PtgHFWnXVMK6JKSdUT+9Nzow3Vt+97/kuFSiLuy4dtopxhMvQiTd3xJ66w+M58kNnbuT2zApUEr+70rE8pTi7P1gR8WqGD5GHSPMUOZLe2te4bF6fpHwXow/VPxW+9PUtIOae4gDWwZiyRWwo57spzK5t3Z62Pabpt82uzZL0zzFew48oZeC15NiKOCplG+GamXxwc47d9YpQ5uCb4GvvWo6hojpjgv41W6+fGmqBQSgL7g8VsZZWGZwh1mW0aBVeT0ez+P/AOySeEU=\".encode(),\"base64\"),\"zip\"))'"
17:35:25 D mitogen: mitogen.ssh.Stream('local.319').connect(): child process stdin/stdout=7
17:35:25 D mitogen.io: iter_read(6) -> "Warning: Permanently added '[REDACTED]' (ECDSA) to the list of known hosts.\r\n"
17:35:25 D mitogen: mitogen.ssh.Stream('local.319'): received "Warning: Permanently added '[REDACTED]' (ECDSA) to the list of known hosts.\r\n"
17:35:26 D mitogen.io: iter_read(7) -> 'EC0\n'
17:35:26 D mitogen: mitogen.ssh.Stream('local.319'): received 'EC0\n'
17:35:26 D mitogen: mitogen.ssh.Stream('local.319')._ec0_received()
17:35:36 D mitogen: mitogen.ssh.Stream('local.319'): child process still alive, sending SIGTERM
17:35:36 D mitogen: Waker(Broker(0x7faa42caf210) rfd=3, wfd=4).on_disconnect()
17:35:36 D mitogen.io: Broker(0x7faa42caf210).stop_receive(Waker(Broker(0x7faa42caf210) rfd=3, wfd=4))
17:35:36 D mitogen.io: Broker(0x7faa42caf210)._stop_transmit(Waker(Broker(0x7faa42caf210) rfd=3, wfd=4))

Can you try the aforementioned trick to try and capture strace of the Pythons involved? Depending on the point this hang occurs at, there will be up to two Python processes.
The first, with almost certainly the lowest PID, will have either "/usr/bin/python" or "/usr/bin/python(mitogen:foo@bar:1234)" depending on whether exec has happened yet. I am expecting exec will already have happened.
The second almost certainly has a PID that is 1+ the previous process, it is the first stage. I suspect this process will be hanging on a read() system call. The relevant code is mitogen/parent.py::_first_stage(). This is the process that is responsible for writing EC0, then using Python to fully read and fully write the source of core.py.
The strace trick is something like:
cat > /tmp/strace-python.sh <<EOF
#!/bin/sh
strace -ff -o /tmp/strace-python /usr/bin/python "$@"
EOF

chmod +x /tmp/strace-python.sh
```

Then pass `python_path="/tmp/strace-python.sh"` as kwarg to `.ssh()`.

Thanks for your help! I bet this one is blindingly simple, but I just can't see it.

Can you also capture ls -l /proc/pid/fd output for both first stage and parent process during the hang.. that would also be super useful

It produced 3 files. I killed mitogen processes which were remaining on the server.
strace-python.15552.txt
strace-python.15553.txt
15552 is as I retrieved it from the server -- it doesn't look like it is completely written.
strace-python.15551.txt does not appear to contain any confidential info, but there are some binary strings in there I haven't decoded so out of an abundance of caution I am going to send it to you via email.

I don't seem to have /proc/pid/fd on my system.

You're fabulous, I think I may have spotted it. It's not to do with CPU load, with memory pressure. There is an ordering bug during startup -- we try to reap the first stage (PID 1551 hung wait()ing for it to exit) before trying to read a copy of the core.py source that the first stage is still blocked in the process of writing.
What I don't understand is why this only shows up some of the time, Linux is documented as having fixed-size pipe buffers.
The ordering fix is simple, but I'd like to confirm the reason the pipe buffer is full isn't due to something else writing to it, so let me reproduce the issue here first.
Thanks so much for this! It's the oldest user bug :)

Can you please dump the output of uname -a, sudo sysctl -a | grep pipe, and free -m from that machine? Thanks :)

Managed to reproduce it locally -- please drop a comment if you're still seeing this, otherwise I'm pretty sure we finally found it. :)  Thanks again so much, it was a massive head-scratcher without debug logs!

I had to bump up the timeout but holy crappers! Totally fast now! Thanks guys.

@kneufeld would still be interested in the output of these from your affected box :)

uname -a, sudo sysctl -a | grep pipe, and free -m

If there is a piece of software restricting pipe buffer size sysctl, this has performance ramifications for file transfer too, so would still love to know how your boxes end up configured like this. Maybe just low RAM

Had a read through fs/pipe.c and turns out the root cause was right there in the pipe(7) man page:
/proc/sys/fs/pipe-user-pages-soft (since Linux 4.5)
      The soft limit on the total size (in pages) of all pipes created or  set
      by   a   single   unprivileged   user   (i.e.,   one  with  neither  the
      CAP_SYS_RESOURCE nor the CAP_SYS_ADMIN  capability).   So  long  as  the
      total number of pages allocated to pipe buffers for this user is at this
      limit, individual pipes created by a user will be limited to  one  page,
      and attempts to increase a pipe's capacity will be denied.

      When  the  value  of  this limit is zero, no soft limit is applied.  The
      default value for this file is 16384, which permits creating up to  1024
      pipes with the default capacity.

It would seem in both cases, the user Mitogen is attempting to connect as already has opened (assuming kernel defaults) sufficient pipes to exhaust 64MiB of kernel memory, which would be (assuming default 64KiB pipe buffer) 1024 pipes. Once that limit is hit Linux allocates 4KiB buffers rather than 64KiB buffers, which triggered the deadlock.
I guess the scenario above could describe a great deal of server apps, so surprising it was hit by so few people. Thanks again

# uname -a
Linux www1 4.13.4-1-pve #1 SMP PVE 4.13.4-26 (Mon, 6 Nov 2017 11:23:55 +0100) x86_64 x86_64 x86_64 GNU/Linux

# sysctl -a | grep pipe
fs.pipe-max-size = 1048576
fs.pipe-user-pages-hard = 0
fs.pipe-user-pages-soft = 16384
kernel.core_pipe_limit = 0
sysctl: reading key "kernel.unprivileged_userns_apparmor_policy"
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"

# free -m
              total        used        free      shared  buff/cache   available
Mem:            512         441          65        1416           4          65
Swap:           512          99         412

For the record I was connecting as root.

The plot thickens! Indeed they're not supposed to, assuming a 'real' root user. Was it perhaps inside any kind of e.g. Docker/LXC/LXD container that has its root user stripped of typical privileges?

It's most definitely running in an LXC container (Proxmox for the win) but this would be the first time I've come across anything like this. But first for anything of course.

I have no clue how Proxmox handles things, but you can check output of getpcaps $$ from a shell to see if cap_sys_resource or cap_sys_admin are present. IIRC the former is a global override for things like ulimits (and you'd assume it would be missing in a container), and the latter is a catch-all for things like configuring network interfaces. I imagine it should also be gone. Without either of those, whatever your UID 0 maps to will receive the soft limit.
Just checked in Docker and they're both def missing, even as UID 0


New Question: What is a CDN and what advantages or disadvantages does it have?

ISSUE TYPE

[ ] Typo
[ ] Bug
[x] Feature

WHERE / WHAT

Our technical interview questions are a little light on technical.html. It would be good to add this question to our list.
EXPECTED BEHAVIOR

Clicking a link will take you to the question page which will allow you to see a possible response to the question.
REPRODUCTION STEPS

To create this new question, you should be able to follow the guide in the README https://github.com/approachable-io/software-interview-prep

Working on this now!

Can I stilll make a contribution?

Can I stilll make a contribution?

@Whizkevina Yes you may!

Okay! Good...
Thanks.

#138


Update Ableton Live, add Ableton Live Lite

Please submit separate pull requests for each cask, as more often than not this type of pull request brings problems with one or more of them, and it halts the inclusion of the other ones.
In this case, the lite version belongs in caskroom/versions.

In this case, the lite version belongs in caskroom/versions.

it's more a edition, not a version. And there are 4 editions of Ableton Live:
— ableton-live-lite (the cask in question) (bundled with hardware only)
— ableton-live
— ableton-live-standard
— ableton-live-suite
Should any of the others go to homebrew-versions too?

This doesn’t really make sense, here. zap is to throw away configurations, not work.

I've copied it from the ableton-live cask. Guess that one needs to be fixed too.

Remove the caveat since it is not related to installation.

App won't work without a license key. There's a free_license(web_page) method in Caveats Mini-DSL related to licensing but unrelated to installation as well, so I guessed it's the right way to tell about licensing caveats.
Anyway, will fix and re-submit things later today.

it's more a edition, not a version

Same thing as per the rules (fifth point in the bulleted list). Actually, “edition” is really a better name for it, will change it to that. Thank you.

Should any of the others go to homebrew-versions too?

All of them except the main one (ableton-live).

I've copied it from the ableton-live cask. Guess that one needs to be fixed too.

Yes. Would you mind doing it, please?

App won't work without a license key.

And you should know that before installing it with homebrew-cask. We’re not a discoverability service.

There's a free_license(web_page) method in Caveats Mini-DSL related to licensing but unrelated to installation as well

There’s a reason that’s a method: it’s common enough. It is also always used with discontinued, which does pertain to installation (it warns you it may or may not work correctly).

Would you mind doing it, please?

Yep, will do everything we discussed in several hours.
There will be several atomic pull requests in both repos.

Thank you.

@vitorgalvao this rule about versions / editions feels a little restrictive (IMO) and it would seem from the history of people attempting to add Ableton Suite to this repo, rather than checking the versions tap, that others agree.
In situations where there's no obvious 'primary stable' version (or edition), I wonder whether it makes sense to relax this rule a little and allow multiple versions to hit the main repo. I know I wasted time creating the same ableton-live-suite casks that others have already done before realizing that it was already in versions.
I may be beating a dead horse on this issue. Apologies if so. I won't be offended if you say 'it's been decided, let's just leave it'. Alternatively, if you want to start a new issue for for comment, happy to go that direction also.

Behind every strict rule is a prior time where the repo was a serious mess. Strict rules are reactionary, and they have been working. That means it’s unlikely we’ll reverse this one.
However, your point is perfectly valid and we’re aware of the problem. The solution is to make so that when you brew cask search, it’ll also check caskroom/versions, even if you don’t have it tapped. If you brew search they actually check our repos, but we (cask) still don’t.
There’s an open issue about this, but I’m now on a phone, so can’t easily check.

I've seen the issue you mention - no need to add it here. Will go with the flow on it based on what you're saying here.


Refactor converters and MinimumEigenOptimizer

Summary

Changed MinimumEigenOptimizer to return the best solution in terms of the original problem. See details.
Simplified MinimumEigenOptimizer and QuadraticProgramToQubo
Removed unnecessary deepcopy in converters
Revised type hints
Replace error messages with f-strings

Note: need to address  #175 to pass CI
Details and comments
The current implementation MinimumEigenOptimizer returns the best solution raw_samples[0].x among raw_samples in terms of QUBO as MinimumEigenOptimizationResult.x. But, it is not always the best solution in terms of the original problem because inequality constraints are converted into penalties as part of QUBO. So, I changed MinimumEigenOptimizer to return the best solution in terms of the original problem as MinimumEigenOptimizationResult.x.

Due to #175, CI fails.

#176 fixed #175

Should we have a reno for this, due to the change in behavior, since it may return different values for an end user than it did in the past.

So, I changed MinimumEigenOptimizer to return the best solution in terms of the original problem as MinimumEigenOptimizationResult.x.

Yes. I added a reno.


[Quick Start] Failed to connect to cluster

Guangyas-MacBook-Pro:kubernetes-sigs guangyaliu$ kubectl --kubeconfig kubeconfig get all -A
Unable to connect to the server: dial tcp: lookup cluster-sample-apiserver on <IP_ADDRESS>:53: server misbehaving

Guangyas-MacBook-Pro:kubernetes-sigs guangyaliu$ kubectl get svc
NAME                       TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
cluster-sample-apiserver   ClusterIP   <IP_ADDRESS>   <none>        6443/TCP   5m7s
cluster-sample-etcd        ClusterIP   None            <none>        <none>     5m9s
kubernetes                 ClusterIP   <IP_ADDRESS>       <none>        443/TCP    24m

@charleszheng44 ^^

@gyliu513 would you try to do nslookup cluster-sample-apiserver?

@charleszheng44 it appears macOS doesn't support HOSTALIASES - https://apple.stackexchange.com/questions/356972/how-can-i-make-macos-respect-hostaliases-environment-variable

/kind bug
/label documentation

@christopherhein @charleszheng44 seems Linux also does not work.
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# cat /root/.hosts
<IP_ADDRESS> cluster-sample-apiserver

root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# env | grep HOST
HOSTALIASES=/root/.hosts

root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# nslookup cluster-sample-apiserver
Server:		<IP_ADDRESS>
Address:	<IP_ADDRESS>#53

** server can't find cluster-sample-apiserver: NXDOMAIN

root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# kubectl --kubeconfig kubeconfig get all -A
Unable to connect to the server: dial tcp: lookup cluster-sample-apiserver on <IP_ADDRESS>:53: no such host

Interesting, yeah I think we just need to have this say the instructions (for now) should tell you to just add it to /etc/hosts so it will actually work or at least that is what I do.

Thanks @christopherhein , /etc/hosts works for me, but not sure why nslookup cluster-sample-apiserver always failed.
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# kubectl --kubeconfig kubeconfig get all -A
NAMESPACE   NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
default     service/kubernetes   ClusterIP   <IP_ADDRESS>    <none>        443/TCP   159m

root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# nslookup cluster-sample-apiserver
Server:		<IP_ADDRESS>
Address:	<IP_ADDRESS>#53

** server can't find cluster-sample-apiserver: NXDOMAIN

root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# cat /etc/hosts
<IP_ADDRESS> localhost
<IP_ADDRESS> cluster-sample-apiserver

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
<IP_ADDRESS> gyliu-dev21.fyre.ibm.com gyliu-dev21

Seems like nslookup does purely DNS resolution but when you just add to the hosts file that's not populated in DNS. For /etc/hosts you should use ping or at least that's what https://askubuntu.com/questions/627906/why-is-my-etc-hosts-file-not-queried-when-nslookup-tries-to-resolve-an-address says.


regression-test fix output

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall


Improving document for max page size

Improving documentation for max page size

API change check for Azure.Communication.Chat
API changes are not detected in this pull request for Azure.Communication.Chat


build error undefined: blackfriday.EXTENSION_DEFINITION_LISTS

Introduced in<PHONE_NUMBER>a6cd8721117525184f77bf8b602111

That's weird, it passed CI tests. Try go get -u github.com/russross/blackfriday then build again, let me know.

Hmm, yes it worked after that. Maybe I had an old version of blackfriday?


[v6.0] suggestion: make focus style modification mechanism part of the theme

Currently you can define function that will modify style of focused object and you can assign it to group with lv_group_set_style_mod_cb regardless of current theme. Since it is responsibility of a theme to define the visual style of objects it would be IMHO better if the theme also defined the visual style for objects when they have the focus.
I suggest moving the style modification function into the theme. For backwards compatibility with v5 the theme's callback could be used by default (instead of current "orangish" default callback) with the possibility to replace it with lv_group_set_style_mod_cb as it is now.
Also see #277, #804

Sounds reasonable.
LV_THEME_LIVE_UPDATE is enabled it's important to have only styles in lv_theme. To solve this the currently existing styles should be packed in a struct called style style It would result in th->style.btn.rel
Besides style there can be an other struct called group with focuse_cb and edit_cb elements.
These callbacks can be assigned when the group is created.
How does it sound to you? Would you like to implement it?

OK. I'll try to create an initial implementation.

In the initial commit https://github.com/manison/lvgl/commit/44e5cc446c9a82043acc3cbaa963d8b409a3c4dc I only moved the styles into the substructure style within the lv_theme_t structure as you suggested. Please review.

I would like to ask you about a comment in lv_theme.c above the th_styles array definition:

Can't determine the size in compile time because sizeof is not evaluated (should be `sizeof(lv_theme_t) / sizeof(lv_style_t*)

Since sizeof is a compile time operator so this expression should be just fine and in fact my compiler does not complain (after the change I use expression sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t*)). What compiler do you use?

TODO

[ ] Update examples accordingly (lv_test_theme.c)

I only moved the styles into the substructure style within the lv_theme_t structure as you suggested. Please review.

Looks good to me! :+1:

I would like to ask you about a comment in lv_theme.c above the th_styles array definition:

It's also working for me with  gcc. I don't remember why I did it this way (I need to add better comments next time). Maybe it's not working in Visual studio?
Anyway, let's use sizeof and we will see.

Maybe it's not working in Visual studio?

Nah, Visual Studio is fine. I'm using it :-)

Then fine! Maybe I just overcomplicated it :)

@kisvegabor How to notify all groups about theme changes?
I introduced function lv_group_report_style_mod (here https://github.com/manison/lvgl/commit/327d7c84caea08a3b2a15e5657104c3058fd974e#diff-1ca71106770136ef4cd6600d307f22b2R531) and I need to call it for all groups whenever theme changes (providing LV_THEME_LIVE_UPDATE is enabled) so groups can update their style modification functions from changed theme. But since there is no global linked list of all groups I have no way to iterate them. I was thinking about calling the function from lv_obj_report_style_mod where the whole object tree is recursively iterated and checking each object's group_p and calling the lv_group_report_style_mod upon it. This would probably work but since multiple objects can share the same group this would result in group being updated multiple times. It wouldn't hurt since theme changes infrequently, but anyway - what do you think? Any other suggestions?

Yes, the groups are not added to a linked list. So far it wasn't required. However, having a linked list for them could be a solution now. Instead of lv_group_t * group = lv_mem_alloc(sizeof(lv_group_t)); in lv_group_create() lv_group_t * group = lv_ll_ins_head(&_lv_group_ll)); can be used.
As _lv_group_ll should be marked as GC_ROOT (Garbage collector root object) similarly to this
After that with a lv_gorup_get_next() function you can iterate through the linked list. Similarly to lv_obj_get_child

I agree the linked list of groups is better long-term solution. Should I create a distinct PR for this or should this go to the "theme style modification" work?

Should I create a distinct PR for this or should this go to the "theme style modification" work?

It's fine to have it in the same PR.

It's fine to have it in the same PR.

OK.
The PR #844 is ready for review.
I tried to implement some focus styles that matches individual themes but it will definitely need some more love from someone with visual feeling :) Probably during #804.

Thank you very much!

I tried to implement some focus styles that matches individual themes but it will definitely need some more love from someone with visual feeling :) Probably during #804.

It will be fine for now :)

@kisvegabor I wanted to update the examples but I see you already did it, great :) Thanks.

@manison Yes, I've created the dev-6.0branch forlv_examples`.


gitlab

this utility doesn't support gitlab:(

Thank you for your issue!
This functional will be added in future version


bam for consensus

Hi,
Does racon accepts bam files instead of sam files for the consensus calculation or do we need convert bam to sam in order to use it?
Cheers,

Hi,
thank you for the nice software! I understand that one of the focal points currently appears to be in accelerating racon using the GPU 👍
Nevertheless, I was wondering whether there has been any progress made on the BAM support already? I could not find anything related in the Changelogs of the Releases, so I am keeping my hopes low ;)
Best,
Cedric

Hi Cedric,
unfortunately no BAM support was added yet.
Best regards,
Robert

I see.
Unfortunately, piping in the SAM file (as in https://github.com/isovic/racon/issues/9#issuecomment-275067339) appears to not be a solution either, as I get
[racon::createPolisher] error: file - has unsupported format extension (valid extensions: .mhap, .mhap.gz, .paf, .paf.gz, .sam, .sam.gz)!

I tried piping (samtools view -h alignment.bam draft.fna  | racon reads.fastq -  draft.fna) as well as process substitution (racon reads.fastq <(samtools view -h alignment.bam) draft.fna), both yielding the above error.

Piping was removed since version 1.0.0.

That is good to know, albeit a bit sad :)
I'll then just create a temporary SAM file from the BAM file. Should be fine too ;)
Thanks a lot!
Best,
Cedric

Either reading BAM or piping SAM from samtools view is useful to me.

I'll try to add it in the next refactor.

Gziped SAM files are supported, but without piping.

Accidentally pushed the wrong button :D

Accidentally pushed the wrong button :D

Gziped SAM files are supported, but without piping.

Good to know!

All formats that Racon accepts can be gziped.

Gzipped BAM file? 😈 (just kidding, please don't)

Actually a little-known fact that I've actually found really useful is that a BAM file is a gzip file. You can gunzip -c a BAM file to get an uncompressed BAM file. gunzip -c possorted_genome_bam.bam | samtools view works as expected.


Fix JSON rendering for stake-distribution command

The output of the stake-distribution command is as follows:
"cacdff40ff2bb71768b6db5257581860d3e1e9d88fba51d5ccdf863449cf944d": [
        {
            "denominator":<PHONE_NUMBER>11597,
            "numerator":<PHONE_NUMBER>4
        },
        "542327e56c0e9ff1a2fe977e54a0d7654754e268b4373688c4ace536725d13f7"
    ]

We can improve this by:

using double for the stake fraction, not rational
using proper field names so it's clear what they are (ie "stake-fraction" and "vrf-hash")

As of right now, this looks more like:
"cacdff40ff2bb71768b6db5257581860d3e1e9d88fba51d5ccdf863449cf944d": {
    "individualPoolStakeVrf": "542327e56c0e9ff1a2fe977e54a0d7654754e268b4373688c4ace536725d13f7",
    "individualPoolStake": {
        "denominator":<PHONE_NUMBER>11597,
        "numerator":<PHONE_NUMBER>4
    }
}


[C++][Parquet] Update parquet-cpp to use Arrow's AssertArraysEqual

Reporter: Phillip Cloud / @cpcloud
Assignee: Phillip Cloud](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cpcloud) / @cpcloud
Note: This issue was originally created as PARQUET-1123. Please see the migration documentation for further details.

Wes McKinney / @wesm:
Issue resolved by pull request 408
https://github.com/apache/parquet-cpp/pull/408


Backport: Fail to create persistent volume on OpenStack

Backport https://github.com/rancher/rancher/issues/19237

Can be tested with v2.2.4-rc19.  @sangeethah it's an api/ui fix, and we can do the first round of testing w/o the real open stack cluster. Just need to make sure you can create open stack volume in the api - before it wasn't working

rancher/rancher:v2.2.24-rc19

Reproduced original issue in v2.2.3, v2.2.4-rc18

When creating openstack PV:

Validation failed in API: PersistentVolume "openstack-test" is invalid: [spec.cinder.volumeID: Required value, spec.cinder.secretRef.name: Required value, spec.cinder.secretRef.namespace: Required value]

Created cluster
Created openstack PV successfully through UI with all required fields (did not test actual openstack cluster)

@bmdepesa could you also double check the edit use case? We also made a fix to not allow certain fields to be edited (volumeMode and spec.PersistentVolumeSource)

rancher/rancher:v2.2.4-rc20

Created cluster
Created openstack PV
Unable to edit cinderPersistentVolumeSource (API / no option in UI)
Unable to edit volumeMode (API / no option in UI)


Support for Kotlin scripts *.kts

Hello/bonjour,
What?
Support for Kotlin Scripts
#!/usr/bin/env kotlin
// my-scripts.kts

@file:Repository("https://jcenter.bintray.com")
@file:DependsOn("io.rsocket.kotlin:rsocket-core-jvm:0.13.0-SNAPSHOT")
////                                    # available:0.14.0")
////                                    # available:0.15.0")

fun main() {
  println("Hello Word")
}

Why?
Kotlin Scripts are becoming more and more useful, see https://github.com/krzema12/github-actions-kotlin-dsl
So why not support them as well?
How?
Parse & rewrite a .kts script in KotlinScript, KotlinScriptLind,  similar but simpler to what is done for versions catalog.
Re-use what refreshVersions already has for finding updates for maven dependencies.
Depends on https://github.com/jmfayard/refreshVersions/pull/509
Testing?
Unit test + sample-kotlin

Blocked by https://github.com/jmfayard/refreshVersions/pull/509

See https://github.com/jmfayard/refreshVersions/issues/582


The {{ watch_url }} variable doesn't handle URLs with Jinja variables

Describe the bug
According to https://github.com/dgtlmoon/changedetection.io/wiki/Handling-variables-in-the-watched-URL, I'm able to add Jinja variables to the URL to be monitored. That works fine, but if I use {{ watch_url }} in the notifications, it displays the un-formatted string (as in with the Jinja syntax)
Version
I'm using the latest commit, https://github.com/dgtlmoon/changedetection.io/commit/8536af0845b74918d1b2439d30ac4d5b3e59ec94
To Reproduce
Steps to reproduce the behavior:

Create a new notification URL using jinja variables
Set up the notification to include {{ watch_url }}
See that the URL in the notification still includes the jinja variables

Expected behavior
{{ watch_url }} contains the URL used in the last change. This can be tricky, as we can't simply parse the Jinja variables again, as they're mostly used for dates (and can return a different value than the URL scraped).

I dont think it was designed for this... maybe more a feature request I think? interesting

@dgtlmoon In that case, can I suggest adding this as clarification on the description of that Jinja variable? Currently it is:

token
description

{{watch_url}}
The URL being watched.

For me, this is the actual URL that was being watched and changed. In my mind, that is https://example.com/2022-01-01 and not https://example.com/{% now 'America/Sao_Paulo', '%Y-%m-%d' %}. Which is why I thought of this as a bug.
If that's not the case, maybe adding The URL being watched. Any Jinja2 variables are left unparsed. or similar to the token description would make it clearer?

Would be best to fix it- if someone wants to make a PR before I get around to it

@dgtlmoon Sounds good. I created the issue https://github.com/dgtlmoon/changedetection.io/issues/1534 as a feature request to track this.


Other Frameworks

I am working on a bot using Microsoft bot framework.
https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-quickstart
Any thoughts on using this?
Any suggestions on how to use your scripts with Microsofts?
@ajturner

Thanks @daFiter - we are starting work on "Sonar 2" and investigating frameworks. We'll look at this one as part of #12


Using mockup-db to unit-test motor application

Hi,
I have a motor application that I'd like to unit-test using MockupDB, but I don't know how.
for example I like to test if this small thing creates a valid user:
async def create(db, mail='some.user@example.com'):
    if not check_mail(mail):
        logging.error('invalid mail')
        return None
    [...]
    return await db.users.insert_one({'mail': mail})

According to the documentation I should wrap the insert_one using mockupdb.go, and call it synchronous. Do I have to refactor my code so it wraps all queries in go and can I use that in production?

In this simple example I could assume that MongoDB is just doing its thing (storing the user correctly) and just test if my check_mail function does what it should do, but if I have some more complex algorithms with multiple collections involved. I might need to refactor this code to modify data outside of mongo and use it just as untested persistence layer ontop of my data.

Happy to help. But I don't yet understand why you need MockupDB for this instead of testing your code with MongoDB. I think it would be simpler to avoid MockupDB. Definitely do not use go in production! It spawns a new thread for every operation, very expensive and risky. Anyway here's a sketch of testing Motor with MockupDB. I'm assuming you use asyncio:
import asyncio
import logging
import unittest

from mockupdb import MockupDB, going, OpMsg

from motor.motor_asyncio import AsyncIOMotorClient

def check_mail(_):
    return True

async def create(db, mail='some.user@example.com'):
    if not check_mail(mail):
        logging.error('invalid mail')
        return None

    return await db.users.insert_one({'mail': mail})

class MyTest(unittest.TestCase):
    def test(self):
        # In a real test, omit "verbose".
        server = MockupDB(verbose=True, auto_ismaster=True)
        server.run()
        self.addCleanup(server.stop)  # Important!
        client = AsyncIOMotorClient(server.uri)
        loop = asyncio.get_event_loop()
        with going(loop.run_until_complete, create(client.test)) as future:
            # Use pattern-matching or asserts to assert what you want about
            # the request.
            request = server.receives(OpMsg('insert', 'users'))
            self.assertEqual(request.doc['documents'][0]['mail'],
<EMAIL_ADDRESS>
            # You could do request.hangup() or request.command_err() to test
            # error handling.
            request.ok()

        # Get the return value of create(), which was passed back through
        # run_until_complete() and going().
        result = future()
        # Just a pymongo.results.InsertOneResult.
        print(result)

if __name__ == '__main__':
    unittest.main()

Yeah, that's what I was looking for! Thank you very much!
I run my tests on gitlab-ci, in a docker container. I did not thought to much about setting up mongodb in my testing process, that seemed also kind of wrong to me, but I will try to create a docker container that provides me with mongo-server before I test your code some more. That's maybe also the clearer implementation because I test on the actual system that will be used in production later.
(I assumed setting up the container would be hard but this looks quite simple... I'll give it a try )

Great! I'll close this but feel free to reopen if you have more questions.

Hi, I wanted to mockup-db with MotorClient, I tried your solution, but it doesn't work for me. I've got timeout.
<EMAIL_ADDRESS>async def test_create_document_in_DB():
"""
Test creates document in DB from Document schema
:return:
"""
document_example = internal.Document(
internal_collection_id="id_collection_some_string",
collection_name="important documents",
high_priority=True,
status="in progress",
progress=50,
interventions=12,
interventions_type=["Extract"],
)
server = MockupDB(verbose=True, auto_ismaster=True)
server.run()
client = AsyncIOMotorClient(server.uri)
loop = asyncio.get_event_loop()
with going(loop.run_until_complete, document.create_document(client, document_example)) as future:
    # Use pattern-matching or asserts to assert what you want about
    # the request.
    request = server.receives(OpMsg('insert', 'documents'))

    # You could do request.hangup() or request.command_err() to test
    # error handling.
    request.ok()

# Get the return value of create(), which was passed back through
# run_until_complete() and going().
result = future()
# Just a pymongo.results.InsertOneResult.
print(result)`

Hi @kob22, please open a new issue if you're still facing this problem. It would be helpful to include the python version, python -m pip list output, OS, and any other relevant environment info.

Hi @kob22, please open a new issue if you're still facing this problem. It would be helpful to include the python version, python -m pip list output, OS, and any other relevant environment info.


aq mon starts at 800

@JelleAalbers , I think the aqmon starts at 800:
https://xe1t-wiki.lngs.infn.it/doku.php?id=xenon:xenonnt:dsg:daq:channel_groups

Yes, but https://github.com/XENONnT/straxen/blob/master/straxen/plugins/daqreader.py#L18

Okay, that's clear. Thanks


Save state between client sessions

I think it would be useful to have a kind of stateSave option to save columns width and location between client sessions.

@KoldoRamirez you can do that using stateSave. You just have serialize the column metadata and to persist it on the server.

Another way is to turn saveState off and persist it yourself via ajax.

Another way is to turn saveState off and persist it yourself via ajax.

could you provide a example on how to restore the columns?

@e88y take a look at the dataTables documentation: https://datatables.net/reference/option/stateSave


Can I retrieve matched results count with results when using aggregation sets?

Hi there
I want to retrieve the matched results count with results simultaneously to reduce roundtrips when I use pagination in my aggregation query.  Is it possible to act in Redis.OM?
If I want to say clearly I want the pointed result in the following picture:

I think you can probably run both a count and your aggregation together asynchronously. Ironically I think the low level results set (which isn't exposed) does capture the count 🤔

Yes @slorello89
I ran both as you said, but sometimes our queries (primarily aggregate) are time-consuming, I think about something like PaginatedResult that can expose this count when we have pagination to reduce round trips and prevent calling complex queries two times.

right @imansafari1991 - but if you just run the count reduction in parallel wouldn't that just reply with the count for you?


[Bug] mixed-task-test-settings complains for init.robot files with Task Tags setting

What happened?
RobotFramework file that causes an issue with mixed-task-test-settings rule
*** Settings ***
Documentation   Initialization file for suite of tasks
Task Tags       task

Robocop output
[W] task\__init__.robot:3:1 (mixed-task-test-settings:0326) Use test-related setting 'Test Tags' if Test Cases section is used

What command/code did you try to run?
robocop ./tasks/__init__.robot
What is the full error message?
[W] task\__init__.robot:3:1 (mixed-task-test-settings:0326) Use test-related setting 'Test Tags' if Test Cases section is used
What did you expect to happen instead?
No warnings related to mixed task  & test  settings
Operating System
No response
Robocop version
5.3.0

Interesting, thanks for the bug report. I will check it out


Form recognizer initial API design proposal

This PR introduces the API design proposal for form recognizer track 2 SDK.
FormRecognizer.md lists all the methods/api's and models exposed to the user. It also contains a list of samples around the proposed api and models.

Major questions on the design are:

If we should consider splitting up the single client into more functionality specific clients i.e CustomForm client, FormLayout client, ReceiptClient.
There is an ongoing discussion on if the analyze operations should be LRO's. here would like to know your thoughts.
Is there a better way of representing tables in Java, rather than the list of table cells and their indices? Is a 2D matrix better for this?

If we should consider splitting up the single client into more functionality specific clients i.e CustomForm client, FormLayout client, ReceiptClient.
I prefer to have a single client

Single client makes it easy to know where to start from as a user
Don't need to create two clients to analyze a form and a receipt
Will be similar to TextAnalyticsClient that also has single client for different types of analyses
Multiple clients will need multiple builders?
Number of APIs per functionality is small (around 3 or 4) which doesn't warrant a client of its own

However, I am open to splitting this if, in the long term, each client evolves to have more operations that don't fit well in a single client.

There is an ongoing discussion on if the analyze operations should be LRO's. here would like to know your thoughts.

From the conversation on Teams, it looks like the average time taken is > 5 seconds and can go all the way up to 136 seconds. They look like LRO to me.

Is there a better way of representing tables in Java, rather than the list of table cells and their indices? Is a 2D matrix better for this?

Don't have enough context on how the user would interact with this. Can you add some sample user-facing code for how they would consume this data?

Multiple clients will need multiple builders?
Multiple clients won't need multiple builders. Instead was thinking if we go ahead with this a single FormRecognizerClient would be responsible to provide the sub-clients.

Number of APIs per functionality is small (around 3 or 4) which doesn't warrant a client of its own
However, I am open to splitting this if, in the long term, each client evolves to have more operations that don't fit well in a single client.
As of today, the functionality is very limited for the sub-clients but they are pretty different functionality wise.

Don't have enough context on how the user would interact with this. Can you add some sample user-facing code for how they would consume this data?

I have included some samples at the end of the Formrecognizer.md file to show the usage.
The tables mostly refer to the raw data in the forms/receipts laid out in tabular content by service.
Like shown in the below image, Left side being the image of receipt broken down into tables and its raw/text/json form on the right hand side.

Wanted to understand if we could have a better data structure to do proper indexing for the individual cell contents or its is common to represent tables in the list of cells structure.

Wanted to understand if we could have a better data structure to do proper indexing for the individual cell contents or it is common to represent tables in the list of cells structure rather than a complex data structure.

The two options we have for representing this are a list of table cells as in this PR or a 2-d matrix (since we can't use Guava Table).
With a list of table cells, the user can't easily do a column-wise traversal or row-wise traversal. For e.g. if I just want to look at only the Charges column in the above image, it's not easy with this type.
With a 2-d DataCell[][] type, I can easily lookup dataCell[i][3]. So, 2-d array seems more user-friendly. Thoughts?

With a 2-d DataCell[][] type, I can easily lookup dataCell[i][3]. So, 2-d array seems more user-friendly. Thoughts?

Yes, As mentioned in previous comments I was thinking of using a 2d matrix data structure for this We can probably play with this idea initially and test it in the user studies .

Closed with #9988


How to auto-update cart quantity from product page

I use a single component to render a product page - /product/{product-handle}
Our shop doesn't need quantity or variant fields as such they aren't exposed to the users. Wanted to mimic the functionality where multiple clicks update the cart quantity (and adds them to the cart).
For some reason my 'onClick={handleAddToCart}' works but the cart number nor the cart is updated without a full refresh.
Any ideas on what I'm doing wrong? Thank you!

When you first click on Add To Cart it creates a checkout with Shopify. The update quantity action on the Cart page updates this checkout. One way you can do what you're saying is to add some state logic to the Add To Cart Button which updates the quantity after the first click.
See createShopifyCheckout and updateShopifyCheckout functions in Store.js for more info.


Curl error 7 on redirect

Guzzle version(s) affected:6.5.3
PHP version: 7.4.6
cURL version: 7.67.0
Description
App in a docker container calling another app also in a docker container.
On a request with a session cookie I get the following error:
cURL error 7: Failed to connect to tesla.localhost port 8181: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) (GuzzleHttp\Exception\ConnectException)

Until the cookiejar was added I didn't get that error.
How to reproduce
$this->httpClient->send($appRequest->getRequest(), $appRequest->getOptions());

In $appRequest->getOptions() an instance of CookieJar is found. It is used to keep the session cookie.
Additional context
I'm smoke testing an old magento app before upgrading the php version (and making the change necessary for that).
I was able to test the REST API using the same step I'm taking now, minus the CookieJar that wasn't needed.

Hi.. I fail to see how there is a connection of your error with the guzzle code having a bug...

Well,
No CookieJar -> The request return a response
CookieJar -> The request crash curl
There seems to be something going on with the way cookies are sent. If I use Postman to send the request everything is going fine.
If it's has nothing todo with Guzzl what would be the probable cause ? (real question I'm not trying to be sarcastic).


MIC-642: End to end tests for record investigation

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.54%. Comparing base (270aa9e) to head (675c08e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
+ Coverage   90.50%   90.54%   +0.03%
==========================================
  Files         347      347
  Lines        5159     5159
  Branches      753      753
==========================================
+ Hits         4669     4671       +2
+ Misses        475      473       -2
  Partials       15       15

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


feat: NPM package upgrades, including MUI to v5.11.1

Need to fix Storybook runtime issue before merging:

Superceded by https://github.com/act-org/dls/pull/163


Pool Table Page

[ ] update top pools list
select top 20 token by APR where:
pool is white listed
liquidity is > 100000

@pingustar lets discuss few style updates
https://www.figma.com/file/fwADI9wqDrRAdlMX8EddCw/Bancor-v3?node-id=6533%3A184575

updated the doc with the items we have discussed.

desktop:

[ ] stats arrow animation
please make it static or much much slower. it can jump up like you have it but every 15 seconds have it jump once.

[ ] ticker title
current: Top Performing Pools
updated: Top Earners

[ ] table titles
current: Reward
updated: Rewards

[ ] table font size
the "rewards" text is 12px instead of 14px. can you update it to 14px like all other cells in the table?

mobile:

[ ] name columns is very wide. can we reduce width to fit 10 character pool name?
[ ] i do not see the option to display more rows in the table in mobile. only the option to go to the next page. is this expected?

[ ] Rewards Column:

Align tooltip to left side

Center rewards so that separators are all below each other

[ ] Add liquidity button should link to old app

open in new tab

implement logic to decide wether to go to single side or dual liquidity

[ ] Top Pools: Add BNT

BNT APR will be based on the pool with highest BNT Rewards APR + Fees APR

on click filter table to the pool with highest BNT APR

[ ] Remove Fee Column


Enable inter-documentation links to be clickable

Summary
Similar to Qiskit/qiskit-nature#783
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 91.432%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
4290

Relevant Lines:
4692

💛  - Coveralls

How about adding networkx to the list https://networkx.org/documentation/stable that looks like it should work. And docplex too https://ibmdecisionoptimization.github.io/docplex-doc likewise.


Generated SYM Enum Lines Exceed Max Length

Hi, I'm having an issue working with cantool's generated SYM files where the enumeration definition exceeds the maximum allowable line length for tools like PCAN Symbol Editor (Error 001: Syntax error - Line too long). The issue appears after approx 1,000 characters. Considering using newlines between each value to remedy.

can you provide a patch?

can you provide a patch?

Yes, I will be working toward this.

Should this issue not have been closed when https://github.com/cantools/cantools/pull/643 was merged?


typst_vello: Use Default::default()

This is standard Rust and reduces the dependency on bevy_utils.

Agreed, I think we can just remove bevy_utils dependencies altogether by adding hashbrown as a dependency.

Agreed, I think we can just remove bevy_utils dependencies altogether by adding hashbrown as a dependency.

See #12 :)

Thanks!


update README to match the command help to prevent discripancies

Fixes #213

@alan-barzilay, I made the suggested changes.
Please review the same.


is there a elegant way to register training service ?

Environment:

NNI version: 1.8
NNI mode (local|remote|pai): custom training service
Client OS: macos
Server OS (for remote mode only): linux
Python version: 3.7
PyTorch/TensorFlow version: pytorch-1.6
Is conda/virtualenv/venv used?: yes
Is running in Docker?: no

Log message:

nnimanager.log: N/A
dispatcher.log: N/A
nnictl stdout and stderr: N/A

What issue meet, what's expected?:
question: as i built a custom training service from my infra, is there an elegant way to register this service without having to download and modify the source code itself ? the way to extend training service here doesn't scale well within an organization. thanks advance for your response.
How to reproduce it?:
N/A
Additional information:
N/A

This feature seems reasonable, we will discuss feasibility of this feature.

I saw the PR, and it looks great. I look forward to v2.3.

https://github.com/liuzhe-lz/nni-training-service-template
This is a naive example for 3rd-party training service. It's considered an early preview since the APIs and toolchain are not formalized yet.


Problem with AppBar

Hello! I am trying to use Marquee with AppBar:

and I am getting the error:

What am I doing wrong?

I think the AppBar allows the Marquee to be as big as possible, so the Marquee doesn't know how high it should be. The same problem would occur if you tried to use a vertically scrolling ListView as the title.
If you wrap the Marquee in a SizedBox with a height of AppBar().prefferedSize.height, that should resolve your issue.

Thank you. It works good.

It works


Solution proposal for #8498

As described in  #8498 all unrolled elements will be contained in result set, which is contradictory to documentation:

$pathElements (since 2.2.1), the same as $paths, but for each node present in the pattern, a single row is created in the result set (no duplicates)

My idea is to track all elements previously fetched, and to ignore all reoccurred elements

It looks like that described behavior is valid, so no need for fix


Calling FlexibleAdapter.clear() may cause NullPointerException

Library Version: 5.0.0-rc1
All methods referenced are located in FlexibleAdapter.java
Expected outcome:
When public IHeader getHeaderOf(@NonNull T item) { ... } is overriden, item should never be null. I relied on that null checking, and it caused a NullPointerException unexpectedly.
Actual outcome:
clear();
calls
removeRange(0, getItemCount(), null);
which then assigns
T item = getItem(positionStart);
without checking if the itemCount argument is 0.
Since the list is empty, getItem(0); returns null, which is then passed to getHeaderOf(item); without a null check.

I'll make a pull request that fixes this and adds more @Nullable and @NonNull annotations in FlexibleAdapter to prevent future similar errors.

@magneticflux- thanks for your message. Actually the annotation is just an indication. But you are right that if overridden, that indication may mislead to not check the nullable value.
If you want you can also add a check of emptiness in removeRange(), to early return so it avoids to run through that method.
Maybe is better to check all the NotNull annotation that can be overridden too. Would you do it?

@davideas I'll try looking through other overrideable methods with @NonNull annotations and see if any can be changed so they aren't violated.


KFLUXINFRA-745: ConfigMap Settings for the Default Resource Requests and Limits

Pipeline ConfigMap Settings for the Default Resource Requests and Limits.
These values are not tested and are for testing purposes to see if it enforces resource requests and limits for the PipelineRin containers with no resource requests and limits set.

I also suspect my earlier guidance in slack won't do what is desired here.  Not 100% why, but that configMapGenerator in the kustomize.yaml seem to only deal with the config maps in the tekton-results namespace, not the config maps in the openshift-pipelines namesapce (which has the config-default cm).
I'm searching the internet trying to figure out this bit of gitops skulduggery.
Also, any PR like this that updates staging has to run hack/deploy-config.sh.  I post an example of what I mean if I figure out how to ge the gitops to work.

OK @manish-jangra @arewm I figured out and havee got an example of the correct gitops mechanics for updating config-defaults in openshift-pipelines updated in https://github.com/redhat-appstudio/infra-deployments/pull/4250
Apologies for my incorrect suggestion yesterday.
I'll leave it to you @manish-jangra to update this PR to follow this pattern, as well as work with @arewm if the use of default is find, or if you need some prefix filtering.

Thank you @gabemontero , your proposed solution sounds reasonable.
@arewm is there any fixed pattern in Konflux PipelineRuns which can be used as a prefix?

is there any fixed pattern for tasks naming conventions in Konflux PipelineRuns which can be used as a prefix?

Are the pods not named according to the name of the task? While some users may customize this name, I assume that the default name we set on the pipeline (i.e. build-container should be a pretty consistent prefix)?

build-container isn't that a pod with 9+ containers running in it? It says containers inside the pod check it here

@manish-jangra, yes there are a lot of containers/steps running within the pod. If the current primary use case for deploying this fix is to try and improve the resource requests for all runs of the build pipeline, then we could just increase it for all steps in the task. If we do not want that, then I don't think that there is any other universal prefix for all steps which we are trying to target.

I would vote only merging this after https://github.com/konflux-ci/build-definitions/pull/1247 (to cover other tasks that do not have their requests/limits set).
If we push this one before, that would make step-build container to run with limit of 0.5 CPU that would be a regression for some big projects.
Another way might be to only make this to define requests, as current 10m on CPU is not good for OpenShift scheduler or nodes auto-scaler.


Toco not working on Windows

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a
TensorFlow installed from (source or binary): source, pip install --upgrade tf-nightly
TensorFlow version (use command below): GIT: 'v1.9.0-rc2-798-gc818bf016d', VERSION: '1.10.0-dev20180719'
Python version: 3.6.6
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:
Exact command to reproduce:

Python API
`import tensorflow as tf
converter = tf.contrib.lite.TocoConverter.from_keras_model_file("model.h5")
tflite_model = converter.convert()
open("model.tflite", "wb").write(tflite_model)`
and
Command-line
toco
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the problem
I'm trying to convert a keras model to the tflite format, but the sample code provided on the website doesn't seem to work. As advised in my other issue, I installed tf-nightly. I used a venv to get a clean environment but for some reason, other issues have arisen. In the case of the Python API, 'lite' seems to be missing from 'tensorflow.contrib' whereas when I run 'toco' from the command line, it raises a ModuleNotFoundError as shown below. Any help would be greatly appreciated.
Source code / logs
Python API
Traceback (most recent call last):   File "sandbox/run.py", line 3, in <module>     converter = tf.contrib.lite.TocoConverter.from_keras_model_file("model.h5")   File "C:\beta\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 54, in __getattr__     return getattr(module, item) AttributeError: module 'tensorflow.contrib' has no attribute 'lite'
Command-line (running toco)
Traceback (most recent call last):   File "c:\users\user\appdata\local\programs\python\python36\Lib\runpy.py", line 193, in _run_module_as_main     "__main__", mod_spec)   File "c:\users\user\appdata\local\programs\python\python36\Lib\runpy.py", line 85, in _run_code     exec(code, run_globals)   File "C:\beta\Scripts\toco.exe\__main__.py", line 5, in <module> ModuleNotFoundError: No module named 'tensorflow.contrib.lite.python.tflite_convert'

Bump

Yes, unfortunately, we do not currently support tooling on Windows. You can use docker to workaround this or a linux instance. We hope to fix this in the future.

Nagging Assignee @aselle: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

The TOCO converter should compile properly on Windows now. We're still working to make sure it gets built along with the standard TensorFlow pip builds.

The TOCO converter was not working for me on Windows 10. For those still having problems, I used the Windows Built-In Subsystem for Linux (good tutorial here https://www.youtube.com/watch?v=xzgwDbe7foQ) as I don't have knowledge of Docker or similar programs. This allowed me to use TOCO.

The TOCO converter was not working for me on Windows 10. For those still having problems, I used the Windows Built-In Subsystem for Linux (good tutorial here https://www.youtube.com/watch?v=xzgwDbe7foQ) as I don't have knowledge of Docker or similar programs. This allowed me to use TOCO.

I was folowing the tutorial  and had a problem running the toco.
This was the solution for me
it was not easy because  you need to have the exact version of tensorflow, and need to find the toco file but here it goes:
on windows 10
install Windows Subsystem for Linux see
so now you have linux subsystem and you installed Ubunto from store
next step setup your linux machine to have all the need python modules.

install pip3

Note: I had a problem installing pip3, needed to install first pip, then pip3
sudo apt-get install python-pip
sudo apt-get install python3-pip

install tensorflow 1.7 -
pip3 install --upgrade  "tensorflow==1.7.*"
note - this is very important other versions may not work
if you try to run toco you would get :

Command 'toco' not found, did you mean:

  command 'todo' from deb devtodo

Try: sudo apt install <deb name>

so where is toco?

go to folder ~/.local/bin/
there you would find toco.
this is a python file so run it python3 ~/.local/bin/toco
now you can run the "exe" of toco
to convert you can run the command explained in https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/#2

just change the -graph_def_file=tf_files/retrained_graph.pb to --input_file=tf_files/retrained_graph.pb
if you are following the tutorial, then go to the git repo folder - "tensorflow-for-poets-2"
and run from there:
python3 ~/.local/bin/toco --input_file=tf_files/retrained_graph.pb --output_file=tf_files/optimized_graph.lite --input_format=TENSORFLOW_GRAPHDEF --output_format=TFLITE --input_shape=1,224,224,3 --input_array=input --output_array=final_result --inference_type=FLOAT --input_data_type=FLOAT
Hope this helps someone
Note: you can access you windows folders under mnt
example
/mnt/c/Users/-----/source/repos/tensorflow-for-poets-2

You are using a 1.7 as the version. Please try something newer like 1.12 or
tf-nightly. It was certainly not available in 1.7.
-A
On Wed, Nov 7, 2018 at 6:14 AM mwindowshz<EMAIL_ADDRESS>wrote:

The TOCO converter was not working for me on Windows 10. For those still
having problems, I used the Windows Built-In Subsystem for Linux (good
tutorial here https://www.youtube.com/watch?v=xzgwDbe7foQ) as I don't
have knowledge of Docker or similar programs. This allowed me to use TOCO.
I was folowing the tutorial
https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/#2
and had a problem running the toco.
This was the solution for me
it was not easy because you need to have the exact version of tensorflow,
and need to find the toco file but here it goes:
on windows 10
install Windows Subsystem for Linux see
https://blog.revolutionanalytics.com/2017/12/r-in-the-windows-subsystem-for-linux.html
so now you have linux subsystem and you installed Ubunto from store
next step setup your linux machine to have all the need python modules.

install pip3

Note: I had a problem installing pip3, needed to install first pip, then pip3
sudo apt-get install python-pip
sudo apt-get install python3-pip

install tensorflow 1.7 -
pip3 install --upgrade "tensorflow==1.7.*"
note - this is very important other versions may not work
if you try to run toco you would get :

Command 'toco' not found, did you mean:
command 'todo' from deb devtodo
Try: sudo apt install
so where is toco?

go to folder ~/.local/bin/
there you would find toco.
this is a python file so run it python3 ~/.local/bin/toco
now you can run the "exe" of toco
to convert you can run the command explained in
https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/#2

just change the -graph_def_file=tf_files/retrained_graph.pb to
--input_file=tf_files/retrained_graph.pb
if you are following the tutorial, then go to the git repo folder -
"tensorflow-for-poets-2"
and run from there:
python3 ~/.local/bin/toco --input_file=tf_files/retrained_graph.pb
--output_file=tf_files/optimized_graph.lite
--input_format=TENSORFLOW_GRAPHDEF --output_format=TFLITE
--input_shape=1,224,224,3 --input_array=input --output_array=final_result
--inference_type=FLOAT --input_data_type=FLOAT
Hope this helps someone
Note: you can access you windows folders under mnt
example
/mnt/c/Users/-----/source/repos/tensorflow-for-poets-2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/20975#issuecomment-436635893,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAT52l74AFddV8KSTLWhCDW31InWnfCFks5usurIgaJpZM4VWuJ4
.

So I'm using tensorflow version 1.12 but when I run toco --help I get the error
No module named 'tensorflow.contrib.lite.python.tflite_convert'

I get the same error as @tajwane, does someone know the solution?

I found a solution. I posted my script on GitHub: https://github.com/Lexicographical/KerasToTFLite
You need to run the script using Ubuntu on Windows though.

I run into the same issues, so to be able to find it in the terminal:

pip3 install tf_nightly

Be careful to use pip3 and not pip, or you will run into the error ImportError: cannot import name abs.


Upgrade RxJava to 1.1.5

This resolves #552

This will also use 1.1.5 rxjava in spring-integration-kafka as well.

@ilayaperumalg

This will also use 1.1.5 rxjava in spring-integration-kafka as well.

What do you mean? Spring Integration Kafka has never used RxJava. Having the Flux and Mono foundation in the latest Reactor I even don't think that we will never take a look into RxJava 1.x at all there.

@artembilan RxJava is being used by the WindowingOffsetManager of the Kafka binder. I thought this offset manager is in spring-integration-kafka and now realized it is part of kafka binder code only.
So, RxJava 1.1.5 is used by the Kafka binder.

Having the Flux and Mono foundation in the latest Reactor I even don't think that we will never take a look into RxJava 1.x at all there.

Yeah, I agree. But I think this fix is needed only for the concern raised by @dsyer in #522

OK. Got it @ilayaperumalg .
Thank you for explanation!
Anyway it isn't clear why you still use RxJava there since we already have WindowingOffsetManager based on Reactor 2.0 in SIK since its 1.3: https://github.com/spring-projects/spring-integration-kafka/blob/1.3.x/src/main/java/org/springframework/integration/kafka/listener/WindowingOffsetManager.java

OK-OK. I understand that upgrade concern here and suppose my comments are a bit out of the purpose of the PR. Just wanted to place all the dots under "i" do not confuse other peoples like I was seeing such a comment in my mail box.
Thank you for the attention!

@artembilan Your concern is well-founded, but unfortunately there's been no release of Spring Integration Kafka 1.3.1 and I'm a bit wary of making additional changes at this point. That being said, we will remove the need for this relatively soon as we start upgrading the binder to 0.9 and also begin the overhaul of the binder system to support reactive binders.

Doh...
Thank you, @mbogoevici , for pointing that out. I really missed that we didn't release that Reactor support in the SIK :smile:
Although there are a couple issues fixed that I think we can release 1.3.1 together with the 2.0.0.
But that is a difference story from this one of course.
Never mind.


adapter.js versioning policy + minimum required versions

In order to make adapter.js dependable, there needs to be some kind of versioning system.
Currently, it is rather unclear what you need to do when upgrading adapter which keeps even me from using it. In the past, things have been removed without notice. And I want to do that in this PR https://github.com/webrtc/adapter/pull/18#discussion_r26180825 as well, so this is not a theoretic problem.
Let's use semver as follows:
Patch version: backward compatible fixes you absolutely want to pull in and that don't break anything.
Minor version: addition of new features.
Major version: removal of old APIs/functionality/workarounds in adapter.js.
The major version is a little tricky. We use adapter to shim functionality that is yet there or only exist newer versions of Chrome and Firefox. But we don't want to keep "old cruft" around forever. For example the shim of MediaStream.prototype.getAudioTracks (mid-2013)...
On talky, I am seeing chrome versions which do not support DTLS and some other ... interesting... errors. I do not want to support those versions anymore. If you use a 6+ month old browser you are probably getting an experience which is worse than what you should get...
Chromium 37 (possibly older versions of Chrome as well) seem to have an issue with opusfec.
Hence we should also require a minimum browser version (both FF and Chrome) and bump the major version if we change that.
thoughts @samdutton? (cc @bemasc @damonoehlman)
The final version will be an empty file because we don't need a shim anymore! Not sure if that is a realistic goal but... :-)

SGTM, with semver versioning: starting with adapter-1.0.0.js?
Would we keep old versions or just rename?
@juberti @jiayliu WDYT?

@samdutton yes. Unless you want a fancy name that requires you to start at 2.0.0 :-)
Using npm for versioning automagically creates git tags which appear as releases on github (but only if one pushes with --tags...). I suppose bower can do something similar.

I think annotated git tags are probably the way to go, using the mechanism described here. Creating the tags manually is probably OK.
@juberti @jiayliu If no objections, I'll go ahead and add tag/release semver versioning, starting with 1.0.0.

@samdutton I can do a PR with the minimum version thing over the weekend

SGTM
On 18 March 2015 at 16:40, Philipp Hancke<EMAIL_ADDRESS>wrote:

@samdutton https://github.com/samdutton I can do a PR with the minimum
version thing over the weekend
—
Reply to this email directly or view it on GitHub
https://github.com/webrtc/adapter/issues/19#issuecomment-83051135.

done as part of #18 -- I don't like breaking my own PRs :-)

@samdutton ping? I want #23 without writing the code myself :-)

This is an important piece to add to this library, as the spec is still evolving, and to develop stable apps using webrtc-adapter would need locking down on some specific release versions to not get trapped with removal/change in APIs :)

Adding my voice in support of this. Adding a version number would make it easy for downstream automated packagers, such as https://rails-assets.org, to distribute this as a gem.

There seems to be an npm published already, which is currently at version 0.7.0.
npm owner ls gives bemasc and willscott as owners. Do @bemasc @willscott  work as tags?

I have now pushed a version-tagged version of this repo as version 0.1.0. Expect the last digit to be increasing often for a while.
I'll write an interpretation of the semver requirements on the README - basically, I think we should increase the minor version every time we have a version with a change, the middle version every time we add some new shim so that something that used to not work now works, and the major version only when we do incompatible changes.
I want to wrap the whole adapter.js in (function(){...})() before I go to version 1.0, as that seems to be the standard Javascript construct for rendering module-local variables invisible to the rest of the world.

You could also consider having a browserify'ed build process, which would do that wrapping for you, and allow the shim to be compiled as part of a larger code base.

I think we are done here for now.


feat: add game server panel

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#147  👈
#146
#145
#144
#143
#142
#141
#140
#139
#138
#137
#136
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NathanFlurry and the rest of your teammates on  Graphite


SDK Sync - Bump for 4a4811c - v0.3.0

Is everything on this PR generated/ready to be stamped?

Is everything on this PR generated/ready to be stamped?

Since stainless has released a couple of recent fixes let's first merge in https://github.com/Modern-Treasury/modern-treasury-node/pull/4 which is an earlier version that we published with python to keep them in sync. So going to close this for now.


Support netbox 3.2.x versions

When I upgrade Netbox to version 3.2.0, netbox_ddns plugin can not been installed.
Traceback (most recent call last):
  File "/opt/netbox-3.2.0/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/apps/registry.py", line 124, in populate
    app_config.ready()
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/netbox_ddns/__init__.py", line 25, in ready
    super().ready()
  File "/opt/netbox-3.2.0/netbox/extras/plugins/__init__.py", line 68, in ready
    template_extensions = import_object(f"{self.__module__}.{self.template_extensions}")
  File "/opt/netbox-3.2.0/netbox/extras/plugins/utils.py", line 31, in import_object
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/netbox_ddns/template_content.py", line 5, in <module>
    from . import tables
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/netbox_ddns/tables.py", line 4, in <module>
    from utilities.tables import BaseTable, ToggleColumn
ImportError: cannot import name 'BaseTable' from 'utilities.tables' (/opt/netbox-3.2.0/netbox/utilities/tables.py)```

#25 I prepared this PR for fast upgrade to NetBox 3.2.0, but it breaks working with lower versions.

I modified PR #25 with support NetBox 3.1.x and 3.2.x.
Now fully tested on NetBox 3.1.7, 3.1.8, 3.1.10 and 3.2.0

Merged #25


Compilation error when trying to compile any postgresql function in DBeaver: Version <IP_ADDRESS>912221734.

I am getting a compilation error when trying to compile any postgresql function in DBeaver: Version <IP_ADDRESS>912221734.
SQL Error [42601]: Unterminated dollar quote started at position 90 in SQL CREATE OR REPLACE FUNCTION
To be sure it was not an issue with the functions themselves I pulled a function that compiled fine three days ago and tried it. It got the same error.
Note that if I select all of the text and then compile, it works fine.  That worked perfectly. Now it does not.
Not the biggest issue in the world, and I can work around it. Just a slight problem.
Thank You,
Greg

Most likely a duplicate of #7460


Error building with cmake

username@Gallium:~/Vulkan-Tools$ cmake -S . -B build -D UPDATE_DEPS=ON -D BUILD_WERROR=ON -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug
CMake Error: The source directory "/home/username/Vulkan-Tools/CMAKE_BUILD_TYPE=Debug" does not exist.

This is more of a CMake issue rather than one with our repository. I ran the exact command you gave here and did not have any issues. Can you remove the Vulkan-Tools directory entirely and retry?

Try the following:
rm -rf build

cmake -S . -B build -DUPDATE_DEPS=ON -DCMAKE_BUILD_TYPE=Debug

Closing due to lack of response.
Feel free to check our CI we build CMake regularly. It's likely user error. Make sure you are also using at least CMake 3.17


Add changelog entry for changes to isSomeString.

This is the changelog entry for https://github.com/dlang/phobos/pull/5291.

Thanks a lot for pointing out the use of REF in the title @aG0aep6G!
@JackStouffer and all: you are aware that you can (and should) give the rendered changelog a quick glance at DAutoTest - it takes ten seconds and can prevent such problems ;-)


pythonPackages.soco: 0.16 -> 0.17

Now works with latest pytestcov
This transitively fixes beets (fixes https://github.com/NixOS/nixpkgs/issues/64339) which depends on soco, which now doesn't depend on
pytest_3 anymore, which depends on pytestcov_3, which is broken.
An upstream PR for the patch here has been submitted: https://github.com/SoCo/SoCo/pull/670

Motivation for this change
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build beets


Do you consider to use new Speech synthesis model ?

Do you mean a better vocoder? We are not working on this problem at the moment and hence we do not have immediate plans to use a better vocoder. However, it is something that can be tried.


feat: Use Task to focus window

Description
Use Task execution to focus window.
causes known vscode issue:
https://github.com/microsoft/vscode/issues/176670
In Output > Tasks there is:
Activating task providers java
Error: the task 'vaadin: bringToFront' neither specifies a command nor a dependsOn property. The task will be ignored. Its definition is:
{
    "type": "shell",
    "id": "shell,/Applications/Visual\\ Studio\\ Code.app/Contents/MacOS/Electron \"/Users/vaadin/src/copilot\",",
    "problemMatcher": [],
    "label": "vaadin: bringToFront"
}
Error: the task 'vaadin: bringToFront' neither specifies a command nor a dependsOn property. The task will be ignored. Its definition is:
{
    "type": "shell",
    "id": "shell,/Applications/Visual\\ Studio\\ Code.app/Contents/MacOS/Electron \"/Users/vaadin/src/copilot\",",
    "problemMatcher": [],
    "label": "vaadin: bringToFront"
}

EDIT: Does not work on Windows due to different executable variable and differences in execution (command line / powershell).

Not working on Windows


Fixed Issue#1: Inconsistent sidebar styles

Fixed the font monospace and used bullets with unfilled circles in show page of articles.

The additional code you wrote does not address the issue

This will fix the issue -- but the real question is why and what was broken in the first place. For instance, why do all the other lists work just fine?

I deleted the old branch by accident where this code came from. I have resubmitted the new code via a NEW PULL REQUEST to fix this issue. Please refer to Pull Request #33 Refixed Issue # 1.

Cannot Push to this branch anymore as this branch has been deleted accidentally. Please refer to to PULL REQUEST #33 from here on.
Please refer to this Stack Overflow discussion:
http://stackoverflow.com/questions/10081053/how-to-change-the-base-branch-of-a-pull-request
up vote
69
down vote
You can't. Just make a new pull request.
shareimprove this answer
answered Apr 9 '12 at 23:18
Amber
230k33386397
8
straight to the point, but not strictly true -- see this answer. – Tom Aug 16 '12 at 9:08
7
Relying on undocumented (and potentially unintentional) API functionality is a recipe for sadness down the line. – Amber Aug 18 '12 at 18:39
15
Nobody said anything about relying on undocumented API functionality. This question is asking for the resolution to a one-off problem, not a permanently supported ongoing solution. Regardless, to say that "You can't" is simply untrue. – Tom Sep 30 '12 at 20:12
5
Either way the undocumented API is broken now (see comments of the other answer), and that's pretty sad. – dequis Jun 16 '13 at 3:00
1
A quick googling dropped me into this issue with hundreds of +1s. github.com/isaacs/github/issues/18 – tejasbubane Feb 4 '15 at 7:04

No problem.
In the future -- although you deleted your local branch, you still have access to the remote branch on your fork. You can pull YOUR branch down and keep working on it.

Duly noted. Lesson learned. Thank you.


Delete button not working in Todojs extension

Describe the bug
hi @Sulagna-Dutta-Roy
I am raising an issue again for the Todo js extension as delete task button not working in extension but it was working in normal webpage, assign this to me
To Reproduce
Steps to reproduce the behavior:

Go to 'todo js extension '
Click on 'delete button'
See it was not deleting

Expected behavior
it need to delete the task i check previous version as well but still same issue with that
Screenshots

Desktop (please complete the following information):

OS: windows 11
Browser [chrome]
Version [124.0.6]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
This issue is on old version as well i checked  it ,assign this to me

Describe the bug hi @Sulagna-Dutta-Roy I am raising an issue again for the Todo js extension as delete task button not working in extension but it was working in normal webpage, assign this to me To Reproduce Steps to reproduce the behavior:

Go to 'todo js extension '
Click on 'delete button'
See it was not deleting

Expected behavior it need to delete the task i check previous version as well but still same issue with that
Screenshots
Desktop (please complete the following information):

OS: windows 11
Browser [chrome]
Version [124.0.6]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context This issue is on old version as well i checked it ,assign this to me

Its working on my browser perfectly

Perfectly working on my side.

@Sulagna-Dutta-Roy  it was working perfectly in webpage but not in chrome extension i dont know why i checked it once again on different crome browser and on different device
one thing , it was working fine on webpage but not on extension please check once again it need some changes i think

@Sulagna-Dutta-Roy it was working perfectly in webpage but not in chrome extension i dont know why i checked it once again on different crome browser and on different device one thing , it was working fine on webpage but not on extension please check once again it need some changes i think

Let me check once again

Please don't raise the Issue until you are assigned.

okay and thankyou for you support @Sulagna-Dutta-Roy