Fails to connect, unable to login. Database container on constant bootloop.

| [Wed Jul 10 07:16:05 2024] <IP_ADDRESS>:49348 [200]: POST /authenticate.php - Uncaught mysqli_sql_exception: Connection refused in /var/www/html/lib/MysqliDb/MysqliDb.php:323
php-dynamic-qrcode-php-dynamic-qrcode-1     | Stack trace:
php-dynamic-qrcode-php-dynamic-qrcode-1     | #0 [internal function]: mysqli->__construct('php-dynamic-qrc...', 'qrcode', Object(SensitiveParameterValue), 'qrcode', 3306, NULL)
php-dynamic-qrcode-php-dynamic-qrcode-1     | #1 /var/www/html/lib/MysqliDb/MysqliDb.php(323): ReflectionClass->newInstanceArgs(Array)
php-dynamic-qrcode-php-dynamic-qrcode-1     | #2 /var/www/html/lib/MysqliDb/MysqliDb.php(415): MysqliDb->connect('default')
php-dynamic-qrcode-php-dynamic-qrcode-1     | #3 /var/www/html/lib/MysqliDb/MysqliDb.php(1988): MysqliDb->mysqli()
php-dynamic-qrcode-php-dynamic-qrcode-1     | #4 /var/www/html/lib/MysqliDb/MysqliDb.php(1594): MysqliDb->_prepareQuery()
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | To do so, start the server, then issue the following command:
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | '/usr/bin/mariadb-secure-installation'
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | which will also give you the option of removing the test
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | databases and anonymous user created by default.  This is
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | strongly recommended for production servers.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | See the MariaDB Knowledgebase at https://mariadb.com/kb
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | Please report any problems at https://mariadb.org/jira
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | The latest information about MariaDB is available at https://mariadb.org/.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | Consider joining MariaDB's strong and vibrant community:
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | https://mariadb.org/get-involved/
php-dynamic-qrcode-php-dynamic-qrcode-db-1  |
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 07:17:21+00:00 [Note] [Entrypoint]: Database files initialized
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 07:17:21+00:00 [Note] [Entrypoint]: Starting temporary server
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:22 0 [Note] Starting MariaDB 11.2.2-MariaDB-1:11.2.2+maria~ubu2204 source revision 929532a9426d085111c24c63de9c23cc54382259 as process 109
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:22 0 [Note] InnoDB: Number of transaction pools: 1
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:22 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:23 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:23 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:23 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:23 0 [Note] InnoDB: Completed initialization of buffer pool
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:23 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:23 0 [Note] InnoDB: End of log at LSN=47661
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 07:17:21+00:00 [Note] [Entrypoint]: Waiting for server startup
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:27 0 [Note] InnoDB: Opened 3 undo tablespaces
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:27 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:28 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:28 0 [Note] InnoDB: log sequence number 47661; transaction id 14
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:28 0 [Note] Plugin 'FEEDBACK' is disabled.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:28 0 [Note] Plugin 'wsrep-provider' is disabled.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:31 0 [Warning] 'user' entry 'root@ff8a8c60e06c' ignored in --skip-name-resolve mode.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:31 0 [Warning] 'proxies_priv' entry '@% root@ff8a8c60e06c' ignored in --skip-name-resolve mode.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:32 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10  7:17:34 0 [Note] mariadbd: ready for connections.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | Version: '11.2.2-MariaDB-1:11.2.2+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 07:17:34+00:00 [Note] [Entrypoint]: Temporary server started.
php-dynamic-qrcode-php-dynamic-qrcode-1 exited with code 137
php-dynamic-qrcode-php-dynamic-qrcode-db-1 exited with code 13

php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:06:11.046285Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.34) initializing of server in progress as process 80
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:06:11.048098Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:06:11.048104Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:06:11.048156Z 0 [ERROR] [MY-010119] [Server] Aborting
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:06:11.048273Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.34)  MySQL Community Server - GPL.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:07:20+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:07:21+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:07:21+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:07:21+00:00 [Note] [Entrypoint]: Initializing database files
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:07:21.288711Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:07:21.288808Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.34) initializing of server in progress as process 80
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:07:21.291042Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:07:21.291049Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:07:21.291091Z 0 [ERROR] [MY-010119] [Server] Aborting
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:07:21.291224Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.34)  MySQL Community Server - GPL.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:08:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:08:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:08:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:08:37+00:00 [Note] [Entrypoint]: Initializing database files
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:08:37.815336Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:08:37.815437Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.34) initializing of server in progress as process 80
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:08:37.817399Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:08:37.817406Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:08:37.817451Z 0 [ERROR] [MY-010119] [Server] Aborting
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:08:37.817574Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.34)  MySQL Community Server - GPL.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:09:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:09:52+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:09:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:09:53+00:00 [Note] [Entrypoint]: Initializing database files
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:09:53.118767Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:09:53.118853Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.34) initializing of server in progress as process 80
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:09:53.120699Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:09:53.120705Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:09:53.120758Z 0 [ERROR] [MY-010119] [Server] Aborting
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:09:53.120876Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.34)  MySQL Community Server - GPL.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:11:19+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:11:20+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:11:20+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8 started.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10 08:11:20+00:00 [Note] [Entrypoint]: Initializing database files
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:11:20.951876Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:11:20.951987Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.34) initializing of server in progress as process 80
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:11:20.954184Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:11:20.954191Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:11:20.954234Z 0 [ERROR] [MY-010119] [Server] Aborting
php-dynamic-qrcode-php-dynamic-qrcode-db-1  | 2024-07-10T08:11:20.954350Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.34)  MySQL Community Server - GPL.

version: "3.2"
services:
  php-dynamic-qrcode:
    image: giandonatoinverso/php-dynamic-qr-code:latest
    restart: unless-stopped
    environment:
      TYPE: docker
      BASE_URL: https://qrcode.domain.name
      DATABASE_HOST: php-dynamic-qrcode-db
      DATABASE_PORT: "3306"
      DATABASE_NAME: qrcode
      DATABASE_USER: qrcode
      DATABASE_PASSWORD:
      DATABASE_PREFIX: ""
      DATABASE_CHARSET: utf8
    ports:
      - 5045:80
    depends_on:
      - php-dynamic-qrcode-db
    volumes:
      - /volume1/docker/php-dynamic-qrcode/php_dynamic_qrcode_saved_qrcode_data:/var/www/html/saved_qrcode
    networks:
      - php-dynamic-qrcode-network
  php-dynamic-qrcode-db:
    image: giandonatoinverso/php-dynamic-qr-code-db:latest
    restart: unless-stopped
    volumes:
      - /volume1/docker/php-dynamic-qrcode/php_dynamic_qrcode_db_data:/var/lib/mysql
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD:
      MYSQL_DATABASE: qrcode
      MYSQL_USER: qrcode
      MYSQL_PASSWORD:
    networks:
      - php-dynamic-qrcode-network
volumes:
  php_dynamic_qrcode_db_data:
  php_dynamic_qrcode_config_data:
  php_dynamic_qrcode_saved_qrcode_data:
networks:
  php-dynamic-qrcode-network:
    driver: bridge

you have to change passwords in docker compose file

you have to change passwords in docker compose file

So I changed it from the default to random. Is there a minimum requirement for the passwords?

I don't think so, but to be safe I recommend using at least 18 alphanumeric characters and symbols

I don't think so, but to be safe I recommend using at least 18 alphanumeric characters and symbols

Thanks, is it the same with the database password as well?

yes

yes

THanks, I've changed all the passwords as suggested, but still the database goes into a constant bootloop. Saying that initializing but files already in the directory.  I was getting that same error earlier in my logs

I can't tell you... It works on my computer and the installations for some customers work too. I encourage you to use a debugger to better understand the error. If you want I can provide assistance with installation but for a fee

I don't know... It works on my computer and the installations for some customers work too. I encourage you to use a debugger to better understand the error. If you want I can provide assistance with installation but for a fee

Is it a requirement to use the database that is in the compose, or can I use whatever I want?

yes it's mandatory

yes it's mandatory

Last question, I noticed that there is the following
volumes:
php_dynamic_qrcode_db_data:
php_dynamic_qrcode_config_data:
php_dynamic_qrcode_saved_qrcode_data:
But there is not bind for qrcode_config_data:  Where does this suppose to bind in the container?  And does it go under the db or the app?  Thanks.


Bigarray syntax does not refmt cleanly

The following fails with a syntax error:
echo "a.{1, 2}" | refmt --parse=ml | refmt

with an intermediate output of a.{1 2};.

Unfortunately the work-around of calling the Bigarray.Array*.get function(s) directly doesn't work properly either as (for example) Bigarray.Array2.get(a, 1, 2) is refmt'd to a.{1 2}.

I'm looking at it as a type.

Thank you!


Create CODE_OF_CONDUCT.md

I created this PR with GH's auto-create-PR features when adding the Code of Conduct. The target branch will be properly reviewed.


Autoindent of macro'd begin blocks

Only a small thing, but this doesn't auto-indent the cursor on newline:
@time foo begin

Odd because this line suggests that it should. Maybe a bug on the atom side?

No, it doesn't allow anything extra between the macro and the begin.  Really, I think that could be extended to any line that ends with begin\s*.  (Same goes for the tmbundle).

Yeah I totally agree with the begin\s* idea

