Index Page Incredibly Slow to Load - Slow SQL Query

Description
Recently on my Gitea instance, loading the index page started taking an absolute eternity, 30 seconds+ quite often. This is a bug report / analysis as to why.
I took a look in the logs for the container and noticed this:
2024/09/23 17:16:08 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/events for <IP_ADDRESS>:0, 200 OK in 292770.1ms @ events/events.go:18(events.Events)
2024/09/23 17:16:11 ...eb/routing/logger.go:68:func1() [W] router: slow      GET / for <IP_ADDRESS>:0, elapsed 3380.0ms @ web/home.go:32(web.Home)
2024/09/23 17:16:29 ...activities/action.go:461:GetFeeds() [W] [Slow SQL Query] SELECT `action`.* FROM `action` INNER JOIN `repository` ON `repository`.id = `action`.repo_id WHERE user_id=? AND is_deleted=? ORDER BY `action`.`created_unix` DESC LIMIT 20 [1 false] - 22.823196669s

Hmm... that's odd. Why would that query be so slow?
Running similar query against database using my actual user_id=2 and is_deleted = 0 returns in 0.006 seconds
MariaDB [gitea]> analyze select action.* from action inner join repository on repository.id = action.repo_id where user_id=3 and is_deleted=0 order by action.created_unix desc limit 20;
+------+-------------+------------+--------+-------------------------------------+--------------------+---------+----------------------+------+--------+----------+------------+-----------------------------+
| id   | select_type | table      | type   | possible_keys                       | key                | key_len | ref                  | rows | r_rows | filtered | r_filtered | Extra                       |
+------+-------------+------------+--------+-------------------------------------+--------------------+---------+----------------------+------+--------+----------+------------+-----------------------------+
|    1 | SIMPLE      | action     | ref    | IDX_action_user_id,IDX_action_r_u_d | IDX_action_user_id | 9       | const                | 340  | 20.00  |   100.00 |     100.00 | Using where; Using filesort |
|    1 | SIMPLE      | repository | eq_ref | PRIMARY                             | PRIMARY            | 8       | gitea.action.repo_id | 1    | 1.00   |   100.00 |     100.00 | Using index                 |
+------+-------------+------------+--------+-------------------------------------+--------------------+---------+----------------------+------+--------+----------+------------+-----------------------------+
2 rows in set (0.006 sec)

Strange... similar query gets results quite quickly.
Let's try removing the where...
Wow! That makes the query take significantly longer!
MariaDB [gitea]> analyze select action.* from action inner join repository on repository.id = action.repo_id order by action.created_unix desc limit 20;
+------+-------------+------------+-------+------------------+----------------------------+---------+---------------------+------+---------+----------+------------+----------------------------------------------+
| id   | select_type | table      | type  | possible_keys    | key                        | key_len | ref                 | rows | r_rows  | filtered | r_filtered | Extra                                        |
+------+-------------+------------+-------+------------------+----------------------------+---------+---------------------+------+---------+----------+------------+----------------------------------------------+
|    1 | SIMPLE      | repository | index | PRIMARY          | IDX_repository_is_template | 1       | NULL                | 60   | 60.00   |   100.00 |     100.00 | Using index; Using temporary; Using filesort |
|    1 | SIMPLE      | action     | ref   | IDX_action_r_u_d | IDX_action_r_u_d           | 9       | gitea.repository.id | 398  | 1437.77 |   100.00 |     100.00 |                                              |
+------+-------------+------------+-------+------------------+----------------------------+---------+---------------------+------+---------+----------+------------+----------------------------------------------+
2 rows in set (45.996 sec)

Output from the actual select statement:

MariaDB [gitea]> select action.* from action inner join repository on repository.id = action.repo_id order by action.created_unix desc limit 20;
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| id    | user_id | op_type | act_user_id | repo_id | comment_id | is_deleted | ref_name | is_private | content                  | created_unix |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| 86272 |       1 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86274 |       7 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86273 |       8 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86269 |       1 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86271 |       7 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86270 |       8 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86266 |       1 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86268 |       7 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86267 |       8 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86263 |       1 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86265 |       7 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86264 |       8 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86260 |       1 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86262 |       7 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86261 |       8 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86257 |       1 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86259 |       7 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86258 |       8 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86254 |       1 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86256 |       7 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
20 rows in set (38.802 sec)

Changing the select to remove the inner join:

MariaDB [gitea]> select * from action order by created_unix desc limit 20;
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| id    | user_id | op_type | act_user_id | repo_id | comment_id | is_deleted | ref_name | is_private | content                  | created_unix |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| 86273 |       8 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86274 |       7 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86272 |       1 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86270 |       8 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86271 |       7 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86269 |       1 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86267 |       8 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86268 |       7 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86266 |       1 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86264 |       8 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86265 |       7 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86263 |       1 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86261 |       8 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86262 |       7 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86260 |       1 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86258 |       8 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86259 |       7 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86257 |       1 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86255 |       8 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86256 |       7 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
20 rows in set (0.003 sec)

From reviewing the source code, the columns for repository are intentionally ignored. https://github.com/go-gitea/gitea/blob/e1f0598c8f5af5ac95f5e13b74fbab99506762db/models/activities/action.go#L456-L459
With this knowledge, I was able to build a significantly faster query that achieves the same thing (only getting actions for repositories that exist in the repository table):

MariaDB [gitea]> select action.* from action where repo_id not in (select unique(repo_id) from action where repo_id not in (select id from repository)) order by action.created_unix desc limit 20;
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| id    | user_id | op_type | act_user_id | repo_id | comment_id | is_deleted | ref_name | is_private | content                  | created_unix |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| 86273 |       8 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86274 |       7 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86272 |       1 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86270 |       8 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86271 |       7 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86269 |       1 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86267 |       8 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86268 |       7 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86266 |       1 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86264 |       8 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86265 |       7 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86263 |       1 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86261 |       8 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86262 |       7 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86260 |       1 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86258 |       8 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86259 |       7 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86257 |       1 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86255 |       8 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86256 |       7 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
20 rows in set (0.028 sec)

Look at that! 0.028 seconds! Much better! But wait? What in the world is that query? Let me break it down a bit:
The original query is completing an "inner join" for the apparently sole purpose of determing if the actions belong to repositories that currently exist.
The first thing I tried was to change it from an inner join to a subquery:
MariaDB [gitea]> analyze select action.* from action where repo_id in (select id from repository) order by action.created_unix desc limit 20;
+------+-------------+------------+-------+------------------+----------------------------+---------+---------------------+------+---------+----------+------------+----------------------------------------------+
| id   | select_type | table      | type  | possible_keys    | key                        | key_len | ref                 | rows | r_rows  | filtered | r_filtered | Extra                                        |
+------+-------------+------------+-------+------------------+----------------------------+---------+---------------------+------+---------+----------+------------+----------------------------------------------+
|    1 | PRIMARY     | repository | index | PRIMARY          | IDX_repository_is_template | 1       | NULL                | 60   | 60.00   |   100.00 |     100.00 | Using index; Using temporary; Using filesort |
|    1 | PRIMARY     | action     | ref   | IDX_action_r_u_d | IDX_action_r_u_d           | 9       | gitea.repository.id | 398  | 1437.77 |   100.00 |     100.00 |                                              |
+------+-------------+------------+-------+------------------+----------------------------+---------+---------------------+------+---------+----------+------------+----------------------------------------------+
2 rows in set (42.362 sec)

Unfortunately... this is also just as slow...
So thinking about it... how do you make it faster? What are we trying to do? Exclude actions that have a repo_id that is not in repositories right?
Let's take a look at the queries we just used above!
MariaDB [gitea]> select unique(repo_id) from action;
+---------+
| repo_id |
+---------+
|       1 |
|  ...    |
|      70 |
+---------+
55 rows in set (0.001 sec)

MariaDB [gitea]> select id from repository;
+-----+
|  id |
+-----+
|   1 |
| ... |
|  70 |
+-----+
60 rows in set (0.000 sec)

Ok, both of those look to be pretty similar, but what's happening is MariaDB needs to compare all of the ids against the "select id from repository" part of the subquery.
This is likely the "same thing" that MariaDB is doing when completing the above inner join.
So how do you make this faster?
Let's flip it around and only get the repo_ids of actions that are not in the repository table!
MariaDB [gitea]> select unique(repo_id) from action where repo_id not in (select id from repository);
Empty set (0.001 sec)

Neat! For me it's an empty set! (and it generally should be; however, repo_id is not a foreign key in the current schema)
Now, when you do a select against that subquery, it is much faster to execute as there is "less" that needs to be scanned for each row.
Bringing us back to this...

MariaDB [gitea]> select action.* from action where repo_id not in (select unique(repo_id) from action where repo_id not in (select id from repository)) order by action.created_unix desc limit 20;
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| id    | user_id | op_type | act_user_id | repo_id | comment_id | is_deleted | ref_name | is_private | content                  | created_unix |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
| 86273 |       8 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86274 |       7 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86272 |       1 |       8 |           1 |      40 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86270 |       8 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86271 |       7 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86269 |       1 |       8 |           1 |      42 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86267 |       8 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86268 |       7 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86266 |       1 |       8 |           1 |      46 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86264 |       8 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86265 |       7 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86263 |       1 |       8 |           1 |      48 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86261 |       8 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86262 |       7 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86260 |       1 |       8 |           1 |      64 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86258 |       8 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86259 |       7 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86257 |       1 |       8 |           1 |      39 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86255 |       8 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
| 86256 |       7 |       8 |           1 |      67 |          0 |          0 |          |          0 | Removed for Report       |<PHONE_NUMBER> |
+-------+---------+---------+-------------+---------+------------+------------+----------+------------+--------------------------+--------------+
20 rows in set (0.028 sec)

