CentOS 7, elastalert-create-index and "ImportError: No module named urllib3"

Current master, this works fine:
sudo python setup.py install
but loading, gives:
elastalert-create-index
Traceback (most recent call last):
File "/usr/bin/elastalert-create-index", line 11, in
load_entry_point('elastalert==0.1.39', 'console_scripts', 'elastalert-create-index')()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 2843, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 2434, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 2440, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python2.7/site-packages/elastalert-0.1.39-py2.7.egg/elastalert/create_index.py", line 10, in
import elasticsearch.helpers
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/init.py", line 24, in
from .client import Elasticsearch
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/client/init.py", line 4, in
from ..transport import Transport
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/transport.py", line 4, in
from .connection import Urllib3HttpConnection
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/connection/init.py", line 3, in
from .http_urllib3 import Urllib3HttpConnection, create_ssl_context
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/connection/http_urllib3.py", line 3, in
import urllib3
ImportError: No module named urllib3
Help? Thanks.

Can you share the output of setup.py install? I'm surprised it wouldn't install urllib3
Elastalert requires requrests (https://github.com/Yelp/elastalert/blob/master/setup.py#L44) and requests requires urllib3: (https://github.com/kennethreitz/requests/blob/master/setup.py#L47)

Sorry, missed this!
elastalert-centos-7-setup.py-install.txt

Probably an ElasticSearch 7 issue?
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/connection/http_urllib3.py", line 3, in <module>     import urllib3 ImportError: No module named urllib3

Anything I can do to help? Thanks.

Hm, I see Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python2.7/site-packages (from elasticsearch>=7.0.0->-r requirements.txt (line 6)) (1.22) so it should be there.. I'm not really sure right now what the issue is.
Does running python -c "import urllib3" give you the same error?

Thanks. I get:
python -c "import urllib3"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named urllib3

Weird too:
locate urllib3
/usr/lib/python2.7/site-packages/urllib3
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/__init__.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/_collections.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/connection.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/connectionpool.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/contrib
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/exceptions.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/fields.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/filepost.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/poolmanager.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/request.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/response.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/contrib/__init__.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/contrib/ntlmpool.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/contrib/pyopenssl.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages/__init__.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages/ordered_dict.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages/six.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages/ssl_match_hostname
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/__init__.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/connection.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/request.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/response.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/retry.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/ssl_.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/timeout.py
/usr/lib/python2.7/site-packages/botocore-1.12.140-py2.7.egg/botocore/vendored/requests/packages/urllib3/util/url.py
/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/connection/http_urllib3.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/connection.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/connection.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/connectionpool.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/connectionpool.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/exceptions.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/exceptions.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/fields.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/fields.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/filepost.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/filepost.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/poolmanager.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/poolmanager.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/request.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/request.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/response.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/appengine.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/appengine.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/securetransport.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/securetransport.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/socks.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/socks.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/six.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/six.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/_implementation.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/_implementation.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/__init__.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/__init__.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/queue.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/queue.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/request.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/request.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/response.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/response.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/retry.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/retry.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/timeout.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/timeout.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyc
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/wait.py
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/wait.pyc
/usr/lib/python2.7/site-packages/urllib3/contrib
/usr/lib/python2.7/site-packages/urllib3/packages
/usr/lib/python2.7/site-packages/urllib3/util
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport
/usr/lib/python2.7/site-packages/urllib3/contrib/appengine.py
/usr/lib/python2.7/site-packages/urllib3/contrib/appengine.pyc
/usr/lib/python2.7/site-packages/urllib3/contrib/securetransport.py
/usr/lib/python2.7/site-packages/urllib3/contrib/securetransport.pyc
/usr/lib/python2.7/site-packages/urllib3/contrib/socks.py
/usr/lib/python2.7/site-packages/urllib3/contrib/socks.pyc
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/__init__.py
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/__init__.pyc
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/bindings.py
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/bindings.pyc
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/low_level.py
/usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/low_level.pyc
/usr/lib/python2.7/site-packages/urllib3/packages/backports
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname;5b82fdd0
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname;5b83e0a0
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname;5b83e174
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname;5c31047a
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname;5c310688
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname;5c310701
/usr/lib/python2.7/site-packages/urllib3/packages/backports/__init__.py
/usr/lib/python2.7/site-packages/urllib3/packages/backports/__init__.pyc
/usr/lib/python2.7/site-packages/urllib3/packages/backports/makefile.py
/usr/lib/python2.7/site-packages/urllib3/packages/backports/makefile.pyc
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/__init__.py
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/__init__.pyc
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/_implementation.py
/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/_implementation.pyc
/usr/lib/python2.7/site-packages/urllib3/util/selectors.py
/usr/lib/python2.7/site-packages/urllib3/util/selectors.pyc
/usr/lib/python2.7/site-packages/urllib3/util/wait.py
/usr/lib/python2.7/site-packages/urllib3/util/wait.pyc
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/DESCRIPTION.rst
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/INSTALLER
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/METADATA
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/RECORD
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/WHEEL
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/metadata.json
/usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/top_level.txt

Weird still as it will uninstall:
[suretec@tommen ~]$ python -m pip uninstall urllib3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Uninstalling urllib3-1.22:
  Would remove:
    /usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/*
    /usr/lib/python2.7/site-packages/urllib3/contrib/_securetransport/*
    /usr/lib/python2.7/site-packages/urllib3/contrib/appengine.py
    /usr/lib/python2.7/site-packages/urllib3/contrib/securetransport.py
    /usr/lib/python2.7/site-packages/urllib3/contrib/socks.py
    /usr/lib/python2.7/site-packages/urllib3/packages/backports/*
    /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/*
    /usr/lib/python2.7/site-packages/urllib3/util/selectors.py
    /usr/lib/python2.7/site-packages/urllib3/util/wait.py
Proceed (y/n)? n

[suretec@tommen ~]$ python -c "import urllib3"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named urllib3

What does which python output? Maybe it's possible that you have multiple Python installations? I know this happens on MacOS a lot because of conflicting system vs package-manager installs.

So I can fix it like so (the urllib3 import error):
pip uninstall requests
pip uninstall urllib3
yum remove python-urllib3
yum remove python-requests
yum install python-urllib3
yum install python-requests

but then the index command fails:
 elastalert-create-index
Traceback (most recent call last):
  File "/usr/bin/elastalert-create-index", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests>=2.10.0' distribution was not found and is required by elastalert
[suretec@tommen elastalert]$ rpm -q python-requests
python-requests-2.6.0-1.el7_1.noarch

If I update requests by pip, I get:
[suretec@tommen elastalert]$ sudo pip install --upgrade requests
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting requests
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests) (2.6)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
  Using cached https://files.pythonhosted.org/packages/39/ec/d93dfc69617a028915df914339ef66936ea976ef24fa62940fd86ba0326e/urllib3-1.25.2-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests) (2<IP_ADDRESS>)
ERROR: botocore 1.12.140 has requirement urllib3<1.25,>=1.20, but you'll have urllib3 1.25.2 which is incompatible.
Installing collected packages: urllib3, requests
  Found existing installation: urllib3 1.10.2
    Uninstalling urllib3-1.10.2:
      Successfully uninstalled urllib3-1.10.2
  Found existing installation: requests 2.6.0
ERROR: Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
WARNING: You are using pip version 19.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[suretec@tommen elastalert]$ python -c "import urllib3"
[suretec@tommen elastalert]$

Any ideas?

Shame no one else is experiencing this. What's the preferred OS to run this on/?

Going to use a docker image for this. Thanks.


cmd+click open external websites confilcts with internal references

VSCode Version: 1.43.2
OS Version: Darwin x64 18.7.0

Steps to Reproduce:

create a .js/.ts file with such code:

const getUrlPrefix = env => 'www'
const getBaseUrl = env => `https://${getUrlPrefix(env)}.example.com`;

cmd + click on the getUrlPrefix in the template string
The cursor will focus on the definition of getUrlPrefix and at the same time jump out an alert on the top asking whether to open the external website.

It could be better that only open the external link when the clicked element has no definition.

Does this issue occur when all extensions are disabled?: Yes

We do not evaluate javascript in the link detected.


Not finding games

The screensaver doesn't seem to be finding available roms. Its list of games in setting is empty. It might have to do with them being stored outside of MAME's internal roms folder, but shouldn't the screensaver be able to find the rom collection from MAME's config?
I'm using Mamesaver 3.0, and MAME 244, on Windows 10.
I have tried it with MAME 200, with no difference.
Copying the files to MAME's roms folder, on the other hand, seems like it works. (It doesn't fail immediately, but puts its progress bar up for a while. I'll supply more information once its done building.)

Can you post your config file? Mamesaver get's the rom path from the config file so theoretically it should work fine... (https://github.com/mika76/mamesaver/blob/8cc835cfa2de4852321dc6a8a8c323fc28c54a7a/Mamesaver/Services/Mame/GameListBuilder.cs#L277)

Strange.
Mamesaver basically uses Mame itself to tell us the rom path (using the -showconfig argument https://docs.mamedev.org/commandline/commandline-all.html). Maybe try recreate the mame.ini file and see what happens.

Ah, I think I've discovered the problem, it was on my end. Thanks for your assistance!

@rodneylives glad you've sorted it - hope you enjoy Mamesaver 😊


Add a default User Agent with customizable argument

Setting a default user agent makes it easier to identify who/what is making requests to a feed.
I reviewed the codebase but couldn’t locate an implementation for #2, which was marked as completed. Please let me know if I missed any related changes. Thanks!

Looks reasonable. Thanks!

No problem at all. Thanks for keeping this going!


Default ordering? Doctrine ORM Adapter

More of a question than an issue based on the default ordering.
I am trying to simply order an entity table based on a createdAt field, in descending order. I can do this in the query builder but then the ordering takes precedence on all queries. Adding order to the datatables js options only visually sorts it. There is something missing on my server side query that I am just not getting at the moment.
->createAdapter(ORMAdapter::class, [
                'entity' => User::class,
                'query' => function (QueryBuilder $qb) {
                    $qb
                    ->select(['u, 'a'])
                    ->from(User::class, 'u')
                    ->leftJoin('u.defaultAddress', 'a')
                    ->orderBy('u.createdAt', 'DESC') // This forces all queries on the callback to use this
                    ;
                }
            ])

Probably something really simple but appreciate any guidance.

As ordering is handled by the adapter based on user input you should configure orderable and orderField on the column level to get the intended behavior.
As the ORMAdapter only [appends ordering based on UI preferences](https://github.com/omines/datatables-bundle/blob/master/src/Adapter/Doctrine/ORMAdapter.php#L183-L188] instead of replacing them you have the flexibility to use base ordering in your own QueryBuilder, but in your case the createdAt dates are likely all unique and therefore make any subsequent ordering criteria pointless.

My issue is not that of actual ordering, it's more the default ordering on whether it is ascending or descending.
The orderable definition is just a boolean argument.
I can add the default sort to the base QueryBuilder; but as you mention, that ordering will then override any UI sorting.
In short, I would like to sort by createdAt (or any field I choose) only when there is no other criteria defined? Just not sure how I would go about it without hacking something into my own implementation?
I would like to basically mimic what writing the below for js on a static datatable would provide.
 $('#users').initDataTables({{ datatable_settings(datatable) }},
{
 order: [0, 'desc']
})

Ah ok, in that case I think you're looking for this indeed undocumented feature.
The following should work:
        $table = $this->createDataTable()
            ->add('firstName', TextColumn::class)
            ->add('lastName', TextColumn::class)
            ->addOrderBy('lastName', DataTable::SORT_DESCENDING)
            ->addOrderBy(0, DataTable::SORT_DESCENDING)

This contrived example would set the default sorting to lastName then firstName, both descending.

Spot on, thank you.
It did seem like something that I was missing, thankfully not blindingly obvious!
Again, thank you for your work on this!

I'll leave this issue open as a reminder to document it   😉

Fixed in https://github.com/omines/datatables-bundle/commit/b39d14115a104d1e1972e50ff315fcb3e9211f92


fix: Special case None type handling in combination with explicit parse functions.

Without this, some field foo: Annotated[int | None, Arg(parse=int)] = None, which would seem like it should work (even if there's no need to use an explicit parse here), will fail because it unconditionally runs the parse.
Now, it will detect optional source types, and apply an optional aware wrapper around the given input parse.
If this behavior breaks something, i'd rather we handle that directly at time that it's identified. As-is, its not obvious why you'd annotate it as potentially None, if it shouldn't be allowed to be None.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

10 of 10 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1727

Relevant Lines:
1727

💛  - Coveralls


Can't resolve imported styles when using 1.0.0-rc4

I'm migrating nuxt from 0.10.7 to 1.0.0-rc4,  and encounter two problems.

Css modules which were installed via npm could not be parsed properly.

It complains,

This relative module was not found:

* ../../nust-boilerplate/themes/default/gitalk/dist/gitalk.css

In fact gitalk is located at  ../../nust-boilerplate/themes/default/node_modules/gitalk/dist/gitalk.css

Imported styles could not be parsed properly

With the code as below in one of my vue components,
<style lang="stylus" scoped>
@import 'assets/css/base/_base.styl';
.qrcode-pic
  width: 100%
</style>

It complains failed to locate @import file assets/css/base/_base.styl when building.
Here is my nuxt configs related to styles,
module.exports = {
  'css': [
    'highlight.js/styles/github.css',
    'gitalk/dist/gitalk.css',
    { 'src': 'assets/css/main.styl', 'lang': 'stylus' }
  ],
  ...
}

For the @import issue, try using /assets or ~/assets.

Also, imports would be much more easy with rc5 with built-in resolve-url-loader


[test] Greetea/HTrun out of sync with bootloader present

When the bootloader takes more time than expected, the sync message never reaches the test application.
Steps to reproduce:

Import https://github.com/ARMmbed/smcc-tests
Checkout branch htrun-bl-desync
Run tests with mbed test -t ARM -m K64F -n simple-mbed-cloud-client-tests-dev_mgmt-connect* -v

If you connect to the board using mbed sterm -b 115200 you can pass it a fake sync message, e.g. {{__sync;0}} and the test will start normally.
@bridadan @theotherjimmy

Thank you for raising this issue. Please note we have updated our policies and
now only defects should be raised directly in GitHub. Going forward questions and
enhancements will be considered in our forums, https://forums.mbed.com/ . If this
issue is still relevant please re-raise it there.
This GitHub issue will now be closed.

This was closed by the automated bot by mistake - re-opening


Research CSS modules to use on library level

[ ] What's profits?
[ ] Research problems
[ ] How to express BEM approach and use modifiers as in cn library?
[ ] How to override styles in high level components?
[ ] What about selectors rely on inner selectors? Example: .Menu ~ .Button. Should we forward class name hooks?

Profits

Styles isolation - no conflicts with other components. But BEM it's pretty good isolation too
Ability to optimize CSS - we can remove unused CSS
Ability to analyze CSS - we can check custom CSS properties while compilation


Flatpak distribution contains 171MB of Boost source files

Checklist

[X] I'm reporting a problem with Chatterino
[X] I've verified that I'm running the most recent nightly build or stable release
[X] I've looked for my problem on the wiki
[X] I've searched the issues and pull requests for similar looking reports

Describe your issue
I noticed that the Flatpak distribution of Chatterino includes ~171MB of Boost source files:
$ du -sh ~/.local/share/flatpak/app/com.chatterino.chatterino/x86_64/stable/active/files/*
7.7M	/home/chowder/.local/share/flatpak/app/com.chatterino.chatterino/x86_64/stable/active/files/bin
171M	/home/chowder/.local/share/flatpak/app/com.chatterino.chatterino/x86_64/stable/active/files/include
6.4M	/home/chowder/.local/share/flatpak/app/com.chatterino.chatterino/x86_64/stable/active/files/lib
4.0K	/home/chowder/.local/share/flatpak/app/com.chatterino.chatterino/x86_64/stable/active/files/manifest.json
100K	/home/chowder/.local/share/flatpak/app/com.chatterino.chatterino/x86_64/stable/active/files/share

(Originally installed from flathub)
I couldn't figure out where the Flatpak distribution is built & published - happy to have a look if someone could point me in the right place.
Screenshots
No response
OS and Chatterino Version
Chatterino 2.3.5 (commit 81a6276)

cc: @ilyazzz

Finally found the Flatpak manifest: https://github.com/flathub/com.chatterino.chatterino/blob/master/com.chatterino.chatterino.yml
Should just be a matter of adding a cleanup step, I can have a go at this. :smile:

Fixed with https://github.com/flathub/com.chatterino.chatterino/commit/d16c2327a4976c2ddb46c9715b377ff93b9498d2 , the installed package size went from 160mb to 8mb.


App crashes when open dialog in settings and leave app to idle

Describe the bug
App crashes when I changed app mode but forgot to close settings. Settings are still saved.
To Reproduce
Steps to reproduce the behavior:

Go to Settings
Click on Settings on BottomAppBar
Open App theme, do anything, or just close this dialog after that
Wait 2-5 minutes (or turn off screen) and see error.

Expected behavior
App will changed settings without issue.
Screenshots
(none)
Device (please complete the following information):

Device: Realme RMX1851
OS: ProjectBlaze v2.9 (Android 13)
App version: v2.0-draft1

Additional context
(none)

Self-fixed issues :)) If this still happen, just re-open this issue again.


How do execute code inside Repo.transaction() while mocking Repo

I have some Ecto code like this:
def myDatabaseOperation do

  # some code here which I can test easily with Patch

  Repo.transaction(fn ->
      # bunch of code which I can easily test using Patch if I didn't
      # have to wrap it in a transaction
  end)

end

I'm wondering what I can do in my test to call myDatabaseOperation() while executing the code inside Repo.transaction.

Nevermind, figured it out. It's easy:
    patch(Repo, :transaction, fn s -> s.() end)


Fix Code.load_file deprecation

Code.load_file was deprecated in Elixir 1.10 (https://hexdocs.pm/elixir/compatibility-and-deprecations.html)
This replaces it with Code.compile_file/1 (Code.require_file/1 was not used because we want to be able to recompile the same file multiple times).
Since Code.compile_file/1 was added in Elixir 1.7, support for 1.6 was removed. 1.7 was released in July 2018 so it is almost 2 years old at this point, so hopefully it is okay to drop support.
https://elixir-lang.org/blog/2018/07/25/elixir-v1-7-0-released/

Mind adding a note to the README that we only support 1.7+?

actually, I guess having it in the mix.exs is fine.

Thanks!


Fix: Import azure-pipelines-tasks-azure-arm-rest for getFederatedToken

Old code is using azure-pipelines-tasks-artifacts-common
But getFederatedToken moved to azure-pipelines-tasks-azure-arm-rest
So this PR is to address the issue via fixing imports.
fixes: https://github.com/jason-johnson/azure-pipelines-tasks-terraform/issues/455
Currently after last update of this extension, there are errors globally.
Please review asap.
thx.

This has been done by #459


Change the value of AuthnCacheContext?

Thanks for providing the container! I have a question about one httpd config:AuthnCacheContext.
It seems the official document recommends to change the default directory, which is conservative and not optimal. A better policy is to name the AuthnCacheContext for the password provider: for example a htpasswd file or database table.
Maybe it's better to set that to specify a context string for use in the cache keyin the comfig file? Thanks.

There is an official S2I enabled httpd container from Red Hat now, you would probably be better off using it instead of this. This one was only created because Red Hat didn't provide one at the time.


Find rst2man from pkgsrc

Find rst2man from pkgsrc.
Pkgsrc installs rst2man as rst2man-${python_version} (rst2man-3.9)

error


Add daily change count in the table for each state

Can we add daily change count in the table for each state?

Duplicate of #12


support for utmpx in file /var/log/utx.log

Summary
FreeBSD writes utmpx log entries to path /var/log/utx.log.
s4 only attempts to parse this as syslog lines. It should recognize this as a utmpx file.

Same as #107


Does it Support on iOS11

Dears,
recently when i upgrade the iOS system to iOS11,when i run my iosrtc project on my device,but not show the media ,i have a question need you help to clarify;
1.Does this plugin can support on iOS11? or need to set some config?
if i misunderstand this ,also give us a direction and give us a advice.

Questions in the mailing list, as the text you removed to write here states.


Add ScriptDrop

Please review our Contribution Guidelines to ensure your changes abides by it.
Review your changes and complete the checklist below.

[x] Company name
[x] Company description
[x] Company location
[x] GitHub link
[x] How Elixir is used

@schneiderderek Thanks for the addition!  Could you rebase on the recent merges?


Make cmd/execute depend only on TG API

Codecov Report

Merging #94 (dd053ae) into master (e5a65f3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #94   +/-   ##
=======================================
  Coverage   80.07%   80.07%
=======================================
  Files          52       52
  Lines        4105     4105
=======================================
  Hits         3287     3287
  Misses        818      818

Continue to review full report at Codecov.

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


Email failing with STARTTLS error, even though encryption is set to 'null'

When I configure SMTP delivery, it's trying to make a TLS connection, which my local mail server isn't configured for.
This is the .env file in the config directory:
MAIL_MAILER=smtp
MAIL_HOST=localmail.gently.org.uk
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
<EMAIL_ADDRESS>MAIL_FROM_NAME="Speedtest Tracker"

This is the error I get when 'test' sending an email:
speedtest  | [2024-02-09 17:21:54] production.ERROR: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
speedtest  | error:0A000086:SSL routines::certificate verify failed {"exception":"[object] (Symfony\\Component\\Mailer\\Exception\\TransportException(code: 0): Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
speedtest  | error:0A000086:SSL routines::certificate verify failed at /app/www/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:171)

As I have MAIL_ENCRYPTION set to null, I wouldn't expect it to attempt TLS negotiation.

Are you sure the ports are correct? Most SMTP services require SSL or TLS

Absolutely. This is an SMTP server accessible solely from my local network for delivering internal email. There is no encryption configured whatsoever, just plain SMTP on port 25.

Try setting MAIL_ENCRYPTION=false, seems Symphony will take null and default it to tls.
Source: https://github.com/laravel/framework/issues/44953

I came here to report a similar, possibly the same issue as what's described. I tried @alexjustesen suggestion of using false instead of null, which did not seem to make a difference. I also discovered a difference in behavior when using an IP Address versus an FQDN. When specifying MAIL_HOST using an IP address, the mail attempt fails. When I set MAIL_HOST using a FQDN instead, emails get sent via my Postfix server without issues.
Here's what I see in my Postfix server logs (real hostname and IP redacted):
> connect from <SOURCE HOSTNAME>[<SOURCE IP>]
> Anonymous TLS connection established from <SOURCE HOSTNAME>[<SOURCE IP>]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384
> OTP unavailable because can't read/write key database /etc/opiekeys: Permission denied
> lost connection after STARTTLS from <SOURCE HOSTNAME>[<SOURCE IP>]
> disconnect from <SOURCE HOSTNAME>[<SOURCE IP>] ehlo=1 starttls=1 commands=2

I also noticed that when using the IP address, three attempts get made. The source IP of the first attempt is the Docker container's IP, then the other two are from the host's IP. When using the Postfix FQDN instead, only one attempt gets made, and again, that works without issues.

The issue described in my previous comment persisted when I upgraded to v0.15.3.

Can you try passing the environment variable MAIL_VERIFY_SSL=false into your container? You can still set MAIL_ENCRYPTION=false.

@alexjustesen that worked! I tested with both MAIL_ENCRYPTION=null and MAIL_ENCRYPTION=false, and was able to receive my test emails using an IP Address. It looks like MAIL_VERIFY_SSL=false was the critical missing piece to the puzzle. Thank you!

I've just nuked my config, and started again with the settings specified as environment variables in the docker-compose.yaml file. All seems to be working correctly now.


Extend configuration UI to support disabling of runtime modules

See https://github.com/NordicSemiconductor/asset-tracker-cloud-docs/issues/209
Add a new section to the device configuration with toggle buttons (like the Active/Passive one), for Firmware Modules that are Enabled by default, and if set to "Disabled", will add a string to the desired.nod array.
The two known modules for now are:

GPS (gnss)
Neighbor Cell Measurements (ncell)

Closed via #344 344


fix: Drop spot-instances-request from tag_specifications

Description
spot-instances-request is not supported in some regions, so we are dropping that from default tag_specifications.
Motivation and Context

https://github.com/terraform-aws-modules/terraform-aws-eks/pull/2360#issuecomment-1358168905
https://github.com/terraform-aws-modules/terraform-aws-eks/pull/2360#issuecomment-1358488428

so far I have only heard one user report one region (Ireland) - so I am less inclined to drop this one since its not as problematic. do you know what other regions do not support this?

It also causes issues if you try to launch node groups without using spot instances at all. much like the Elastic GPU instances it doesn't allow you to specify the tag if you're not launching spot instances.

yes I understand the behavior - that was a bit surprising when it was discovered with the tagging request for GPUs. However, this still appears to be isolated to one region so far (that I can tell - docs are not producing any additional results so far)

@bryantbiggs even if it is incosistency with just one region, why should it not be fixed? I mean AWS should be supposedly consistent, but since they are not IMO it feels wrong to enforce such a change and possibly be breaking even just this one region!

Failed: You cannot specify tags for Spot instances requests if there are no Spot instances requests being created by the request. Launching EC2 instance failed. - well this is some somewhat surprising behavior so yes, reverting this out and making it an opt in

This PR is included in version 19.4.2 :tada:


How to distinguish externally and locally originated errors for upstream clusters?

Title: How to distinguish externally and locally originated errors for upstream clusters?
Description:

In order to setup proper alerting for Api Gateway based on Envoy I'm trying to find the opportunity to get metric that shows only the errors originated by Envoy.
The idea was to calculate the difference between downstream_rq_xx and upstream_rq_<*xx> but as I understand the upstream_rq_<*xx> includes also, for example, timeouts originated by Envoy.

Is there any stats for upstream cluster's externally originated errors?
If no, could you please suggest any workaround to get such statistics?
[optional Relevant Links:]

I have found out that externally and locally originated errors are calculated separately during outlier detection:
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier
But I have found any related statistics for upstream errors.

I think the upstream_rq_xxx stats are the best thing that's available.


Lora models / Lora training

Would it be possible to somehow add lora support just like embedding support? That way we can load lora models to be used in the execution of text generation models in order to fine tune their output?
Also wondering if it would be possible to add lora training so we could train a lora directly via ollama to run on top of models
I have noticed loras seem to really improve the results of models so it would be nice to be able to directly support loading them on top of models within ollama

Ollama does support LoRA, add it as an adapter in a Modelfile, read more about it here: https://github.com/ollama/ollama/blob/798b107f19ed832d33a6816f11363b42888aaed3/docs/modelfile.md#adapter

Thank you for the response, i will play around with it 👍

Let's close this in favour of #4618 . You can use Ollama to load GGLA based LoRA adapters (ggla being the old "gguf" file format specifically for LoRAs), but it's practically impossible to make them work right now.
I have been working on a change to allow importing LoRAs from MLX (#5524) which right now is just in NPZ format, although adding safetensors shouldn't be hard. There are still a few things to sort out:

GGLA is missing some options which we need to make this work well w/ MLX/Unsloth
There is an upstream change in Llama.cpp which will deprecate GGLAs altogether in favour of GGUF (which is welcomed because GGLA has some real shortcomings)


member-ordering is not enforced when private variable goes after optional public variable

Bug Report

TSLint version:  5.1.2
TypeScript version: 3.x
Running TSLint via: CLI

TypeScript code being linted
TSLint does not consider the d member as being misplaced. (I haven't tested this exact piece though)
class A {
  set b(newValue: boolean) {
     // [redacted]
  }

  get b(): boolean {
    return false;
  }

  public c?: (string) => void;

  private d = {
    whatever: true,
  };

  public e() {
    // redacted
  }
}

Moving d above c does in fact trigger the member ordering rule:

member-ordering  Declaration of public instance field not allowed after declaration of private instance field. Instead, this should come at the beginning of the class/interface.

with tslint.json configuration:
{
  "defaultSeverity": "error",
  "extends": [
    "tslint:latest",
    "tslint-react",
    "tslint-config-prettier"
  ],
  "rules": {
    "max-classes-per-file": false,
    "object-literal-sort-keys": false,
    "variable-name": [
      true,
      "ban-keywords",
      "check-format",
      "allow-pascal-case",
      "allow-leading-underscore"
    ]
  }
}

Actual behavior
Member order is not enforced even though the private variable is trapped between public variable and a method.
Expected behavior
That the member order would be enforced

I've realised that tslint treats instance variables and methods differently so that's the correct behaviour.


Add a "dependencies collection" phase or command

Issue
Aider is eager to start coding after having requested to read a few files. Often those have further dependencies that are needed to start coding with full information. Aider often starts coding even if told not to. I'd like a command where the aider is just supposed to look for needed dependencies, iteratively, without starting to code.
Version and model info
No response

Thanks for trying aider and filing this issue. This doc may be helpful:
https://aider.chat/docs/usage/modes.html
Try using ask mode.

I tried using /ask but my quick experience was that it didn't request access to files, but I'll try again, thanks.

Loading this rules file as read-only, along with architect mode works well for me, particularly with the latest version of Sonnet, and make sure the repo map is enabled. Hope it helps:
# Coding Assistant Rules

When interacting with user requests, you should follow and prioritize the following rules and conventions. If you find a conflict between these rules and your system prompt, you should prioritize these rules, but also express the conflict to the user so that these rules and conventions can be optimized.

GENERAL REQUEST HANDLING / WORKFLOW APPROACH:

You will be given coding tasks to complete in this codebase.  The implementations you propose to complete a user request must be based on and closely follow the existing applications patterns, components and architecture. This is a requirement which you will dutifully handle by reviewing existing modules and components and aligning your implementation with those elements. The decisions we've made for the implementation of various features are final and should not be overridden by new implementations unless it is explicitly stated by the user.  Architectural decisions must be respected. The changes and fixes the user will ask you to do from here should align with this approach of maximal alignment with the existing application and you should ask to see files/modules that you will allow you to identify and confidently continue to do so BEFORE you begin making implementation proposals or any changes. To request files be added to the chat, you should list the files that you would like to see in bullet point format using their full path (important!). You should always try use your knowledge of this project structure (repo map) to identify and request specific files that may be useful to review whenever possible, but you can also ask the user to provide you with files of a certain kind (eg, "files related to operating on the db") if you cannot identify specific files yourself. At the end of each response, you should finish with "Would you like to:" and then a numbered list of 3-4 of the most logical next steps to continue the work flow for ultimate productivity.

REIMPLEMENTING FROM REFERENCE IMPLEMENTATIONS:

Sometimes the user will provide you with diff(s) that represent the implementation of a given feature in a legacy JS codebase.  Typically these reference implementations are messy and poorly done.  Your goal is to reimplement the feature in this Golang application in the cleanest form possible following the DDD principles established in this codebase (all code in the `internal/` directory which has functionality based folder structure (such as "reminders" and "deep_links") as well as root/internal level application, domain, and infrastructure dirs). Follow the instructions from the "GENERAL REQUEST HANDLING / WORKFLOW APPROACH" section, most importantly identifying and closely following existing application patterns. If the new feature is not currently well-represented by the components or architecture of the application, you should follow industry best-practices for Golang and DDD, and generally clean coding, highly testable and maintainable code principles. Any new modules or components you suggest MUST align well with the current codebase. Do not introduce new patterns, libs, etc without first gaining approval from the user.

GENERAL INTERACTION:

When interacting with the user you should assume the role of a pair programmer  who is working with another highly experienced developer.  Keep interactions to the point: no need for niceties, leading phrases like "certainly, I can do that!". Speak naturally, (eg, "Ah, I see what's going on.", "Ah, right, let's try that.", "We should do it like x, because..."). Use <thinking></thinking> tags before answering to maintain an inner-monologue that won't be seen by the user. These are your private thoughts. For example, if you think the user is asking you to take a wrong approach based on the given task and current code, you could note it here. Otherwise your thinking scratchpad can be used for any important reasoning, notes, reminders, etc.

ULTRA IMPORTANT: Answer questions as they are posed to you, answer the question literally. Never infer that because the user asks you a question that it is an indication you are wrong about something and therefore you must change your approach. You should always assume that a question posed by the user is a genuine question to be answered as it was asked. If you are so wrong about something that it requires a different approach, the user will tell you explicitly. You should defend your choices with sound reasoning if they question is interrogatory in nature.

Interesting, and quite clever. Thanks @transcendr


speech resolving issues? Not showing winning channel claim

I tried resolving https://spee.ch/@KazeEmanuar this morning and it leads to the old claim(6b5992e2cc667dddd3dfb7c6f8082f1fe33ef40f), it should be going to: https://spee.ch/@KazeEmanuar:8e098d2042ad9b9074f52cc06b89d6d4db5231dd

same issue with current 404 page for lbry.io

Per discussion with Bill, the effective amount was not updated properly, he's looking into it. Also, his current algorithm doesn't take into account the time delay for a takeover.

This is also happening for spee.ch/nine - its resolving to 7289ed1bb8825471da886b40b59520fca19246bb but should be resolving to e5e538607b63b296ef7b11158349581b9e838c0c
Going back to the original claim in question, this is what Bill's output was showing:
6b5992e2cc667dddd3dfb7c6f8082f1fe33ef40f amount: 0.1 claimSequence: 1 effectiveAmount: 0.1
8e098d2042ad9b9074f52cc06b89d6d4db5231dd amount: 0.01 claimSequence: 2 effectiveAmount: 0
Effective amount of 0 is incorrect. When he ran a resolve, it showed the correct amount. Not sure if these are 2 separate issues, or all stem from the same root cause.

might be useful informations but the 404 didnt break till i deleted the 404 claim all together then re uploaded a new one instead of just editing


parsing json with missing key throws exception

Description
When trying to parse a json file with missing keys json throws an exception and stops parsing
Is there a way of successfully parsing files with missing keys?
Reproduction steps
compile and run the code
Expected vs. actual results
Expected:
json [{ "testObj":{ "start": 3, "stop": 7, "time": 4 }, "obj": 3 } ] is parsed without an exception
Actual:
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::out_of_range'
  what():  [json.exception.out_of_range.403] key 'missing' not found

Minimal code example
#include <iostream>
#include <fstream>
#include <nlohmann/json.hpp>

struct demo {
        int start;
        int stop;
        int missing;
        int time;
};

struct test {
        demo testObj;
        int obj;
};

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(demo, start, stop, missing, time)
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(test, testObj, obj)

int main() {
        std::ifstream inFile("test.json");
        nlohmann::json jsonData = nlohmann::json::parse(inFile);
        test data = jsonData[0].get<test>();
        if (data.testObj.start == 3) return -1;
        return 0;
}

Error messages
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::out_of_range'
  what():  [json.exception.out_of_range.403] key 'missing' not found
Abgebrochen

Compiler and operating system
GCC 10.2.1
Library version
4b2c8ce6bcfe7f39f2bb9e680c1e7a4d67c2dd48
Validation

[ ] The bug also occurs if the latest version from the develop branch is used.
[ ] I can successfully compile and run the unit tests.

This is not a parsing error, this is an error converting the parsed object to your defined structures.  You specified by using the macro NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE that all structure members are required.  If you want some of the structure members to be optional, then you need to write the from_json function yourself and handle the data for that member not being provided in the JSON.

so there is no way of marking an element as optional without defining a custom from_json function?

The macro NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE shortcut for automatically creating the custom from_json function does not support optional elements.


The container has been successfully run, but the Podman Desktop shows that it is not running, and the container cannot be started from the Podman Desktop.

Bug description

Operating system
macOS 14.7.1  arm64
Installation Method
Installer from website/GitHub releases
Version
1.14.0
Steps to reproduce
I auto-updated from v1.13.3 to v1.14.1 which seems bad, not sure what happened.
Relevant log output

Additional context
No response

Hi @edoger is the problem still present? Can you please give us a minimal reproducible steps to debug this issue? Also if the issue is still present can you provide the logs from the containers in question?

@cbr7 Hi, After I reinstalled the latest version, the problem still exists.


Some sort of bug with placing pages in ./src

Description
<EMAIL_ADDRESS>You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).
    at getVirtualFilePageConfigValuesAll (./node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js:24:5)
    at LoadPluginContext.load (./node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/index.js:53:30)
    at PluginContainer.load (./node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:49063:22)
    at loadAndTransform (./node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:51869:22)

Docs state that pages can be place under ./src/pages, but this appears to be error-prone. Here is what I remember doing:

With a vike-vue project, Create a page under ./src (note the mistake, the page placed in ./src, not ./src/pages)
Run npm run dev, the page works
Add a +onBeforeRenderClient.js and a +onAfterRenderClient.js
Get errors like [vike][config][Wrong Usage] /src/[page name]/+onBeforeRenderClient.js sets an unknown config onBeforeRenderClient. Did you mean to set onBeforeRenderEnv instead?
Remove +onBeforeRenderClient.js and +onAfterRenderClient.js
The page no longer works although it should like it did before since the problematic hook files are gone, error given is [vike][request(4)][Wrong Usage] No onRenderHtml() hook found, see https://vike.dev/onRenderHtml despite using vike-vue.
Move properly to ./src/pages
Page still does not work
Stop the dev server and process and run npm run dev again
The page still no longer works
Move page from ./src/pages to ./pages instead
The page works perfectly

See updated docs:

b63f988476ada6a8ef0efc8ba6c42ae12e35b25c
https://vike.dev/routing#src

<EMAIL_ADDRESS>You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).
    at getVirtualFilePageConfigValuesAll (./node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js:24:5)
    at LoadPluginContext.load (./node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/index.js:53:30)
    at PluginContainer.load (./node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:49063:22)
    at loadAndTransform (./node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:51869:22)

Can you reproduce that error or is it random? Closing as I suspect it's random, let's re-open once we get more information.


Using the latest version (from master) - Can't get "defaults" to work.

Hi there,
I'm having trouble getting "defaults" to work... I keep getting Action defaults not handled when running the script.
Here's my install.conf.yaml
- defaults:
    link:
        create: true
        relink: true

- clean: ['~']

- link:
    /etc/pacman.conf:
        force: true
        path: arch/pacman.conf
    /usr/local/bin/bedroomlights: scripts/bedroomlights
    ~/.bash_profile:
        force: true
        path: bash_profile
    ~/.bashrc:
        force: true
        path: bashrc
    ~/.config/dunst/dunstrc: compiled/dunstrc
    ~/.config/ranger/rc.conf: ranger/rc.conf
    ~/.config/ranger/scope.sh: ranger/scope.sh
    ~/.config/ranger/rifle.conf: ranger/rifle.conf
    ~/.gitconfig: gitconfig
    ~/.git-prompt.sh: scripts/git-prompt.sh
    ~/.i3: i3/config/
    ~/.inputrc: inputrc
    ~/.taskrc: taskrc
    ~/.tmux.conf: tmux.conf
    ~/.vim: vim
    ~/.vimrc: vimrc
    ~/.xinitrc: arch/xinitrc
    ~/.Xresources: arch/Xresources

- shell:
    - [git submodule update --init --recursive, Installing submodules]

Let me know if you'd like to have a look at anything else. Thanks in advance. I appreciate the help! :beers:

Hmm, that config works fine for me. What may be happening is that your ./install script automatically checks out the last committed (or staged) version of Dotbot, which is the old version.
Try git submodule update --init --remote dotbot && git add dotbot and then try running your script.  That worked perfectly :+1:
Thanks so much for the help!

Awesome!


Issue : View config not found for name path . Make sure to start component names with a capital letter.

Hi I am getting issue Issue : View config not found for name path . Make sure to start component names with a capital letter.. My code is as following
  <View style={styles.imgWrap}>                      <Lightbox       medium={CONSTANTS.IMAGE_URL + item.data+ "_150" }       large={CONSTANTS.IMAGE_URL + item.data}       alt="Hello World!"     /> </View>

@Anujmoglix I'd assume this issue is not related to react-modal-image, but your framework instead? I'm closing the issue.


When using RapidStream on U55C, I encountered the following error.

The command I used was: rapidstream-tapaopt --work-dir ./build --tapa-xo-path My.xo --device-config u55c_device.json --floorplan-config floorplan_config.json.
INFO [Pass]: update TAPA FSM
Traceback (most recent call last):
File "/io/rapidstream/tapaopt/main.py", line 347, in
File "/home/sun/.rapidstream/opt/python3.10/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/sun/.rapidstream/opt/python3.10/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/sun/.rapidstream/opt/python3.10/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/sun/.rapidstream/opt/python3.10/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/io/rapidstream/tapaopt/main.py", line 196, in main
File "/io/rapidstream/tapaopt/main.py", line 257, in tapa_opt_main
File "/io/rapidstream/tapaopt/preprocess_main.py", line 168, in preprocess_main
File "/io/rapidstream/tapaopt/gen_fsm.py", line 217, in update_tapa_fsm
File "/io/rapidstream/tapaopt/gen_fsm.py", line 579, in get_global_fsm_ifaces
NotImplementedError: Global FSM __global_fsm_Test_fsm no-iface ports: ('global_fsm_ap_done', 'global_fsm_ap_start'): {'ap_done', 'ap_idle'}

This means that the functionality for handling the FSM in the gen_fsm.py file is not fully implemented?

Please share how to reproduce the situation whenever you report an issue. Also are you using the latest tapa?


git.commit.describe

Great plugin (although I didn't test it yet).
I would suggest adding git.describe property. Please see https://github.com/ktoso/maven-git-commit-id-plugin#git-describe---short-intro-to-an-awesome-command

Great idea. I've added it to master.


bug: Side Menu navigation with $state

Type: bug
Platform: all
Ionic version: 1.0.0-rc2
Codepen: http://codepen.io/canihazcookienow/pen/rabJKo
I've spotted an issue with the side menu. If I try to navigate to the second menu, I can't access the side menu again after the state is loaded.
On codepen you can't swipe for the side menu but on the iOS emulator it swipes to the previous view and then to the side menu.

Greetings @pedroabreu!
My sensors indicate that you need to update your issue through our custom issue form. We are now requiring all issues to be submitted this way, to ensure that we have all of the information necessary to fix them as quickly as possible.
Click Here To Update Your Issue
I will have no choice but to close this issue if it is not resubmitted through the form. Please fill out the rest of the form, so that I may use my friendly robot powers to assist you.
Thank you!

Note that this happens when calling a function that uses $state.go, but not when using anchor tags.
http://codepen.io/brandyshea/pen/YPMLQJ?editors=101

Soo two things are going on here.

enable-menu-with-back-views

http://codepen.io/mhartington/pen/azxMrp

enable-menu-with-back-views
Determines whether the side menu is enabled when the back button is showing. When set to false, any menuToggle will be hidden, and the user cannot swipe to open the menu. When going back to the root page of the side menu (the page without a back button visible), then any menuToggle buttons will show again, and menus will be enabled again.

http://ionicframework.com/docs/api/directive/ionSideMenus/
By default, this is set to false so we can do things like swipe-to-go-back.

Using menu-close and hrefs, the next view resets the history, allowing the menu to be swiped open

So for your original example @pedroabreu, you could use $ionicHistory.nextViewOptions to recreate the same thing.
  $scope.ItemClick = function(tab){
    $state.go('tab.'+tab.displayName);
    $ionicHistory.nextViewOptions({
      disableAnimate: true,
      disableBack: true
    });
  }

http://codepen.io/mhartington/pen/YPMgoe

I don't know why I didn't think of this. Thanks Mike!


When fetch fails, should I throw a BottleneckError to fail a job?

Hi, I'm evaluating Bottleneck and have this question after reading the readme.
Sometimes fetch fails, and I catch that error, as follows,
const handleFetchErrors = (response) => {
    if (! response.ok) {
        throw Error(response.statusText)
    }
    return response.json()
}

const fetchUrl = () => {
    return window.fetch("https://example.com")
    .then(handleFetchErrors)
    .catch(console.log)
}

fetchUrl()
.then(result => {
    if (result === undefined) return; // fetch failed
    // ... do work
})

It might be convenient to retry fetchUrl jobs that fail. Could/should this be implemented with Bottleneck as follows?
const fetchUrlWrapped = limiter.wrap(fetchUrl)

fetchUrlWrapped()
.then(result => {
    if (result === undefined) throw Bottleneck.BottleneckError();
    // ... do work
})

// Listen to the "failed" event
limiter.on("failed", async (error, jobInfo) => {
  const id = jobInfo.options.id;
  console.warn(`Job ${id} failed: ${error}`);

  if (jobInfo.retryCount === 0) { // Here we only retry once
    console.log(`Retrying job ${id} in 25ms!`);
    return 25;
  }
});

Also, do people ever use Bottleneck in extensions? I'm wondering whether or not it's a good idea to use this in an extension with a persistent background page.

Hi, thank you for trying it out.

It might be convenient to retry fetchUrl jobs that fail
Could/should this be implemented with Bottleneck as follows?

Yup the code looks good, but you don't have to throw a BottleneckError. Any kind of error will work fine. BottleneckError is what Bottleneck throws to let you, the user, tell apart which errors came from your code and which errors came from Bottleneck itself.

Also, do people ever use Bottleneck in extensions?

Yup! I know it's used in at least a few, including one in VS Code (which uses Chromium under the hood).

Thank you! I will give this a shot soon.


github action for forbidden urls

some places require the bookmarks to be only in kubernetes.io and such..
this repo should have automation to check in every PR if they are valid

this can be tackled by OPA/rego fairly simple
https://www.openpolicyagent.org/


How to add new state to the Redux store?

I am new to this project, and I am enjoying reading the code. But I am having a hard time figuring out how to add my app's (new) state to the store.
The specifics of my app is that my server.js code will receive data asynchronously from some other server, which needs to be reflected in the GUI.
My understanding of the Redux pattern is that my server code should create actions for each newly-arrived bit of information and then dispatch them to the store. The update in the store then propagates to the React containers/components that rely on it.
I realize that this might be more of a Redux question, but I would love to see an outline of steps for the following in react-redux-universal-hot-example:

Extending the 'schema' of the store with a new kind of information. (I'm not sure how to ensure that my new state data won't conflict with existing info in the store);
Creating actions (I think that's straightforward - simply make a new object with { type: xxx, ... })
Hooking those actions into the dispatch() method. (I see the @asyncConnect() and @ connect() methods, but don't entirely understand what they do.)
and whatever else needs to happen...

Thanks!

Add new state is simple! Just write your own state file under redux/modules/, here is part of mine schedule.js:
// define constants for different actions
const UPDATE = 'uhs/schedule/UPDATE';
const UPDATE_SUCCESS = 'uhs/schedule/UPDATE_SUCCESS';
const UPDATE_FAIL = 'uhs/schedule/UPDATE_FAIL';

const SEARCH = 'uhs/schedule/SEARCH';
const SEARCH_SUCCESS = 'uhs/schedule/SEARCH_SUCCESS';
const SEARCH_FAIL = 'uhs/schedule/SEARCH_FAIL';

// initial state object, your may put more initial object here if needed
const initialState = {
  loading: false
};

// this will be used to `dispatch` actions, each `case` condition deal a kind of `action`
export default function reducer(state = initialState, action = {}) {
  switch (action.type) {
    case UPDATE:
    case SEARCH:
      return {
        ...state,
        loading: true
      };
    case UPDATE_SUCCESS:
      return {
        ...state,
        loading: false
      };
    case SEARCH_SUCCESS:
      return {
        ...state,
        loading: false,
        searchResult: action.result.data
      };
    case UPDATE_FAIL:
    case SEARCH_FAIL:
      return {
        ...state,
        loading: false,
        error: action.result.error
      };
    default:
      return state;
  }
}
// internal actions here
function _updateSchedule(data) {
  return {
    types: [UPDATE, UPDATE_SUCCESS, UPDATE_FAIL],
    promise: (client) => client.post('/schedule/update', {data})
  };
}

// this show how to `dispatch` sequential actions, See `clientMiddleware.js`
export function updateSchedule(data, callback) {
  return (dispatch) => {
    dispatch(_updateSchedule(data))
      .then(callback);
  };
}
// your action here, if it may have multiple `type` of result, use `types` field;
// note `post` (`data`) & `get` (`params`) has different arguments. See `clientMiddleware.js` under `redux/middleware` for detail
export function searchSchedule(params) {
  return {
    types: [SEARCH, SEARCH_SUCCESS, SEARCH_FAIL],
    promise: (client) => client.get('/schedule/search', {params}),
  };
}

@richb-hanover

Then import your js (for me, it's schedule.js) into reducer.js under redux/modules just like other modules.

@richb-hanover,
Each reducer is responsible for a branch of the tree. The state object which is passed into reduce is just that branch, so everything stays separate. There is no formal declaration needed. Just fill that object with the data needed to render the parent and child components.
As you said, actions are straightforward. The methods in the reducer are action creators. All they do is return an action object with a unique type value. You may add whatever other data is necessary to update the state when action is handled.
Dispatch and connect are a little more tricky, and I'm not the best person to explain them. If things are connected correctly, then your component can just call the action creator and the action is automatically dispatched for you. If you find that your action is not happening, make sure connect is being called or else manually dispatch the action.
When I first started working with this, the docs for react-redux and the other redux libraries confused me. I got pretty far just mimicking the pattern in this project and blindly hacking when things didn't work. Gradually I got more comfortable with the pieces and then revisited the API docs.
Good luck!

Thanks for these hints - they were very helpful.
re:  connect() function: the discussion on http://redux.js.org/docs/basics/UsageWithReact.html helped me figure it out. connect() takes two functions as arguments:

one to transform this component's state into props to pass to its wrapped component
a second to tell dispatch() which callback functions to pass as props to the wrapped component.

I had to read it a few times, but now it makes sense. As I understand it, when dispatch() is called, it uses those two functions to prepare all the props for the wrapped component

Another bit of information that I was missing... Sometimes my reducer got the full state from the store, other times (in other projects), it only got a slice of data from the store. (That was the genesis of my original question...)
I re-read the Splitting Reducers section (once again) at http://redux.js.org/docs/basics/Reducers.html#splitting-reducers and realize that each combined reducer gives a name to a property/property-sub-tree that becomes part of the state. If you use combineReducers(), that's the part of the state that is passed to your reducer. (And I believe if you don't use combineReducers(), your reducer gets passed the entire state of the store.)

@richb-hanover That's correct. You can also nest usages of combineReducers to further isolate the segments of state that are passed into reducers E.G.:
combineReducers({
  entity: entityReducer,
  otherEntity: combineReducers({
    subdomain1: subdomain1Reducer,
    subdomain2: subdomain2Reducer,
    subdomain2: subdomain2Reducer,
  })
});

@tearsofphoenix Your Suggestion worked perfectly for me . Thanks.

@tearsofphoenix Your suggestion worked perfectly for me as well. That kind of answer really rocks 🤘


Make Kazoo work without gevent (for example in sidecars)

💸 TL;DR
KazooClient needs to be initialized differently depending on whether we are using gevent or not. We don't use gevent in sidecars so need to make sure KazooClient works without gevent.
📜 Details
In #659 we updated Kazoo to use SequentialGeventHandler for compatibility with gevent. Unfortunately this handler silently fails if we are not using gevent.
Sidecars do not use gevent as they don't use entrypoint scripts that patch (such as baseplate-serve), instead being ran directly (python -m baseplate.sidecars.live_data_watcher some_config.ini). I'm not sure if this is intentional or an oversight.
This PR detects if gevent patching has occurred and initializes KazooClient accordingly.
🧪 Testing Steps / Validation

This change has been tested on an internal service that was experiencing the above issue when updating to the latest baseplate version.

✅ Checks

[x] CI tests (if present) are passing
[x] Adheres to code style for repo
[x] Contributor License Agreement (CLA) completed if not a Reddit employee

I verified that this resolves the issue of the ZK source file not triggered live updates (on_change). I verified locally by doing the following:
Creds to @TylerLubeck for helping me get this setup.

Make a venv

Inside the venv
`pip3 install -e .[zookeeper,s3fetcher]

make a config file (example below) live-data.ini in the directory:

[app:main]
factory = helloworld:make_wsgi_app

metrics.tagging = true
metrics.log_if_unconfigured = true

db.url = sqlite:///

[live-data]
zookeeper.hosts = localhost:2181

nodes.a.source = /data-three
nodes.a.dest = /tmp/data-three

[server:main]

run docker run --name zk -p 2181:2181 zookeeper

create a znode docker exec zk zkCli.sh create /data

update the znode (do this repeatedly) docker exec zk zkCli.sh set /data new-data-or-whatever-you-want

Change permissions for secrets:  sudo mkdir -p /var/local;  sudo chown -R ${USER}:staff /var/local; echo "{}" > /var/local/secrets.json

Run the live-data-watcher python -m baseplate.sidecars.live_data_watcher live-data.ini

The PR description says that you intend to use this for sidecars so that they don't try to uses gevent, but I don't see any code related to updating how the sidecars work. Is this intended?

To clarify, sidecars currently do not use gevent because they aren't run with an entrypoint script that does gevent patching (see docs). This surprised me and I think that there's a discussion to be had about whether to use gevent with them, but that would be a bigger change.
This PR detects if gevent patching has occurred and chooses the correct Kazoo handler accordingly. This means that the KazooClient can be safely used in gevent environments (baseplate-serve, baseplate-script) and non-gevent environments (sidecars).

If patching occurs then in theory you shouldn't need to check, you can just use the native handlers.
That said, I feel like we should be committing to gevent because that's what we want, or fall back on native handling because we want patching to replace it when it happens.
I think I need a bit more info on what the silent failure mode you described in the PR description is before I have enough context to thoughtfully approve this.

Thanks for your feedback, I have addressed some of your comments inline.
I think that committing to gevent is probably the right thing to do in the long term and would be interested in doing that migration. However, I've been bitten enough by weird gevent patching to not want to do it as part of this bugfix. I think we should do a controlled prerelease of any such change, canarying a gevent patching entrypoint before general release.

@nsheaps I've pushed some changes to rely on the patching time.sleep. I had to fiddle with the tests a bit, the comments should explain why 😓

@nsheaps @KTAtkinson I tidied up the testing a bit:

Mocked gevent_is_patched rather than do a true gevent patched test.
I worked out how to patch default values in a less brittle way.


CLOUDP-184640 Extend the lifetime of stream callbacks

https://jira.mongodb.org/browse/CLOUDP-184640
This PR extends the lifetime of a stream callback.

I put up this PR, but didn't add reviewers, so you probably didn't get notice. Here it is.

Updated the PR and it's ready for another review.

@gregbanks the patch is ready for another review.


OSF Resource Download

Work Completed

Added resource download endpoint
Integrated OSF with the endpoint
Updated some previous tests to hit a 400

Required Steps

docker-compose up --build

Resolves Tickets

https://crcdev.atlassian.net/secure/RapidBoard.jspa?rapidView=5&view=planning&selectedIssue=PRES-55

Notes

This does not handle the issue of the server timing out because of the resource size. We will handle that next.

Sir Brett. Everything looks great. Could we sit together for a bit tomorrow. I'd like to ask some more conceptual questions that are difficult to put into comment boxes.


Clear button does not clear certain formatting options.

Describe the bug
Clear button does not clear certain styles, such as  headings (heading 1, heading 2, etc) and text alignment.

Give it a Heading 1 style or change text aligment
Select the text
Press "Clear formatting" button.
The button does nothing

Expected behavior
Text completely returns to it's original, not formatted state
Desktop (please complete the following information):

OS: Linux 5.15.71 #1-NixOS
Browser: Vivaldi | 5.2.2623.41 (Stable channel) stable (64-bit)

Also reproducible on Chromium Version 106.0.5249.61 (Official Build) (64-bit)

https://user-images.githubusercontent.com/1235775/195780296-d99eaab4-cf46-4270-982b-bae49946b694.mp4

"Clear formatting" button is only clear text style(color, bold, ..etc).
Formats such as headers are required, so you can only change them with the corresponding button.
The list can be changed or toggled on and off with the list button.

What do you mean "required"?
The expectation is that if you can change something about the text, be it alignment or heading style, there should be an ability to clear that from the text.
This is especially annoying if you're copying a text from some source and want to completely reformat it yourself, including alignment and headings, so you have to go manually through a fairly chunky bit of text and reset everything yourself.
This seems like an anti-feature and it's hostile to the user.

The format that makes up the main line is <P> by default.
The format of the list or line is changed only with the corresponding button.
"clear format" is a button related to text style.
This is a universal feature applied to other editors as well.


One cancels all :  group of orders should contain orders with exactly the same account

Hello,
I get this error while creating the trail and the stop order using the one cancels all logic (OCA), it's working fine in the paper account but not in the live account, below is the error message:
ERROR - Error 10224, reqId 673: One-cancels-all group of orders should contain orders with exactly the same account. OCA group '0913e328-d9c4-4b4a-99b8-f6b921824f25' contains orders for Personal Account (account_name), Undefined.
What can be the issue here please ?
below is the code if this help :
oca_group_name = str(uuid.uuid4())
if position["enable_trailing_stop"]:
    trailing_stop_order = Order(
        orderType="TRAIL",
        action="SELL",
        totalQuantity=position["current_shares"],
        trailingPercent=position["trailing_stop"] * 100,
        tif="GTC",
        outsideRth=True,
        ocaGroup=oca_group_name,
        ocaType=1,
    )

    trade = self.place_order(position["contract"], trailing_stop_order)

    position["trailing_stop_order_id"] = trade.order.orderId
    position["trailing_stop_order"] = trade.order

stop_loss_order = StopOrder("SELL", position["current_shares"], stop_loss_price, tif="GTC", outsideRth=True)
stop_loss_order.ocaGroup = oca_group_name
stop_loss_order.ocaType = 1

trade = self.place_order(position["contract"], stop_loss_order)

Thanks,
Hamza

What could be happening:

trailing_stop_order is submitted without an account id
but place_order() updates trailing_stop_order to populate the account id
now stop_loss_order is submitted without an account id too
IBKR sees two orders with different account definitions and rejects the combination

The more standard way of doing this would be to use parent orders if everything is submitted at once (buy <- {sell loss, sell, profit}): https://interactivebrokers.github.io/tws-api/bracket_order.html
Or you could manually add your account id to every order too.


fix: Restructure text in Readme

This resolves #418. Please ignore the two old commits. Thanks (:

Thanks for your contribution 🚀


doc: update faq

Codecov Report

Merging #230 (7deb468) into main (4416868) will decrease coverage by 2.12%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
- Coverage   41.08%   38.96%   -2.13%
==========================================
  Files          23       16       -7
  Lines        1969     1699     -270
  Branches       48        0      -48
==========================================
- Hits          809      662     -147
+ Misses       1160     1037     -123

Impacted Files
Coverage Δ

...-contracts/lib/recipient-typescript-lib/src/lib.rs
80.00% <0.00%> (-20.00%)
:arrow_down:

...tracts/lib/recipient-typescript-lib/src/actions.rs
81.08% <0.00%> (-12.47%)
:arrow_down:

offchain-modules/ckb-contracts/tests/src/lib.rs
0.00% <0.00%> (ø)

offchain-modules/ckb-contracts/types/src/hasher.rs
0.00% <0.00%> (ø)

...ules/ckb-contracts/tests/src/utils/case_builder.rs
0.00% <0.00%> (ø)

...odules/ckb-contracts/contracts-helper/src/chain.rs

...es/eth-contracts/contracts/libraries/SafeERC20.sol

...les/eth-contracts/contracts/libraries/SafeMath.sol

...th-contracts/contracts/libraries/MultisigUtils.sol

...ain-modules/eth-contracts/contracts/test/ERC20.sol

... and 9 more

Continue to review full report at Codecov.

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


⚠ ClamAV has degraded performance

In 2f02769, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 231 ms

Resolved: ClamAV performance has improved in a9644f0.


Follow up for #278 : make the required function from FoundationEssentials package so we can use it from FoundationI18n

issue #285

@swift-ci please test

@swift-ci please test


Add interpreter for select

Following the testing guidelines

Fixed in https://github.com/openxla/stablehlo/pull/1087.


#error conditions are emitted from the preprocessor, making hard to diagnose issues

If a method is declared without using a comma between the type and the name, like:
#define COBJ_INTERFACE_METHODS	\
    COBJ_INTERFACE_METHOD(void, set_options, gpio_pin_options options)	\

it's very hard to diagnose, because of the following macro:
cobjpvt-generator-framework.h
#define COBJPVT_GEN_METHOD_ARGS_SEPERATOR_1	#error "Invalid Method Signature"

Using an #error within a #define is not possible. It should use some static assertion, if possible, or remote it in total

There is no good way, or I have not found one, to show the user a meaningfull message in gcc.
Instead of this, there are some comments in the form of:
/*
			Common Error:
			src.o: In function `interface_method_thunk':
			undefined reference to `interface_method_impl'

			Cause:
			You are missing the implementation of the method of an interface in a class. The .o file specifies which class.

			Solution:
			Implement the method with the following signature:

			static RETURN_TYPE interface_method_impl(CLASS_NAME_impl * self [argument-list])
			{
				...
			}
		*/

They are located in right where the compiler checks the error in the generator, so giving the user a hint what is wrong or missing.
We will keep this schema for further improvements!


Clean up/speed up some Context descriptor lookups.

Remove unused swiftNameForProtoName on Context.
Rename getMessageForPath(path:) to messageDescriptor(forTypeName:) and have
it use the already built catch so it isn't always linear.
Remove the linear lookup of Message types.
Add helper for enum descriptor lookup off Context.
Drop Context's fileByProtoName, isn't used.
Stop tracking the parents, wasn't used.
Stop tracking what type names were groups at the Context level. Groups are
still messages and the knowledge they are a group is inspected on the field
when generating, so this was just wasted work.

There are still lots of other lookups that are linear because they build data up along the way, but that can be a different cleanup.

Actually, I'll drop this and just do https://github.com/apple/swift-protobuf/issues/484 which will expand on what this happened to notice.


Removing dataset_id as a required field

Removing dataset_id as a required field given that it is not being added by default in upstream pipeline

I think we are going to add dataset ID to the create function so it is in the object to being with.


Autofix doesn't handle cursor/selection correctly

From @rebornix on October 25, 2016 17:22
Testing https://github.com/Microsoft/vscode/issues/14319 .
Repro steps:

Turn on eslint rule curly as warn.

Insert following code into the editor, put cursor just after the semicolon.
if (foo) foo++;

Save

Expected
The content is changed to if (foo) {foo++;} and the cursor is after }
Actual
The content is fixed correctly while both ; and } are selected.