This seems to have regressed between 0.7.0 and 0.8.0.

Hm, I don't see any regression for the @time foo begin case.

Oh, my test case is slightly different:
@testset "testing some stuff" begin
"not-indented"
end

This indented properly with 0.7.0 but not 0.8.0.

Right. That one's pretty hard to solve as far as I can tell though, because I'm not sure how to differentiate between
@macro "foo bar begin" and @macro "foo bar" begin (or even @macro "foo \"bar\" begin" begin). I thought this could be solved by using a negative lookahead inside of a negative lookbehind, but first-mate (or whatever the regex engine is called) doesn't support that...

FWIW I think that a false positive on @macro "foo bar begin" is preferable to a false negative on @macro "foo bar" begin (which is common with @testset). I was so happy when the latter started working, and then my joy was dashed with the 0.8.0 update.

Alright, something like
increaseIndentPattern: "(^(\\s*|.*=\\s*|.*@\\w*\\s*)[\\w\\s]*(if|while|for|function|macro|immutable|type|let|quote|try|begin|.*\\)\\s*do|else|elseif|catch|finally)\\b(?!.*\\bend\\b[^\\]]*$).*$|(begin|do|try|let|quote)\\b(?!\\s*\\bend\\b[^\\]]*$)\\s*$)"

is a bit better, but also a bit of a monstrosity (gut feeling: it's impossible to get this right for all cases with a single regex). It will fail for
@foo "bar begin
    " # this is indented
a = a == a ? 1 : try a catch e
# not indented
end

but work for the cases above. I'll think about this a bit more tomorrow, but if someone either wants to propose any ideas or wants to try the regex pattern above, please do!


Add support for cap account-tag

The account-tag capability is now requested when ZNC connects to an IRC server, the same is then offered to clients connecting.
This permits the tag to then pass through to account-tag aware clients.

That's a great start, there's a couple of changes that would be needed to push this forward:

Only advertising to clients when the upstream server supports account-tag. We cannot guarentee support on all servers which
Using CAP NEW / CAP DEL to update client state
The account tag should be filtered out for clients which did not enable account-tag. One client enabling the tag can break other clients which have no idea about message tags.

I'd like to see some tests to count for these cases.

Nice, that's a great start! I've given this some manual testing and it appears to work as expected. I think I've found one bug regarding the behaviour of removing the capability (CAP DEL) still leaves the capability enabled according to ZNC which leaves the client thinking its disabled while the capability is enabled (partially).
< setup: connected to server with account-tag, client negotiated account-tag (used CAP LS 302 thus cap-notify is implicitly enabled) >
< znc disconnects after we had account-tag enabled >
S: :irc.znc.in CAP Guest59998 DEL :account-notify account-tag away-notify extended-join

C: CAP LIST
S: :irc.znc.in CAP Guest59998 LIST :account-tag

Perhaps around CClient::ClearServerDependentCaps would need to be updated to unset the internal state of CClient.
It would be great to see some tests for this introduced behaviour, you can find similar tests in https://github.com/znc/znc/blob/c79961c514a172e07821b2dafe81483569118d98/test/ClientTest.cpp#L158. It would be good to test functionality such as when account-tag is enabled with server (m_pTestSock) and reciving account tag isn't propergated to client which didn't enable account-tag. Along with when it account-tag is enabled on both sides and the tag is presented to client.

Thanks for taking a look.  I've tried to recreate the bug you've pointed out and I'm having trouble doing so.
Below is the debug log showing CAP LS and CAP LS 302 (how weechat sends /cap ls by default) before and after disconnecting znc from an account-tag enabled server.  I had set the flag for account-tag to be server dependent where it is defined as part of m_mCoreCaps in Client.h so it shows up in the CAP DEL sent to the client.  I see that in your example output as well.  Just that it appears to be actually removed from the list right after in my testing.
[2020-08-03 08:44:45.171543] (nw/default) CLI -> ZNC [CAP LS 302]
[2020-08-03 08:44:45.171766] (nw/default) ZNC -> CLI [@time=2020-08-03T12:44:45.171Z :irc.znc.in CAP nw` LS :account-notify account-tag away-notify batch cap-notify echo-message extended-join multi-prefix server-time userhost-in-names znc.in/batch znc.in/self-message znc.in/server-time-iso]
[2020-08-03 08:45:08.089625] (nw/default) CLI -> ZNC [CAP LS]
[2020-08-03 08:45:08.089764] (nw/default) ZNC -> CLI [@time=2020-08-03T12:45:08.089Z :irc.znc.in CAP nw` LS :account-notify account-tag away-notify batch cap-notify echo-message extended-join multi-prefix server-time userhost-in-names znc.in/batch znc.in/self-message znc.in/server-time-iso]
[2020-08-03 08:45:36.309492] (nw/default) CLI -> ZNC [PRIVMSG *status :disconnect]
[2020-08-03 08:45:36.309653] (nw/default) ZNC -> IRC [QUIT :ZNC - http://znc.in]
[2020-08-03 08:45:36.309708] (nw/default) ZNC -> CLI<EMAIL_ADDRESS>PRIVMSG nw` :Disconnected from IRC. Use 'connect' to reconnect.]
[2020-08-03 08:45:36.309949] IRC::nw::default == Disconnected()
[2020-08-03 08:45:36.310121] (nw/default) ZNC -> CLI [@time=2020-08-03T12:45:36.310Z :irc.znc.in CAP nw` DEL :account-notify account-tag away-notify extended-join]
[2020-08-03 08:45:47.176368] (nw/default) CLI -> ZNC [CAP LS]
[2020-08-03 08:45:47.176507] (nw/default) ZNC -> CLI [@time=2020-08-03T12:45:47.176Z :irc.znc.in CAP nw` LS :batch cap-notify echo-message multi-prefix server-time userhost-in-names znc.in/batch znc.in/self-message znc.in/server-time-iso]
[2020-08-03 08:47:14.898958] (nw/default) CLI -> ZNC [CAP LS 302]
[2020-08-03 08:47:14.899090] (nw/default) ZNC -> CLI [@time=2020-08-03T12:47:14.899Z :irc.znc.in CAP nw` LS :batch cap-notify echo-message multi-prefix server-time userhost-in-names znc.in/batch znc.in/self-message znc.in/server-time-iso]

I will also look into seeing if a test can be added.  Off hand I don't see any documentation on running the tests, so I can test my tests, is there a page outlining this?

The problem is with CAP LIST which returns the list of enabled capabilities. CAP LS returns the available capabilities. The enabled capabilities include account-notify after reciving DEL. After digging into this in more detail, it seems this would apply to other existing capabilities too, CClient::ClearServerDependentCaps does not appear to cleanup m_ssAcceptedCaps thus these deleted capabilities are still marked as accepted. Thus CAP LIST (which returns m_ssAcceptedCaps) includes account-notify. So not directly a problem introduced in this branch, just discovered it while reviewing these changes. Could be fixed outside this PR given it isn't introduced here.

As for the tests, there is a unittest target, if you're using CMake with the makefile generator you can run make unittest to invoke the mentioned tests.

A ha, my bad, I misread CAP LIST as CAP LS
Following your logic, I added an erase in CClient::ClearServerDependentCaps to remove the capabilities from m_ssAcceptedCaps, since that seems to be the fix needed.  If you would prefer the fix for the issue uncovered but not introduced here come in another PR or in another fashion let me know.
I will also now look into the unittest target and see if I can't also make a test for the account-tag capability.

I have added an AccountTag test at this time.
This test enables the capability on the server (m_pTestSock) then presents a message with the @account=account-name tag present to a client (m_pTestClient) which has not enabled the account-tag capability.  The capability is then turned on and the same message presented.  The test checks that the tag will only pass through to the client when it is enabled.

I've realised theres some cases where account-tag support isn't quite as simple in a bouncer. This implementation breaches the account-tag specification, there are some MUST clauses which are not fulfilled (and I am not sure we can fulfil them without adding a lot of complexity).

The tag MUST be added by the ircd to all commands sent by a user (e.g. PRIVMSG, MODE, NOTICE, and all others).

If account-tag is enabled by the client, then all PRIVMSG/MODE/NOTICE and other messages must also contain an account tag. We might have messages stored in the our buffers while account-tag wasn't enabled with the upstream server which we may replay to a client which has enabled account-tag, the replay would breach that clause.
ZNC may have offered the end user echo-message, where ZNC itself will be echoing the users message without their account tag.

The tag also MUST be added by the ircd to all numerics directly caused by the sender

There's many cases where ZNC would directly reply to messages by producing the numeric response (which won't have an account tag), for example handling a MODE command can produce 324 and 329 numerics (https://github.com/znc/znc/blob/f5c3ea4/src/Client.cpp#L1104).

I've got some thoughts on being able to solve some of these MUST breaches, although I'm not to keen on all the complexity that these would bring:

znc might need to always enable account-tag with the server so that message buffers contain account-tag when future clients might enable the capability.
Should ZNC only offer account-tag if all messages in ZNC buffers have been received with account-tag? Would ZNC send CAP NEW when buffers are cleared or new messages push old messages out of buffers?
can/should we use account-notify to be able to know about account-tag's for messages when account-tag is not enabled with upstream server.
Would we need to always know about our own account so that ZNC produced messages and numerics are able to contain the account-tag? If so, would account-notify facilitate that?

I've realised theres some cases where account-tag support isn't quite as simple in a bouncer.

Shall we roll this back for now?

znc might need to always enable account-tag with the server

Definitely. Why would it not do so? Doesn't it do it now?

Should ZNC only offer account-tag if all messages in ZNC buffers have been received with account-tag? Would ZNC send CAP NEW when buffers are cleared or new messages push old messages out of buffers?

I'd prefer to avoid such dependency.

There's many cases where ZNC would directly reply to messages by producing the numeric response

This might be ~easy to fix by adding the tag in something like OnSendToClientMessage(), though need to be careful with multiple clients connected.

Would we need to always know about our own account so that ZNC produced messages and numerics are able to contain the account-tag? If so, would account-notify facilitate that?

That could work with CAP NEW - start advertising account-tag to clients after ZNC learnt its account.


Update NuGet dependencies to v7 (major)

This PR contains the following updates:

Package
Type
Update
Change

Microsoft.AspNetCore.Authentication.JwtBearer (source)
nuget
major
6.0.16 -> 7.0.5

Microsoft.AspNetCore.DataProtection.Abstractions (source)
nuget
major
6.0.16 -> 7.0.5

Microsoft.AspNetCore.TestHost (source)
nuget
major
6.0.16 -> 7.0.5

Release Notes

dotnet/aspnetcore
v7.0.5: .NET 7.0.5
Release
v7.0.4: .NET 7.0.4
Release
v7.0.3: .NET 7.0.3
Release
v7.0.2: .NET 7.0.2
Release
v7.0.1: .NET 7.0.1
Release
v7.0.0: .NET 7.0.0
Release

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Renovate Ignore Notification
Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 7.x releases. But if you manually upgrade to 7.x then Renovate will re-enable minor and patch updates automatically.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.


Script to add nova timelock alias sweep to an existing proposal

This script should be used to "patch" some future proposal by adding a call to the nova inbox to sweep ETH from the L1 Timelock alias
note that it leaves the salt unchanged

forgot Daniel already made something for this https://github.com/ArbitrumFoundation/governance/pull/278/files

forgot Daniel already made something for this #278

let's close that and use this PR instead as I already reviewed this haha


Update to support GHC 8.2.2, 8.4.4, 8.6.5 + cabal 2.x

Added CPP pragmas around Data.Monoid imports
Removed containers upper bound
Added a cabal.project for cabal 2.x
Added a convenience nix shell.nix
Bumped version
Updated travis ci with new compiler version support

This supersedes PR #66 as it maintains backwards compatibility.

@markandrus Tests are failing due to apitests: ACCOUNT_SID: getEnv: does not exist (no environment variable), which I am not sure what to do about.

https://mail.haskell.org/pipermail/haskell-cafe/2019-July/131328.html


Reloading data doesn't behave correctly

Hello my friend,
You nice expandable tableview works well for static data array. However, when my array changes (mutable), I trigger [tableview reloadData]; which doesn't call numberOfParentCells and so it has the outdated number of rows, which results in crashes because of outbound exception. I don't have much time, so could you fix that, as you're familiar with the code.
Thank you.

Hello,
    I fix this issue doing this modification in JKExpandTableView.m:

(NSUInteger) parentIndexForRow:(NSUInteger) row {
NSUInteger parentIndex = -1;
NSUInteger i = 0;
while (i <= row) {
parentIndex ++;
i++;
if ([self.expansionStates count])  // Add this line
if ([[self.expansionStates objectAtIndex:parentIndex] boolValue]) {
i++;
}
}
NSLog(@"parentIndexForRow row: %ld parentIndex: %ld", (long)row, (long)parentIndex);
return parentIndex;
}

Hello,
Sorry, I was on holiday.
Thanks for the fix, I'll try it out soon.
I hope this fix can be added to the project.


 This is insecure. Location: /etc/rancher/k3s/k3s.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
NAME       	NAMESPACE  	REVISION	UPDATED                                	STATUS  	CHART                      	APP VERSION
traefik    	kube-system	1       	2023-05-17 16:41:55.312871537 +0000 UTC	deployed	traefik-21.2.1+up21.2.0    	v2.9.10
traefik-crd	kube-system	1       	2023-05-17 16:41:52.730849799 +0000 UTC	deployed	traefik-crd-21.2.1+up21.2.0	v2.9.10


Implement support for different source types (CLI untouched for now)

This is a partial fix for #48. It changes dock's API, but CLI is left untouched for now - I will file a PR for it separately after this is accepted. Note that there are some subtle changes from my proposal in #48, see docs/apidocs/top.md diff for documentation.
Also, I believe that we should create a "json-able" class for the whole build configuration (usually called build_json in most parts of the source) to be able to validate it right after it enters API functions and to be able to use objects instead of dicts. The way I implemented this PR, the Source classes get into play quite a long way down the call chain, which I would like to avoid in the long run.

Please don't merge yet, landscape discovered some actual errors that I need to fix first.

will test extensively tomorrow

Ready for review now!

The code looks good to me. I haven't tested it manually but the tests look comprehensive and they pass so +1 from me.

Slavek, I have rebased your work against current master, you can find it here https://github.com/DBuildService/dock/tree/107-rebased feel free to pull in my commits, update the PR and let's merge this!

Thanks Slavek!
(Merged from command line)

Thanks!


Sign the assembly (strong name)

I use your assembly in a project which requires strong names.
So please sign your assemblies in your NuGet packages.

Will do it as soon as I can.

Released v2.0.4 with signed assemblies.
Update your nuget and see if it works.
Regards,
Guilherme

It works, thanks a lot.


How to get the number of examples being processed?

Hello. I'm using your library to make a 3d visualization of a song. I'm trying to implement onset detection on multiple frequencies looking at the spectral flux, like explained here http://www.badlogicgames.com/wordpress/?p=161. I've already implemented it in the past using Maximilian.
The thing that is not clear to me is how to get the number of the examples processed in tone.js.

To do onset detection, you'll want to take a look at the ScriptProcessorNode which has been deprecated, in favor of the AudioWorkerNode (which is not yet implemented in any browsers). This lets you set the block size (the number of samples that are processed in each chunk).
Otherwise the block size is fixed by the Web Audio API at 128 samples.


help: Use message screenshots for global times examples.

Adds screenshots for the examples of global times in messages.
Notes:

The SF example has the tooltip shown.
The example message text is updated to match the screenshot text.

Fixes #31131.
Screenshots and screen captures:

Updated global times article
Current documentation

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

The clock icon in the screenshot looks a little off-center vertically; @karlstolley is that a 16px bug we need to fix?

The clock icon in the screenshot looks a little off-center vertically; @karlstolley is that a 16px bug we need to fix?

Quite possibly. I'll investigate.

#31185 is up with much improved clock-icon centering.

Merged, so you should be able to retake the screenshots.

Let's make these 2024, not 2020.

Updates:

Screenshots are redone on updated main with changes from #31185.
Changed dates to be Tuesday, August, 06, 2024 and meeting times to be 5pm BST (British Summer Time, GMT+1).
Color of channel in screenshots is now blue instead of pink.

Updated global times help article
Current documentation

Backported to 9.x in #31238.


Added an option to automaticaly search for a non-configured project for oil, nvim-tree and neo-tree integrations

Discussed in detail here
https://github.com/wojciech-kulik/xcodebuild.nvim/discussions/152
@wojciech-kulik one question I had it where to put the option. I put it in each integration separately, but that leaves out commands like "rename current file", which do not use any of the integrations. In this PR those commands just do not use this feature, let me know if I should put this option on a global level rather than per-integration level

Thank you for your review! I'll make sure to address your comments at earliest convenience :)

Done! I've addressed all of the issues :)

Thank you for all the updates! I will take a look at it once again a little bit later today, will run a few tests and I think it will be ready to merge :).