That is where the odd looking subquery comes from; however, it leads to significantly faster queries that still maintain the "same" restrictions
as the existing inner join!
Finally, let's add user_id=2 and is_deleted=0 back just for a "apples to apples" comparison with original query:
MariaDB [gitea]> analyze select action.* from action where repo_id not in (select unique(repo_id) from action where repo_id not in (select id from repository)) and user_id=2 and is_deleted=0 order by action.created_unix desc limit 20;
+------+--------------+------------+----------------+--------------------+----------------------------+---------+-------+------+--------+----------+------------+-------------------------------------------------+
| id   | select_type  | table      | type           | possible_keys      | key                        | key_len | ref   | rows | r_rows | filtered | r_filtered | Extra                                           |
+------+--------------+------------+----------------+--------------------+----------------------------+---------+-------+------+--------+----------+------------+-------------------------------------------------+
|    1 | PRIMARY      | action     | ref            | IDX_action_user_id | IDX_action_user_id         | 9       | const | 186  | 20.00  |   100.00 |     100.00 | Using where; Using filesort                     |
|    2 | SUBQUERY     | action     | index_subquery | IDX_action_r_u_d   | IDX_action_r_u_d           | 9       | func  | 796  | NULL   |   100.00 |       NULL | Using index; Using where; Full scan on NULL key |
|    3 | MATERIALIZED | repository | index          | PRIMARY            | IDX_repository_is_template | 1       | NULL  | 60   | 60.00  |   100.00 |     100.00 | Using index                                     |
+------+--------------+------------+----------------+--------------------+----------------------------+---------+-------+------+--------+----------+------------+-------------------------------------------------+
3 rows in set (0.002 sec)

Neat! Just as fast (0.002 seconds), I'm omitting the actual output from this query as it's just an absolute load of json in the content column, but otherwise looks similar to above samples.
I'd test changing the query in the source code; however, I do not have a Go development environment currently setup. I do hope this knowledge can be incorporated into the next version update for faster index page loads!
Thanks!
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
AlmaLinux 9.4 - Official Gitea container
How are you running Gitea?
Official gitea container, running on podman:
REPOSITORY                 TAG         IMAGE ID      CREATED       SIZE
docker.io/gitea/gitea      latest      f5b290987d7d  2 weeks ago   168 MB

Database
MySQL/MariaDB

Any time we need to teach dumb database engine to execute simple queries with such a mess, it leads to "wtf is happening here???" in the feature.
Have you tried to update statistics/rebuild indexes?

The indexes are already there, the query that is being ran is just not optimized to use the indexes appropriately.
The tl;dr is the because of the inner join, every row on actions needs to be compared repo_id == repository.id?
Limiting the number of comparisons (by only comparing against the set of repo_id that do not exist in repository.id) massively increases performance. In my example, I have ~70 repositories and ~86k actions.
Each of the 86k actions needs to be compared against ~70 repository.id values, leading to 86k * 70 = ~6 million comparisons. Reducing that to... 0 (in my case) means that the query can run quite a lot faster. It's making the database do less work.
Instead of asking "get me the set of actions for the repo_ids in repository.id" ask "get me the set of actions with a repo_id not in the set of ids that do not exist in repository.id"
i.e. it's a "double negative" to get back to the same place, but let's the database figure it out a lot faster.
Ideally action.repo_id should be a foreign key to repository.id, then the database would already know if the repository exists in the repository table already.

Maybe we can remove the inner join directly and provide a doctor command to clean the dirty records on action table.

@lunny that would probably work pretty well, maybe have it be one of the "cronjobs" where it removes action entries if they refer to repos that do not exist in the repository table. This could be done using the select unique(xxx) not in (select id) query example.
The select without the join is plenty fast, it's just the comparison between tables that's slow.
Ideally, I believe that action.repo_id should be a foreign key to the repository table and then a delete cascade can be added to automatically "clean up" the action table as well.

On the index page (and on pagging)

Description
Recently on my Gitea instance, loading the index page started taking an absolute eternity, 30 seconds+ quite often. This is a bug report / analysis as to why.

On which hardware du you run gitea?
After #31752 the whole start page need ~3-5 seconds. It run on an NUC with an Intel Pentium Silver J5005 and 32GB RAM and PostgreSQL.
giteadb=# select count(*) from repository;
 count
-------
 24853
(1 Zeile)

giteadb=# select count(*) from action;
  count
---------
 3951400
(1 Zeile)

In my case the problem is this
2024-09-25 07:48:35.236 CEST [2120998] gitea@giteadb LOG:  Dauer: 2207.702 ms  Ausführen <unnamed>: SELECT count(*) FROM "action" INNER JOIN "repository" ON "repository".id = "action".repo_id WHERE user_id=$1 AND is_deleted=$2
2024-09-25 07:48:35.236 CEST [2120998] gitea@giteadb DETAIL:  Parameter: $1 = '1', $2 = 'f'

which is made on every page. All other stuff is fast now.

@somera #32127 will make it more faster after #31752 .


How do I use the new bindings with SDL.zig?

I have seen the use of the "gl.load" function, but I don't know how to get the required parameters to pass when using SDL.zig. I have seen the other examples with glfw, but I don't understand or know which parameters have to be passed. My project was working fine before, but now it won't run saying that a function isn't bound.
lib/zgl/binding.zig:2722:54: 0x296d3e in createProgram (usg)
    return (function_pointers.glCreateProgram orelse @panic("glCreateProgram was not bound."))();
                                                     ^
lib/zgl/zgl.zig:757:68: 0x263b9c in createProgram (usg)
    const program = @intToEnum(types.Program, binding.createProgram());
                                                                   ^
src/Renderer.zig:48:38: 0x2636a3 in init (usg)
    const program = gl.Program.create();
    ...

In a similar way to the mach-glfw example, you invoke loadExtensions with SDL_GL_GetProcAddress

Well, the following seems to compile and run, but I don't know if it's the intended way to do it:
fn glGetProcAddress(p: []const u8, proc: [:0]const u8) ?*const anyopaque {
    _ = p;
    return sdl.c.SDL_GL_GetProcAddress(@ptrCast([*c]const u8, proc));
}

    const proc: []const u8 = undefined;
    try gl.loadExtensions(proc, glGetProcAddress);

you can just use void for the context parameter:
fn glGetProcAddress(_: void, proc: [:0]const u8) ?*const anyopaque {
    return sdl.c.SDL_GL_GetProcAddress(@ptrCast([*c]const u8, proc));
}
try gl.loadExtensions({}, glGetProcAddress);

I think it would be helpful to explain what the function does and maybe document it in the SDL.zig repo?


standard the docs for installing from source

In the installing from source section can we make the elements all the same. Currently we tell the user how to install terra from source and then in the contributing file in the terra element we link to this documentation. In all the other elements in the documentation we link to the contributing file in element.
I recommend that we make them all like terra.

This is fixed by: https://github.com/Qiskit/qiskit/pull/318 and https://github.com/Qiskit/qiskit/pull/317


Wiki...

Hello. You can add one wiki how is calculate height of biomes ?

That is a very complicated formula, spanning thousands of lines of code. It is based on different noise functions, like "Perlin noise" (you can Google that).
An interesting quote from Notch:

In the very earliest version of Minecraft, I used a 2D Perlin noise heightmap to set the shape of the world. Or, rather, I used quite a few of them. One for overall elevation, one for terrain roughness, and one for local detail. For each column of blocks, the height was (elevation + (roughnessdetail))64+64. Both elevation and roughness were smooth, large scale noises, and detail was a more intricate one. This method had the great advantage of being very fast as there’s just 1616(noiseNum) samples per chunk to generate, but the disadvantage of being rather dull. Specifically, there’s no way for this method to generate any overhangs.

So I switched the system over into a similar system based off 3D Perlin noise. Instead of sampling the “ground height”, I treated the noise value as the “density”, where anything lower than 0 would be air, and anything higher than or equal to 0 would be ground. To make sure the bottom layer is solid and the top isn’t, I just add the height (offset by the water level) to the sampled result.
Unfortunately, I immediately ran into both performance issues and playability issues. Performance issues because of the huge amount of sampling needed to be done, and playability issues because there were no flat areas or smooth hills. The solution to both problems turned out to be just sampling at a lower resolution (scaled 8x along the horizontals, 4x along the vertical) and doing a linear interpolation. Suddenly, the game had flat areas, smooth hills, and also most single floating blocks were gone.

The exact formula I use is a bit involved (and secret!), but it evolved slowly over time as I worked on the game. It still uses the 2D elevation and noisyness maps, though.

I would either copy settings from existing biomes, or experiment with the values in the config files, and document what you get.

@rutgerkok I need height for BiomeMaster ( plugin ) for Nukkit. If you want heights ( Elevation ) to biomes, please you can tell me?


[question] how to access or restore from the backup?

Hi!
I have a few questions:

For every time we run this script, a new file will be stored in S3, right? It wont overwrite the old one?
Once the file is saved in S3. How do we access its content? For example, what if I want to use a backup and restore it into another heroku app? Any idea on this? because wont the file be encrypted in the S3 bucket?