Note
This issue won't happen if you already put cursor elsewhere.
Copied from original issue: Microsoft/vscode-eslint#161

I checked this and the edit actually looks ok to me:
[Trace - 12:12:32 PM] Received response 'textDocument/willSaveWaitUntil - (14)' in 1ms.
Result: [
    {
        "range": {
            "start": {
                "line": 2,
                "character": 10
            },
            "end": {
                "line": 2,
                "character": 16
            }
        },
        "newText": "{foo++;}"
    }
]

Moving to VS Code since this is nothing ESLint can fix.

When editing the model directly (which is what autofix on save does I think), the edit goes directly to the model, and the cursor is left to "recover" its position from markers.
This edit causes one of the two markers used by the cursor to move as it is making edits exactly at the cursor position.
In the core, the edits can give a hint as to their semantics https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/core/editOperation.ts#L11 via the forceMoveMarkers flag.
Additionally, we could send this edit through to the web worker to compute a more minimal edit.

Today we use the bulk edit here. That's the same we use for rename and find/replace across files. It should be aware of the current editor...

@rebornix and I can't get eslint autofix to work at all, whether by eslint.autoFixOnSave or the command palette. Same in 1.9 and 1.10. Am I missing something?

Actually, it's fine. We just messed it up a couple times (eslint out of date, syntax error in js file)