Done! Thank you for your comments. My experience with Lua is extremely limited, it's basically just my own config, contributing to this project and some ComputerCraft as a kid :D. So your project and suggestions help me grow my knowledge

Thank you for all the hard work! 🍻


Use different prototype in Some and None, not same one

Hi, saneyuki.
I found that
new None() instanceof Some

returns true . And,
new Some('hoge') instanceof None

also returns true .
It is caused by using same prototype for Some and None at here and here.
I make there to use different prototype in those classes, and write test case.
Thank you.

Hi @rail44!
Thank you for your contribution!.
Could you update package.json's contributors field?

haisyo!

Reviewed 2 of 2 files at r1, 1 of 1 files at r2.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.

Comments from the review on Reviewable.io


Add zustand & AG-GRID documentation

Added zustand documentation under web category and AG-GRID under PaaS category

Hi @mithun-srinivas there are some conflicts can you fix it?


Create another version

We need two versions to test upgrades

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: TerryHowe
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [TerryHowe]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/lgtm


docs(clustered): add section for troubleshooting licensing

As licensing is moving to being utilised by customers, we'll need some documentation on how to troubleshoot/verify that things are working as intended.

[x] Signed the InfluxData CLA
(if necessary)
[ ] Rebased/mergeable

@jdockerty I just made revisions in the branch. ~I'll add you to that PR and close this one.~

Can you review my changes?

@jstirnaman / @sanderson  Looks great, thanks both as always!