Thank you.

@kbaum any idea on the above^

Hi @MyraGul. It's been a while and I'm not using Heroku on a daily basis but you can expose a temporary obfuscated url in s3. I Unfortunately I think you would need to then access that file through the url and decrypt and decompress. Then you can expose it again through another temp obfuscated url and point heroku restore at this file. I can't remember the exact steps but you only need a publicly available pg dump to restore on Heroku.


Fix broken Native Image

After upgrading to Quarkus version 2.8.1.final the native image does work anymore.
Create a issue for it at Quarkus (#25325)
Until a new version is released we will create a non-native version of the Docker Image for CIM Mapping.

Look like Quarkus version 2.10.0 fixed the problem with Jaxb, so this issue can be picked up.


Remove mentions of "nightly"

The nightly feature was removed in 0.5.0, hence remove its mentions.

Thanks!


Analyzer confused by mixing in and implementing

Seen over at built_value, where we're using the analyzer via package:source_gen + package:build: https://github.com/google/built_value.dart/issues/220
The analyzer version I'm testing with is 0.30.0+2.
The issue is that when a class both mixes in and implements a mixin, the analyzer is unable to read annotations on getters of the mixin. This should repro the issue, although I don't know how to run a small test of this with just the analyzer:
--- mixin.dart

const String annotation = 'foo';

abstract class Mixin {
  @annotation
  int get x;
}

--- test.dart

import 'mixin.dart';

abstract class Value extends Object with Mixin implements Mixin {
}

Then what we find is that for the field 'x' on the class Value, calling field.metadata.constantValue returns null. We're getting to the field via the Value class, so: classElement.interfaces.single.fields.single.metadata.constantValue.
This only happens if 'Mixin' is in a different file -- if it's in the same file it returns the correct value.
I can repro within built_value, please let me know if that's useful to you and I'll post instructions. But I suspect there might be too many layers in between (source_gen, build) for that to be useful -- it may be quicker for you to try to create a repro yourself based on the code snippet above. (Or, if you can point me to how I could create such a minimal example, I'm happy to do so).
Thanks!

Never mind -- turns out it works with "computeConstantValue()" instead of "computeValue".
The caching of results is probably what led to me getting confused. Whether the analyzer was ever confused, I leave as an exercise for the reader ;)


On click of search button the heading "Dive into the world of Logic" gets hidden!!!

Description : When you click on the search button on the home page the search bar hides the heading "Dive into the world of Logic"
To Reproduce
Steps to reproduce the behavior:

Go to the home page of circuitverse.org
Click on search button icon
on the click of the button the search bar hides the line of user interface "Dive into the world of Logic".
See error

Expected behavior
The line "Dive into the world of Logic" should not get hide else it should be visible to the user.
Screenshots
Before :

After :

Additional context
Add any other context about the problem here.
Are you working on this issue? (Yes/No)
Yes!!!

I would like to work on this!!! kindly assign it to me!

@khanjasir90 this is actually not meant for this repository. The name is a bit confusing but cv-fronted is actually only the simulator part. You should open this issue in the Circuitverse repo.

okay @shubhankarsharma00


Fix Justfile dev command

Why:

The recent change to the way Tauri is installed and managed broke the
Justfile dev command

How:

Using yarn tauri dev instead of cargo tauri dev to run the dev
command

I don't understand this one.
the recent changes to tauri are that now we're supposed to run cargo dev, not yarn. I made this change a few weeks ago


Support SARIF format in Checkstyle plugin

Allow to turn on the SARIF output format for the Gradle Checkstyle plugin.
Expected Behavior
When defined something like the following is defined (similar to xml / html):
checkstyleTask {
  reports {
    sarif {
      required = true
    }
  }
}

generate the SARIF report by using SARIF output format (https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/SarifLogger.html)
Current Behavior
Currently, there is no way to generate SARIF output.
Context
GitHub supports SARIF format and generates code anotations looking like code-review comments. It is very convenient to have them this way so we can see the warning write next to the code it relates to.

Hi. I would like to work on this. Can I pick this up ?

Gradle currently uses ant task to execute the checkstyle. The CheckstyleAntTask current doesnt support the option of 'sarif'. I have raised a request there at https://github.com/checkstyle/checkstyle/issues/11985.
Should we wait for that to release or Should we attempt to implement Sarif Logger like we do for html ?


checking if the bot in a server

check if the bot is inside the server before showing the dashboard, else show a page to invite the bot

issue solved


(vite) Flash of unstyled content occurring on dev environment

What version of Remix are you using?
2.2.0
Are all your remix dependencies & dev-dependencies using the same version?

[X] Yes

Steps to Reproduce

clone https://github.com/aAtila/remix-vite-css-flash
npm run dev
visit http and do a couple of hard reloads (ctrl+shift+r)

Expected Behavior
Styles should be applied seamlessly upon page load without any interim period of unstyled content.
Actual Behavior
I am experiencing a flash of unstyled content when pages are initially loaded on my development environment. This issue manifests as unstyled content displaying for a brief moment - typically a second or two - before the styles are applied.
Occurence

dev: This behavior is consistently reproducible in the development environment only.
build: The issue is not present when serving a build; the styles load as expected without any noticeable delay.

Possible duplicate of #7853 and #7870

Duplicate of #7878

Im getting a flash of styled content then unstyled for infinity


I can't able to use RawKeyboardListener on overlay

I want to show a suggestion in textformfield with the function to choose the option using arrows in keyboard. I tried with show menu but in show menu I can't able to use keyboard listener. & then I tried dropdown in that too I can't able to navigate to options using arrow keys, then I tried overlay, overlay widget is not responding to raw keyboard listener.
is there any way to achieve this?
how can I navigate through pop up options & in suggestions using arrow keys?

Hi @anandsubbu007
This platform is not meant for assistance on personal code. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you


context menu position

if you take a look at the video and you focus on the top left corner you will see that the context menu is visible there for a pretty small time before it takes the right position on the row of the table
https://user-images.githubusercontent.com/35760236/229760836-5e507160-5ce4-4b76-803e-95843734552b.mp4

This will probably be fixed by https://github.com/zakodium-oss/react-science/issues/469

This is probably fixed since we moved to a completely new context menu component
@hamed-musallam feel free to reopen if not


Should be able to create twins with components

Edge Tech requests ability to instantiate a twin with values in a given component

Thanks for reporting this issue!
Basic support for creation of twins with components has been added.
More advanced scenarios, like creating twins with components inherited from a base class, is still pending and tracked by #59.


NullPointers on Dedicated Servers (1.16.1 Fabric)

Using the latest version in curse. (v0.12)
https://pastebin.com/W1yWc6pm
Steps to repro:
Attempt to create a portal in a newly generated dedicated world
As soon as the loading finishes, attempt to step in.

I cannot reproduce this. Are you using other mods?

I'll try reproducing it again with my updated modlist and I'll send it over to you in a zip file if you wish, if it happens again that is.

Close because outdated.


npm2nix is broken

> nix-shell -p nodePackages.npm2nix

[nix-shell:~]$ npm2nix
module.js:327
    throw err;
    ^

Error: Cannot find module '/nix/store/5a8lcw2r1mjyca4n3yjrzd6d8m9ar3b2-node-npm2nix-5.12.0/lib/node_modules/npm2nix/lib/npm2nix.js'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/nix/store/5a8lcw2r1mjyca4n3yjrzd6d8m9ar3b2-node-npm2nix-5.12.0/lib/node_modules/npm2nix/lib/command.js:3:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

master from two or three days ago.

cc @svanderburg

I can confirm this. node2nix seems to work though (no idea what the differences are...)

node2nix is brilliant. @svanderburg maybe it’s time to phase out npm2nix?

@Profpatsch That's already what we have been doing. The only reason why there are still files left generated by npm2nix, is because it would break a couple of non-NPM packages.
I also intend to replace these affected packages, but it will take a bit of time as some of them are a bit obscure.

@svanderburg I’m afraid we can’t phase out the package itself. Maybe deprecate it and remove it on the next release?

Seems to work again.


How to clear existing value in date picker

clear your variable use as ng-model ?

ohh sorry i was looking for react-multiple-datepicker. issue raise at wrong github.

no prob ;)


fix(deps): update dependency bootstrap to v5

This PR contains the following updates:

Package
Type
Update
Change

bootstrap (source)
dependencies
major
^4.3.1 -> ^5.0.0

bootstrap (source)
devDependencies
major
^4.2.1 -> ^5.0.0

Release Notes

twbs/bootstrap
v5.0.2
Compare Source
🚀 Features

#34052: Automatically select an item in the dropdown when using arrow keys

🎨 CSS

#33621: Allow individual grid classes to override .row-cols
#34008: Fix x-paddings for select (with floating label, and in Firefox)
#34026: Set the correct color for popover header bottom border
#34034: Add missing transition to .form-select
#34044: Fix wrong comment text for tooltip
#34047: Handle complex expressions in add() & subtract()
#34048: Decouple --bs-table-bg and --bs-table-accent-bg
#34062: Document how to make utilities responsive using the API
#34124: fix(dropdowns): RTL for .dropdown-menu-*
#34161: fix(forms): unitless line-height for floating labels
#34223: docs(style): fix display of nested