Change default shell in vscode-settings

not bash but zsh

The default shell is the system-shell.
If this is not the preferred one, you should change it or change the settings.json.
Adding an env-variable to the settings.json does work if this env-variable is set, which is not the case if vscode is not called from console (e.g. code ~/dotfiles).


AttributeError: 'NoneType' object has no attribute 'name'

I want to test OneShot AllReduce and TwoShot AllReduce separately, so I have modified the following code:
class LLaMAModel(Module):

    def __init__(self, config: PretrainedConfig) -> None:
        super().__init__()
        init_all_reduce_helper()

        self.mapping = config.mapping
        if self.mapping.is_first_pp_rank():
            self.vocab_embedding = Embedding(config.vocab_size,
                                             config.hidden_size,
                                             dtype=config.dtype)

        self.layers = DecoderLayerList(LLaMADecoderLayer, config)

        if self.mapping.is_last_pp_rank():
            self.ln_f = RmsNorm(normalized_shape=config.hidden_size,
                                eps=config.norm_epsilon,
                                dtype=config.dtype)

        self.tp_group=config.mapping.tp_group

    def forward(
            self,
            input_ids,
            position_ids=None,
            use_cache=False,
            attention_mask=None,
            medusa_position_offsets=None,  # For Medusa support
            medusa_packed_mask=None,  # For Medusa support
            kv_cache_params=None,
            attention_params=None,
            hidden_states=None,
            prompt_embedding_table: Optional[Tensor] = None,
            prompt_tasks: Optional[Tensor] = None,
            prompt_vocab_size: Optional[Tensor] = None,
            lora_params=None):

        ptuning_args = [
            prompt_embedding_table, prompt_tasks, prompt_vocab_size
        ] if prompt_embedding_table is not None else []

        if self.mapping.is_first_pp_rank():
            hidden_states = self.vocab_embedding(input_ids, *ptuning_args)
        else:
            hidden_states = recv(hidden_states, self.mapping.prev_pp_rank())

        ### Test OneShot_AllReduce and TwoShot_AllReduce
        x = Tensor(name='input_ids', dtype=trt.float16, shape=[64, 8192])
        torch.cuda.synchronize()
        for i in range(10):
             #hidden_states = allreduce(x, self.tp_group, strategy=1)
             hidden_states = allreduce(x, self.tp_group, strategy=2)
        torch.cuda.synchronize()

        return hidden_states