Content type application/rss+xml listed as /xml+rss

Which Cloudflare product does this pertain to?
Speed
Existing documentation URL(s)
https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/
What changes are you suggesting?
The page lists all content types that can be compressed with Gzip or Brotli by Cloudflare.
The official content type for RSS feed is:
application/rss+xml (and not application/xml+rss as is currently appearing on the page)
Source: https://www.rssboard.org/rss-mime-type-application.txt
Additional information
No response

@claudiobrandt  Thank you for pointing this out. https://github.com/cloudflare/cloudflare-docs/pull/11054 updated the docs.


Side scroll possible in certain pages

In the following pages there is some space off the screen, which makes me able to scroll to the right side:

https://codecombat.com/teachers/classes
https://codecombat.com/teachers/courses
https://codecombat.com/teachers/enrollments
https://codecombat.com/courses

Should be fixed by 81b550a.


Added actions menu to read inspection screen

Hello i want to merge your PR to re-use the menu.
Also can you update the menu so when an option is selected the menu pops out ?

@franklinkemta I will add the auto close functionality, once I finish my current task.

@franklinkemta I will add the auto close functionality, once I finish my current task.

My thanks !


mobile layout

to keep it simple, I propose for @media all and (max-width: 720px) {} we move the sidebar into a footer that gets 33% of screen height.
@binx @aaronshekey Seem reasonable? Does that open a can of worms for the #searchbox?

In my thinking, I think that's all we need to do.
Perhaps not a footer though, considering we've got the dropdown for autocomplete. That may push things around in an annoying way on smaller screens. The #searchbox layout itself should be completely fluid regardless of the size of its parent, so we're good there.
If you feel like opening a branch / pr for that, I can clean up any rough edges.

I don't think there's room for an always open sidebar or footer, at least on a phone. How about a floating search box with a button to slide out the sidebar, like Google Maps?

@kielni I have a sense that the drawer UI is pretty well-conditioned in users to contain tools and configuration instead of content, but you're right that it's a good way to clear things off the map. What about (with apologies to tinder) a swipe interface on the bottom of the map, with the same fixed search bar you mentioned?
a la this mockup:

Basic mobile UI is covered by #52 and #53, now merged. What's left is detailed i #54

Great work @kielni!


glueyness, false

This pull request was generated by the 'mq' tool
[test]
flake rate: 0.4
logical conflict every: 100
sleep for: 300s
[pullrequest]
requests per hour: 30
deps=[f,g]

/trunk merge


Support constants

In the official language-javascript package, variables declared with const or in all caps would mark the syntax--constant class

Much syntax themes support this syntax--constant class, I think it would be awesome to have this added ( or give some advice about how I can contribute to this )

In the first example language-babel does this

In the second case the problem lies with having multiple coma separated vars. language-javascript breaks like this.

This issue has been raised before. See here


feat: use a single transport for fetchModule and HMR support

Description
so that env providers not need to implement both fetchModule transport and HMR transport.
I think this PR still needs to polish the naming and probably better to introduce a interface that wraps HotChannel so that env providers does not need to care about internal conversion that is done for send and invoke (done).

The upper part is how it was before and the lower part is how it is after.

I polished the interface so that it's more easier to implement. I think we need a better name and check if this is not breaking a code that was working in 5.x.

/ecosystem-ci run

/ecosystem-ci run

I've updated the docs (maybe it should contain a bit more explaination about the HotChannel). It's now ready.
This is how the diff looks like after this PR: https://github.com/sapphi-red/daienjo-architecture/commit/fb91e06f365a159e2d7e9e12ab4e94d068ce1e01

I'm not going to implement it in this PR, but it would be nice if we can use the default WebSocketServer for multiple envs. For example, using it from the service worker env as well.

Exported env.getInvokeHandler (https://github.com/vitejs/vite/pull/18362/commits/7536dfbc99ec000fc4b6adebd673f0ddd5e720ee) and tweaked some types (https://github.com/vitejs/vite/pull/18362/commits/05413c626e006b431f3d044c73d35d99f581fdf2) to reduce required knowledge on the runtime provider side (https://github.com/sapphi-red/daienjo-architecture/commit/6b91f2525315d9b89fc4c589f1f693a38fe859b0).

I feel sad that we can't do transport: { fetchModule() { /* anything */ } } anymore, but it makes everything else so much easier, so I think it's worth it 😄

My first impression was it became more complicated 😅

I think it's because your examples does not support HMR. connect/send on SSE one should be now able to enable HMR without any code changes. (invoke one won't work as connect is not implemented though)

I made a POC of builtin fetch transport in https://github.com/vitejs/vite/pull/18485. Not sure if this exact implementation is usable, but I thought having a different transport implementation would help validating the transport API design here at least. Any feedback there is welcome!

How do you opt-out of HMR per environment now?

@jamesopstad Thanks for taking a look! The diff looks like this: https://github.com/sapphi-red/daienjo-architecture/compare/966c60a5a94dcc388ba163ddbe9f2ba3435b2cbb...feat/try-single-transport (note that this diff includes two environments, service-worker and workerd)
Both of the env used in this example uses the newly exposed createWebSocketModuleRunnerTransport, but you can make a custom ModuleRunnerTransport as before.

Thanks @sapphi-red. That helps a lot! I really like this proposal.
One thing that I'm wondering is if it might be possible to make it so that the transport can be added lazily? So, rather than providing { hot: true, transport: hot } you could provide { hot: true } and then add the transport by calling environment.setTransport(transport) or something similar.
We have this scenario where the WebSocket connection can't exist before the DevEnvironment constructor is called. We get around it by passing in an object and then mutating it later but it feels a bit hacky (https://github.com/flarelabs-net/vite-plugin-cloudflare/blob/7adf439fbd5e187c7419fe5686ed653191363d87/packages/vite-plugin-cloudflare/src/cloudflare-environment.ts#L82-L85). It seems you do something similar in your example (https://github.com/sapphi-red/daienjo-architecture/blob/577a508368380f728ac0941607c85ecf419c0f71/environment-pkgs/workerd/index.ts#L162). It would be nice if there was a cleaner solution for this.
The only other thing I'm wondering is if it might be possible to avoid the need for setInvokeHandler to make the API a bit cleaner. As far as I can tell setInvokeHandler is part of the public API but invokeModuleHandler is specific to your example. Does something equivalent to invokeModuleHandler need to be part of the public API or does that not make sense? Probably missing some context here so just trying to understand.

One thing that I'm wondering is if it might be possible to make it so that the transport can be added lazily?

I guess that's possible. But I'd like to leave that for this PR as this PR is already quite large.

I'm wondering is if it might be possible to avoid the need for setInvokeHandler to make the API a bit cleaner.

HotChannel is an interface that is implemented by users and all methods in the interface are called by Vite. On the other hand, handleInvoke (a function that removes miniflare specific parts from invokeModuleHandler) is something that users will call. setInvokeHandler inverts that so that it can be in the HotChannel interface. This was a compromise for me so that transport related things are all inside the HotChannel. I would love to change it.
The other ways I can think of is to:

expose handleInvoke from NormalizedHotChannel

users can use it like:const payload = (await request.json()) as HotPayload
const result = await this.hot.handleInvoke(payload)
return new MiniflareResponse(JSON.stringify(result))

the downside of doing this is that this requires users to know more about the difference of HotChannel and NormalizedHotChannel. Maybe that's fine?

expose handleInvoke from DevEnvironment

users can use it like:const payload = (await request.json()) as HotPayload
const result = await this.handleInvoke(payload)
return new MiniflareResponse(JSON.stringify(result))

the downside of doing this is that the transport related things are leaked to DevEnvironment

expose handleInvoke from NormalizedHotChannel

This sounds good to me :+1: It looks like we cannot hide the normalization entirely anyways, so adding this won't hurt hopefully.

I implemented NormalizedHotChannel::handleInvoke 👍


Add method to fix failing bandit tests

Example bandit out from stout is as follows:
Test results:
>> Issue: [B607:start_process_with_partial_path] Starting a process with a partial executable path
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b607_start_process_with_partial_path.html
   Location: code_management/test_writer.py:45:13
44          """
45          result = subprocess.run(
46              ["pytest", string_test_identifier], capture_output=True, text=True
47          )
48          test_passed = result.returncode == 0

--------------------------------------------------
>> Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input.
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b603_subprocess_without_shell_equals_true.html
   Location: code_management/test_writer.py:45:13
44          """
45          result = subprocess.run(
46              ["pytest", string_test_identifier], capture_output=True, text=True
47          )
48          test_passed = result.returncode == 0

--------------------------------------------------
>> Issue: [B607:start_process_with_partial_path] Starting a process with a partial executable path
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b607_start_process_with_partial_path.html
   Location: code_management/test_writer.py:69:17
68              # Running the pre-commit command
69              result = subprocess.run(
70                  ["pre-commit", "run", "--all-files"], capture_output=True, text=True
71              )
72

--------------------------------------------------
>> Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input.
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b603_subprocess_without_shell_equals_true.html
   Location: code_management/test_writer.py:69:17
68              # Running the pre-commit command
69              result = subprocess.run(
70                  ["pre-commit", "run", "--all-files"], capture_output=True, text=True
71              )
72

--------------------------------------------------