#34245: Replace / division with multiplication and custom divide() function
#34255: Don't set auto margin on offcanvas close
#34281: Fix lingering Sass math
#34283: Update the divide() function and RFS
#34332: Fix another Sass division

☕ JavaScript

#33276: Add getOrCreateInstance method in base-component
#33371: Popover & Tooltip: Allow dispose/hide methods usage through jQueryIntreface
#33608: Utils: add getNextActiveElement helper function
#33845: Fix handling of transitionend events dispatched by nested elements
#33928: Reset inside a Dialog does not work if data-dismiss="modal" is set
#33947: Refactor scrollbar.js to be used as a Class
#33948: Add tests for scrollbar.js & better handling if a style property doesn't exist
#33960: fix isVisible false positives from deep nesting or alternate means
#33982: Don't add empty content holder when there is no content available
#34014: Fix backdrop "Cannot read property 'removeChild' of null" when removed from body
#34052: Automatically select an item in the dropdown when using arrow keys
#34070: Fix test of #34014
#34071: Change element.parentNode.removeChild(element) to element.remove()
#34085: Fix prevented show event disables modals with fade class from being displayed again
#34092: Backdrop: Fix stale body by removing unnecessary default
#34158: Register only one DOMContentLoaded event listener in onDOMContentLoaded
#34266: Fix carousel buttons
#34307: fix(carousel): arrow keys break animation if carousel sliding

📖 Docs

#33724: Nav-tabs documentation example: Adjust example to querySelectorAll
#33749: add Bootstrap 5 Simplified Chinese translation
#34009: Drop BlinkMacSystemFont in docs
#34018: Adjusted z-index to cover "copy" buttons
#34040: Placeholder changes to input value in readonly input.
#34044: Fix wrong comment text for tooltip
#34050: Replace Freenode with Libera IRC server
#34062: Document how to make utilities responsive using the API
#34074: Update Hugo config and sitemap.xml
#34090: Change HTTP to HTTPS
#34143: Add positioned badges example to docs
#34160: img in horizontal card
#34175: Fix typo in sass.md ("theses"→ "these")
#34179: Missed explanations for variables override
#34180: docs: update dropdowns.md to reflect the correct version
#34183: docs: update migration.md to fix a typo
#34199: docs: update overview.md to fix typo
#34223: docs(style): fix display of nested

#34239: fix(docs): update docs to match the newest modal-open removal
#34251: Document the change to breakpoint mixins
#34256: Add important to utilities, mention it's usage and global variable
#34263: Fix error in JavaScript doc example
#34280: Remove a leftover sass:math module call

🛠 Examples

#34007: Dashboard example improvements
#34011: Cheatsheet: fix JS errors in setActiveItem()
#34214: fix accessibility issue on sidebars example

🌎 Accessibility

#34052: Automatically select an item in the dropdown when using arrow keys
#34214: fix accessibility issue on sidebars example

🔧 Utility API

#34062: Document how to make utilities responsive using the API
#34256: Add important to utilities, mention it's usage and global variable

🏭 Tests

#33948: Add tests for scrollbar.js & better handling if a style property doesn't exist

🧰 Misc

#34075: Improve vnu-jar.js
#34250: Replace Freenode with Libera.Chat in the remaining files
#34279: build/vnu-jar.js: clean up ignores

📦 Dependencies

Updated numerous devDependencies: https://github.com/twbs/bootstrap/pulls?q=is%3Apr+is%3Aclosed+label%3Adependencies+project%3Atwbs%2Fbootstrap%2F41

v5.0.1
Compare Source
🎨 CSS

#33551: Modals no longer use .modal-open to affect the  scroll
#33644: Validated inputs in .input-group shouldn't be behind sibling element
#33825: Prevent accent-bg from leaking in nested table
#33870: Don't redefine $list-group-color in loop
#33961: Revert :read-only selector back to [readonly]

☕ JavaScript

#33221: Prevent toast autohiding if focusing or hovering
#33288: Remove potential false positive assertions
#33327: Move get element functionality to a helper
#33381: Popover/Tooltip: streamline config property to start with underscore
#33609: Merge js-components transitionend listener callbacks into one method
#33635: Extract static DATA_KEY & EVENT_KEY to base-component
#33740: Refactor: move disposing properties into the base class
#33853: Fix backdrop rootElement not initialized in Modal
#33920: Fix: Click on input outside of dropdown-menu prevents dropdown from closing
#33938: Fix dropdown test warning "without expectations"

📖 Docs

#33709: Add Arabic translation
#33837: update About text now that Bootstrap 5 is live
#33841: Fix typo in scrollspy docs
#33842: Fix browser support versions in migration doc
#33843: Fix typo in migration.md
#33855: Remove extra t in Close button heading in Migration guide
#33868: Fix value
#33879: Fix "no long require" to "no longer require" typo
#33893: Add accessible names to SVG icons in alerts
#33896: Fix accordion link
#33901: docs: make tooltip anchor properly wrap the svg
#33904: Add Fathom Analytics to v5 docs
#33915: docs: fix rtlcss stringmap configuration
#33916: Remove unneeded "Edge Legacy" mention in Range docs
#33924: Fix "directoinal" typo in v5 migration docs

🛠 Examples

#33850: Fix unnecessary classes
#33859: Update Sidebars example to fix dividers and rendering on Chrome
#33926: Fix offcanvas example, using a custom trigger selector

🌎 Accessibility

#33893: Add accessible names to SVG icons in alerts

🏭 Tests

#33288: Remove potential false positive assertions
#33635: Extract static DATA_KEY & EVENT_KEY to base-component
#33927: Fix offcanvas test to expect the initial body overflow value
#33938: Fix dropdown test warning "without expectations"

🧰 Misc

#33923: CI: remove Node.js 10

📦 Dependencies

Updated numerous devDependencies: https://github.com/twbs/bootstrap/pulls?q=is%3Apr+is%3Aclosed+label%3Adependencies+project%3Atwbs%2Fbootstrap%2F38

v5.0.0
Compare Source
Highlights
#32155: Updated make-col() mixin to generate equal columns when no size is specified
#32763: Added new color-scheme() mixin
#33389: Dropdown menus now have option become clickable
#33453: Added new docs footer
#33548: Offcanvas header components are now vertically aligned
#33549: Added offcanvas-top modifier
#33634: Added support for .dropdown-items wrapped in
s
#33626: Fix v5 regressions in tab dropdown functionality
🚀 Features

#32763: Add color-scheme mixin
#33389: Dropdown — Add option to make the dropdown menu clickable
#33549: Add offcanvas-top modifier

🎨 CSS

#32155: Add equal column mixin
#32763: Add color-scheme mixin
#33292: Make accordion icon rotation more natural
#33411: Fix validation feedback icon in select multiple
#33478: Make .nav-link color consistent when using buttons
#33482: Dropdown — Apply positioning only when Popper is not used
#33548: Vertically align offcanvas header components
#33549: Add offcanvas-top modifier
#33550: Spinner alignment changes
#33598: Hide validation icons from multiple selects
#33600: Have $form-check-input-border's default derive from $black
#33607: Reduce color-scheme complexity
#33642: use :read-only css selector instead [readonly] for consistency
#33658: fix: use list-group variable instead of alert
#33736: accordion: fix border-top on Firefox

☕ JavaScript

#32439: Decouple BackDrop from modal
#33245: Decouple Modal's scrollbar functionality
#33249: Simplify Modal Config
#33250: Simplify ScrollSpy config
#33310: fix: make EventHandler better handle mouseenter/mouseleave events
#33389: Dropdown — Add option to make the dropdown menu clickable
#33429: Remove element event listeners through base component
#33451: Add missing things in hide method of dropdown
#33456: Use our isDisabled util on dropdown
#33466: Refactor dropdown's hide functionality
#33479: Fix dropdown escape propagation
#33496:  Use cached noop function
#33497: Use template literals instead of concatenation
#33499: Fix wrong carousel transformation, direction to order
#33545: Use the backdrop util in offcanvas, enforcing consistency
#33586: Tab.js: Fixes on click handling
#33589: refactor: make static selectMenuItem method private
#33612: tests: fix random BrowserStack failures in scrollbar
#33626: Fix v5 regressions in tab dropdown functionality
#33634: Dropdown: support .dropdown-item wrapped in
 tags
#33638: Fix toggle between modals example
#33643: fix: clicking an item in navbar dropdown should not collapse the dropdown in firefox
#33666: Modal.js: fix test for scrollbar
#33677: Offcanvas.js: If scroll is allowed, should allow focus on other elements
#33684: Don't change the value for altBoundary option
#33706: Scrollbar: respect the initial body overflow value

📖 Docs

#33446: Make offcanvas example fully static
#33453: Add new docs footer
#33521: The spacing margin side identifiers 's' and 'e' may be intuitive for …
#33522: Clarify docs accordion example
#33543: Update parcel.md
#33553: Add example: Panels stay open
#33567: Fixed wrong method name _getInstance
#33571: footer: fix rel=noopener attribute
#33583: docs: update clipboard.js to v2.0.8
#33597: Docs: Fix wrong dark attribute in Table - Vertical Alignment
#33632: Correct the heading for the States section
#33638: Fix toggle between modals example
#33664: Docs: fix W3C validation errors in list-group example
#33668: Update anchor.js to v4.3.1.
#33669: Change from preventOverflow to detectOverflow in boundary option
#33675: Fix typo
#33676: Fix Grid System docs
#33685: docs: fix the default value of Popper's boundary option
#33687: Fixes #33686 typo in RTL docs
#33690: Add Bootstrap Icons to alerts docs
#33726: Replace modal and scrollspy placeholder content
#33733: Tooltip/Popover — Minor doc updates
#33735: Clarify boundary option description
#33772: Improve overall new examples' accessibility
#33782: Add new team members to the Teams page
#33786: Docs: adding intro about web accessibility
#33797: Update links to CCA, MQ5 prefers-reduced-motion, evergreen WCAG urls
#33810: Tweak toast docs
#33829: Update migration guide for some v5 changes
#33832: Fix doc typo and Bootstrap Icons link
#33833: refactor(docs): Added form file input variables
#33834: Rewrite migration guide

