SqlAlchemy problem inside celery when deploying on heroku

Helo Miguel, i deployed my app and i am starting a startup thanks to your tutorials which give me the confidence to start developing my idea. My app is online but the celery task aren't working. I have a psycopg2 operational error:
SSL SYSCALL error: EOF detected
I think that the problem is generated by some things i did wrong when working with sqlalchemy but im not sure. So here i will recap the things that might be causing trouble.
1) im using:
    with app.app_context():
at the beggining of the celery task, i dont know if it is the correct way to pass the context to the task.
2) this one i think is the real problem:
I think i  dont fully understand how to work properly with sqlalchemy. I noticed that first i had a problem when trying to acces a query atributes after a commit so i disabled expiring_on_commit because i have also do some socket.emit from this tasks and i couldn't send a emit before commiting. BUT i remove all session when the task ends and also in the socket functions using  db.session.remove().

some say in the formus that doing  db.engine.dispose() on every task creation solves the problem but i dont even understand why should it solve it and i think my problem goes deeper but maybe im actually working well with sqlalchemy and indeed that solves the problem.

3)another possible cause of the problem is that im also doing things like:
obj1=query...
commit()
emit({obj1.id})
obj2 = query(filter_by=obj1)
obj3 = obj1.name
commit()
remove()
that was a illustration of the things that my code do, because sometimes i call a function that maybe emits but before emiting i need to commit (this example i give it above) so the user detect new changes when is redirected, etc. but then i need to access the atributes of that query and i dont know i thought that disabling expire_on_commit and db.session.remove() at the end would partially solve my problem but aparently not or im doing something else wrong.
I think the problem is there but maybe is somewhere else... i would like to give you access to my private rep on github so you can see and maybe give me a push in the correct way of working with flask-sqlalchemy. so if you are interested let me know im kinda stuck with this.

Can I see a stacktrace please?