We can use find and regex to get each issue, extract the location of the issue, identify the wider function, then send off a prompt to edit the code to fix the issue.

Prompt:
I am running bandit as part of a pre-commit hook. I get the following test result for the code below. How can I fix the code?
The bandit issue is:
{bandit_issue_string}
The code that is failing is here:
$SELECTION


fish (shell) support?

Any chance this could be supported on fish shell as well? I am pretty sure the changes are minimal and mostly around the install script.

I've never used fish but I can look into it.

I'll see if I can make a script for it.  PR coming up

Nice!

Resolved by version: 2.0.0


Mask r-cnn training runs infinitely without output or error

🐛 Describe the bug
Here’s a brief overview of my process:
1.I generated a dataset using PyTorch by applying the SAM mask from bounding boxes to my images.
2.After creating the dataset, I split it into training and testing sets.
3.I loaded both sets using torch.utils.data.DataLoader.
4.I’m using a pre-trained model with 11 classes.
However, I’m encountering an issue during training. The process seems to take an unusually long time, and I’m not seeing any progress or error messages to troubleshoot from.

What might be going wrong or how to improve my training process?
Versions
--2024-05-05 11:05:17--  https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22068 (22K) [text/plain]
Saving to: ‘collect_env.py’
collect_env.py      100%[===================>]  21.55K  --.-KB/s    in 0.002s
2024-05-05 11:05:18 (12.6 MB/s) - ‘collect_env.py’ saved [22068/22068]
Collecting environment information...
PyTorch version: 2.2.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: 14.0.0-1ubuntu1.1
CMake version: version 3.27.9
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.1.58+-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.2.140
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 535.104.05
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.6
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             8
On-line CPU(s) list:                0-7
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) CPU @ 2.30GHz
CPU family:                         6
Model:                              63
Thread(s) per core:                 2
Core(s) per socket:                 4
Socket(s):                          1
Stepping:                           0
BogoMIPS:                           4599.99
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat md_clear arch_capabilities
Hypervisor vendor:                  KVM
Virtualization type:                full
L1d cache:                          128 KiB (4 instances)
L1i cache:                          128 KiB (4 instances)
L2 cache:                           1 MiB (4 instances)
L3 cache:                           45 MiB (1 instance)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-7
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Mitigation; PTE Inversion
Vulnerability Mds:                  Vulnerable; SMT Host state unknown
Vulnerability Meltdown:             Vulnerable
Vulnerability Mmio stale data:      Vulnerable
Vulnerability Retbleed:             Vulnerable
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Vulnerable
Vulnerability Spectre v1:           Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Vulnerability Spectre v2:           Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Versions of relevant libraries:
[pip3] numpy==1.25.2
[pip3] torch==2.2.1+cu121
[pip3] torchaudio==2.2.1+cu121
[pip3] torchdata==0.7.1
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.17.1
[pip3] torchvision==0.17.1+cu121
[pip3] triton==2.2.0
[conda] Could not collect

Sorry @MontassarTn , it's impossible to help with so little info about the code that you're trying to run. But in any case, this seems to be more of a usage issue rather than a bug report. Since this is a bug tracker, please direct usage questions to https://discuss.pytorch.org/ instead


I can no longer use iptools.IpRangeList for INTERNAL_IPS

Hello!
Long time happy user of DDT here.
With https://github.com/jazzband/django-debug-toolbar/commit/782bdd9b0f24d3d71f6d68a20b12d5c51c6d370e I can no longer use iptools.IpRangeList with INTERNAL_IPS, it blows up when I want to whitelist a larger IP range such as IPv6. With smaller ranges such as <IP_ADDRESS>/8 it won't blow up but it will delay every request significantly while DDT waits for IpRangeList to write out all the IP addresses.
INTERNAL_IPS = iptools.IpRangeList('<IP_ADDRESS>', '10/8', '::1', '1a:1a:1a:1a::/64')

Traceback (most recent call last):
  File "/mnt/drive/skeleton/virtual/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/mnt/drive/skeleton/virtual/lib/python3.10/site-packages/debug_toolbar/middleware.py", line 64, in __call__
    if not show_toolbar(request) or DebugToolbar.is_toolbar_request(request):
  File "/mnt/drive/skeleton/virtual/lib/python3.10/site-packages/debug_toolbar/middleware.py", line 23, in show_toolbar
    internal_ips = list(settings.INTERNAL_IPS)
OverflowError: cannot fit 'int' into an index-sized integer

For now I simplified my configuration to work around it. My requirements have changed a bit over the years and I can live with this simplified setup, but I just wanted to let you know in case this fallout was undesirable.

Thanks for letting us know! Would you be interested in creating a PR to resolve this?

I'm happy to.
The commit doesn't state why a list was preferable. Looking around I assume the cast in https://github.com/jazzband/django-debug-toolbar/commit/782bdd9b0f24d3d71f6d68a20b12d5c51c6d370e was done because in https://github.com/jazzband/django-debug-toolbar/commit/7d77a34dcd00bcbc1561541877be132bef1789a5 the .copy()+append() was added, which didn't work on certain not-a-list objects.
For the biggest compatibility and efficiency I'd say the copy()+append() should not be done either. The code should go back to request.META.get("REMOTE_ADDR") in settings.INTERNAL_IPS. An additional clause can be added to deal with the Docker IP check separately.
I'll make a PR later today.

The reason was that the suggested docker solution was to add the docker internal host IP address to INTERNAL_IPS which is defined as a list. @matthiask does the docker host need to be added to INTERNAL_IPS? If yes, @quinox you may be headed down the wrong direction.

The Docker IP is added to a local copy of the Django setting. This variable gets destroyed at the end of the function.
I made the PR: #1929. I'm happy to amend it in any way should you so desire.

I have commented on the pull request. The change makes sense to me. INTERNAL_IPS is used by Django for a limited list of things: https://docs.djangoproject.com/en/5.0/ref/settings/#internal-ips
The toolbar won't have a problem when e.g. the debug() context processor variables aren't in the context.


[WIP] scaler governance

// @tomkerkhove
Relates to https://github.com/kedacore/keda/issues/573

Personally I'd like to:

Move to an add-on scaler first approach and move it in core when there is adoption/usage
Individually version scalers, regardless of type - Even if they are in KEDA Core v1.5 a scaler can be individually versioned as Service Bus Scaler v1.2; no?

Move to an add-on scaler first approach and move it in core when there is adoption/usage

In ASF there are incubator projects. Once the project is mature (has a community, is well maintained, has docs etc) it becomes a top level project. We can consider such a process for scalers, however, it must be described somewhere.

Any thoughts @jeffhollan ?

Pokedie-poke @jeffhollan!

@jeffhollan Shall we finalize this or abandon it?

Closing in favor of https://github.com/kedacore/governance/pull/18


do some yum cleaning

 slimmer python27 $ docker history marketplace/python27:slimmer
IMAGE               CREATED             CREATED BY                                      SIZE
f12a163c8d1c        11 seconds ago      /bin/sh -c pip install ipython ipdb             18.65 MB
5f07e7178d3f        16 seconds ago      /bin/sh -c easy_install pip                     6.181 MB
e5f43c5aa011        19 seconds ago      /bin/sh -c #(nop) ENV LANG=en_US.UTF-8          0 B
44b49d7609c4        19 seconds ago      /bin/sh -c #(nop) ENV LD_LIBRARY_PATH=/opt/rh   0 B
39bfe23f7165        20 seconds ago      /bin/sh -c #(nop) ENV PATH=/opt/rh/python27/r   0 B
86a48c01ecda        20 seconds ago      /bin/sh -c yum install -y     python27-m2cryp   25.4 MB
c6b4e14b1890        37 seconds ago      /bin/sh -c yum install -y python27 git gcc &&   280.4 MB
dcddf0451a27        6 minutes ago       /bin/sh -c #(nop) ADD file:813e789ea49480c7cc   123 B
b9aeeaeb5e17        4 weeks ago         /bin/sh -c #(nop) ADD file:2b2b26209d285cd1a9   202.6 MB
f1b10cd84249        4 weeks ago         /bin/sh -c #(nop) MAINTAINER The CentOS Proje   0 B

helps with #81

533.2 MB vs 775.8 MB

r? @robhudson

Does this need a rebase?

Looks good to me, simple addition. r+


Unable to modify CachedResponse object, raises AttributeError

The problem
One of the hooks I run modifies the Response object.
Since 0.7 release any hook that attempts to modify the Response object -- now returned as CachedResponse object -- raises an AttributeError.
Expected behavior
Hooks should be able to modify the CachedResponse object.
Steps to reproduce the behavior
def parse(r, *args, **kwargs):
    if r.status_code == requests.codes.ok:
        r.html = lxml.html.document_fromstring(ftfy.fix_encoding(r.text), base_url=r.url)
        r.html.make_links_absolute()
        return r