Examples

#33097: Update RTL examples
#33759: fix: change margin breakpoints for bootstrap logo on double header
#33681: Fixes signup form in Heroes example
#33569: Improve responsiveness of Features examples

🌎 Accessibility

#33772: Improve overall new examples' accessibility
#33810: Tweak toast docs

🏭 Tests

#33578: Remove unnecessary data-bs-backdrop="static" from modal tests
#33612: tests: fix random BrowserStack failures in scrollbar
#33666: Modal.js: fix test for scrollbar
#33734: Add missing test for clicking select option in a dropdown

🧰 Misc

#33720: JS tests: add Node.js 16

📦 Dependencies

Updated numerous devDependencies https://github.com/twbs/bootstrap/pulls?q=is%3Apr+is%3Aclosed+label%3Adependencies+project%3Atwbs%2Fbootstrap%2F27

Configuration
📅 Schedule: 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.

⚠ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you check the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:
File name: @uportal/user-profile-menu/package-lock.json
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/eslint
npm ERR!   dev<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   @uportal/api-template-vue
npm ERR<EMAIL_ADDRESS>npm ERR!     node_modules/@uportal/api-template-vue
npm ERR!       workspace @uportal/api-template-vue from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from<EMAIL_ADDRESS>npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   @uportal/api-template-vue
npm ERR<EMAIL_ADDRESS>npm ERR!     node_modules/@uportal/api-template-vue
npm ERR!       workspace @uportal/api-template-vue from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /tmp/renovate/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate/cache/others/npm/_logs/2021-07-30T19_45_44_309Z-debug.log

This will take manual updates to CSS to support the new version of bootstrap.
It also changes Bootstrap's look slightly, we should compare with the rest of uP to ensure styles still align.


Setting wildcard value * for Access-Control-Allow-Headers

Closes: https://github.com/uglyog/pact-stub-server/issues/29
Let  me know if I should also bump version / create changlog.
Cheers

We can bump the version after releasing this


sink(ticdc): fix broken test in cdc/sink/mq & migrate test-infra to testify

What problem does this PR solve?

Issue Number: close #2907
What is changed and how it works?

fix goroutine leak in cdc/sink/mq/producer
migrate test-infra to testify & enable leak testing
fix broken mq_test

Check List
Tests

Unit test

Code changes

Has exported function/method change
Has exported variable/fields change

Release note
`None`.

/run-all-tests

/run-all-tests

/merge

/run-verify
/run-leak-test
/run-dm-integration-test

/run-dm-integration-test

/run-dm-integration-test

/run-integration-test

/run-all-tests

/run-verify


next_link on POST /account/password/email/requestToken is awkward

Link to problem area: https://spec.matrix.org/unstable/client-server-api/#post_matrixclientv3accountpasswordemailrequesttoken
Issue
https://matrix.to/#/!NasysSDfxKxZBzJJoE:matrix.org/$zcgp3rNQPQajiz0bsPhUYE7JypVy_ruQVPOcZ_Qqu04?via=matrix.org&via=libera.chat&via=envs.net

What is the next_link used for in this: https://spec.matrix.org/unstable/client-server-api/#post_matrixclientv3accountpasswordemailrequesttoken ?
Isn't that always a POST, so it is always ignored?

empirically it is not ignored :/

But I guess I should just ignore it for now?
(The email registration part during UIA could really use some graphs)

yeah :/

I guess the thing that confused me is, that the requestToken request is a POST request, so the next_link makes no sense there, with how I interpret the spec, because it should be ignored. So my only guess is, that it is copied from the GET version of the identity API?


Set up styling using Webpack inside Storybook

adds global sass (all settings, functions, mixins, fonts and base partials)
add the styles.scss entry point
switches from the sass preset to explicitly configure Webpack's sass handling
adds pattern styles for the Heading and Image patterns
adds webfonts
removes the indirection of the vendor sass folder from the Pattern Lab implementation, calling the files from node_modules directly

The styling needs more investigation, but this is a good waypoint.

I guess.
There're also questions around the webpack build in storybook, and whether there should also be a separate one for the main build including exporting etc.
Priority needs to be enabling being able to make a call whether we use Storybook as a Pattern Lab replacement.


Introduce two new APIs to C interface.

LoadModel API: loads a model from a file and returns an opaque handle
CreateSessionFromHandle: Creates a session from loaded model using LoadModel api

Why do you want to split it into two phase?

Why do you want to split it into two phase?

The original motivation was perf; however, later on realized sessions are thread safe in Onnx RT. I still think there is a value especially if you plan to expose some model manipulation APIs in the future.

So, this PR won't bring any perf benefit. If it is for APIs in the future, let's do it in the future. Because we don't know who will use it, in which way. Therefore it's likely it will get changed.


Don't use Ubuntu 18.04 actions runner.

What
The version is deprecated and will be removed by 12/1/22.
https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/
How

update actions runner version.
some actions may be needed to ensure compatibility with container images based on 18.04. we need to use 18.04 as a base for compatibility. see https://github.com/topolvm/topolvm/blob/69765670a87bb80eb69d05c83193bf7631c9c8c5/docs/maintenance.md#upgrade-procedure

Checklist

[ ] Finish implementation of the issue
[ ] Test all functions
[ ] Have enough logs to trace activities
[ ] Notify developers of necessary actions

will be fixed in #539


Live camera view no longer working on iOS

It appears that you're no longer able to use the live camera feed to detect codes on iOS devices – something to do with an update to the camera API maybe?

Tested on iPhone 7, X, Xs; Safari and Firefox.
All running iOS 12.

We fixed this by adding muted autoplay playsinline on the video element.

@Crisfole aren't those attributes already on the video element? https://github.com/PaulKinlan/qrcode/blob/production/app/index.html#L45
I've had some success by switching the getUserMedia API to use the navigator.MediaDevice object, but as the two don't adhere to the same interface it requires some deeper code changes.

Sorry, I just realized we'd switched to a wrapper of qr-reader...wrong repo.
On Thu, Apr 18, 2019, 10:10 AM rdarcy1<EMAIL_ADDRESS>wrote:

@Crisfole https://github.com/Crisfole aren't those attributes already
on the video element?
https://github.com/PaulKinlan/qrcode/blob/production/app/index.html#L45
I've had some success by switching the getUserMedia API to use the
navigator.MediaDevice
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
object, but as the two don't adhere to the same interface it requires some
deeper code changes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PaulKinlan/qrcode/issues/57#issuecomment-484526595,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADE4NP2YLKVK72IVCSYO3DPRB6NBANCNFSM4HG4IHEA
.


leverage spatialreference.org to allow user more flexibility in specifying projections.

Figuring out how to specify Spatial Reference Systems / Projections can be a big time sink.  Would be very cool to use spatialreference.org to auto convert whatever spatial reference specification the user has available.

spatialreference.org URL's are now the preferred method of specifying projections / Coordinate Reference Systems in spiderosm (as of v0.4.0).  Other formats (e.g. proj4text) are then downloaded from spatialreference.org


Develop

getting an error and filters dont work if I import filters example:
?filters=[{"filterId":1691515145194,"filterColor":"%23ff0000","filterName":"Alpha","includeMapTier":true,"mapTier":[10,16]},{"filterId":1691515155175,"filterColor":"%237F0945","filterName":"Beta","includeMapTier":true,"mapTier":[1,6]}]

getting an error and filters dont work if I import filters example

fixed


Setting outline: none! important; in preflight is too aggressive.

I have hard times working around this lines of code.
I struggle allot with focus management in my App. !important overrides my focus styles.
So i have to make them important too with higher specificity.
My suggestion would be to remove this lines from the preflight or make them optional.
https://github.com/tailwindcss/tailwindcss/blame/e1f3286141db27ac6d2d304d3730f152dd6e43de/css/preflight.css#L522

Interesting! What's your use case for applying focus styles to elements that are essentially unfocusable (tabindex="-1"), are you manually focusing those elements with JS in certain situations but don't want them keyboard accessible by default?
Not opposed to removing this at all, just want to understand the context better 👍

okey let me explain:
I have a AJAX Form and on submit i move focus to success or fail message on the top of the form. (requirements...) The whole page slides to this section and needs to be :focused with css.
I use role="alert" and everything works fine but when i focus the element there is no focusring.


Align GPQA zero-shot / few-shot prompts with paper?

GPQA uses a fixed prompt for zero-shot and few-shot evaluation (see Appendix A.3.1 of the paper). For example, this is the format of the zero-shot prompt:
What is the correct answer to this question: {QUESTION}
Choices:
(A) {CHOICE_A}
(B) {CHOICE_B}
(C) {CHOICE_C}
(D) {CHOICE_D}