when I buid:
[05/07/2024-11:22:02] [TRT] [E] 3: [network.cpp::addInput::1973] Error Code 3: API Usage Error (Parameter check failed at: optimizer/api/network.cpp::addInput::1973, condition: inName != knownInput->getName() )
concurrent.futures.process._RemoteTraceback:
Traceback (most recent call last):
  File "/usr/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/commands/build.py", line 315, in build_and_save
    engine = build_model(build_config,
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/commands/build.py", line 308, in build_model
    return build(model, build_config)
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/builder.py", line 732, in build
    model(**inputs)
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/module.py", line 40, in __call__
    output = self.forward(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/modeling_utils.py", line 634, in forward
    hidden_states = self.transformer.forward(**kwargs)
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/llama/model.py", line 191, in forward
    x = Tensor(name='input_ids', dtype=trt.float16, shape=[64, 8192])
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/functional.py", line 226, in __init__
    self.name = name
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/functional.py", line 248, in name
    self.trt_tensor.name = name
AttributeError: 'NoneType' object has no attribute 'name'

The reason for the error is due to this line of code:x = Tensor(name='input_ids', dtype=trt.float16, shape=[64, 8192])
Why is this error reported?
Is there any way for me to create a tensorrt tensor for any shape during the forward process?

In addition, I also tried to modify the shape of existing tensor hidden states , but none of them were successful. Is there any way to modify the shape of an existing tensor during the forawrd inference process?

Hi @QiJune  would u please take a look this question?

Hi @liminn do u still have further issue or question now? If not, we'll close it soon.


Additional options on DatagramSocket

I took the liberty of adding the rest of these.
Resolves #2

Hey @WhittlesJr this mostly LGTM, I've been thinking about adding a changelog and this seems like a suitable occasion, do you think you can add one to this PR?

Sure thing! I am a proponent of changelogs myself.

How's that?


Move Docker call functions in Toil-lib into Toil

See https://github.com/BD2KGenomics/toil-lib/blob/master/src/toil_lib/programs.py
Proposal is that docker_call function (and necessary functions) moves to src/toil/lib/docker.py

Note, this needs a synched PR to remove from toil-lib.

Note, this needs a synched PR to remove from toil-lib.

and toil-scripts and toil-rnaseq

@jvivian do you want to take this on? I figure I would take on the testing.

Thanks @jvivian


[DROOLS-1129] consistent OSGi Bundle-SymbolicName for all jars

Depends on:
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/pull/183

+1
Waiting for that upstream PR to be merged before merging this.


Create Maximum-Equal-Frequency.cpp

hey @AryanBarsaiyan I have created this code Kindly accept and merge it.

Not accepting CPP/C DSA codes
Alternative ->
1)Create a page using HTML & CSS Add DSA problem statement and solution in that
2)You can contribute in python and java OR
Ask for an issue assign
3)Contribute to Web Project