Access uncached resource :)
Reaccess resource :(

Workarounds
None at the moment.
Environment

requests-cache version: 0.7.1
Python version: 3.9.6
Platform: macOS High Sierra 10.13.6

You can modify anything that's an attribute on the Response class, but there's no html attribute. That example works with requests.Response but not requests_cache.CachedResponse because the latter is a slotted class, which doesn't have a __dict__ and doesn't let you assign new attributes after the class is defined.
One workaround would be to store that in Response._content:
def parse(r, *args, **kwargs):
    if r.status_code == requests.codes.ok:
        r._content= lxml.html.document_fromstring(ftfy.fix_encoding(r.text), base_url=r.url)
        r._content.make_links_absolute()
        return r

This has been fixed in #324. You can try out the pre-release build with:
pip install requests-cache==0.7.2b0

Let me know if that works for you, and I'll push out another patch release within a week or so.

I'll give this a test today, many thanks!
The slotted class would also break caching support for the requests-HTML package, they also assign new attributes to the Response object.

This is nice.
I also kind of subclassed CachedSession to attach the cache key to the response. With version 0.7.1 it raised an exception and I had to do a lot more stuff...
(I manually added a table to link cache key to url for easier lookup.)

I also kind of subclassed CachedSession to attach the cache key to the response. With version 0.7.1 it raised an exception and I had to do a lot more stuff...
(I manually added a table to link cache key to url for easier lookup.)

@Querela Interesting, was that mainly for debugging/development, or for a user-facing feature?
That may be related to some features I'm considering adding in the future, which would involve storing a few response attributes as separate indexed columns to improve certain types of bulk operations. For example, alternative cache eviction methods like #116 would require either created_at or expires to be a separate column. Having the request URL as a separate column may also be convenient.
I've also considered adding the cache key as a CachedResponse attribute. Feel free to make an issue for that, if that's something you would use.

It was kind of for both. As the dev myself it was mostly for debugging purposes for now, e. g. checking what URLs are cached, possibly cleaning up cache entries from previous requests, ...
My situation: I had to crawl/scrape a large amount of URLs. Unfortunately the cache file only includes the cache-key which I was not able to inversely map to the request URL if it is not stored beforehand.
I intend to later just check by cache key whether I have a stored response without requesting again. It is not strictly neccessary but allows me to use the URLs to retrieve the responses without simulating my whole scraping process. (And for me, only the URL changes between each request, so my lookup is essentially 1:1).
The code I had to use to attach the URLs to my cache keys. I simulate the crawling/scraping to retrieve the cached responses, and then just compute the cache keys. (I could do this while I do my actual crawling but this came afterwards.)
import json
from os import PathLike
from pathlib import Path
from typing import Iterator
from urllib.parse import urljoin

import requests
from parsel import Selector
from requests_cache import CachedSession
from requests_cache.backends.sqlite import DbDict

REQ_HEADERS = {
    "User-Agent": "...",
}
REQ_COOKIES = {}

# subclass cached session to retrieve the key (response here not required)
class MyCacheKeySession(CachedSession):
    def send(self, request, **kwargs):
        return self.cache.create_key(request, **kwargs)
        # NOTE: the code below failed
        # response = super().send(request, **kwargs)
        # setattr(response, "cache_key", self.cache.create_key(request, **kwargs))
        # return response

# simulate the crawling / scraping process
def iter_serieslists_urls(sess: requests.Session) -> Iterator[str]:
    url = "https://the.start.url/series/"

    while True:
        yield url

        resp = sess.get(url)
        assert getattr(resp, "from_cache", False)

        sel = Selector(resp.text)
        next_url = sel.css("div.pagination a.next_page::attr(href)").get()
        if not next_url:
            break

        url = urljoin(url, next_url)

def get_session(
    cache_file: str = ".cache.sqlite",
    allowable_codes=(200,),
    session_cls=CachedSession,
    **kwargs
) -> requests.Session:
    backend = DbCache(cache_file)
    session = session_cls(backend=backend, allowable_codes=allowable_codes)

    if "headers" in kwargs:
        headers = kwargs["headers"]
    else:
        headers = REQ_HEADERS
    if headers:
        session.headers.update(headers)

    if "cookies" in kwargs:
        cookies = kwargs["cookies"]
    else:
        cookies = REQ_COOKIES
    if cookies:
        requests.utils.add_dict_to_cookiejar(session.cookies, REQ_COOKIES)

    return session

def main():
    cache_file = ".cache.sqlite"
    session_kwargs = dict(cache_file=cache_file, allowable_codes=(200, 302))
    sess = get_session(**session_kwargs)
    fakesess = get_session(**session_kwargs, session_cls=MyCacheKeySession)
    cache_url_table = DbDict(cache_file, table_name="key2url")

    url_iter = iter_serieslists_urls(sess)  # crawling simulator, returns the request urls
    for url in url_iter:
        key = fakesess.get(url)  # to get the cache key
        cache_url_table[key] = url  # store url for key

I could solve this differently but it works for me now.
Having the cache key as a attribute would be nice.
But I would make storing the URL in the cache optional. My last crawl had 10k or more? responses and my cache file is 4GB large. Just the URLs are probably only ~5MB but including more metadata if they are not required/used might increase the filesize again. Maybe including an empty hook that allows users to subclass the CachedSession to store arbitrary JSON strings or pickled data for a given cache-key?

Thanks for the details, that's helpful. And yes, additional cache columns would definitely be optional, and I like the idea of leaving it up to the user which columns to include. That may be part of the next release (0.8).

I "abuse" the cache as a kind of web-archive

That's a cool idea! I've seen other users do something similar. Let me know if you have more ideas for features that would be useful for the "pseudo-web-archive" use case.

Also, the fix for this issue (as well as the new CachedResponse.cache_key attribute) is now in the latest stable release (0.7.2).
I'm going to go ahead and close this issue, but you're welcome to create more if you have any more problems or feature requests.

Just asking here, I will create an extra issue if necessary: Can I kind of simulate the requests? As in, if the response is cached, return the response if nothing is cached, raise an exception? That would be like monkeypatching in tests to block outgoing requests. This would make working with the pseudo web archive easier as for now (?) there is no mapping for the URL stored and we still need to do the detour over the request.
The call-flow currently is:
CachedSession.get(some_url) (which is Session.get()) → CachedSession.request() → Session.request() → CachedSession.send() → (...) CachedSession._send_and_cache() → Session.send() (which calls the http[s] adapter HTTPAdapter that does the actual sending via urllib3)
So would I override the http[s] adapter in Session.adapters or better subclass CachedSession._send_and_cache and just raise an exception?
I'm not sure how many would want to simulate the requests with an existing cache, to justify another parameter and check in the code? It could alternatively implemented with an additional attribute/flag (_send_disabled) and with send_disabled (see cache_disabled) context handler.

Hm. The new version does not allow to unpickle from the older class definitions. I have to look whether I can kind of convert my older cache to the newest version.

Good question! I would be okay with adding another parameter for this. The problem with subclassing is that it might break with future releases, since internal methods like _send_and_cache() are likely to change. You could pin your dependencies by minor version (requests-cache~=0.7.2 or requests-cache<0.8) to avoid that, if needed. Adapters are a good approach, but maybe a bit more code. Also see this example of combining requests-cache with requests-mock, which may do what you want.
Let's continue this in a separate issue to make it easier for others to find: #330

Hm. The new version does not allow to unpickle from the older class definitions. I have to look whether I can kind of convert my older cache to the newest version.

Yes, unfortunately this will happen any time we pickle a non-builtin type (like CachedResponse), and then add or modify attributes on that type. There are some notes on that in the changelog here. I previously added a script to convert an existing cache from 0.5 to 0.6, but not from 0.6 to 0.7. I can probably look into that either later this week or next week if you don't figure it our first.

The 0.7 update also added a way to make your cache more future-compatible: if you pip install cattrs, then requests-cache will use that to 'unstructure' responses so they will be pickled as builtin types instead of CachedSession objects. This is not yet the default behavior and isn't fully documented, since it requires python 3.7+, and requests-cache still supports python 3.6  (which will be dropped in a future release).
This is done in serializers/cattrs.py and serializers/preconf.py, if you're curious.

Ok. I will look into it. :-)
I found the json storage option (which uses the mentioned cattrs). And here some quick testing indicated that saving in 0.7.1 and loading in 0.7.2 works. But I used the filesystem cache instead of sqlite.

Ok. I found a simple way to update the stored responses. But it depends on the availability of cattrs.
Essentially, install cattrs so the default pickle_serializer uses it. Then load and store each response. This makes them use just the basic python types with robust default values for newly introduced attributes. Then upgrade to newer version.
Python 3.6 is EOL in ~5 month. Most with current systems (non LTS servers) will probably be on python 3.8 or 3.9. So a conversion script might be nice but not really necessary?
Code:
from requests_cache.backends.sqlite import DbPickleDict
# assumes default names from the DbCache, with db_path being the cache filename
# serializer=pickle_serializer (is default, uses cattrs if installed)
dpd = DbPickleDict(db_path=".cache.sqlite", table_name="responses", use_temp=False, fast_save=False)
for key in dpd:
    dpd[key] = dpd[key]

@Querela Nice! I'm glad there was a simple way to do that.

Well, for me. As you said, cattrs is still optional and does not support python 3.6. So some might not be able to use this. But otherwise this is enough and seems future proof. And an easier way is impossible.
You thankfully pointed me in the right direction. 😄


Fix: xl settings for grid