ok so aparently some work well and some give a type of error of unexpected closing and some of bad decryption, i dont know, now it doesnt seem to appear the original error.
2019-03-05T18:14:30.179505+00:00 app[worker.1]: [2019-03-05 18:14:30,173: INFO/MainProcess] Received task: app.SearchEngine.order_timeout[69fb7a79-1a4d-44cd-b1dd-3843001d132f]  ETA:[2019-03-05 18:15:20.038113+00:00]
2019-03-05T18:14:30.375159+00:00 app[worker.1]: [2019-03-05 18:14:30,262: INFO/MainProcess] Received task: app.SearchEngine.asignation_timeout[bfd31c8d-bc25-4841-b1fe-06ba293376a5]  ETA:[2019-03-05 18:14:40.223113+00:00]
2019-03-05T18:14:40.686492+00:00 app[worker.1]: [2019-03-05 18:14:40,685: WARNING/ForkPoolWorker-3] AFTER TASK PUBLISH
2019-03-05T18:14:40.697438+00:00 app[worker.1]: [2019-03-05 18:14:40,696: INFO/ForkPoolWorker-3] Task app.SearchEngine.asignation_timeout[bfd31c8d-bc25-4841-b1fe-06ba293376a5] succeeded in 0.4625552839715965s: None
2019-03-05T18:14:40.705248+00:00 app[worker.1]: [2019-03-05 18:14:40,702: INFO/MainProcess] Received task: app.SearchEngine.aviable_check[175aa7bd-6dde-41bf-90a5-f7ab0eb9789d]  ETA:[2019-03-05 18:14:55.519561+00:00]
2019-03-05T18:14:55.605201+00:00 app[worker.1]:     cursor.execute(statement, parameters)
2019-03-05T18:14:55.605203+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/eventlet/support/psycopg2_patcher.py", line 46, in eventlet_wait_callback
2019-03-05T18:14:55.605205+00:00 app[worker.1]:     state = conn.poll()
2019-03-05T18:14:55.605207+00:00 app[worker.1]: psycopg2.OperationalError: server closed the connection unexpectedly
2019-03-05T18:14:55.605209+00:00 app[worker.1]: 	This probably means the server terminated abnormally
2019-03-05T18:14:55.605211+00:00 app[worker.1]: 	before or while processing the request.
2019-03-05T18:14:55.605212+00:00 app[worker.1]:
2019-03-05T18:14:55.605214+00:00 app[worker.1]:
2019-03-05T18:14:55.605216+00:00 app[worker.1]: The above exception was the direct cause of the following exception:
2019-03-05T18:14:55.605217+00:00 app[worker.1]:
2019-03-05T18:14:55.605218+00:00 app[worker.1]: Traceback (most recent call last):
2019-03-05T18:14:55.605220+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
2019-03-05T18:14:55.605222+00:00 app[worker.1]:     R = retval = fun(*args, **kwargs)
2019-03-05T18:14:55.605224+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/celery/app/trace.py", line 641, in protected_call
2019-03-05T18:14:55.605225+00:00 app[worker.1]:     return self.run(*args, **kwargs)
2019-03-05T18:14:55.605227+00:00 app[worker.1]:   File "/app/app/SearchEngine.py", line 272, in aviable_check
2019-03-05T18:14:55.605229+00:00 app[worker.1]:     aviable_checking(client_id, user_id, *args, **kwargs)
2019-03-05T18:14:55.605231+00:00 app[worker.1]:   File "/app/app/SearchEngine.py", line 278, in aviable_checking
2019-03-05T18:14:55.605232+00:00 app[worker.1]:     user = User.query.filter_by(id=user_id).first()
2019-03-05T18:14:55.605234+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2895, in first
2019-03-05T18:14:55.605235+00:00 app[worker.1]:     ret = list(self[0:1])
2019-03-05T18:14:55.605237+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2687, in getitem
2019-03-05T18:14:55.605239+00:00 app[worker.1]:     return list(res)
2019-03-05T18:14:55.605240+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2995, in iter
2019-03-05T18:14:55.605242+00:00 app[worker.1]:     return self._execute_and_instances(context)
2019-03-05T18:14:55.605243+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3018, in _execute_and_instances
2019-03-05T18:14:55.605245+00:00 app[worker.1]:     result = conn.execute(querycontext.statement, self._params)
2019-03-05T18:14:55.605246+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 948, in execute
2019-03-05T18:14:55.605248+00:00 app[worker.1]:     return meth(self, multiparams, params)
2019-03-05T18:14:55.605250+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
2019-03-05T18:14:55.605251+00:00 app[worker.1]:     return connection._execute_clauseelement(self, multiparams, params)
2019-03-05T18:14:55.605253+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
2019-03-05T18:14:55.605254+00:00 app[worker.1]:     compiled_sql, distilled_params
2019-03-05T18:14:55.605256+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
2019-03-05T18:14:55.605257+00:00 app[worker.1]:     context)
2019-03-05T18:14:55.605259+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
2019-03-05T18:14:55.605260+00:00 app[worker.1]:     exc_info
2019-03-05T18:14:55.605262+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
2019-03-05T18:14:55.605264+00:00 app[worker.1]:     reraise(type(exception), exception, tb=exc_tb, cause=cause)
2019-03-05T18:14:55.605266+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 248, in reraise
2019-03-05T18:14:55.605267+00:00 app[worker.1]:     raise value.with_traceback(tb)
2019-03-05T18:14:55.605269+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
2019-03-05T18:14:55.605270+00:00 app[worker.1]:     context)
2019-03-05T18:14:55.605272+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
2019-03-05T18:14:55.605273+00:00 app[worker.1]:     cursor.execute(statement, parameters)
2019-03-05T18:14:55.605275+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/eventlet/support/psycopg2_patcher.py", line 46, in eventlet_wait_callback
2019-03-05T18:14:55.605276+00:00 app[worker.1]:     state = conn.poll()
2019-03-05T18:14:55.605278+00:00 app[worker.1]: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) server closed the connection unexpectedly
2019-03-05T18:14:55.605280+00:00 app[worker.1]: 	This probably means the server terminated abnormally
2019-03-05T18:14:55.605281+00:00 app[worker.1]: 	before or while processing the request.
2019-03-05T18:14:55.605336+00:00 app[worker.1]:  [SQL: 'SELECT "user".id AS user_id, "user".username AS user_username, "user".email AS user_email, "user".password_hash AS user_password_hash, "user".user_type AS user_user_type, "user".aviable AS user_aviable, "user".in_cooldown AS user_in_cooldown, "user".open_sockets AS user_open_sockets, "user".system_cooldown AS user_system_cooldown, "user".eta_cooldown AS user_eta_cooldown \nFROM "user" \nWHERE "user".id = %(id_1)s \n LIMIT %(param_1)s'] [parameters: {'id_1': 5, 'param_1': 1}] (Background on this error at: http://sqlalche.me/e/e3q8)
2019-03-05T18:14:06+00:00 app[heroku-redis]: source=REDIS addon=redis-perpendicular-46171 sample#active-connections=13 sample#load-avg-1m=0.175 sample#load-avg-5m=0.145 sample#load-avg-15m=0.14 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15664272kB sample#memory-free=12840132kB sample#memory-cached=1029004kB sample#memory-redis=643272bytes sample#hit-rate=0.039216 sample#evicted-keys=0
2019-03-05T18:15:20.103579+00:00 app[worker.1]: [2019-03-05 18:15:20,101: ERROR/ForkPoolWorker-6] Task app.SearchEngine.order_timeout[69fb7a79-1a4d-44cd-b1dd-3843001d132f] raised unexpected: OperationalError('(psycopg2.OperationalError) SSL error: decryption failed or bad record mac\n',)
2019-03-05T18:15:20.103593+00:00 app[worker.1]: Traceback (most recent call last):
2019-03-05T18:15:20.103596+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
2019-03-05T18:15:20.103602+00:00 app[worker.1]:     context)
2019-03-05T18:15:20.103604+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
2019-03-05T18:15:20.103606+00:00 app[worker.1]:     cursor.execute(statement, parameters)
2019-03-05T18:15:20.103608+00:00 app[worker.1]: psycopg2.OperationalError: SSL error: decryption failed or bad record mac
2019-03-05T18:15:20.103610+00:00 app[worker.1]:
2019-03-05T18:15:20.103611+00:00 app[worker.1]:
2019-03-05T18:15:20.103613+00:00 app[worker.1]: The above exception was the direct cause of the following exception:
2019-03-05T18:15:20.103615+00:00 app[worker.1]:
2019-03-05T18:15:20.103617+00:00 app[worker.1]: Traceback (most recent call last):
2019-03-05T18:15:20.103619+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
2019-03-05T18:15:20.103620+00:00 app[worker.1]:     R = retval = fun(*args, **kwargs)
2019-03-05T18:15:20.103622+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/celery/app/trace.py", line 641, in protected_call
2019-03-05T18:15:20.103624+00:00 app[worker.1]:     return self.run(*args, **kwargs)
2019-03-05T18:15:20.103625+00:00 app[worker.1]:   File "/app/app/SearchEngine.py", line 421, in order_timeout
2019-03-05T18:15:20.103627+00:00 app[worker.1]:     order_timeouting(order_id)
2019-03-05T18:15:20.103629+00:00 app[worker.1]:   File "/app/app/SearchEngine.py", line 427, in order_timeouting
2019-03-05T18:15:20.103631+00:00 app[worker.1]:     order = Order.query.filter_by(id=order_id).first()
2019-03-05T18:15:20.103632+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2895, in first
2019-03-05T18:15:20.103634+00:00 app[worker.1]:     ret = list(self[0:1])
2019-03-05T18:15:20.103636+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2687, in getitem
2019-03-05T18:15:20.103638+00:00 app[worker.1]:     return list(res)
2019-03-05T18:15:20.103639+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2995, in iter
2019-03-05T18:15:20.103641+00:00 app[worker.1]:     return self._execute_and_instances(context)
2019-03-05T18:15:20.103643+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3018, in _execute_and_instances
2019-03-05T18:15:20.103644+00:00 app[worker.1]:     result = conn.execute(querycontext.statement, self._params)
2019-03-05T18:15:20.103646+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 948, in execute
2019-03-05T18:15:20.103648+00:00 app[worker.1]:     return meth(self, multiparams, params)
2019-03-05T18:15:20.103650+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
2019-03-05T18:15:20.103652+00:00 app[worker.1]:     return connection._execute_clauseelement(self, multiparams, params)
2019-03-05T18:15:20.103653+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
2019-03-05T18:15:20.103655+00:00 app[worker.1]:     compiled_sql, distilled_params
2019-03-05T18:15:20.103657+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
2019-03-05T18:15:20.103677+00:00 app[worker.1]:     context)
2019-03-05T18:15:20.103678+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
2019-03-05T18:15:20.103680+00:00 app[worker.1]:     exc_info
2019-03-05T18:15:20.103682+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
2019-03-05T18:15:20.103684+00:00 app[worker.1]:     reraise(type(exception), exception, tb=exc_tb, cause=cause)
2019-03-05T18:15:20.103686+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 248, in reraise
2019-03-05T18:15:20.103687+00:00 app[worker.1]:     raise value.with_traceback(tb)
2019-03-05T18:15:20.103689+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
2019-03-05T18:15:20.103691+00:00 app[worker.1]:     context)
2019-03-05T18:15:20.103703+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
2019-03-05T18:15:20.103705+00:00 app[worker.1]:     cursor.execute(statement, parameters)
2019-03-05T18:15:20.103706+00:00 app[worker.1]: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SSL error: decryption failed or bad record mac
2019-03-05T18:15:20.103717+00:00 app[worker.1]:  [SQL: 'SELECT "order".id AS order_id, "order".creator AS order_creator, "order".creation_time AS order_creation_time, "order".for_client AS order_for_client, "order".aborted_time AS order_aborted_time, "order".is_urgent AS order_is_urgent, "order".is_emergency AS order_is_emergency, "order".unknown_destiny AS order_unknown_destiny, "order".order_type AS order_order_type, "order".from_adress AS order_from_adress, "order".to_adress AS order_to_adress, "order".extra AS order_extra, "order".pacient_name AS order_pacient_name, "order".timeout AS order_timeout, "order".rounds AS order_rounds \nFROM "order" \nWHERE "order".id = %(id_1)s \n LIMIT %(param_1)s'] [parameters: {'id_1': 10, 'param_1': 1}] (Background on this error at: http://sqlalche.me/e/e3q8)

is that what you needed?

This is the important problem in this error:
2019-03-05T18:14:55.605207+00:00 app[worker.1]: psycopg2.OperationalError: server closed the connection unexpectedly
2019-03-05T18:14:55.605209+00:00 app[worker.1]: This probably means the server terminated abnormally

Your server must have gotten offline, or doesn't have a reliable connection.

and what may it be causing it ?

i noticed that it say i have 13 open connections with redis, that is weird or not ?
source=REDIS addon=redis-perpendicular-46171 sample#active-connections=13 sample#load-avg-1m=0.175 sample#load-avg-5m=0.145 sample#load-avg-15m=0.14 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15664272kB sample#memory-free=12840132kB sample#memory-cached=1029004kB sample#memory-redis=643272bytes sample#hit-rate=0.039216 sample#evicted-keys=0

I don't know, you may want to look for Postgres logs to see if there is anything interesting in there. Redis is probably not related to this problem, the error is from Postgres.

I will go on from here and i will keep you updated

i couldnt find a proper solution, and as my free plan i cant access heroku postgress logs

I found a tutorial where instead of db.session.remove() the tutorial maker ought to do a db.engine.dispose() my question is what does it difference them ?

so maybe that solves the problem because as we saw the celery task connect well to the db at the first task but even the second task start to have problems connecting to it.

no difference, except now it doesnt appear to lost connection, just the other 2 warnings the EOF and the decryption

The free postgres database is very limited, you are probably going over the max connection limit.

that is a possibility, im going to take out the dispose part, and just leave it as it was and im going to upgrade it but i dont understand why some work and some not, if just 1 celery task run at a time there should be just 1 session for every task, maybe they are expensive task.
taking that 'illustration' of how i work with my database isnt a problem making multiple queries inside a session and committing without expiring a problem ? does it create multiple connections ? is a benefit using expunge if my goal after the commit is just to acces some atributes of the query ? sorry im a bit confused

and by the way thanks for your time and commitment to helping me

Are you using Flask-SQLAlchemy? This extension manages a separate pool of connections in each process, so you may end up with more connections that you think you have. Not having visibility into the Postgres database stats and logs is a problem for debugging this.

yes, i will upgade heroku plan


filer do not update after re-create collection

Sponsors SeaweedFS via Patreon https://www.patreon.com/seaweedfs
Describe the bug
reproduce step：
1、create collection abc
2、upload a file（use filer api）to collection abc use filer api，name file_abc
3、delete collection abc，and then create it with the same name
4、upload a file use p previous path，and filer will return 404 not found
System Setup
List the command line to start "weed master", "weed volume", "weed filer", "weed s3", "weed mount".
weed master
weed volume
weed filer
Expected behavior
it seems filer record the wrong vid and can not overwrite it
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

我怕我英语不好，用中午复述一下：就是先上传一个文件到filer指定collection，然后在后台把collection删除再重建。这个时候用同样的文件路径就无法上传了，一只返回404，感觉像是filer再做覆盖的时候 查了一个老的vid

can not reproduce. please show your exact steps.


_WIN32 vs. _MSC_VER

The libosmium code contains some places with #ifdef _WIN32 and others with #ifdef _MSC_VER. According to https://github.com/cxong/tinydir/issues/18, which I just stumbled upon, this is probably false.
Shall we change all _MSC_VER to _WIN32 or are there some cases where _MSC_VER is actually correct?
/cc @BergWerkGIS @alex85k

Well, there is no wrong or right.
Both are correct - each for their purpose.

_WIN32 is for generally checking if the app is built for/on Windows.
 All the Windows code I have been writing came either from somebody else or I have been guessing from docs and snippets here or there. Can we try compiling with clang or gcc on Windows and see what works and what doesn't?

As far as I see, there are no _MSC_VER specific version checks now (we assume Visual Studio 2015 or later to have base C++ 11).
Many of the checks are including unistd.h file with POSIX api, not available on Windows but having some equivalents in io.h  or C++ 11.
I can check with MSYS2 (latest GCC on Windows).

@alex85k Not sure what you mean with "no _MSC_VER specific version checks now" ? I count 20 mentionings of the _MSC_VER macro in libosmium code. Many of these are because of the unistd.h vs. io.h thing, but it is inconsistently used.

Can we try compiling with clang or gcc on Windows and see what works and what doesn't?

Yes, Visual Studio VS 2015 Update 1 and 2017 deploy 'flavour' of clang  (Clang with Microsoft CodeGen).
Why not add clang-based build job to the AppVeyor where clang 3.8 is available. Boost Hana can provide example of config: https://github.com/boostorg/hana/blob/master/.appveyor.yml

I mean there are no checking of compiler version. The reason to use _MSC_VER was tht thing like unistd existed for mingw but not for Visual Studio. Most of checks can be with _WIN32 but not all.
Gcc from MinGW does not need many code tweaks for compiler but the binary is usually slower.

To check vs+clang on Appveyor we'll most likely need to rebuild dependency pack with clang...

Now that we are testing with GCC in the Msys2 environment, I think we can close this issue. If somebody wants to provide a clang build script for Appveyor, please go ahead. But the _MSC_VER vs. _WIN32 issue seems to be fixed now and is tested going forward with the different builds on Appveyor.


docs: fix codeblock

Also breaks apart the shell blocks, so it's easier to use the copy button on GitHub to copy the line

Before
After

Summary by CodeRabbit

Documentation

Enhanced the README.md with clearer installation and build instructions.
Updated CONTRIBUTING.md to improve the "Recap" section, app setup instructions, and guidelines for contributing, including issues and pull requests.

it's the small things


envForm record not found in dc when linking component using --wait flag

/kind bug

What versions of software are you using?
Operating System:
Supported platform
Output of odo version:
master
How did you run odo exactly?
https://github.com/openshift/odo/pull/2398/files#diff-93c99b01e2a566d8d27400ffb6e2ee51R112-R135
Actual behavior
envForm record not found

Expected behavior
envForm record should be added in dc

Any logs, error output, etc?

/priority high

https://github.com/openshift/odo/pull/2398/files#diff-93c99b01e2a566d8d27400ffb6e2ee51R112-R135

This is not a valid bug. The problem is in the test. It is trying to link backend component to the backend component. see  https://github.com/openshift/odo/pull/2398/files#r350663133

https://github.com/openshift/odo/pull/2398/files#diff-93c99b01e2a566d8d27400ffb6e2ee51R112-R135

This is not a valid bug. The problem is in the test. It is trying to link backend component to the backend component. see https://github.com/openshift/odo/pull/2398/files#r350663133

/close


feat: fix demo bug and optimize the x6-example-draw

Description

fix the bug in x6-example-feature
support some feature in x6-example-draw

Motivation and Context

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Enhancement (changes that improvement of current feature or performance)
[ ] Refactoring (changes that neither fixes a bug nor adds a feature)
[ ] Test Case (changes that add missing tests or correct existing tests)
[ ] Code style optimization (changes that do not affect the meaning of the code)
[ ] Docs (changes that only update documentation)
[ ] Chore (changes that don't modify src or test files)

Self Check before Merge

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Kneel to be merged


Add an ADP example

Implement nonlinear continuous-time (CT) value-iteration (VI) adaptive dynamic programming (ADP) algorithm [1].
Refs.
[1] T. Bian and Z.-P. Jiang, “Value Iteration, Adaptive Dynamic Programming, and Optimal Control of Nonlinear Systems,” in 2016 IEEE 55th Conference on Decision and Control (CDC), Las Vegas, NV, USA, Dec. 2016, pp. 3375–3380, doi: 10.1109/CDC.2016.7798777.

Note: Reference code.

I think that the code is simple but hard to understand 'cause there's no instruction.
I guess that nonlinear_sys.R may be the implemented code, and parameters.R may be the parameters related to simulation.
It is necessary to be checked.


Cancel button

Are you planning to add a cancel button to dismiss the password lock view ?
Thank you.

Hello, @di2pra
You can add cancel button by yourself in the storyboard


Save All - keyboard shortcut should use VS binding

VSCode Version: 1.4.0
OS Version: Windows 10

Visual Studio (IDE) has the Save All keyboard shortcut of (Ctrl+Shift+S), the same shortcut is available in code but it actions the Save As... function.
Can you apply the same to VS Code? I use both daily, like many other developers.
It would be nice to keep the same functionality between both Microsoft products.

@shammelburg keybindings can be changed via settings. The current keybinding was inspired from Sublime and Atom and has been like this from day one.
Marking as UX issue.

The main problem is that there is no keybinding by default, yet we propagate a UX where refactorings and global replace open all affected files, apply the changes and leave the editors dirty. In that situation I often want to use Save All and I think we should provide a keybinding by default. What about using the same as Atom/Sublime use: Alt+Cmd+S?

@chrmarti I think that'll be great. Having this feature as a default keybinding would help a lot.


Collision polygon is rather conservative

The polygon (in red) encapsulating all predicted footprints (blue) is rather conservative, to the point where a feasible global plan cannot be traversed due to collision avoidance. See example below:

Interesting... Under the hood it's just a polygon-merge I think. So I cannot really explain this behavior.

It loops through pairs of two polygons to merge them bilaterally so every polygon is merged once with its neighbor before, and once with its neighbor after it. Finally it joins the lot to get to the red polygon. If you look at the line segment from the front rectangle, it runs from the front of the first rectangle, towards the rear corner of the second until it intersects with the line segment connecting the front corner of the second with the rear of the third.
Not sure what is desirable here. If you sample infinitely many poses you get to the desired shape, but that seems like overkill. Somehow you'd want the collision shape to approach that without sampling the pose with a very high density...

Since we know quite well the heading upfront, I'm quite sure there is some maths to it to do this properly.
But until then, this solution is indeed a slight bit conservative. And you are right: a higher sampling would solve it.
I would say this is desired behavior in this case. You are sampling a 90 degree curve with 3 samples. That is simply too rough I'd say.

In line with https://github.com/nobleo/path_tracking_pid/pull/2#discussion_r794403340:
If the sampling size results in a less than 70% overlap between the poses, we can issue a warning that such artifacts can occur?


ImportError: No module named '_pywrap_tensorflow'

When I try to run a simple test to see if Tensorflow works I get the following error. I already tried to upgrade tensorflow with: $pip tensorflow -- upgrade and with: pip install -- upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0rc2-cp35m-win-amd64.whl
But I  keep on getting the response in my Command Line that everything is up to date, yet this is my error:
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
  return importlib.import_module(mname)
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 903, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Kan opgegeven module niet vinden.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
  from tensorflow.python import pywrap_tensorflow
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
  _pywrap_tensorflow = swig_import_helper()
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
  return importlib.import_module('_pywrap_tensorflow')
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Gebruiker\Desktop\Sentiment.py", line 1, in <module>
  import tensorflow as tf
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
  from tensorflow.python import *
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 72, in <module>
  raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
  return importlib.import_module(mname)
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 903, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Kan opgegeven module niet vinden.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 66, in <module>
  from tensorflow.python import pywrap_tensorflow
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
  _pywrap_tensorflow = swig_import_helper()
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
  return importlib.import_module('_pywrap_tensorflow')
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'

You need MSVCP140.DLL in your system. Check if it is in your PATH and if it's not install Visual C++ Redistributable 2015 x64

I am getting the same error in Ubuntu 16.04 with TF v1.0 rc2. I have installed from sources.

@codeloverr please see if this helps you.

@Carmezim
Thank you for the suggestions. I checked the path and installed  Visual C++ Redistributable 2015 x64.
`Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 903, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Een initialisatieroutine van de dynamic link library (DLL-bestand) is mislukt.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python_init_.py", line 66, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('pywrap_tensorflow')
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Gebruiker\Desktop\Sentiment.py", line 1, in
import tensorflow as tf
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import *
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python_init_.py", line 72, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 903, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Een initialisatieroutine van de dynamic link library (DLL-bestand) is mislukt.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python_init_.py", line 66, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('pywrap_tensorflow')
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python35\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'`
I noticed that with some other (statistical) modules (SKlearn) I have the same problems.
Do you have any other ideas on how I could solve this?

If you are sure it's not a missing MSVCP140.DLL, I am out of ideas for this one then for now, as yourself already pointed out it's not a TensorFlow specific issue.
Maybe @mrry can help.
I would suggest to post it on StackOverflow.

@Carmezim, thank you anyway! I uninstalled sklearn and now it functions, but it does not seems to do the trick for TensorFlow.

@DutchDandy Did you mean you uninstalled then installed sklearn again and it worked but the same process didn't yield the same result with TensorFlow?

@Carmezim Exactly that.

@DutchDandy  Well, that error usually comes from the mentioned missing DLL, if your CUDA and cuDNN are properly installed.
The other alternative is to replace your python distribution for the Anaconda one as this is a Python.org distribution specific problem or wait if other folks can help on this one.

Since you're running the GPU version, have you ensured that %CUDA_HOME% is set, and the CUDA and cuDNN DLLs are in your %PATH%?

@mrry
Thank you for the suggestion.
I decided to work around my Windows problem, by doing the rest of my programming on a VPS with Ubuntu, that seems to have done the trick for the problems with Tensorflow.

@DutchDandy a quick follow up. Another folk was having a similar issue [#7705] and it was that cuDNN wasn't properly installed missing some DLLs on his %PATH% as @mrry suggested.

@mrry  When you say%CUDA_HOME% , do you mean %CUDA_PATH% ?
I'm facing with the same problem, and I can only see %CUDA_PATH% in my environment variable.

when i installed
 export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0rc2-py2-none-any.whl
and upgraded in my linux machine i get  following error

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/tensorflow/init.py", line 23, in
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 21, in
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow')
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named _pywrap_tensorflow

Please install a later version, 0.11 may have some issues, may be incompatible with the latestruntimes, we have not ran any tests on that pip package for almost a year now.

i am getting below error after installation of tensorflow :
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\python38\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\python38\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "chatgui.py", line 7, in
from keras.models import load_model
File "C:\python38\lib\site-packages\keras_init_.py", line 3, in
from . import utils
File "C:\python38\lib\site-packages\keras\utils_init_.py", line 6, in
from . import conv_utils
File "C:\python38\lib\site-packages\keras\utils\conv_utils.py", line 9, in
from .. import backend as K
File "C:\python38\lib\site-packages\keras\backend_init_.py", line 1, in
from .load_backend import epsilon
File "C:\python38\lib\site-packages\keras\backend\load_backend.py", line 90, in
from .tensorflow_backend import *
File "C:\python38\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in
import tensorflow as tf
File "C:\python38\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import *
File "C:\python38\lib\site-packages\tensorflow\python_init_.py", line 60, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\python38\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\python38\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
Error importing tensorflow.  Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

Please open a new issue, filling in the template. and posting the error logs using markdown markup (see the M and the down arrow button just above the green "Comment" button, click on it for a primer)
Note that we don't have a pip released for python3.8.

I have installed python 3.7, Keras 2.4.3, and TensorFlow 1.0.0
now upgraded version
pip install --upgrade tensorflow but still have the same version
Requirement already up-to-date: tensorflow in c:\programdata\anaconda3\lib\site-packages (1.0.0)
Requirement already satisfied, skipping upgrade: six>=1.10.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.14.0)
Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.18.1)
Requirement already satisfied, skipping upgrade: protobuf>=3.1.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (3.11.3)
Requirement already satisfied, skipping upgrade: wheel>=0.26 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.34.2)
Requirement already satisfied, skipping upgrade: setuptools in c:\programdata\anaconda3\lib\site-packages (from protobuf>=3.1.0->tensorflow) (45.2.0.post20200210)
Note: you may need to restart the kernel to use updated packages.
======== If import the keras then show the error ==========
import keras
ImportError                               Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in swig_import_helper()
17         try:
---> 18             fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
19         except ImportError:
C:\ProgramData\Anaconda3\lib\imp.py in find_module(name, path)
295     else:
--> 296         raise ImportError(_ERR_MSG.format(name), name=name)
297
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
ModuleNotFoundError                       Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python_init_.py in
65     # use dlopen() for dynamic loading.
---> 66     from tensorflow.python import pywrap_tensorflow
67 except ImportError:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in
27             return _mod
---> 28     _pywrap_tensorflow = swig_import_helper()
29     del swig_import_helper
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in swig_import_helper()
19         except ImportError:
---> 20             import _pywrap_tensorflow
21             return _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
ImportError                               Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\keras_init_.py in
2 try:
----> 3     from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_init_.py in
23 # pylint: disable=wildcard-import
---> 24 from tensorflow.python import *
25 # pylint: enable=wildcard-import
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python_init_.py in
71 above this error message when asking for help.""" % traceback.format_exc()
---> 72   raise ImportError(msg)
73
ImportError: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\ProgramData\Anaconda3\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python_init_.py", line 66, in
from tensorflow.python import pywrap_tensorflow
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
Failed to load the native TensorFlow runtime.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
During handling of the above exception, another exception occurred:
ImportError                               Traceback (most recent call last)
 in
----> 1 import keras
C:\ProgramData\Anaconda3\lib\site-packages\keras_init_.py in
4 except ImportError:
5     raise ImportError(
----> 6         'Keras requires TensorFlow 2.2 or higher. '
7         'Install TensorFlow via pip install tensorflow')
8
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow

I also have MSVCP140.DLL

I have installed python 3.7, Keras 2.4.3, and TensorFlow 1.0.0
now upgraded version
pip install --upgrade tensorflow but still have the same version
Requirement already up-to-date: tensorflow in c:\programdata\anaconda3\lib\site-packages (1.0.0)
Requirement already satisfied, skipping upgrade: six>=1.10.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.14.0)
Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.18.1)
Requirement already satisfied, skipping upgrade: protobuf>=3.1.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (3.11.3)
Requirement already satisfied, skipping upgrade: wheel>=0.26 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.34.2)
Requirement already satisfied, skipping upgrade: setuptools in c:\programdata\anaconda3\lib\site-packages (from protobuf>=3.1.0->tensorflow) (45.2.0.post20200210)
Note: you may need to restart the kernel to use updated packages.
=### ======= If import the keras then show the error ==========
import keras
ImportError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in swig_import_helper()
17 try:
---> 18 fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
19 except ImportError:
C:\ProgramData\Anaconda3\lib\imp.py in find_module(name, path)
295 else:
--> 296 raise ImportError(_ERR_MSG.format(name), name=name)
297
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python__init__.py in
65 # use dlopen() for dynamic loading.
---> 66 from tensorflow.python import pywrap_tensorflow
67 except ImportError:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in
27 return _mod
---> 28 _pywrap_tensorflow = swig_import_helper()
29 del swig_import_helper
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in swig_import_helper()
19 except ImportError:
---> 20 import _pywrap_tensorflow
21 return _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\keras__init__.py in
2 try:
----> 3 from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow__init__.py in
23 # pylint: disable=wildcard-import
---> 24 from tensorflow.python import *
25 # pylint: enable=wildcard-import
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python__init__.py in
71 above this error message when asking for help.""" % traceback.format_exc()
---> 72 raise ImportError(msg)
73
ImportError: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\ProgramData\Anaconda3\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python__init__.py", line 66, in
from tensorflow.python import pywrap_tensorflow
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
Failed to load the native TensorFlow runtime.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
in
----> 1 import keras
C:\ProgramData\Anaconda3\lib\site-packages\keras__init__.py in
4 except ImportError:
5 raise ImportError(
----> 6 'Keras requires TensorFlow 2.2 or higher. '
7 'Install TensorFlow via pip install tensorflow')
8
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow

I also have MSVCP140.DLL file in my C:\windows\system32\ location


Soft affinity

Positive soft affinity via ==~, negative soft affinity via !=~
Todo:

[x] more specs
[x] docs

Fixes #2490

Design wise looks pretty good IMO. Need to take another look when todos are done.

@jnummelin PTAL


tons of console errors

Not sure now... Just did an empty cache/hard reload and now I see no errors....

Yes, that is a bug in ApexCharts, I can't do anything about it unfortunately :(. You can ignore them.
It happens mainly when you have null data in the time line.

Yes, that is a bug in ApexCharts, I can't do anything about it unfortunately :(. You can ignore them.
It happens mainly when you have null data in the time line.

add an option to delete null points

I'm in the latest version and still seeing these errors (10's of thousands of them!)

It happened again also on my side. It's not breaking anything, so I'll keep this opened. Maybe it will solve itself in the future while upgrading the library.

just found this and updated and yes, I do believe the errors have disappeared ;-)
thx!

Cool thanks for the feedback :)

right. I ofc shouldn't have been so quick....

and the odd thing is, this happens on pages even without a single apexchart card...
so sorry

Same here with v2.0.4
update_interval is 1min or 15min.

made a dirty hack to get rid of most of the spam Log. Only drops an console error when leaving a page that contains an apex card.
/www/communty/apexchart-card/apexchartcard.js
Delete the GZ file and edit ABOVE file
!!!!!!!!!!!!!!!!MAKE BACKUP OF THE FILE!!!!!!!!!!!!!!!!!!!
Use a unminify tool like to make it more readable: https://www.unminify2.com/