MIXEDARCH-330: E2E test suite initial implementation

This PR adds the initial implementation for a e2e test suite and 1 test case that verifies the operands are deployed and available after the creation of the pod placement config.

/retest-required

/retest-required

/test e2e-gcp-multi-operator-periodic

/lgtm

/approve


[microTVM] Custom IDE Tutorial

Adds "Bring microTVM to your own development environment" to microTVM tutorials. This tutorial describes the steps required to integrate a model compiled with microTVM into a custom development environment. We use STM32Cube IDE, the VWW model and the nucleo_l4r5zi board.

Great tutorial @mkatanbaf, I left a few comments and was able to get it up and running on MacOS:
Person not detected, inference time = 297 ms
Person detected, inference time = 297 ms

Thanks @alanmacd for the detailed review


Main to Main

I still have some error with the File upload functionality.
From Slack:
I think the problem is in the resolver, when the FormData object is used in a prompt no separate import needs to be used, when used with a resolver along with a separate import in then created a problem with the HTTP body, the body parameter does not accept the FormData type.
meta node "FileInput" (a prompt) contains:
const formData = new FormData(evt.currentTarget)
const rawDescription = formData.get('description')
const { file: [record] } = await clientUploadFile(formData)
The clientUploadFile function is essentially identical to the one I am using, I just have one more property for additional headers.