Hey @andrelmlins ,
we recently added this package to a vue application and experienced an error with the xl-grid settings, where only the "lg" settings for a column were used, even if the resolution exeeded the max breakpoint size.
How to reproduce:
Paste this into any empty template:
<div>
    <row :gutter="0" style="{ height: '500px' }">
      <column :sm="1" :md="1" :lg="6" :xl="4" :style="{ backgroundColor: 'blue', height: '500px' }"></column>
      <column :sm="1" :md="1" :lg="6" :xl="8" :style="{ backgroundColor: 'red', height: '500px' }"></column>
    </row>
  </div>

You will see something like this, where there is still some white space. This should not be the case. The grid does fill 100% of the page, but the columns do not use all the available space.

Problem
Even if the breakpoint for lg is exceeded and the xl-settings should be shown for grid-columns, the lg-settings are still active.
This is, because the flex-basis for xl is not set and therefore the lg-settings for flex-basis are still active.

Solution
Add flex-basis for xl-settings as well.
Result

Cheers, Dennis for NanoGiants

Hi @DennisMatthiasScherf , makes sense to me!


allowUnreachableCode has to be turned off due to third party libraries.

This is a feature request:
I get the following error when I build my webpack project:

[default] C:\myPath\my-project\node_modules\bluebird\js\release\util.js:201:5
Unreachable code detected.
[default] Checking finished with 1 errors

This is problem in the bluebird npm library.
But I don't want to have errors in my build.  So I have to add this to my tsconfig.json to get this error to turn off:
"allowUnreachableCode": true