Line: 8661:
replace
for (var o in t) t.hasOwnProperty(o) && e.setAttribute(o, t[o])
with
for (var o in t) t.hasOwnProperty(o) && !String(t[o]).includes("NaN") && e.setAttribute(o, t[o])
Line: 23394:
Insert new line before "stroke-width" == e ? this.attr("stroke",......................
containing
if (String(t).includes("NaN")) return null;
Save and do a hard refresh (this is hardest part), i had to alter resources under settings- dashboard and change the number in the back of the url.

Btw for those not comfortable editing the JS file.
Attached here is a copy, replace in /homeassistant/www/community/apexcharts-card/apexcharts-card.js (rename remove .txt extension)
apexcharts-card.js.txt
WARNING its not minimized so slightly bigger than orginal (minify yourself)
Reduces the spam a lot.


Issue #SB-1779 feat:Content Creation tooling (Data driven forms)

@harishgilimi

@vbrajath  send two prs one for creation tooling another for health check


domain mapping failed

Expected behavior
Map my existing domain name to Begin app
Description of bug
In the first domain mapping step, after I enter my domain names for production and staging environment, I get the following error message:

TypeError: Cannot read property 'account' of undefined
TypeError: Cannot read property 'account' of undefined
at requestCertificate (/var/task/node_modules/@architect/shared/_request-certificate.js:7:27)
at Object.request (/var/task/index.js:33:3)
at Object._iter (/var/task/node_modules/@architect/functions/src/http/_request.js:73:12)
at Object.create (/var/task/index.js:25:5)
at Object._iter (/var/task/node_modules/@architect/functions/src/http/_request.js:73:12)
at done (/var/task/node_modules/@architect/shared/middleware/auth.js:28:11)
at Response._get (/var/task/node_modules/@architect/data/_init.js:36:14)
at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:364:18)
at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)