Format your response as follows: "The correct answer is (insert answer here)".

In particular, note the final instruction to format the answer and that they also mention that they use a regex parser to extract the desired answer:

We extracted answers from the model response using a simple regex matching phrases like ‘answer is’, ‘answer:’ etc.

However, inspecting the details from lighteval I see we have the following for zero-shot:
Select the correct answer to the following questions.

Question: Identify the final product produced when cyclobutyl(cyclopropyl)methanol reacts with phosphoric acid in water.
A. spiro[3.4]oct-5-ene
B. 1,2-dimethylcyclohexa-1,4-diene
C. 1,2,3,4,5,6-hexahydropentalene
D. [1,1'-bi(cyclobutan)]-1-ene
Answer:

The trouble with this format is that it heavily penalises chat models which will typically produce a long-winded explanation and thus fail to produce the expected format (A,B,C,D) that a base model typically will.
Another thing I noticed is that the paper uses a fixed few-shot CoT prompt (link) which can be adapted to pure few-shot by removing the reasoning steps. However, it seems that lighteval samples fewshot prompts from the dataset and I wonder if it makes sense to align the evaluation in both cases (zeroshot / fewshot) in line with the paper?
Happy to take a stab at this one if you agree!

Cool points! We could completely have 2 versions, one multichoice looking at logprobs (which is cool because very, very fast) and the other following the original implem as closely as possible, therefore being generative if I understood well.
You can add the second one under the original keyword if you want :smiley:
Regarding the few shot CoT prompt, let's add it to #8 and do it in another PR - we'll notably need to change the format a bit if we want to allow to pass fixed few shot example files for example. Wdyt?

Yes, a generative version sounds great! I can start with the vanilla zero-shot and few-shot prompts and we add the CoT ones later as you suggest :)

Sounds good, I'll assign this to you then :)


SetConsoleScreenBufferInfoEx isn't working well on Window Terminal.

Windows Terminal version
1.15.3466.0
Windows build number
10.0.22621.963
Other Software
No response
Steps to reproduce
Please try to run this code:
#include <windows.h>
#include <stdio.h>

int main(void)
{
	HANDLE hStdout;
	CONSOLE_SCREEN_BUFFER_INFOEX csbiInfoEx{ 0 };
	csbiInfoEx.cbSize = sizeof(csbiInfoEx);
	SMALL_RECT winRect, srctScrollRect, srctClipRect;
	CHAR_INFO chiFill;
	COORD coordDest;
	COORD size = COORD{ 80, 25 };
	int i;

	printf("\nPrinting 20 lines for reference. ");
	printf("Notice that line 6 is discarded during scrolling.\n");
	for (i = 0; i <= 20; i++)
		printf("%d\n", i);

	hStdout = GetStdHandle(STD_OUTPUT_HANDLE);

	if (hStdout == INVALID_HANDLE_VALUE)
	{
		printf("GetStdHandle failed with %d\n", GetLastError());
		return 1;
	}

	// Get the screen buffer size.

	if (!GetConsoleScreenBufferInfoEx(hStdout, &csbiInfoEx))
	{
		printf("GetConsoleScreenBufferInfoEx failed %d\n", GetLastError());
		return 1;
	}

	// Set the screen buffer size.

	csbiInfoEx.dwSize = size;
	csbiInfoEx.srWindow = SMALL_RECT{ 0,0,size.X,size.Y };
	csbiInfoEx.dwMaximumWindowSize = size;

	if (!SetConsoleScreenBufferInfoEx(hStdout, &csbiInfoEx))
	{
		printf("SetConsoleScreenBufferInfoEx failed %d\n", GetLastError());
		return 1;
	}

	// Set the screen size.

	winRect = { 0,0,(short)(size.X - 1),(short)(size.Y - 1) };

	if (!SetConsoleWindowInfo(hStdout, true, &winRect))
	{
		printf("SetConsoleWindowInfo failed %d\n", GetLastError());
		return 1;
	}

	// The scrolling rectangle is the bottom 15 rows of the
	// screen buffer.

	srctScrollRect.Top = csbiInfoEx.dwSize.Y - 16;
	srctScrollRect.Bottom = csbiInfoEx.dwSize.Y - 1;
	srctScrollRect.Left = 0;
	srctScrollRect.Right = csbiInfoEx.dwSize.X - 1;

	// The destination for the scroll rectangle is one row up.

	coordDest.X = 0;
	coordDest.Y = csbiInfoEx.dwSize.Y - 17;

	// The clipping rectangle is the same as the scrolling rectangle.
	// The destination row is left unchanged.

	srctClipRect = srctScrollRect;

	// Fill the bottom row with green blanks.

	chiFill.Attributes = BACKGROUND_GREEN | FOREGROUND_RED;
	chiFill.Char.UnicodeChar = ' ';

	// Scroll up one line.

	if (!ScrollConsoleScreenBuffer(
		hStdout,         // screen buffer handle
		&srctScrollRect, // scrolling rectangle
		&srctClipRect,   // clipping rectangle
		coordDest,       // top left destination cell
		&chiFill))       // fill character and color
	{
		printf("ScrollConsoleScreenBuffer failed %d\n", GetLastError());
		return 1;
	}

	(void)getchar(); //Explicitly ignore return value.

	return 0;
}

Expected Behavior
With Windows Console Host I get the right size:

Actual Behavior
With Windows Terminal I don't get the right size screen as expected. See the point missing after the word scrolling.
Look at the green blanks filled at the bottom which occupies all the incorrect console size.
If I'm doing something wrong, please let me know. Thanks.

I think the only issue here is that we don't support screen size changes in Windows Terminal. If I remember correctly, the SetConsoleScreenBufferInfoEx call will change the size on the conhost side of the conpty connection, but that change isn't passed on to the conpty client. As a result, the two get out of sync and things can get weird. This problem is tracked in issue #5094.

Thanks for your response @j4james. Do you prefer I close this issue and use the tracked one?

Yea, that's probably easiest, thanks!
/dup #5094


Update open_practices.md

This is how I would structure this document, feel free to adapt some of it or none of it. The biggest persisting issue I noticed was a lot of information was in multiple places and that just adds text so I tried to apply the DRY rule to it and make all the copy as brief and straightforward as possible.

This is really helpful, thanks so much. I'll make a few modifications after this but otherwise will just merge all this in. Specifically, keeping the name as practices instead of guidelines because I think it's helpful to base this on behavior rather than on guidance, but maybe that's minor. And tagging is required not optional, and I want to keep the checklist process in some linkable place because users ask for it quite a bit.


Split EPs to test PVS Staging

This isn't presently useable. As it turns out, the terraform provider doesn't support one of the required endpoints for Power VS through the endpoints file. It only supports overriding that using an environment variable. We can't use the env vars b/c they will override everything, effectively requiring Power VS Staging and IBM Cloud VPC staging envs. That we don't have access to.

closing this. just pushing to a new branch. if anyone wants to use this, it's here, but not planning to keep it rebased onto upstream master


Deriving for a module with the same name as a standard library module