But that is kind of a shame, because I don't want to allow unreachable code in my code, I just don't want to see errors for unreachable code that is in my node_modules.  (I can't change them with out messing up my autobuild.)
So:
I am seeing code in node_modules inspected for unreachable code.
What I would expect (or want) to see is that node_modules is excluded from the unreachable code inspection.
In case it matters, here is my tsconfig.json:
{
  "compilerOptions": {
    "target": "es2015",
    "module": "es2015",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "sourceMap": true,
    "allowJs": true,
    "allowUnreachableCode": true
  },
  "awesomeTypescriptLoaderOptions": {
    "doTypeCheck": true,
    "forkChecker": true,
    "useBabel": true,
    "useCache": true,
    "babelOptions": {
      "presets": ["es2015-loose-native-modules"]
    }
  },
  "exclude": [
    "node_modules",
    "dist",
    "release",
    "index.js",
    "webpack.config.js",
    "config"
  ]
}

node_modules being in your exclude list means we shouldn't see the JS by default. The fact that you do see it likely means you're importing it but there's no definition file. Do you have a .d.ts for bluebird somewhere, and can you confirm it's being picked up by the compiler?

Although bluebird does actually contain legitimately unreachable code:
function toFastProperties(obj) {
    /*jshint -W027,-W055,-W031*/
    function FakeConstructor() {}
    FakeConstructor.prototype = obj;
    var l = 8;
    while (l--) new FakeConstructor();
    ASSERT("%HasFastProperties", true, obj);
    return obj;
    // Prevent the function from being optimized through dead code elimination
    // or further optimizations. This code is never reached but even using eval
    // in unreachable code causes v8 to not optimize functions.
    eval(obj);
}

It just has a good reason for it.

I do have a .d.ts file for it.
It is located in typings/globals/bluebird/index.d.ts.
I know visual studio is picking it up because when I put it there this statement lost the red error squiggles:
import * as Bluebird from 'bluebird';
Bluebird.config({ warnings: false });

I assume it would fail compilation as well because it would not know what Bluebird.config was.

+1 Experiencing this problem as well.

If you are including the .js code from a different project, it is sort of your code at this point from the perspective of the compiler. the options are to include the .d.ts instead (.d.ts files have no statements, so no unreachable code by definition), or use a linter like tslint that allows you more fine grained control on what rules run on which files.
All the compiler flags/options are compilation wide knobs, I do not think we intend to enable any file-level control at the time being.

@mhegazy
Just to be clear, I am "including" the code by doing an NPM install of it.
If that counts as "including" the code then that is fine, but most every JavaScript project out there has at least one other library in it via a package manager.  If that is not supported then it makes the unreachable code feature very hit and miss when allowJs is on.  (Just luck if the package has unreachable code or not.)
However, if that is the way it has to be because of Design Limitations and the fix being Too Complex then that is OK.

I see the issue now. we have made a change in TS 2.0 to automatically load .js files from node_modules if --allowJS is specified. this brought the .js files into your project. I do not think this was the intent on your side, though i could be wrong.
as part of fixing https://github.com/Microsoft/TypeScript/issues/10460 we should be disabling this by default, so you only get it if you set --maxNodeModuleJsDepth 2 for instance. I think this would address the issue here since you already have the declaration file.
If i may ask, do you have .js files in your compilation other than the ones the compiler is automatically pulling them from node_modules?

I do have a .js file in my compilation.
Only one that has one line in it. (To declare a global variable because I could not get Typescript to do it. See this answer on SO if you want details http://stackoverflow.com/a/38906665/16241 )

#10538 may fix this as @mhegazy mentioned above, by reducing the default maxNodeModuleJsDepth to 0. Can you check with typescript@next in a day or two? (Travis CI seems to be down so I'm not sure when we'll get a nightly build.)


dsa/dsa_pmeth.c: Add the checks for the EVP_MD_CTX_get_size()

Add the checks for the return value of EVP_MD_CTX_get_size() before explicitly cast them to size_t to avoid the integer overflow.
Fixes: 9d04f83410 ("Add DSA digest length checks.")

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

This pull request is ready to merge

merged, thank you for your contribution


Location args

@TravisHaussler Approved changes. I think maybe the person who owns the PR should do the merging/issue updating since they are more familiar with what is included so I'm leaving that to you.  I did merge main into the branch since it was out of date.

@TravisHaussler Approved changes. I think maybe the person who owns the PR should do the merging/issue updating since they are more familiar with what is included so I'm leaving that to you. I did merge main into the branch since it was out of date.

Thanks!  I agree - was out yesterday but merged in now


Express.js with RxJS in Reactive Stack

Hi everyone,
Can Express.js be reactive with RxJS? because I thought yes I've created this projet... but wait a sec, it plays only on the backend! how about the full stack ?
This is what I was trying to do, a fully Reactive Stack & Non-Blocking responsive web app in a form of an eShop example, using the following solution for each layer:
Database: Rethinkdb for better storage reactivity
Backend: Express.js & Rxjs for reactivity
Frontend: Vue & RxJs for reactivity & Reveal.js for a seamless UX.
This may sounds strange a bit and I know there are a lot of things to improve in this demo, especially in the Vue part (VueX, Vuetify, split into components, maybe vue router...), also on the back side (for better readability), I'm not using RxJS in every possible place, but this is just a quick demo to see how these layers fit all together...
I wanted see how reactive can a web app be with too many user interactions (back and forth... from/to the DB) in low performance network in fully reactive non-blocking environment, the idea is to don't let the user waiting for any action (maybe I had to add some loading GIFs to see that in action...), you may say this is what PWA is all about, right? well, I believe this is different from PWA which is more native-like approach.
I don't want to include Socket.IO for such purposes, I think that's too much bandwidth for such kind of app, maybe this plays better for realtime-chat or streaming scenarios...
Do you think this is something new/different by any kind? can this improve UX somehow?
I code is a little bit messy I know, however it's still concise and easy to modify, basically you've 2 files to play with, routes/index.js at the back side the other App.vue.
Do you think Express.js is good fit for that kind of project or shall I use Marble.js ?
Waiting for further improvements & suggestions.
https://github.com/bitsnaps/reactive-stack
Best Regards

Although RxJS does provide many interesting and useful advantages I have not seen much demand for its use with Express. So @bitsnaps I think the honest answer to this question may be that ExpressJS and most of the its eco system are not a great fit. However please do not let any one put you off from experimenting. I gave a little talk on the observables proposal comparing it to a simpler proposal a couple of years back to a boot camp meetup. It may shed some light on why this complex proposal has not been taken up everywhere.
I am going to close this issue. If you want to re-open it please comment and I will do so.


Add CI job for validating CSV entries

Closes #142.
#142 is about validating the hyperlinks in the CSV file, but it is possible and perhaps useful to extend the validation to other fields as well.  As an example, I have added basic sanity checks on the latitude, longitude, and elevation columns.
The job also adds annotations/comments in the PR on lines that fail the validation checks.

It seems to be working well.  One hiccup is that the Australian BOM website rejects automated requests:

Your access is blocked due to the detection of a potential automated access request. The Bureau of Meteorology website does not support web scraping: if you are trying to access Bureau data through automated means, you should stop. You may like to consider the following options:

An anonymous FTP channel: http://www.bom.gov.au/catalogue/anon-ftp.shtml -  this is free to access, but use is subject to the default terms of the Bureau's copyright notice: http://www.bom.gov.au/other/copyright.shtml
A Registered User service for continued use of Bureau data if your activity does not comply with the default terms: http://reg.bom.gov.au/other/charges.shtml noting charges apply to most data products. Please contact<EMAIL_ADDRESS>to discuss your requirements.

If you still need assistance in accessing our website, please contact us by filling in your details at http://reg.bom.gov.au/screenscraper/screenscraper_enquiry_form/ and we will get in touch with you. Thank you for your understanding.

It is presumably easy enough to bypass this by specifying a useragent or somesuch, but perhaps it is better to just comply.  I suppose we could add an exception in the validator to skip certain URLs.  @AdamRJensen?
The other URL failures seem to be legitimate issues.  I suggest addressing them in separate PRs to keep this one focused.

This is awesome @kandersolar, thank you so much!


List

You might want to take a look at this project on Gitlab for a larger list
https://gitlab.com/ZeroDot1/CoinBlockerLists/issues/1
Also, in your post : https://laskowski-tech.com/resources/web-server-malware-investigating/
Note that Gravity has been closed. Could suggest sucuri scan instead.

Hell, thank you for the info. I am familiar with Zerodot's list. As this package is aimed at webserver malware I can't pull directly from  the list as is due to IP's used by Cloudflare and other CDN's that if added here would impact legitimate performance.
I have updated my site from Gravity scan though to sucuri, I also enjoy their external scanning and now that Gravity is ended its a pretty good option.


Deployment fails if Apex class does not already exist

Is this a bug report?
Yes

Did you try recovering your dependencies?

Yup!
Which terms did you search for in User Guide?

😬
Environment

(paste the output of the command here)
Steps to Reproduce

Create a new project and deploy it to Salesforce (the controller and Visualforce page shouldn't exist yet)
Fill out the .local.env with your Salesforce sandbox creds
run yarn build && yarn deploy

Expected Behavior

The deployment should succeed. All green checks.
Actual Behavior

I received the following error however the Apex class SalesPortalController was created. When I ran yarn deploy again, the deployment succeeded.
$ yarn deploy
yarn run v1.5.1
$ react-scripts deploy

✔ Logging in as<EMAIL_ADDRESS>✔ Bundling build assets as static resource
✔ Deploying bundle as SalesPortal.resource
✔ Checking for SalesPortalController

TypeError: this._createSingle is not a function
    at Tooling.Connection.insert.Connection.create (/Users/mitchconquer/Projects/sales-portal/node_modules/jsforce/lib/connection.js:728:12)
    at module.exports.SObject.insert.SObject.create (/Users/mitchconquer/Projects/sales-portal/node_modules/jsforce/lib/sobject.js:62:21)
    at conn.tooling.sobject.findOne.then.then.res (/Users/mitchconquer/Projects/sales-portal/node_modules/salesforce-react-scripts/scripts/deploy.js:155:10)
    at tryCallOne (/Users/mitchconquer/Projects/sales-portal/node_modules/jsforce/node_modules/promise/lib/core.js:37:12)
    at /Users/mitchconquer/Projects/sales-portal/node_modules/jsforce/node_modules/promise/lib/core.js:123:15
    at flush (/Users/mitchconquer/Projects/sales-portal/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c react-scripts deploy
Directory: /Users/mitchconquer/Projects/sales-portal
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/mitchconquer/Projects/sales-portal/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Resolved in v3.1.2-0


Drag and drop feature in system dashboard

It would be good to have if we can able to drag and drop the items in system dashboard. It is difficult to accomplish the tasks by priority of story setter. But it should be useful the assigned is also provided with an option to priortize this

Hi @igowthamr. I'm from a team at Atlassian that is currently in the process of migrating the ownership over to us from GitHub. As a part of this, we're currently going through the backlog of issues and prs to see what can still be addressed and what should be closed.
Can you please provide a little more context around this? What system dashboard are you referring to? Provide screenshots if possible.

As it has been almost 2 months with no response, closing this issue. Please feel free to reopen if needed.


Could not resolve "pinceau__flat.ts"

Version 0.3.0 throws this error. Adding resolution to 0.2.0 fixes the issue
✘ [ERROR] Could not resolve "pinceau__flat.ts"

    node_modules/pinceau/dist/runtime.mjs:2:40:
      2 │ import { aliases, flattenedTheme } from 'pinceau__flat.ts';
        ╵                                         ~~~~~~~~~~~~~~~~~~

  You can mark the path "pinceau__flat.ts" as external to exclude it from the bundle, which will
  remove this error.

Yea it's fixed. Thanks a lot!


Browser cannot find @angular/material

Bug, feature request, or proposal:
Bug
What is the expected behavior?
Angular Material loads correctly in the browser
What is the current behavior?
Angular Material cannot be found (error 404) and the application will not load as a result.
What are the steps to reproduce?
Follow the steps to create a small Angular app as shown in https://angular.io/docs/ts/latest/quickstart.html
Add the Material components as shown in https://github.com/angular/material2/blob/master/GETTING_STARTED.md
Start the Angular app
Here's a plunker:
http://plnkr.co/edit/eu16LXv5iy0FGuleiWfn

This doesn't seem like it's a bug, you aren't actually including the material barrels in your systemjs.config.js, and therefore they aren't available to your application.
Adjust your systemjs.config to the following
/**
 * System configuration for Angular samples
 * Adjust as necessary for your application needs.
 */
(function (global) {
  System.config({
    transpiler: 'typescript',
    typescriptOptions: {
      emitDecoratorMetadata: true
    },
    paths: {
      // paths serve as alias
      'npm:': 'node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',
      // angular bundles
      '@angular/core': <EMAIL_ADDRESS>      '@angular/common': <EMAIL_ADDRESS>      '@angular/compiler': <EMAIL_ADDRESS>      '@angular/platform-browser': <EMAIL_ADDRESS>      '@angular/platform-browser-dynamic': <EMAIL_ADDRESS>      '@angular/http': <EMAIL_ADDRESS>      '@angular/router': <EMAIL_ADDRESS>      '@angular/forms': <EMAIL_ADDRESS>      // other libraries
      'rxjs':                      'npm:rxjs',
      'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      '.': {
        defaultExtension: 'ts'
      },
      'node_modules': {
        defaultExtension: 'js'
      },
      app: {
        main: './main.js',
        defaultExtension: 'js'
      },
      rxjs: {
        defaultExtension: 'js'
      },
      'angular-in-memory-web-api': {
        main: './index.js',
        defaultExtension: 'js'
      },
      '@angular/material': {
        format: 'cjs',
        main: 'material.umd.js'
      }
    }
  });
})(this);

You have to configure your module loader to know what any third-party import (such as @angular/material) is.


Prevent quoting numeric keys

Although object keys are always strings, it's cheaper to treat them as numbers where applicable, esp when url encoding...
current
'1':(locationID:-2)
url encoded
%271%27:(locationID:-2)
proposed
1:(locationID:-2)

This is important for eventually sparse matrix encoding.
ty Casey.


Add 3 new enemies to pncl addon

Drowning, Pull sniper, and Puffing enemy

that's more enemies in your addon...


[ION-1407] Nextjs: access site url and distribution id at runtime

It's obviously not possible to link itself
discord: https://discord.com/channels/983865673656705025/1177071497974648952/1223082317828853821
ION-1407

It would be great if we could just add the Distribution ID in an env var in the lambda... We have env vars like CACHE_BUCKET_NAME and REVALIDATION_QUEUE_URL... can we just add the distribution ID? Without it, this complex workaround is the only way to achieve ISR.


fix: TextField, Input exports

What are the relevant tickets?
Fix missing exports in https://github.com/mitodl/smoot-design/releases/tag/v1.1.0
Description (What does it do?)
Adds the missing exports.

:tada: This PR is included in version 1.1.1 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Merge for v4.1

🌳 New

m.new_inset_map()

🔨 fixes

allow using a scalar radius for calculating ellipse and rectangle points
make sure the blit-manager always uses the correct figure object
make histogram plot background visible (but set boundary color to none)

Codecov Report

Merging #76 (3d4b0aa) into master (5201379) will decrease coverage by 0.01%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   71.61%   71.60%   -0.02%
==========================================
  Files          12       12
  Lines        5673     5684      +11
==========================================
+ Hits         4063     4070       +7
- Misses       1610     1614       +4

Impacted Files
Coverage Δ

eomaps/_shapes.py
71.93% <66.66%> (-0.14%)
:arrow_down:

eomaps/eomaps.py
65.25% <66.66%> (+<0.01%)
:arrow_up:

eomaps/helpers.py
76.23% <77.77%> (+0.03%)
:arrow_up:

Continue to review full report at Codecov.

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


Review payment identifies the recipient

reviewPaymentLocal identifies the recipient. There are 3 outcomes.

The identify succeeds, the caller is notified, and the call exits. ReadyToSend
If an identify ever succeeds or the recipient is tracked or untracked by this device then the caller is notified just like 1.
The identify errors out, the caller gets a banner and then hangs out forever. If 2 ever happens that's great.

This one can wait until after code 🍟

nah


Translation Custom Widget

Hello,
i want to use the custom translation widget in this repo.
I followed all the steps in the description and i can add the custom to my experience builder app.
The problem:
Just the default key from the default.ts are showing up.
If i change the locale for example to "de" and yes i have a de.js file, where the keys are translated, i get just the noation within the brackets. For example for ${key1} i get just "key1".
In the manifest file i added the languages in translatedLocales..
In the developer tools i can find an error:

Do i need any requirements on my webserver where my files are saved to give acces for my portal?
For example does node.js has to be installed in IIS or on the webserver itself?
Can anybode help me to get this widget running?

@Skormsaw This is caused by this breaking change: https://developers.arcgis.com/experience-builder/guide/1.10/whats-new/#widget-translation-file-format. This is fixed. Could you give it a try?

Thank You @qlqllu ! That worked very well!