Steps to reproduce
Detailed steps to reproduce the behavior:

Go to Domain section
Fill the form for production and staging domain name
Click on the Generate SSL certificates button
See error

Desktop

OS: Ubuntu 17.10
Browser: Chrome version 66.0.3359.139 (Official Build) (64-bit)

@bind-almir oy, that sucks. We're looking into it, please stand by!

@bind-almir pushed a fix, please give mapping your domain another go! 🤗

@bind-almir, glad we got that fixed! Sorry about that.
Is the domain you're using in this case already being used with AWS Certificate Manager in your AWS account?
If so that may be what's preventing things from working as it would conflict between AWS accounts, but it's hard to say without digging into this a bit further – and that will probably require some information that you probably don't want here in a public GitHub issue.
I'm going to open a private support issue on your behalf with the email we have on file and we'll go from there!

Hello again :)
Thank you very much for your support. I am sorry that I am re-opening the issue. I feel it's convenient to continue on the same thread.
Production and staging domains are verified, now after I click on the button "Create domain distribution", step 3 throws an error:

TypeError: Cannot read property 'appID' of undefined
TypeError: Cannot read property 'appID' of undefined
at createCloudFrontDistribution (/var/task/node_modules/@architect/shared/_create-cloudfront-distributions.js:26:26)
at Object.create (/var/task/index.js:12:5)
at Object._iter (/var/task/node_modules/@architect/functions/src/http/_request.js:73:12)
at done (/var/task/node_modules/@architect/shared/middleware/auth.js:28:11)
at Response._get (/var/task/node_modules/@architect/data/_init.js:36:14)
at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:364:18)
at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)

Hey there, this is the right spot – will reopen and look into it! Sorry you've hit every branch on the way down with this one.

Ok, I just pushed a fix for this. When we released this feature it was working, but there were a couple of regressions, and you caught both of them. Which means the good news is: as far as I can tell, there are no more places for us to break you in this flow! Heh.
Again, thank you very much for your patience.
I tested the flow end to end before releasing to production and it worked perfectly; the fix is now live, and I'm testing it again in prod, too. (Since it's DNS a full test pass on this can take 10-60 minutes, so I'll check back if I notice anything is amiss.)
To put a bow on this: just go back to the domains page, hit that Create domain distribution button one more time, and you should be good to go to complete your domain setup!


Apparently inconsistent ImageBuffer bufferSize() values?

Hello TIS people.
We have 2 DFK33 GX545 cameras, apparently configured to use a width/height of 1280x192 using BGR8  running on Windows 10 and Windows 11. Both use the latest IC4 runtime with version <IP_ADDRESS>6
When a frame is received the buffer size is checked to detect external modifications to width/height etc.
On the Win10 machine this works correctly with 1280*192*3 = a 737280 byte buffer. The calculated value (expected) matches the reported value of 737280.
On the Windows 11 system the buffer set up is identical  but bufferSize() reports a value of 737616.
In both cases stride is identical at 3840px
Any thoughts? Please ask if more information is required.
Thanks
Jerry.

Hello there Tim
Excellent work. I shall check it out. Thank you.

Yes, chunk mode is the culprit.
Thanks again Tim,
great support.


Pipelines need to support target namespace as a parameter

While attempting to build a new Appsody application using a Kabanero pipeline, I noticed that all applications end up getting deployed to the same cluster namespace where the pipeline is running, without an option to indicate the desired target namespace for the application.
As a workaround, I see app developers hardcoding the target namespace of a specific cluster into the app-deploy.yaml file of the Appsody application and checking it into the Git repo for the app (see #77) . That means applications must be hardcoded to one specific target deployment, which means applications cannot be reused anywhere else unless the administrators for all target clusters agree on the namespaces for all applications that must be connected to one another and reconfigure all of their specific operators (E.g. Istio) to work on all those namespaces.
In short, requiring applications to hardcode namespaces make them virtually unusable, so we need the pipelines to accept the target namespace as a parameter.

Our plan is provide a set of deploy pipelines that will work with gitops in the near future.  I think that will address the concerns that you have raised.

Plan is to address this via gitops by work in this epic: https://github.com/kabanero-io/kabanero-pipelines/issues/255


Convert to JS

Do we really want to use ASI? I'm personally :-1: due to obvious reasons related to well known issues with ASI. Always explicitly using semicolons never causes any problems, but omitting them frequently does, hence I suggest that omitting them is not worth it.
I'll gladly add the semicolons myself.

I agree with @thomasjo on this - I desperately want to not use semicolons in JS, but ASI (at least as implemented by every JS interpreter) is janky as hell. One of the cases I'd expect us to run into a lot is with array destructuring, if we did something like:
let [thing, thing2] = arrayOfThings
[thing] = otherArrayOfThing

It would be interpreted as:
let [thing, thing2] = arrayOfThings[thing] = otherArrayOfThing

Which could be avoided by prepending that like with a ;, but that would be awful.
One thing I'd still like to do one of these days would be to write a Babel plugin that does ASI for you with a much better algorithm, but until such a plugin exists, I think our code would be safer and more consistent by just using semicolons everywhere, unfortunately. :confused:


Pool detail page - show gamm share equivalent values

6/10 austin wework co-work sesh - we've (@victortokaito and I) realized the GAMM/x concept is a bit of a complex concept to expose to the average (even advanced) user.
We think it would be good to still show it, but instead, primarily showing the equivalent value of the tokens comprising the shares. As we see for the fiat value of amounts in the assets table, we could show the token equivalents in the bold font above the gamm share amount in the faint font below.
Simple design as we're copying the assets table amounts, but there may be room to design for cramped UIs.

6/28 sprint planning -
Recent design work by victor-

Concerned with wrapping, also introduces LP-share vs gamm as user-facing concept.
Blocked Victor thinks it's still valuable, just needs to think more about design. Low priority.


[FLINK-25015][Table SQL] Use SQL string as jobName for DQL jobs submitted by sql-gateway

What is the purpose of the change
when submitting DQL jobs, the job name should not always be 'collect'. Using sql as the job name will improve the usability.
Brief change log

use 'QueryOperation#asSerializableString()' as the JobName for DQL jobs submitted by sql-gateway

Verifying this change

Added unit test 'QueryOperationSqlSerializationTest#testSqlAsJobNameForQueryOperation' to verify the logic using sql as job name

Test manually by submitting queries SQL Client, the jobName changes to sql

Does this pull request potentially affect one of the following parts:

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

Documentation

Does this pull request introduce a new feature? no

@flinkbot run azure

Hi @libenchao @KarmaGYZ , can you kindly help review this when you have time?

LGTM


Add select multiple projects activation

Could you please add the possibility to select multiple projects that plugin will interact with? It's annoying that I have to select checkboxes in every new project I create (https://plugins.jetbrains.com/plugin/7642-save-actions#comment=24764)

This is the opposite of #10 (maybe add an option "apply to all projects")

Please make this an option, we really need it, @dubreuia .

Hey @smartwjw, I won't have time anytime soon, but you can always submit a PR for it. Thanks.


Make script compatibel with PowerShell 5.1

Make script compatibel with PowerShell 5.1: https://www.reddit.com/r/PowerShell/comments/occgr2/powershell_script_for_checking_spf_dkim_and_dmarc/h3tk0yt?utm_source=share&utm_medium=web2x&context=3

Fixed in version 1.4


[1.10.2] Crash on Post-Init with latest The One Probe installed

Issue Description:
With latest EnderIo-beta and latest The One Probe MC crashes at start.
Maybe a TOP problem? Will x-post.
What happens:
MC crashes while post-initializing
What you expected to happen:
Playing as normal
Steps to reproduce:

Install Forge
Install Ender IO + EnderCore
Install TOP
Play (at least try)
Crash on startup

Affected Versions (Do not use "latest"):

EnderIO: <IP_ADDRESS>
EnderCore: <IP_ADDRESS>
Minecraft: 1.10.2
Forge: 2089+ (tested on 2089 and 2092)

Your most recent log file where the issue was present:
http://pastebin.com/86ZA40i8

Confirming same crash. Downgrading EnderIO resolves conflict.
The One Probe: <IP_ADDRESS>.1
McJtyLib: <IP_ADDRESS>.1
EnderIO: <IP_ADDRESS>
EnderCore: <IP_ADDRESS>
Minecraft: 1.10.2
Forge: 2092
http://pastebin.com/FM0gpHAp

Will be fixed in next build.
And btw, here we see the whole idiocy of using Optionals to avoid NPEs...there will just be another exception and no compiler warning about it.

Using Optionals incorrectly

I have already handled this better in the next (not yet released) version of The One Probe


Builder pattern needed?

Hi,
Since node/javascript does not have the problem that a builder pattern fixes, since you can just pass along an object literal, why would you want to apply all this overhead?
If we take a look at the example: https://github.com/torokmark/design_patterns_in_typescript/blob/master/builder/builder.ts
We could just use an object literal instead:
// user.js
const create = args => {
  const options = Object.assign({}, defaultOptions, args); // Normalize the options
  return {
    name: options.name,
    age: options.age,
    phone: options.phone,
    address: options.address
  }
}

module.exports.create = create;

// test.js
const user = require('user.js');

const myUser = user.create({
  name: 'a name',
  age: 30
});

This achieves the same thing as the builder pattern. The main difference here is that user.js is a lot smaller than the builder.ts example.  (10 lines vs 60+)
Passing along an object literal, which is very common in node, is just as readable as with a builder, but with a lot less overhead or boilerplate.
So my question is: why would you do this?

One use case I've come across (I'm going to try and dig up a really good blog post about this as well), is for when creating mock data in unit tests.
I used to do this very much like your above example.
e.g.
let createUser;