In ppx_deriving 2.2., it was possible to apply @@deriving on a module that happens to have the same name as a standard library module, e.g.:
module List = struct
    type 'a t = [`Cons of 'a | `Nil] [@@deriving show]
end
type 'a t = 'a List.t option [@@deriving show]

However, this results in an error in ppx_deriving 3.0:
ocamlfind ocamlc -c -package 'ppx_deriving.std' test.ml
File "test.ml", line 4, characters 0-46:
Error: Unbound value List.pp

Looking at the output of ppx_tools/rewriter, it appears that Ppx_deriving_runtime.List is shadowing the user-defined List module:
module List = struct ... end
let rec pp : ... =
  ((let open! Ppx_deriving_runtime in
      fun poly_a  ->
        fun fmt  ->
          function
          | None  -> Format.pp_print_string fmt "None"
          | Some x ->
              (Format.pp_print_string fmt "(Some ";
               (List.pp (fun fmt  -> poly_a fmt) fmt) x;
               Format.pp_print_string fmt<EMAIL_ADDRESS>"-A"])
and ...

Oh, this was an unintended result of the hygiene improvements. (Note that in the past, it would not be possible to use List.t and the standard library list in the same data structure.)
Let me take a stab at this...


@Accessors(chain = true) should work with inheritance

Link to the issue, https://github.com/peichhorn/lombok-pg/issues/148
This is a good feature, without this, it's not convenient to configure lombok.accessors.chain=true, If we are using inheritance in models.

as @randakar said, the resolution thing means we don't want to do this.


PodLooper example

oh, also: Normally I'm fine with having static functions (like Reset, and Controls) above main.
I'd say for the sake of clarity for the users we should prototype the functions at the top, and then define them below main.
That way the callback, and init are the first things a person reads, and then they can follow that to the details below if they want.


Register provider via policy For RecoveryServices.

Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:

[ ] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

/azp run java - recoveryservices - ci

API change check
API changes are not detected in this pull request.

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservices - mgmt - tests


Initial idea

I have spent an hour to make mimesis and factory_boy work together.
@lk-geimfari do you like my approach?
I have created a gist as a proof of a concept: https://gist.github.com/sobolevn/19032ff9ed03a167a3cc3337ebaebd99

@sobolevn Sure! Looks awesome. I'll try how it works right now.


Chess: Move E7 to E6

Please do not change the title. Just click "Submit new issue". You don't need to do anything else :D

Sorry @BengalPirate, you can't move twice in a row! You can ask someone to play the next turn :D


Remove warning about @Nullable var args

Unfortunatelly, it is commong to have wrapper functions that take
@Nullable var args and e.g. pass them immediately to a formatting/logging
third-party method that also takes @Nullable var args safely.
Because of this, erroring out on @Nullable T args... can cause a worse
experience than simply letting the local array args be considered a
@Nullable array. I am not too happy with current error reporting after
reverting this change, but the alternative blocks too many valid method
declarations.

cc: @ZacSweers (Skipping 0.7.0 internally due to this, unfortunately)


fix: bump node core version to 4.1.4

PR summary
Bumps our node core version to the latest.
PR Checklist
Please make sure that your PR fulfills the following requirements:

[x] The commit message follows the Angular Commit Message Guidelines.
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Document PushOver integration config

@stapelberg you can probably describe best which parameter means what.

The parameters are directly taken from https://pushover.net/api, where they are extensively documented.
I’ll be traveling the next couple of days, so I’m not sure when I’ll get around to doing something about this issue. If someone else wants to step in, that’d be appreciated.


[untested/wip] Fix all the other improper clones

This is pretty much the opposite of how it should work. You update the original objects and update those, but make a clone first for the "old" version, in order to maintain references. The current behaviour is actually correct - we just need to deal with arrays/collections/etc inside the objects.

That is completely incorrect. Once you clone it with your method, you create object references for any array/object/collection act. That means no matter which you patch (the clone or the object you got from the cache) you will patch both for each non-primitive value. Which is why there are all of these Update bugs creaping up where old and new share non-primituve properties it shouldn't.


fix HTTP Method error for the same URI with multiple Method

Description
Fix #1632
How was this PR tested?
updated the UT and tested in local

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Java void should maps to Unit

(\(x: Unit) -> 1) java.lang.System.out.println("hello")

Current status:
Simplify.transExpr: Coercion failed
Function: \ (x : Unit).
            1 : Unit -> Int
Argument: java.lang.System.out.println("hello") : java.lang.Void
Coercion: java.lang.Void <: Unit

Notes:

Despite the error message, what should be worked on should be the type checker, not the simplifier.
The mapping should be bidirectional ideally. Some thoughts are needed.

Isn't this done? @lihuanglx @zhiyuanshi ?


Update domain names

The *.orgbook.gov.bc.ca DNS records have been created.  Update the domain names in the configurations.
Permitify/dflow:

dev-dflow.orgbook.gov.bc.ca
dflow.orgbook.gov.bc.ca

The OrgBook Demo:

dev-demo.orgbook.gov.bc.ca

dev-demo-api.orgbook.gov.bc.ca

demo.orgbook.gov.bc.ca

demo-api.orgbook.gov.bc.ca

Routes migrated and certificates installed.


add new Kubernetes backend endpoints

Signed-off-by: Matthew Clarke<EMAIL_ADDRESS>Hey, I just made a Pull Request!
Part of https://github.com/backstage/backstage/issues/11309
I'm going to do the frontend parts and delete the deprecated endpoint in the next PR as this was getting too big.

:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[x] Added or updated documentation
[x] Tests for new functionality and regression tests for bug fixes
[x] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

@Rugvip @jhaals could I get a review? 🙏

@mclarke47 yep! will try to have a look tomorrow

@Rugvip, what is the easiest way to get a backstage token on the command line to test these endpoints out?

@jhaals done

I think I'm going to close this and re-open it as smaller PRs so it's more manageable


Rename AddBankAccountPage to AddPersonalBankAccountPage

Details

Since we are adding a new flow for adding a "verified" bank account to E.cash we'll want to differentiate between the modal that adds a personal bank account and the one that adds business bank account.
Adds a minor copy change to match new mockups

Fixed Issues
No Issue Prep for N5.5
Tests

Navigate to /add-personal-bank-account
Verify the "Add Bank Account" right side panel opens

QA Steps
No QA - as this flow isn't used by anything yet
Tested On

[x] Web

Skipping the other platforms as the changes are just in name so web is enough to prove things worked IMO.
Screenshots

Web

🚀 Deployed to staging in version: 1.0.65-1🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production in version: 1.0.68-4🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Added gene_phenotype flag to VEP analysis

Added gene_phenotype flag to VEP analysis, as this info is valuable in a diagnostics settings

Thanks much for the VEP improvements. Much appreciated.


site.login: true, But page still accessible

In the page's configuration  I set site.login: true in the header.
When I try to visit the page I am asked for a password. If I login with incorrect credentials or no credentials the content of the restricted page is showing. Page is malformed but visible. Information about incorrect login does show, but below the content of the shown page.
I am running latest grav, on a fresh project (I am learning at the moment)
Thank you

Thanks for the report, this is actually a problem with the login plugin.  I'll leave it here though as you've already created it.

Should already be fixed in version 2.0, which is currently in beta using Grav 1.1.
Going to fix this on the stable (1.3) version of the Login plugin too, with a minor release.

Thank you for your reply.
How can I upgrade plugin to 1.3, or tell which one is currently installed? I can't find it in my composer.json file.

You can check it via Admin, or in the user/plugins/login/blueprints.yaml file

I have updated the plugin to 1.3 and the issue is gone. Thank you.


Does model binding work for Ajax Posts

I have this:
public async Task<IActionResult> Post(TaskInput input)
And calling this method via ajax post, but the input Parameter is always null?

I'm trying to do the same as @adriaanp but it still doesn't work (I posted on stackoverflow : http://goo.gl/ycjV7k), and I don't find any solution for the moment. Are there news about it ?

Use [FromBody] for json posts


Flaky test MockSharedArbitrationTest.globalArbitrationWithoutSpill time metric

Bug description
https://github.com/facebookincubator/velox/actions/runs/11677911618/job/32516568911?pr=11384
[ RUN      ] MockSharedArbitrationTest.globalArbitrationWithoutSpill
E20241105 05:17:01.132427  8705 Exceptions.h:66] Line: /__w/velox/velox/velox/common/memory/SharedArbitrator.cpp:1163, Function:reclaimUsedMemoryByAbort, Expression:  Memory pool aborted to reclaim used memory, current capacity 256.00MB, memory pool stats:
Memory Pool[RootPool-2 AGGREGATE root[RootPool-2] parent[null] MALLOC track-usage thread-safe]<max capacity 256.00MB capacity 256.00MB used 256.00MB available 0B reservation [used 0B, reserved 256.00MB, min 0B] counters [allocs 0, frees 0, reserves 0, releases 0, collisions 0])>
RootPool-2 usage 256.00MB reserved 256.00MB peak 256.00MB
    MockTask3 usage 256.00MB reserved 256.00MB peak 256.00MB

Top 1 leaf memory pool usages:
    MockTask3 usage 256.00MB reserved 256.00MB peak 256.00MB
, Source: RUNTIME, ErrorCode: MEM_ABORTED
/__w/velox/velox/velox/common/memory/tests/MockSharedArbitratorTest.cpp:1833: Failure
Expected equality of these values:
  runtimeStats[SharedArbitrator::kMemoryArbitrationWallNanos].count
    Which is: 0
  1
[  FAILED  ] MockSharedArbitrationTest.globalArbitrationWithoutSpill (2 ms)

System information
CI
Relevant logs
No response

CC: @bikramSingh91 @xiaoxmeng @tanjialiang

@jinchengchenghh @mbasmanova   https://github.com/facebookincubator/velox/pull/11415 should have fixed this flakiness. Please reopen if you still see this error. thanks!


panic: runtime error: invalid memory address or nil pointer dereference

Hi. We are evaluating this tool and we noticed that it's crashing from time to time. Output from the log:
2023-03-01T15:05:33.577718925Z stdout F {"level":"error","ts":1677683133.5776238,"msg":"failed to get transaction from cache","transaction_id":"41f17f8c-f0f1-4d5a-b2kl1-03de1a64e9g0","error":"Key not found.","app":"testcoraza"}
2023-03-01T15:05:33.579874622Z stderr F panic: runtime error: invalid memory address or nil pointer dereference
2023-03-01T15:05:33.579991989Z stderr F [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x673bcb]
2023-03-01T15:05:33.580015811Z stderr F
2023-03-01T15:05:33.580072224Z stderr F goroutine 602 [running]:
2023-03-01T15:05:33.58034082Z stderr F github.com/corazawaf/coraza-spoa/internal.(*SPOA).processResponse(0xc000b4f800, {{0xc00214e00a?, 0x50?}, 0xc002169bd0?})
2023-03-01T15:05:33.580441486Z stderr F         /app/internal/response.go:86 +0x1eeb
2023-03-01T15:05:33.580541527Z stderr F github.com/corazawaf/coraza-spoa/internal.(*SPOA).Start.func1(0xc0021743c0)
2023-03-01T15:05:33.580629496Z stderr F         /app/internal/spoa.go:59 +0xa9
2023-03-01T15:05:33.580989239Z stderr F github.com/criteo/haproxy-spoe-go.(*conn).handleNotify(0xc001edbae0, {0x3, 0x1, 0x15b7, 0x2, {0xc00214e009, 0x305, 0x3ff3}, {0xc00214e000, 0x3ffc, ...}}, ...)
2023-03-01T15:05:33.581078331Z stderr F         /go/pkg/mod/github.com/criteo/haproxy-spoe-go@v1.0.6/notify.go:109 +0xea
2023-03-01T15:05:33.581489496Z stderr F github.com/criteo/haproxy-spoe-go.(*conn).runWorker(0xc001edbae0, {0x3, 0x1, 0x15b7, 0x1, {0xc002064009, 0x23c, 0x3ff3}, {0xc002064000, 0x3ffc, ...}}, ...)
2023-03-01T15:05:33.581587384Z stderr F         /go/pkg/mod/github.com/criteo/haproxy-spoe-go@v1.0.6/conn.go:162 +0x231
2023-03-01T15:05:33.58166379Z stderr F created by github.com/criteo/haproxy-spoe-go.(*conn).run
2023-03-01T15:05:33.581703092Z stderr F         /go/pkg/mod/github.com/criteo/haproxy-spoe-go@v1.0.6/conn.go:136 +0xbb0

Service is setup with default values as per documentation / examples.

@devasmith Can you check what are the values for timeout connect, timeout queue & timeout server configured to in haproxy vs transaction_ttl_seconds in coraza-spoa?

@devasmith Can you check what are the values for timeout connect, timeout queue & timeout server configured to in haproxy vs transaction_ttl_seconds in coraza-spoa?

Hi, sorry for the late reply.
timeout connect         10s
timeout server          10m

timeout queue has not been configured.
We bumped transation_ttl_seconds from 60000 to 6000000.
It seems as the internal/response.go causes this error. Managed to do a workaround but we disabled the service due to a memory leak.
			txInterface, err := app.cache.Get(id)
			if err != nil {
				app.logger.Error("failed to get transaction from cache", zap.String("transaction_id", id), zap.String("error", err.Error()), zap.String("app", app.name))
				return nil, fmt.Errorf("failed to get transaction from cache")
			}

So please, how can we fix this problem. I have now knowledge at Go language.
What does above code mean? And where can I paste this code to?

@devasmith Can you check what are the values for timeout connect, timeout queue & timeout server configured to in haproxy vs transaction_ttl_seconds in coraza-spoa?

Hi, sorry for the late reply.
timeout connect         10s
timeout server          10m

timeout queue has not been configured.
We bumped transation_ttl_seconds from 60000 to 6000000.
It seems as the internal/response.go causes this error. Managed to do a workaround but we disabled the service due to a memory leak.
			txInterface, err := app.cache.Get(id)
			if err != nil {
				app.logger.Error("failed to get transaction from cache", zap.String("transaction_id", id), zap.String("error", err.Error()), zap.String("app", app.name))
				return nil, fmt.Errorf("failed to get transaction from cache")
			}

If you use transaction_ttl_seconds, your coraza-spoa is old. Please update it and use transaction_ttl_ms. Now it's fixed and the value should be 600000 (for 10 minutes). Please be aware that every session you store, takes some memoro, so be sure to have enough memory for your server.

@devasmith Can you check what are the values for timeout connect, timeout queue & timeout server configured to in haproxy vs transaction_ttl_seconds in coraza-spoa?

Hi, sorry for the late reply.
timeout connect         10s
timeout server          10m

timeout queue has not been configured.
We bumped transation_ttl_seconds from 60000 to 6000000.
It seems as the internal/response.go causes this error. Managed to do a workaround but we disabled the service due to a memory leak.
			txInterface, err := app.cache.Get(id)
			if err != nil {
				app.logger.Error("failed to get transaction from cache", zap.String("transaction_id", id), zap.String("error", err.Error()), zap.String("app", app.name))
				return nil, fmt.Errorf("failed to get transaction from cache")
			}

If you use transaction_ttl_seconds, your coraza-spoa is old. Please update it and use transaction_ttl_ms. There was an inconsistency in session ID storage length units. Now it's fixed and the value should be 600000 (for 10 minutes). Please be aware that every session you store, takes some memoro, so be sure to have enough memory for your server.

I copied the value from the documentation that might have been old, we are using transaction_ttl_ms and had set value to 6000000 ms rather than 600000 ms which might have been too much.
We temporarily disabled the service due to the memory leak we encountered and haven't had time to look further into it but we would like to test this out again.

I download coreruleset v3.3.4 rules, then I start coraza-spoa, then I got this error:
$ Loading 1 applications
{"level":"error","ts":1680775797.2646449,"msg":"unable to create waf instance","app":"haproxy","error":"invalid WAF config: failed to compile rule (error parsing regexp: invalid or unsupported Perl syntax: (?<): FILES_NAMES|FILES "@rx (?<!&(?:[aAoOuUyY]uml)|&(?:[aAeEiIoOuU]circ)|&(?:[eEiIoOuUyY]acute)|&(?:[aAeEiIoOuU]grave)|&(?:[cC]cedil)|&(?:[aAnNoO]tilde)|&(?:amp)|&(?:apos));|['\"=]" "id:920120,phase:2,block,t:none,t:urlDecodeUni,msg:'Attempted multipart/form-data bypass',logdata:'%{MATCHED_VAR}',tag:'application-multi',tag:'language-multi',tag:'platform-multi',tag:'attack-protocol',tag:'paranoia-level/1',tag:'OWASP_CRS',tag:'capec/1000/210/272',ver:'OWASP_CRS/3.3.4',severity:'CRITICAL',setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'""}
panic: invalid WAF config: failed to compile rule (error parsing regexp: invalid or unsupported Perl syntax: (?<): FILES_NAMES|FILES "@rx (?<!&(?:[aAoOuUyY]uml)|&(?:[aAeEiIoOuU]circ)|&(?:[eEiIoOuUyY]acute)|&(?:[aAeEiIoOuU]grave)|&(?:[cC]cedil)|&(?:[aAnNoO]tilde)|&(?:amp)|&(?:apos));|['"=]" "id:920120,phase:2,block,t:none,t:urlDecodeUni,msg:'Attempted multipart/form-data bypass',logdata:'%{MATCHED_VAR}',tag:'application-multi',tag:'language-multi',tag:'platform-multi',tag:'attack-protocol',tag:'paranoia-level/1',tag:'OWASP_CRS',tag:'capec/1000/210/272',ver:'OWASP_CRS/3.3.4',severity:'CRITICAL',setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'"

I configured audit log like this:
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus "^(?:(5|4)(0|1)[0-9])$"
SecAuditLogParts ABIJDEFHZ
SecAuditLogType Serial
SecAuditLog /var/log/corazaaudit.log
But it does not write any log to that file (/var/log/corazaaudit.log), it just show all audit log on screen. How can I write audit log to the file?

coraza-spoa sometime show this warning:
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16858: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16858: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16860: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16860: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16864: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16864: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16866: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16866: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16878: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16878: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16880: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16880: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16886: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16886: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16892: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16892: write: broken pipe
INFO[0000] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16896: write: broken pipe
WARN[0000] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16896: write: broken pipe
INFO[0001] spoe session ending with: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16898: write: broken pipe
WARN[0001] spoe: error handling connection: write frame: write tcp <IP_ADDRESS>:9000-><IP_ADDRESS>:16898: write: broken pipe
How can I fix this?

coraza service took too high memory, over 80%. how can I reduce this?

After running coraza-spoa, backend log shows proxy ip instead of public source IP. Can I change this? I prefer showing original public ip in backend log.

that does not solve my problem. my coraza.cfg is:
https://github.com/haproxy/haproxy/blob/master/doc/SPOE.txt
[coraza]
spoe-agent coraza-agent
messages coraza-req coraza-res
option var-prefix coraza
option set-on-error error
timeout hello      100ms
timeout idle       2m
timeout processing 500ms
use-backend coraza-spoa
log global
spoe-message coraza-req
args app=str(haproxy) id=unique-id src-ip=src src-port=src_port dst-ip=dst dst-port=dst_port method=method path=path query=query version=req.ver headers=req.hdrs body=req.body
event on-frontend-http-request
spoe-message coraza-res
args app=str(haproxy) id=unique-id version=res.ver status=status
event on-http-response
Backend log still display proxy LAN IP instead of sourc public IP.
PS: Haproxy show parsing [/etc/haproxy/coraza.cfg:18] : 'args': unknown fetch method 'res.hdrs' so I removed headers=res.hdrs and body=res.body.

Performance issues are probably related to Coraza version, I will create a PR to upgrade it. Other problem you might face, by design, is the transaction ttl cache. A good solution would be to add an option to completely disable response processing, therefor disabling transaction ttl cache.

Can you try with this? https://github.com/corazawaf/coraza-spoa/pull/60 it seems to address many of the existing problems

I'm seeing the same issue after changing my HAProxy timeouts. I've changed the HAProxy settings back to what I thought are the defaults but still seeing the same issue.
Could someone clarify exactly which settings in HAProxy should correlate with which settings in the SPOA config?
I'm running in Docker and using an image built in the last week.

I've run the latest release since a week and I've not seen any more crashes. Maybe we can close this one?

Awesome.
On Mon, 28 Aug 2023, 08:39 Anders Smith, @.***> wrote:

I've run the latest release since a week and I've not seen any more
crashes. Maybe we can close this one?
—
Reply to this email directly, view it on GitHub
https://github.com/corazawaf/coraza-spoa/issues/56#issuecomment-1695116573,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXOYARL2QSPQ6NP6EAVEODXXQ4KNANCNFSM6AAAAAAVMIR5GE
.
You are receiving this because you were mentioned.Message ID:
@.***>