Merged via squash in 886f610f1c846f44758187356354f5f9af398191


grunt.d.ts: Type of cwd in interface IExpandedFilesConfig is wrong

cwd?: boolean in interface IExpandedFilesConfig is typed as boolean. According to the [API documentation of grunt.file.expand] (http://gruntjs.com/api/grunt.file#grunt.file.expand) this should be a path string.
Shall I create a fork and pull request for the fix?

@callmetango yep, I'll review it.


Allow use of remote wsdls

wsdl files are loaded locally by default (see SoapWebService.getWsdlDocumentLocation()). It would be nice to have a simple way to load these files from the webpdf server. This would also circumvent problems like in issue #3.
I think two things need to be done to enable this:

Add an "official" way to set SoapSession.useLocalWsdl to false. Maybe just make the setter public. The flag can already set via reflection, but of course that's not very nice.
Fix generation for remote URLs in SoapWebService.getWsdlDocumentLocation(). If useLocalWsdl is false in this method, it will simply use this.webserviceURL.toURL(). However, this URL seems not to be correct, it gives an HTML-Overview. To make it work, the URL needs an additional ?wsdl to be added.

No reaction?

Has been answered in issue #3


[AutoRelease] t2-eventgrid-2022-08-18-46671(Do not merge)

https://github.com/Azure/sdk-release-request/issues/3095
Live test success
https://dev.azure.com/azure-sdk/internal/_build?definitionId=993
BuildTargetingString
azure-mgmt-eventgrid
Skip.CreateApiReview
true

issue link:https://github.com/Azure/sdk-release-request/issues/3095


swipe down

Is there any reason because of which swipe down cannot work? all other orientations are working well;

Swipe down was working till last time, any chance you can create a plunkr to demo the issue? (stackblitz is pretty awesome for that)

I just used the basic example; I dont really know how to do thin in plunkr
or stachblitz;
On Thu, Oct 26, 2017 at 10:10 AM, Mashhood Rastgar<EMAIL_ADDRESS>
wrote:

Swipe down was working till last time, any chance you can create a plunkr
to demo the issue? (stackblitz is pretty awesome for that)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ksachdeva/angular2-swing/issues/40#issuecomment-339549230,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWd8IQyl1K9ZBFQ1_5KpOl-MewHon6sBks5swA0wgaJpZM4QGd5E
.

successfully made a stackblitz example; please check;
demo can be seen at https://ionic-vcklfx.stackblitz.io/
code can be seen at https://stackblitz.com/edit/ionic-vcklfx?file=pages%2Fhome%2Fhome.html

got it working by adding the following in stackConfig in the TS file; I had tried specifying the same through html earlier and it had not worked;
  allowedDirections: [Direction.UP, Direction.DOWN, Direction.LEFT, Direction.RIGHT],

this is not working