beforeEach(() => {
    createUser = () => {
        return {
            username: 'bob.smith',
            email<EMAIL_ADDRESS>            accountType: ACCOUNT_TYPES.DEVELOPER
       };
    };
}));

// some spec

it('should do something', () => {
    const user = createUser();
});

This is all well and good, but what if we don't always want to test against a "developer" user. Well, we could do something like you suggested and pass in an object to override the parameters, or use individual parameters (e.g. createUser => (username) => {}).
This is fine, but if you often find yourself having to modify the default/generic object in order to obtain a useful object to test against, you can end up with lots of:
const user = createUser({
    accountType: ACCOUNT_TYPES.ADMIN,
    username: 'some.user'
});

// ...

const user = createUser({
    accountType: ACCOUNT_TYPES.ADMIN,
    username: 'some.user'
});

// ...etc...

That seems fine in isolation, but if each of those definitions is really saying "create me an admin user", then that would be better abstracted to a createAdminUser function, which sets the admin defaults and allows overrides, similar to createUser.
In a simple example like this, it's probably more overhead that it's worth to do anything more complicated than that.
If, such as in a real, complicated application, you're needing to create users in a lot of different places (read: a lot of different tests), the above can quickly get repetitive and you can end up with lots of these types of functions littered through the test suite. In such a situation, having a generalised "userBuilder" can help reduce duplication through the tests.
Much of this can be applicable to non-test code, too, but I'm specifically focussing on that as it's what I found most useful.
Apologies for the slight incoherence, trying to type out this quickly during the downtime of waiting for something to compile...
A really good blog post on this is: http://davedevelopment.co.uk/2015/01/28/test-data-builders.html
The examples in that blog post are all PHP, but it's just as relevant here. Especially if you want to work with immutable data (though not a prerequisite to this being useful).

TL;DR: For a very small or very simple use cases, it introduces overhead that almost certainly isn't worth it. But the same can be said of most abstractions. (One of?) the benefits comes with reducing complexity and repetitiveness in larger and more complicated use cases.

Thanks for the quick response!
I am kinda struggling to see where a builder would be easier for testing.
Similar to where I have to create my object to create a user, you would also have to build your object with the builder.
so instead of:
const user = createUser({
    accountType: ACCOUNT_TYPES.ADMIN,
    username: 'some.user'
});

you would need to do something like:
const user = User(User.Builder('some.user').withAccountType(ACCOUNT_TYPES.ADMIN))

So I do not see the benefit of that in testing.
If I needed a specific admin user for multiple tests, I would just create an admin user with the correct options.
You would also need to create this admin user if you were to use the builder pattern.
So yes, I am still struggling to see 'why' :)

The main idea behind Software Design Patterns is that instancialization of an class object should be invisible  because instancialization the least you should worry about in a complex structure.
let us say you wanted to add a log.. that contains all created user. if you were to use
const user = new User()
then everytime you have to do
GlobalLog.addUser(user)
then maybe you are only using it for debugging so
if(GlobalDebug)GlobalLog.addUser(user);
however if you use a structural pattern the one who instancialization it will do so and you wont have to do the very same trick for every file you have an instance in.
Now you will ask why dont I do that in the User Class... let me know how long it will take you to do it all over the whole system

I would never use a class in the first place when a simple object literal and simple functions can do the job. hence I do not need to create anything with the new keywords. Don't forget this is JavaScript. It does not have to be or look like Java

this example is all about typescript not plain javascript if you are moer into object literals then there is indeed no point in builders or any other design pattern... plain old javascript is not an OOP and this pattern is for OOP. so yes if you are more into object literals then this is not usable at all..you do not need it

@msqaddura , in javascript you have the choice to do OOP or functional. And I think you are missing the point. I was trying to find an answer to the following question:

Why would you use a builder pattern when using plain javascript object literals gives you the same readability and the same functionality, but without any of the overhead or boilerplate.

I am not trying to attack any patterns here, I just do not think it belongs in every language. And since TypeScript is merely a superset of javascript, it is still javascript.
And as per definition of the builder pattern, the problem it is trying to solve is not present in javascript.

man I believe you are completely our of the context between Prototyping(apparently your style), Object Oriented(apparently not your style), Functional(everyone's style that doesnt really matter)... what am saying is just that for you and the way you look at javascript (over a typescript code) you do not need any pattern it wont help you anyway... unless you are hardcore Object Oriented with javascript/typescript then you can use a pattern but for you it is absolutely no point to bother about a pattern.
just because there is a pattern it doesnt really mean that we have to use it everywhere... it can only make things worse if we are forcing it into something that is not meant for it.
I do use builders with typescript but ONLY when I have the urge and that was building a CMS you can imagine a an form tag  can take billions of options and CMS users should really bother about the way am handling it... something like {"type":"tag","family":"form","actions:[{beforeSubmit:"someFunctionILike"}]....

https://github.com/joelpalmer/Typescript--Builder-Pattern
please look at this example it should completely answer your original question that we drifted from.
var myRequest = new scope.Utils.RequestBuilder("get").setScheme("http").setPath("mypath").setHost("localhost").setPort("9999").build();
without a builder it would be
var myRequest = new Get("http","myPath","localHost",9999)
and cards constructor would be constructor(Scheme="http",path="myPath"......)
we can add destructing pattern over here for default values
constructor({Scheme="http",...})//ntices we wrapped it weith json tab
so yes you can fiddle it down to literal objects but once change in superior constructor will have to be done to all constructors super() call... but with builder you would just need to change the method in the superior class... again you can find a way to simplify so it is always like this... you can always find your way out

@msqaddura you lost me at 'superior constructor'.

Favor composition over class inheritance

Never would I fall in the trap of extending, so never would I have the issue you just described.
And your example is again an example of how a Java person would write node. Just take a look at the 'request' module and see how it is done generally in node: https://github.com/request/request
// You would do:
request.get({
  host: 'localhost',
  port: 9999,
  path: 'mypaeh'
}, callback)

// not
new Get("http","myPath","localHost",9999)

The only  reason why you are finding these issues is because you are not coming up with common nodejs/javascript examples. You find the problems by using javascript as if it was java.

you can still do it with something like
var options = {
   method: 'get',
   scheme: 'http',
   host: 'localhost',
   port: 9999
};
var request = createRequest(options);

and you don't need the 200 lines of code https://github.com/joelpalmer/Typescript--Builder-Pattern/blob/master/RequestBuilder/RequestBuilder.ts
you would need something like @jruts said here: https://github.com/torokmark/design_patterns_in_typescript/issues/6#issuecomment-284765974

do you know the difference between javascript and typescript? I think you are asking the question on a typescript page while you are waiting for the answer in a javascript page. If so, then i believe we are both getting each another differently...

typescript adds types to javascript, it doesn't mean you have to forget about javascript essence

I dont want to live in this planet anymore :D first read, then ask

Typescript is a superset of javascript. Which means plain javascript is valid typescript. The benefit that typescript gives you is nice IDE support like auto-completion and compile errors. You could easily write a definition for the object literal you want to pass along and it would be valid javascript with the typescript benefits.
But let's make it very clear, adding typescript does not mean this language becomes Java and it does not mean you should treat it in the same way.
By adding typescript for it's benefits to then add all the complexity of design patterns that you do not need kinda defeats the purpose for me.

add to types: modules & classes & interface

I recommend closing the issue as it is going more into argument than a solution.

@msqaddura really... all I want to do is open a discussion where we could all learn from, yet you fail to address anything I mentioned in my comment and post a picture of what AtScript is?
I do sense you are being very defensive but fail to come up with real examples or benefits. Even the examples you post in pure javascript clearly indicate that you have no great experience with pure javascript at all.
All I was hoping for was a conclusion to my question as to why would I ever use a builder pattern as a javascript developer. There is no need for childish discussion.

that is what am saying, no need for childish discussion


feat: Support legacy entreprise users

Description

Related Issue(s)

#652

Verification

[ ] Your code builds clean without any errors or warnings
[ ] Manual testing done (required)
[ ] Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

[ ] Documentation is updated (either in docs-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)

Note that this branch has some issues, as I realized we needed to change some things after I wrote the initial implementation

"Enterprise" user type, ie. a "pure" Maskinporten authenticated user without any additional claims indicating a service owner or a human, is not something we will support (should cause a 401 error)
"Service Owner" user type is indicated by the presence of the dialogporten.serviceprovider scope, and not the "org"-claim in the token (which is a Altinn-ism). We should still rely on altinn-orgs.json for name resolution.
This means the party name lookup refactor is not really needed, as we will only need that for person name lookups and not organization name lookups

#768


Update prometheus and grafana libs

Hi,
We are still using an outdated version of Prometheus and Grafana libs in this charm. Can we update it to a more recent version, to cover gh#262?

libs are updated in this pr. Closing this issue


Nick: Watch astuteanalytica.com

Nick requests the watch of the watch_keyword astuteanalytica\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

astuteanalytica\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by cocomac in Charcoal HQ


fix: string formatting in delete_user

The delete user method is not working.
This seems to be due to a leftover from javascript style string formatting (dollar sign).
Proposed edits.
These seem to work in the case of my local development environment.

@songololo thank you very much for your contribution


Add Checkstyle

We should add Checkstyle so that we have a Java based linter.

Initial version done that uses Google style.


[incubator-kie-drools-5938] [new-parser] Tests using wrong duration a…

…ttribute format
Issue:

https://github.com/apache/incubator-kie-drools/issues/5937

I choose the approach to meet the same approach as old parser --- use intOrChunkAttribute.

@yurloc @mariofusco @gitgabrio Please review, thanks!


MRG, MAINT: DRY code

While looking at #6403 I realized our 3D backend code / testing infrastructure could be simplified:

yield mne.viz.renderer instead of plain yield to give us access to the renderer functionality directly (no need for most import statements in tests anymore)
Rename backends_3d to renderer to reflect what the fixture will actually yield
DRY code for importing by using a dict lookup and importlib call rather than duplicated functions in conditional branchesfrom ._whatever import ...
Add a private _close_all() function to each module that will close all open figures (this was used a lot in the 3D code)

Currently only mayavi supports (4) but we should inquire with pyvista if there is a way to keep track. If not, we might want to have a way of tracking Renderer-created figures, at least within a context manager for testing purposes. I think right now we are accumulating pyvista figures (?) which would not be so good memory or OpenGL-wise.

@GuillaumeFavelier this is for you :)

This is neat! I agree this will greatly simplify the tests. I tried it locally and the DRY code works for me. With this we wont have all the LGTM unused import messages too.
For _close_all we can see how to implement it for each 3d backend and keeping track of the active figures is a way to tacke this.

@larsoner you need to fix conflicts.
@GuillaumeFavelier ok to merge?

Yes, I'm okay for having this merged.

I've rebased. This should be green.

Thanks for the reviews and rebase


Is Python >=3.10 really required?

Bug Description
Not actually a bug, but didn't know how else to make this request. Is Python >=3.10 really required? I have a project where this is a dependancy so it is forcing my project to require >3.10. Just wondering if this could be dialled back a bit for better compatibility. Thanks
The operating system on which the bug occured
Mac OS
Python Version
3.10

Hi @ctdegroot, thanks for your issue! We chose this version because of ease (it was the latest version available when we started this project, not a good reason....). We'll look into how far back we can go but it will be at least version 3.x.x. For our information, what version of Python are you using?

I was using 3.9 but did upgrade to 3.10 to use this in my code. It would be great if you could go back to 3.8 if possible, since that is what I had set up for my continuous integration pipeline (which now fails due to this dependency). Just wanting to avoid pinning to a newer version for dependency reasons, unless required. Thanks for looking into it :)

NVM, after talking to @zargot we're on 3.10 because of the assertNoLogs function. We're going to try to see if we can replace that with something else. Since that's only used for the tests, the library code should theoretically work for versions before 3.10.

@ctdegroot, no worries, it's a good enhancement. We're aiming to have it done next week, if not earlier. In the meantime you can try this (work in progress) branch: 210-python-version

Forgot to close this. This issue should now be fixed in dev. Let us know if there are any more issues, @ctdegroot.


panic: unable to fetch local commits

I replicates the readme example and I got this error, I generated two tokens just in case with repo scope, but the same error arises.
panic: unable to fetch local commits

goroutine 1 [running]:
github.com/ejoffe/spr/spr.(*stackediff).getLocalCommitStack(0x90a6780, 0x83d0104, 0x29, 0x95c60f0)
        /Users/eitan/Code/spr/spr/spr.go:263 +0x213
github.com/ejoffe/spr/spr.(*stackediff).UpdatePullRequests(0x90a6780, 0x8437fac, 0x901a0e0)
        /Users/eitan/Code/spr/spr/spr.go:89 +0xaa
main.main.func3(0x9097260, 0x2, 0x2)
        /Users/eitan/Code/spr/cmd/spr/main.go:139 +0x2e
github.com/urfave/cli/v2.(*Command).Run(0x90d1b00, 0x90971c0, 0x0, 0x0)
        /Users/eitan/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 +0x3c4
github.com/urfave/cli/v2.(*App).RunContext(0x9098680, 0x8437fac, 0x901a0e0, 0x910a000, 0x2, 0x2, 0x0, 0x0)
        /Users/eitan/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 +0x651
github.com/urfave/cli/v2.(*App).Run(...)
        /Users/eitan/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224
main.main()
        /Users/eitan/Code/spr/cmd/spr/main.go:174 +0xa26

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic
git version 2.33.0

@acabreragnz - is it tomorrow yet? where you able to get it working?

I'm sorry @ejoffe, lot of work from my side. I suppose is something in my machine let me close it, and I'll re-open it if it happens again.


Feature/mpi halo resize

Description
Changes to update tests for compatibility with atlas 0.38.1 Disable tests of halo resize until we get the new atlas-orca mesh generator halo = 1.
Issue(s) addressed

Part of https://github.com/ecmwf/atlas-orca/issues/19
Fixes https://github.com/MetOffice/orca-jedi/issues/53

Dependencies

[x] jjdocs change for testing in sith https://github.com/MetOffice/jjdocs/pull/167
[x] Fix to properly wrap periodic cells during interpolation https://github.com/ecmwf/atlas/pull/211

build-group=https://github.com/ecmwf/atlas-orca/pull/20
build-group=https://github.com/ecmwf/atlas/pull/211
Impact
Enable domain distributed MPI for improved performance of high resolution models.
Testing

[x] spice_ostia configuration on spice
[x] spice_ocnd configuration on spice
[x] spice_ocnd_nosubsample configuration on spice
[x] spice_ocnd_eorca12 configuration on spice
[x] spice_ocnd_eorca12_nosubsample configuration on spice
[x] spice_gl_ocn configuration on spice
[x] spice_gl_ocn_nosubsample configuration on spice
[x] xc_ostia configuration on xc
[x] xc_ocnd configuration on xc
[x] xc_ocnd_nosubsample configuration on xc
[x] xc_ocnd_eorca12 configuration on xc
[x] xc_ocnd_eorca12_nosubsample configuration on xc
[x] xc_gl_ocn configuration on xc
[x] xc_gl_ocn_nosubsample configuration on xc
[x] I have updated the unit tests to cover the change
[x] New functions are documented briefly via Doxygen comments in the code
[x] I have linted my code using cpplint
[x] I have run the unit tests
[x] I have run mo-bundle to check integration with the rest of JEDI and run the unit tests under all environments

Closing this one as it is superceded by the approach in MetOffice/orca-jedi/issues/109


[firebase_analytics]: iOS 13 required?

Is there an existing issue for this?

[X] I have searched the existing issues.

Which plugins are affected?
Analytics
Which platforms are affected?
iOS
Description
After last update, firebase_analytics required iOS 13:
The pod "Firebase/Analytics" required by the plugin "firebase_analytics" requires a higher minimum iOS deployment version than the plugin's reported minimum version.
Flutter is compatible with iOS 12. It makes no sense whatsoever to require a higher iOS version than Flutter itself.
We would lose more than 15 thousand users by forcing an iOS 13 update right now!
Reproducing the issue
Just update the project
Firebase Core version
3.0.0
Flutter Version
3.22.1
Relevant Log Output
No response
Flutter dependencies
No response
Additional context and comments
No response

Yea, there are cases when packages may have different target versions from what Flutter can handle by default. Sure, for a simple wrapper packages that don't even have platform-specific implementations, it doesn't make sense to max out these versions. However, things like analytics must evolve at some point together with very deep-native API of OSs.
I would say it's about time. From what I know, Stripe, Mixpanel are also already on 13+.
Yeah, the team is not very elaborate about the reasoning behind the bump, but whatever. It's understandable.
I mean, you still have a totally viable option just not to upgrade. Your apps stop working any time soon. And I doubt you have any amazing features in mind that you need right now from the latest releases. So, yeah, a decision for you to make.

For Firebase iOS SDK 11 it would require a bump to iOS 13, that's why flutterfire have bumped the iOS version.


Find out how to connect to Bluetooth devices within Xamarin in order to assign label to BLE devices in proximity

User story

As a user
I want / need to track up to two BLE devices
So that I can detect the devices and can assign labels

Acceptance criteria

Detection of the devices
Track location of two devices
Assign labels to devices such as "hearing aid"
research regarding signal strength

Definition of done (DoD)

TBD

A summary of my findings
It seems that, while it is possible to access the Bluetooth-functionality of both platforms in the respective platform-specific projects (FindMyBLEDevice.Android and FindMyBLEDevice.iOS), Xamarin does not provide a platform-independent Interface for use in the core project (FindMyBLEDevice). There are, however, independent libraries that add this independence.
This means, we have two options:

Implement the Bluetooth-functionality we need for both platforms individually, with a common interface, and access this interface from the core project. (This should be what these libraries do.)
Use a library that does this.

The following is a list of such possible libraries, each accompanied by an article that uses it in an example.
Note that even if a library in this list is eliminated from being potentially used by us, each article is still worth reading in order to gain a better understanding of how Bluetooth works.

Library: https://github.com/aritchie/bluetoothle

Article: https://servocode.com/blog/servocode.com/blog/bluetooth-le-for-xamarin.forms-how-to-control-things-from-the-level-of-mobile-app
License: MIT
Note: This library is currently moving to the Shiny Framework (next library below), support currently remains, but will probably end sometime in the future

Library: https://github.com/shinyorg/Shiny

Article: https://blog.noser.com/bluetooth-low-energy-in-xamarin-app-ein-projektbericht/
License: MIT
Note: I'm not 100% sure whether this library is still in beta or fully released. It does however also come with Location-services (GPS, Geofencing, & Activity Monitoring), so we could hit two birds with one stone.

Library: https://github.com/tbrushwyler/Xamarin.BluetoothLE

Article: https://medium.com/enigmamx/how-to-integrate-bluetooth-le-in-xamarin-forms-2dcdf974703a
License: MIT

Library: https://github.com/xabre/xamarin-bluetooth-le

Article: https://www.jenx.si/2020/08/13/bluetooth-low-energy-uart-service-with-xamarin-forms/
License: Apache-2.0

Concerning how to measure the signal strength:
This is indicated via the Received Signal Strength Indicator (RSSI). The RSSI-value is a real number in decibel and is generally negative, meaning that the signal is weaker at the receiver than it was at the sender (0 would mean perfect transmission, positive would mean it is being amplified).
The RSSI value can be measured not only for connected devices, but for every device that is visible to you: When scanning for devices in your vicinity, you send a broadcast-message out into the ether and every device that wants to be found sends a response message back to you. Through this response message, the RSSI value and therefore the signal strength to all of these visible devices is known.
Note, however, that the RSSI value may be more or less useful or even be unavailable, depending on the device! (see: https://stackoverflow.com/questions/2149776/android-irc-office-hours-question-about-android-bluetooth-rssi)
I haven't checked yet which of the above libraries allow reading the RSSI value, but I would be surprised if any of them don't.
tl;dr:
Xamarin does not have a platform-independent way of using bluetooth, so we can either write 2 different versions of platform-specific code, or use a library that adds a platform-independent interface. There are several options for such libraries.
Signal strength can be measured via the RSSI-value.


Rest call to get VM w/ InstanceViews frequently returns 429 http status code

We're using the Azure SDK for Java 1.0-beta1 to create and retrieve VM Scale Sets and their associated VM instances in Azure. When we try to retrieve the instance view via the following SDK API call:
VirtualMachineScaleSetVMsOperations.list(, , null, null, "instanceView"). body
which will call the following Rest API:
https://management.azure.com/subscriptions/3557e83a-4f9f-490d-b681-90ab48e42182/resourceGroups/_/providers/Microsoft.Compute/virtualMachineScaleSets/_/virtualMachines?$expand=instanceView&api-version=2015-06-15
We often receive a 429 response code from Azure. Per the response headers, the value for the x-ms-ratelimit-remaining-subscription-reads is usually just short of 15000.
If there are almost 15000 remaining reads in the subscription, why are we getting a 429?
Also, in the headers, there is the Retry-After value which as I understand indicates how long we should wait before trying again. In most cases, it returns 120 seconds for that value. There have been some instances however, where it has return 1200 seconds. Twenty minutes is an incredibly long time to wait before retrying, especially when we are trying to report back to the user the status of the VMs (via the instance view) associated with their scale set.
Finally, one thing worth noting is that we only see this when we query Azure for the Scale Set VMs. We have several other processes that are querying Azure for other resources (load balancers, networks, security groups, VM Images, etc.) on the same subscription and have yet to encounter a 429 response with any of those. Also, the frequency of 429 responses goes up when we include the "InstanceView" in the request.

@singhkay any thoughts on why this would be the case?
@binderjoe you might also be interested.

This needs input from @gbowerman

The reason these calls appear to be causing throttling is that the instance view list API calling is effectively doing a get instance view on each VM in the scale set, and each call counts against the maximum number allowed in the time interval for a subscription before throttling kicks in - I don't think the number is published but I believe you get in the thousands of calls per subscription per 3 minutes.
If you had a 100 VM scale set, one call to this API would count as 100 calls. If possible call individual VM instance calls for the VMs you need, or call this one as sparingly as possible to avoid throttling.

Hey Scott!
There are actually a variety of different throttles you can hit. In this case, odds are you're actually hitting a throttle on scale set reads, not subscription reads (so that's why you're getting throttled even though the remaining subscription reads number is so high). And as you point out, some of these throttles are short term, others long term (we have sliding windows of size 3 and 30 minutes). Medium-term we have some improvements planned to throttling behavior, but in the mean time we can probably help you avoid the throttles if we can understand your use case better. How frequently are you making the call above? And to what end?
@kirthik I can't seem to make myself assigned to this; could you assign me so I can keep track of this? :)

Closing due to inactivity.
Scott kindly feel to reopen if issue still exists


Make the author list in tutorial more welcome to contribution

The author list on the top of the tutorial may feel like set in the stones and people may feel like their names could be there if they contribute:

What could we do to make the author list more welcome to contribution? Adding a "+" / you/next contributor to show that new contributors are welcome there?

I had more in mind a greyed out "your name here". Not sure about clickable. What should it link to?

Or we could add CTA below the Authors - "Interested in contributing to this tutorial" and "become an author" link below it.

Such links would be useful definitely below the authors.

This is what I could think of right now but there are several other ways to spur people to contribute.

Do you have other suggestions there?

Do you want to try to implement something in this direction?

The structure of the layouts and includes is indeed quite confusing. Feel free to reach me on Gitter/Matrix if you need help

I didn't link this issue so it did not automatically close. @bebatut any help with this please?

Nice catch @Chinonyemildred. Thanks. I close it now.


token-2022: Add pod-compatible mint / account / multisig types

Problem
In order to use the Pod-compatible types in #6336, we need Pod-compatible base types.
Solution
Mostly copy-paste of the types in state.rs, but only using types that align to 1. Also introduces PodCOption<T> for a Pod-compatible COption
These will eventually be used for the extension tests.

All points should be addressed now, thanks for your careful review!


Error after use keyboard

After using the keyboard, all backwards screens, except for the nearest screen, were all pushed up and the topside of the contents are hidden after the header and cannot scroll down this part, which were hidden.  (Ex: when the screen is the third screen and open the keyboard by touching input text inside this screen, the first screen and even all the screen before the first screen occur error display)
Error occur on mobile phone.

I experienced sth simliar. In addition: If I click on an input and type one letter, the keyboard closes. If i click on the input again it opens and closes immediately. Then these 2 steps repeat infinitely. Impossibel to use like this... only on mobile.

+1